Information read-write control method and device for network equipment firmware

By obtaining network device type information and communication interface information, efficient writing of network device firmware is achieved, the problem of low firmware writing efficiency in the prior art is solved, and the rapid changes in customer needs are adapted.

CN119906633AActive Publication Date: 2025-04-29NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411994678.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The writing efficiency of existing network equipment firmware is low, and IP network environment is required to be deployed. The device configuration and parameters are different, resulting in a longer firmware writing time.

Method used

By obtaining network device type information, determining its communication interface information, and writing preset information to the firmware using remote network mode or serial port/JTAG mode, dynamic writing and updating is achieved.

Benefits of technology

It improves the writing efficiency of network equipment firmware, reduces the time required for firmware updates, and adapts to the rapid changes in customer needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906633A_ABST
    Figure CN119906633A_ABST
Patent Text Reader

Abstract

The invention discloses an information read-write control method and device for network equipment firmware. The method comprises the following steps: acquiring network equipment type information; acquiring communication interface information of the network equipment according to the network equipment type information; and writing preset information into network equipment firmware according to the communication interface information of the network equipment. The step of acquiring the network equipment type information comprises the following steps: acquiring network equipment information; the network equipment information comprises an equipment type, an equipment manufacturer and an equipment model; sending the standard information sequence to the network equipment, and receiving a feedback information sequence of the network equipment; and performing category discrimination processing on the network equipment information and the feedback information sequence to obtain network equipment type information. The invention mainly solves the problem that the firmware writing efficiency of the network equipment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computers and artificial intelligence, and in particular to a method and device for controlling information reading and writing of firmware of a network device. Background Art

[0002] With the development of Internet technology, the demand for network equipment has exploded. However, due to the rapid development of technical requirements and the frequent changes in network product requirements, the network has brought certain rework problems to equipment production, so network equipment needs to have the ability to dynamically write and update remotely or on-site. At the same time, due to the rapid changes in customer needs, higher requirements are placed on the dynamic update capabilities of network equipment.

[0003] The existing firmware upgrade solutions for network devices are basically based on three-layer IP switching, which requires the deployment of an IP network environment. The configuration environment and parameters of different devices are different, and it takes a certain amount of time for network devices to be started, run, and deployed in an IP network environment. These factors have led to a decrease in the efficiency of writing network device firmware. Summary of the invention

[0004] The present invention mainly solves the problem of decreased writing efficiency of network device firmware and discloses an information reading and writing control method and device of network device firmware.

[0005] In a first aspect of an embodiment of the present invention, a method for controlling information reading and writing of firmware of a network device is disclosed, comprising:

[0006] S1, obtain network device type information;

[0007] S2, acquiring communication interface information of the network device according to the network device type information;

[0008] S3, writing preset information into the network device firmware according to the communication interface information of the network device.

[0009] The obtaining of network device type information includes:

[0010] S11, obtaining network device information; the network device information includes device usage information, device manufacturer, and device model;

[0011] S12, sending a standard information sequence to the network device, and receiving a feedback information sequence from the network device;

[0012] S13, performing category discrimination processing on the network device information and feedback information sequence to obtain network device type information.

[0013] The performing category discrimination processing on the network device information and the feedback information sequence to obtain the network device type information includes:

[0014] Representing the network device information as a network device vector;

[0015] Representing the feedback information sequence as a feedback information vector;

[0016] Acquire a network device standard vector set and a feedback information standard vector set; each vector of the network device standard vector set corresponds to a network device type information; each vector of the feedback information standard vector set corresponds to a network device type information;

[0017] The network device standard vector set and the feedback information standard vector set are represented as a network device standard matrix and a feedback information standard matrix respectively; a row vector of the network device standard matrix is ​​a vector of the network device standard vector set; a row vector of the feedback information standard matrix is ​​a vector of the feedback information standard vector set;

[0018] Performing a first calculation process on the network device vector and the network device standard matrix to obtain a first difference vector;

[0019] Performing a second calculation process on the feedback information vector and the feedback information standard matrix to obtain a second difference vector;

[0020] Performing discriminant calculation processing on the first difference vector and the second difference vector to obtain a category value;

[0021] Determine the network device type information corresponding to the row vector whose row number in the network device standard matrix is ​​the category value as the network device type information.

[0022] The expression of the first calculation process is:

[0023]

[0024] Among them, a i is the i-th element of the first difference vector, y ij is the element in the i-th row and j-th column of the network device standard matrix, M is the column dimension of the network device standard matrix, and s j is the jth element of the network device vector, and t1 is a preset constant factor;

