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

By acquiring network device type information and communication interface, and utilizing category discrimination processing and a three-level hook communication design, the accuracy of network device firmware writing is accurately achieved. This solves the problems of low firmware writing efficiency in existing technologies, adapts to the low firmware writing efficiency in existing technologies, and enables rapid updates and accurate writing.

CN119906633BActive Publication Date: 2026-02-10NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411994678.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2026-02-10
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The existing network equipment firmware has low writing efficiency, cannot quickly adapt to changes in customer needs, and requires the deployment of an IP network environment, which leads to extended time.

Method used

By acquiring network device type information, using category discrimination processing and calculation algorithms to determine the communication interface, and writing information to the device firmware via remote network or serial/JTAG port, a three-level hook communication design is established.

Benefits of technology

It improves the accuracy and efficiency of firmware writing for network devices, supports online updates and manual imports, reduces firmware writing time, and adapts to rapidly changing customer needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906633B_ABST
    Figure CN119906633B_ABST
Patent Text Reader

Abstract

The application discloses a kind of information read-write control method and device of network equipment firmware, the method comprises: obtaining network equipment type information;According to the network equipment type information, the communication interface information of network equipment is obtained;According to the communication interface information of network equipment, preset information is written to network equipment firmware.The network equipment type information is obtained, including: obtaining network equipment information;The network equipment information includes device type, device manufacturer, device model;Standard information sequence is sent to network equipment, and the feedback information sequence of network equipment is received;Classify discrimination processing is carried out to the network equipment information and feedback information sequence, and the network equipment type information is obtained.The application mainly solves the problem of the decline of network equipment firmware write efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer science and artificial intelligence, and specifically to a method and apparatus for controlling the reading and writing of firmware information in network devices. Background Technology

[0002] With the development of internet technology, the demand for network equipment has exploded. However, the rapid evolution of technological requirements and frequent changes in network product needs have led to rework issues in equipment production, necessitating network equipment with the ability to be dynamically updated remotely or on-site. Simultaneously, the rapid changes in customer needs place higher demands on the dynamic update capabilities of network equipment.

[0003] Existing firmware upgrade solutions for network devices are mostly based on Layer 3 IP switching, which requires the deployment of an IP network environment. Different devices have different configuration environments and parameters, and it takes a certain amount of time for a network device to go from startup to operation to deployment in an IP network environment. All these factors lead to a decrease in the efficiency of writing network device firmware. Summary of the Invention

[0004] This invention primarily addresses the problem of decreased firmware writing efficiency in network devices. It discloses a method and apparatus for controlling firmware information reading and writing in network devices.

[0005] In a first aspect, this invention discloses a method for controlling information reading and writing in network device firmware, comprising:

[0006] S1, obtain network device type information;

[0007] S2, Based on the network device type information, obtain the communication interface information of the network device;

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

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

[0010] S11, Obtain network device information; the network device information includes device purpose information, device manufacturer, and device model;

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

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

[0013] The process of classifying the network device information and feedback information sequence to obtain network device type information includes:

[0014] The network device information is represented as a network device vector;

[0015] The feedback information sequence is represented as a feedback information vector;

[0016] Obtain the network device standard vector set and the feedback information standard vector set; each vector in the network device standard vector set corresponds to a network device type information; each vector in 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; the row vector of the network device standard matrix is ​​a vector of the network device standard vector set; the row vector of the feedback information standard matrix is ​​a vector of the feedback information standard vector set.

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

[0019] The feedback information vector and the feedback information standard matrix are subjected to a second calculation process to obtain a second difference vector;

[0020] The first and second difference vectors are processed to perform discrimination calculations to obtain category values;

[0021] The network device type information is determined by identifying the row vector in the network device standard matrix whose row number corresponds to the category value.

[0022] The expression for the first calculation is:

[0023]

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

[0025] The expression for the second calculation is:

[0026]

[0027] Among them, b i t is the i-th element of the second difference vector.j Let x be the j-th element of the feedback information vector. ij The element in 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, and N is the length of the first difference vector. This represents the index i corresponding to the maximum value.

[0031] The step of obtaining the communication interface information of the network device based on the network device type information includes:

[0032] Based on the network device type communication interface information set, obtain 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 several network device type information and the corresponding network device communication interface information.

[0034] The step of writing preset information into the network device firmware based on the network device's communication interface information includes:

[0035] By accessing the communication interface of the network device via a remote network, a communication link is established between the host storing preset information and the network device.

[0036] Preset information is written into the firmware of the network device according to the communication link.

[0037] The step of writing preset information into the network device firmware based on the network device's communication interface information includes:

[0038] Based on the communication interface information of the network device, the debug shell interface of the network device firmware is obtained using serial port or JTAG port.