[0025] The expression of the second calculation process is:

[0026]

[0027] Among them, b i is the i-th element of the second difference vector, tj is the jth element of the feedback information vector, x ij is the element of the i-th row and j-th column of the feedback information standard matrix;

[0028] The expression for the discrimination calculation process is:

[0029]

[0030] Where I is the category value, N is the length of the first difference vector, Indicates the subscript i value corresponding to obtaining the maximum value.

[0031] The acquiring, according to the network device type information, the communication interface information of the network device comprises:

[0032] According to the network device type communication interface information set, obtaining the communication interface information of the network device corresponding to the network device type information;

[0033] The network device type communication interface information set includes a plurality of network device type information and corresponding network device communication interface information.

[0034] The step of writing preset information into the network device firmware according to the communication interface information of the network device comprises:

[0035] Accessing the communication interface of the network device through a remote network to establish a communication link between the host storing the preset information and the network device;

[0036] According to the communication link, preset information is written into the firmware of the network device.

[0037] The step of writing preset information into the network device firmware according to the communication interface information of the network device comprises:

[0038] According to the communication interface information of the network device, a debugging shell interface of the network device firmware is obtained by using a serial port or a JTAG port;

[0039] According to the debugging shell interface of the network device firmware, preset information is written into the firmware of the network device.

[0040] According to a second aspect of the present invention, a device for controlling information read and write of firmware of a network device is disclosed, the device comprising:

[0041] A memory storing executable program code;

[0042] a processor coupled to the memory;

[0043] The processor calls the executable program code stored in the memory to execute the information reading and writing control method of the network device firmware.

[0044] According to a third aspect of the present invention, a computer storable medium is disclosed, wherein the computer storable medium stores computer instructions, and when the computer instructions are called by a computer, they are used to execute the information reading and writing control method of the network device firmware.

[0045] According to a fourth aspect of the present invention, an information data processing terminal is disclosed. The information data processing terminal is used to implement the information reading and writing control method of the network device firmware.

[0046] The beneficial effects of the present invention are:

[0047] The invention discloses an information reading and writing control method and device for network device firmware, which mainly solves the problem of decreased writing efficiency of network device firmware.

[0048] The present invention obtains network device type information by performing category discrimination processing on the network device information and feedback information sequence, establishes a special discrimination model, and extracts the first difference vector and the second difference vector corresponding to the device information and the feedback information through the first calculation processing algorithm and the second calculation processing algorithm. On this basis, the discrimination calculation processing algorithm is adopted to obtain the category value, which makes full use of the characteristics of various types of data, suppresses the interference of irrelevant data and noise, and improves the discrimination accuracy and efficiency of the network device type. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 1 is a flow chart for implementing the method of the present invention;

[0050] Figure 2 It is a schematic diagram of the three-level hooking of the system based on the JTAG network device communication interface. DETAILED DESCRIPTION

[0051] In order to better understand the content of the present invention, an embodiment is given here.

[0052] Figure 1 It is a flow chart for implementing the method of the present invention. Figure 2 It is a schematic diagram of the three-level hooking of the system based on the JTAG network device communication interface.

[0053] In a first aspect of an embodiment of the present invention, a method for controlling information reading and writing of firmware of a network device is disclosed, comprising:

[0054] S1, obtain network device type information;

[0055] S2, acquiring communication interface information of the network device according to the network device type information;

[0056] S3, writing preset information into the network device firmware according to the communication interface information of the network device;

[0057] The obtaining of network device type information includes:

[0058] S11, obtaining network device information; the network device information includes device usage information, device manufacturer, and device model; the device usage information includes firewalls, routers, interactive machines, etc.

[0059] S12, sending a standard information sequence to the network device, and receiving a feedback information sequence from the network device;

[0060] S13, performing category discrimination processing on the network device information and feedback information sequence to obtain network device type information;

[0061] The performing category discrimination processing on the network device information and the feedback information sequence to obtain the network device type information includes:

[0062] Representing the network device information as a network device vector;

[0063] The expressing the network device information as a network device vector is to perform text vector conversion processing on the network device information, and convert the text information into data information, which can be achieved by using str2num function or text encoding model.

[0064] Representing the feedback information sequence as a feedback information vector;

[0065] Acquire a network device standard vector set and a feedback information standard vector set; each vector of the network device standard vector set corresponds to a network device type information; each vector of the feedback information standard vector set corresponds to a network device type information;

[0066] The network device standard vector set and the feedback information standard vector set are represented as a network device standard matrix and a feedback information standard matrix respectively; a row vector of the network device standard matrix is ​​a vector of the network device standard vector set; a row vector of the feedback information standard matrix is ​​a vector of the feedback information standard vector set;