[0039] Preset information is written to the firmware of the network device using the debug shell interface of the network device firmware.

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

[0041] Memory containing 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 read / write control method of the network device firmware.

[0044] In a third aspect, the present invention discloses a computer-storable medium storing computer instructions, wherein the computer instructions, when invoked by a computer, are used to execute the information read / write control method of the network device firmware.

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

[0046] The beneficial effects of this invention are as follows:

[0047] This invention discloses a method and apparatus for controlling the reading and writing of firmware information in network devices, which mainly solves the problem of decreased firmware writing efficiency in network devices.

[0048] This invention obtains network device type information by performing category discrimination processing on the network device information and feedback information sequence, establishes a specialized discrimination model, and extracts the first difference vector and the second difference vector corresponding to the device information and feedback information through a first calculation processing algorithm and a second calculation processing algorithm. Based on this, a discrimination calculation processing algorithm is used to obtain the category value. This fully utilizes the characteristics of various types of data, suppresses the interference of irrelevant data and noise, and improves the accuracy and efficiency of network device type discrimination. Attached Figure Description

[0049] Figure 1 This is a flowchart illustrating the implementation of the method of the present invention;

[0050] Figure 2 This is a schematic diagram of a three-level hook for the system based on the JTAG network device communication interface. Detailed Implementation

[0051] To better understand the content of this invention, an embodiment is provided here.

[0052] Figure 1 This is a flowchart illustrating the implementation of the method of the present invention. Figure 2 This is a schematic diagram of a three-level hook for the system based on the JTAG network device communication interface.

[0053] In a first aspect, this invention discloses a method for controlling information reading and writing in network device firmware, comprising:

[0054] S1, obtain network device type information;

[0055] S2, Based on the network device type information, obtain the communication interface information of the network device;

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

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

[0058] S11, Obtain network device information; the network device information includes device purpose information, device manufacturer, and device model; the device purpose information includes firewalls, routers, switchboards, etc.

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

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

[0061] The process of classifying the network device information and feedback information sequence to obtain network device type information includes:

[0062] The network device information is represented as a network device vector;

[0063] Representing the network device information as a network device vector involves performing text vector conversion processing on the network device information, converting the text information into data information. This can be achieved using the str2num function or a text encoding model, etc.

[0064] The feedback information sequence is represented as a feedback information vector;

[0065] Obtain the network device standard vector set and the feedback information standard vector set; each vector in the network device standard vector set corresponds to a network device type information; each vector in 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; the row vector of the network device standard matrix is ​​a vector of the network device standard vector set; the row vector of the feedback information standard matrix is ​​a vector of the feedback information standard vector set.

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

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

[0069] The feedback information vector and the feedback information standard matrix are subjected to a second calculation process to obtain a second difference vector;

[0070] The first and second difference vectors are processed to perform discrimination calculations to obtain category values;

[0071] The network device type information is determined by identifying the row vector in the network device standard matrix whose row number corresponds to the category value.

[0072] The expression for the first calculation is:

[0073]

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

[0075] The expression for the second calculation is:

[0076]

[0077] Among them, b i t is the i-th element of the second difference vector. j Let x be the j-th element of the feedback information vector. ij The element in 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, and N is the length of the first difference vector. This represents the index i corresponding to the maximum value.

[0081] The step of obtaining the communication interface information of the network device based on the network device type information includes:

[0082] Based on the network device type communication interface information set, obtain 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 several network device type information and the corresponding network device communication interface information.

[0084] The step of writing preset information into the network device firmware based on the network device's communication interface information includes:

[0085] By accessing the communication interface of the network device via a remote network, a communication link is established between the host storing preset information and the network device.

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

[0087] The step of writing preset information into the network device firmware based on the network device's communication interface information includes:

[0088] Based on the communication interface information of the network device, the debug shell interface of the network device firmware is obtained using serial port or JTAG port.

[0089] Write preset information to the network device firmware using the debug shell interface of the network device firmware.

[0090] The process involves writing preset information into the network device firmware based on the network device's communication interface information, supporting two methods: online update and manual import. Online update: Some mainstream network device manufacturers provide online firmware downloads through their official websites, maintaining the firmware through regular updates. Manual import: Supports manual import and maintenance by extracting firmware through device hardware interfaces, such as directly reading and writing data from flash memory or hard drives to extract complete firmware content. Extraction can also be achieved through local cracking methods, such as logging into the device with a known account and password, or gaining access through a local login port.

[0091] The communication interface information includes interface information for services such as HTTP, SSH, Telnet, and FTP.

[0092] The step of writing preset information into the network device firmware based on the network device's communication interface information includes:

[0093] 1. Backlink Communication: Under specific circumstances, this allows communication with a remote system to establish a control channel;

[0094] 2. Command Execution: Executes issued commands without authorization;