[0067] Each vector of the feedback information standard vector set is a feedback sequence corresponding to a standard information sequence of each corresponding network information type;

[0068] Performing a first calculation process on the network device vector and the network device standard matrix to obtain a first difference vector;

[0069] Performing a second calculation process on the feedback information vector and the feedback information standard matrix to obtain a second difference vector;

[0070] Performing discriminant calculation processing on the first difference vector and the second difference vector to obtain a category value;

[0071] The network device type information corresponding to the row vector whose row number is the category value in the network device standard matrix is ​​determined as the network device type information.

[0072] The expression of the first calculation process is:

[0073]

[0074] Among them, a i is the i-th element of the first difference vector, y ij is the element in the i-th row and j-th column of the network device standard matrix, M is the column dimension of the network device standard matrix, and s j is the jth element of the network device vector, and t1 is a preset constant factor;

[0075] The expression of the second calculation process is:

[0076]

[0077] Among them, b i is the i-th element of the second difference vector, t j is the jth element of the feedback information vector, x ij is the element of the i-th row and j-th column of the feedback information standard matrix;

[0078] The expression for the discrimination calculation process is:

[0079]

[0080] Where I is the category value, N is the length of the first difference vector, Indicates the subscript i value corresponding to obtaining the maximum value.

[0081] The acquiring, according to the network device type information, the communication interface information of the network device comprises:

[0082] According to the network device type communication interface information set, obtaining the communication interface information of the network device corresponding to the network device type information;

[0083] The network device type communication interface information set includes a plurality of network device type information and corresponding network device communication interface information.

[0084] The step of writing preset information into the network device firmware according to the communication interface information of the network device comprises:

[0085] Accessing the communication interface of the network device through a remote network to establish a communication link between the host storing the preset information and the network device;

[0086] According to the communication link, preset information is written into the network device firmware.

[0087] The step of writing preset information into the network device firmware according to the communication interface information of the network device comprises:

[0088] According to the communication interface information of the network device, a debugging shell interface of the network device firmware is obtained by using a serial port or a JTAG port;

[0089] According to the debugging shell interface of the network device firmware, preset information is written into the network device firmware.

[0090] According to the communication interface information of the network device, the preset information is written to the network device firmware, and two methods are supported: online update and manual import. Online update method: Some mainstream network equipment manufacturers provide online download of device firmware through their official websites, and implement firmware maintenance through regular updates; Manual import method: Supports manual import and maintenance of firmware extracted through device hardware interfaces, etc. For example: extracting the complete firmware content by directly reading and writing data in flash and hard disk. Extracting through local cracking methods, such as: obtaining after logging into the device with a known account password, or obtaining after obtaining permissions using the local login port.

[0091] The communication interface information includes interface information of http service, ssh service, telnet service, ftp service, etc.

[0092] The step of writing preset information into the network device firmware according to the communication interface information of the network device comprises:

[0093] 1. Backlink communication: communicate with the remote system under certain circumstances to establish a control channel;

[0094] 2. Command execution: unauthorized execution of issued commands;

[0095] 3. File upload and download: upload and download specific files, which can be further embedded into the complete program;

[0096] The step of writing preset information into the network device firmware according to the communication interface information of the network device comprises:

[0097] Based on the three-level hook communication design method, the system adopts a level-by-level hook form in design. There are three hook modules in the communication port structure, such as Figure 2 As shown:

[0098] The adoption of the three-level hooking method is determined by actual needs, such as Figure 2 Analyze from top to bottom. In order for the Payload to be triggered and executed, the communication interface needs to hook the operating system kernel. The system selects the system call table as the communication interface to hook the kernel, so the hook object of level-3 is the system call table in the kernel; the best time to hook the kernel is when the kernel is just expanded in the memory, otherwise when the kernel runs to a certain stage and starts the self-protection mechanism, it will be very difficult to tamper with the kernel, so the code that operates the kernel expansion must be hooked, that is, the hook object of level-2 is the kernel image self-extraction code; because the kernel image self-extraction code is bound to the kernel to form the kernel image, to hook the kernel image self-extraction code, it is necessary to wait until the kernel image is loaded into the memory, so it is necessary to hook the kernel image loading code, so the hook object of level-1 is the kernel image loading code.

[0099] According to a second aspect of the present invention, a device for controlling information read and write of firmware of a network device is disclosed, the device comprising:

[0100] A memory storing executable program code;

[0101] a processor coupled to the memory;

[0102] The processor calls the executable program code stored in the memory to execute the information reading and writing control method of the network device firmware.

[0103] According to a third aspect of the present invention, a computer storable medium is disclosed, wherein the computer storable medium stores computer instructions, and when the computer instructions are called by a computer, they are used to execute the information reading and writing control method of the network device firmware.

[0104] According to a fourth aspect of the present invention, an information data processing terminal is disclosed. The information data processing terminal is used to implement the information reading and writing control method of the network device firmware.

[0105] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A method for controlling information reading and writing of network device firmware, characterized in that: include: S1, obtain network device type information; S2, acquiring communication interface information of the network device according to the network device type information; S3, writing preset information into the network device firmware according to the communication interface information of the network device.

2. The information reading and writing control method of network device firmware according to claim 1, characterized in that: The obtaining of network device type information includes: S11, obtaining network device information; the network device information includes device usage information, device manufacturer, and device model; S12, sending a standard information sequence to the network device, and receiving a feedback information sequence from the network device; S13, performing category discrimination processing on the network device information and feedback information sequence to obtain network device type information.

3. The information reading and writing control method of network device firmware according to claim 2, characterized in that: The performing category discrimination processing on the network device information and the feedback information sequence to obtain the network device type information includes: Representing the network device information as a network device vector; Representing the feedback information sequence as a feedback information vector; Acquire a network device standard vector set and a feedback information standard vector set; each vector of the network device standard vector set corresponds to a network device type information; each vector of the feedback information standard vector set corresponds to a network device type information; The network device standard vector set and the feedback information standard vector set are represented as a network device standard matrix and a feedback information standard matrix respectively; a row vector of the network device standard matrix is ​​a vector of the network device standard vector set; a row vector of the feedback information standard matrix is ​​a vector of the feedback information standard vector set; Performing a first calculation process on the network device vector and the network device standard matrix to obtain a first difference vector; Performing a second calculation process on the feedback information vector and the feedback information standard matrix to obtain a second difference vector; Performing discriminant calculation processing on the first difference vector and the second difference vector to obtain a category value; Determine the network device type information corresponding to the row vector whose row number in the network device standard matrix is ​​the category value as the network device type information.

4. The information reading and writing control method of network device firmware according to claim 3, characterized in that: The expression of the first calculation process is: Among them, a i is the i-th element of the first difference vector, y ij is the element in the i-th row and j-th column of the network device standard matrix, M is the column dimension of the network device standard matrix, and s j is the jth element of the network device vector, and t1 is a preset constant factor; The expression of the second calculation process is: Among them, b i is the i-th element of the second difference vector, t j is the jth element of the feedback information vector, x ij is the element of the i-th row and j-th column of the feedback information standard matrix; The expression for the discrimination calculation process is: Where I is the category value, N is the length of the first difference vector, Indicates the subscript i value corresponding to obtaining the maximum value.

5. The information reading and writing control method of network device firmware according to claim 1, characterized in that: The acquiring, according to the network device type information, the communication interface information of the network device comprises: According to the network device type communication interface information set, obtaining the communication interface information of the network device corresponding to the network device type information; The network device type communication interface information set includes a plurality of network device type information and corresponding network device communication interface information.

6. The information reading and writing control method of network device firmware according to claim 1, characterized in that: The step of writing preset information into the network device firmware according to the communication interface information of the network device comprises: Accessing the communication interface of the network device through a remote network to establish a communication link between the host storing the preset information and the network device; According to the communication link, preset information is written into the firmware of the network device.

7. The information reading and writing control method of network device firmware according to claim 1, characterized in that: The step of writing preset information into the network device firmware according to the communication interface information of the network device comprises: According to the communication interface information of the network device, using the serial port or JTAG port method, obtain the debugging shell interface of the network device firmware; According to the debugging shell interface of the network device firmware, preset information is written into the firmware of the network device.

8. An information read and write control device for network device firmware, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the information reading and writing control method of the network device firmware according to any one of claims 1 to 7.

9. A computer storable medium, characterized in that: The computer storable medium stores computer instructions, and when the computer instructions are called by a computer, they are used to execute the information reading and writing control method of the network device firmware according to any one of claims 1 to 7.

10. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the information reading and writing control method of the network device firmware according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for network equipment identity recognition

    CN103166917A

  • Method of realizing wireless card driver in UEFI (unified extensible firmware interface) layer

    CN103853586A

  • A remote upgrading method based on a DTU download board

    CN109918110A

  • Multi-mode remote operation and maintenance system and method for Internet of Things equipment

    CN117544488A

  • Text data recognition processing method and device based on recognition model

    CN118734839A