[0095] 3. File Upload and Download: Allows uploading and downloading of specific files, which can be further integrated into the complete program;

[0096] The step of writing preset information into the network device firmware based on the network device's communication interface information includes:

[0097] Based on a three-level hooking communication design method, the system adopts a hierarchical hooking structure. The communication port structure contains three hooking modules, such as... Figure 2 As shown:

[0098] The adoption of a three-tiered hook system is determined by actual needs, such as... Figure 2 The analysis proceeds from top to bottom. For the payload to be triggered and executed, the communication interface needs to hook into the operating system kernel. The system chooses the system call table as the means of hooking into the kernel through the communication interface. Therefore, the hook object for level-3 is the system call table in the kernel. The best time to hook into the kernel is when the kernel is just unfolded in memory. Otherwise, once the kernel has reached a certain stage and activated its self-protection mechanism, it will be very difficult to tamper with the kernel. Therefore, the code that operates the kernel unfolding must be hooked. That is, the hook object for level-2 is the kernel image self-extracting code. Since the kernel image self-extracting code is bound to the kernel to form the kernel image, to hook into the kernel image self-extracting code, we must wait until the kernel image is loaded into memory. Therefore, the kernel image loading code needs to be hooked. Thus, the hook object for level-1 is the kernel image loading code.

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

[0100] Memory containing 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 read / write control method of the network device firmware.

[0103] In a third aspect, the present invention discloses a computer-storable medium storing computer instructions, wherein the computer instructions, when invoked by a computer, are used to execute the information read / write control method of the network device firmware.

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

[0105] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.

Claims

1. A method for controlling information reading and writing in network device firmware, characterized in that, include: S1, obtain network device type information; S2, Based on the network device type information, obtain the communication interface information of the network device; S3, Write preset information into the network device firmware according to the communication interface information of the network device; The acquisition of network device type information includes: S11, Obtain network device information; the network device information includes device purpose information, device manufacturer, and device model; S12, send a standard information sequence to the network device and receive a feedback information sequence from the network device; S13, perform category discrimination processing on the network device information and feedback information sequence to obtain network device type information; The process of classifying the network device information and feedback information sequence to obtain network device type information includes: The network device information is represented as a network device vector; representing the network device information as a network device vector involves performing text vector conversion processing on the network device information, converting the text information into data information; The feedback information sequence is represented as a feedback information vector; Obtain the network device standard vector set and the feedback information standard vector set; each vector in the network device standard vector set corresponds to a network device type information; each vector in 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; the row vector of the network device standard matrix is ​​a vector of the network device standard vector set; the row vector of the feedback information standard matrix is ​​a vector of the feedback information standard vector set. A first calculation process is performed on the network device vector and the network device standard matrix to obtain a first difference vector; The feedback information vector and the feedback information standard matrix are subjected to a second calculation process to obtain a second difference vector; The first and second difference vectors are processed to perform discrimination calculations to obtain category values; The network device type information is determined by identifying the row vector in the network device standard matrix whose row number is the category value. The expression for the first calculation is: Among them, a i Let y be the i-th element of the first difference vector. ij Let be the element in the i-th row and j-th column of the network device standards matrix, M be the column dimension of the network device standards matrix, and s be the element in the j-th column of the network device standards matrix. j Let t1 be the j-th element of the network device vector, and t1 be a preset constant factor. The expression for the second calculation is: Among them, b i t is the i-th element of the second difference vector. j Let x be the j-th element of the feedback information vector. ij The element in 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, and N is the length of the first difference vector. This represents the index i corresponding to the maximum value.

2. The network device firmware information read / write control method as described in claim 1, characterized in that, The step of obtaining the communication interface information of the network device based on the network device type information includes: Based on the network device type communication interface information set, obtain the communication interface information of the network device corresponding to the network device type information; The network device type communication interface information set includes several network device type information and the corresponding network device communication interface information.

3. The information read / write control method for network device firmware as described in claim 1, characterized in that, The step of writing preset information into the network device firmware based on the network device's communication interface information includes: By accessing the communication interface of the network device via a remote network, a communication link is established between the host storing preset information and the network device. Preset information is written into the firmware of the network device according to the communication link.

4. The network device firmware information read / write control method as described in claim 1, characterized in that, The step of writing preset information into the network device firmware based on the network device's communication interface information includes: Based on the communication interface information of the network device, the debug shell interface of the network device firmware is obtained using serial port or JTAG port. Preset information is written to the firmware of the network device using the debug shell interface of the network device firmware.

5. A network device firmware information reading and writing control device, characterized in that, The device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the information read / write control method of the network device firmware as described in any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, which, when invoked by a computer, are used to execute the information read / write control method of the network device firmware as described in any one of claims 1 to 4.

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