USB wireless network card log capturing method and system and user client
The user client establishes a communication connection with the USB wireless network card device, sends log crawling instructions and multiplexes the log data through the network data transmission channel, solving the problem that USB wireless network card log cannot be transmitted, and achieving efficient and accurate log crawling and storage.
Patent Information
- Application Number
- CN202510218551.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, when the USB wireless network card is connected to the user client, the abnormal log cannot be transmitted, resulting in the inability to diagnose communication problems such as unstable connection and degraded data transmission performance.
It provides a USB wireless network card log crawling method, establishes a communication connection with the wireless network card device through the user client, sends log crawling instructions to generate original log data, and multiplexes the encapsulated log data through the network data transmission channel, and performs format conversion and storage and output.
It avoids the problem of log transmission failure caused by log data transmission channel failure, improves the operation efficiency of wireless network card equipment, and supports efficient and accurate capture and storage of log information during operation.
Smart Images

Figure CN120075856A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wireless communication, and particularly relates to a method, a system and a user client for capturing USB wireless network card logs. Background Art
[0002] With the popularization of wireless communication, the USB wireless network card (also known as the CDC ECM device) has become the preferred way for many devices to access the wireless network due to its portability and flexibility. Among them, USB, also known as the Universal Serial Bus, is an input / output interface specification that is widely used in information communication products such as personal computers and mobile devices. Since the wireless network card has only one USB physical interface, when this physical interface is connected to the user client, the connection between the wireless network card and the diagnostic terminal is disconnected. When the user client fails to connect to the external Internet through the wireless network card, it is difficult to diagnose communication problems such as unstable connection and decreased data transmission performance of the wireless network card because the analysis and diagnostic terminal cannot obtain the working logs of the wireless network card.
[0003] Therefore, it is necessary to provide a method, a system and a user client for capturing USB wireless network card logs to solve the above problems existing in the prior art. Summary of the Invention
[0004] In order to solve the problem that abnormal logs cannot be transmitted when the wireless network card device is connected to the user client in the prior art, the present application provides a method, a system and a user client for capturing USB wireless network card logs.
[0005] The method, the system and the user client for capturing USB wireless network card logs provided by the present application adopt the following technical solutions: A method for capturing USB wireless network card logs, which is applied to a user client cooperating with a wireless network card device. The log capturing method includes: After the user client establishes a communication connection with the wireless network card device, it sends a log capturing instruction to the wireless network card device, so that the wireless network card device generates original log data according to the log capturing instruction, encapsulates the original log data according to the network transmission protocol to obtain intermediate log data; The user client receives the intermediate log data from the wireless network card device through the network data transmission channel, unpacks the intermediate log data to obtain the original log data, and stores and outputs the original log data after converting the format.
[0006] Beneficial effects: When a communication connection is established between a conventional user client and a wireless network card device, data can be transmitted through the command data transmission channel, the log data transmission channel, and the network data transmission channel. Among them, the command data transmission channel is used to transmit command data such as instructions, the log data transmission channel is used to transmit log data, and the network data transmission channel is used to transmit network data that complies with the network transmission protocol.
[0007] In this solution, after the user client establishes a communication connection with the wireless network card device, the user client controls the wireless network card device to generate raw log data through a log capture instruction. Subsequently, the encapsulated raw log data is obtained by multiplexing the network data transmission channel, and then stored after format conversion. On the one hand, the log data transmission between the user client and the wireless network card device is carried out by multiplexing the network data transmission channel, avoiding the situation where log data cannot be transmitted in the case of a failure of the log data transmission channel. On the other hand, the user client performs format conversion and storage of the target log data, and the wireless network card device only needs to be responsible for generating the raw log data, and the operation efficiency of the wireless network card device is higher; after receiving the encapsulated raw log data, the user client performs format conversion, storage and sending of the raw log data, so that the analysis and diagnosis terminal can obtain the log data after format conversion in the user client, and then diagnose the failure of the wireless network card device adapted to the user client. Overall, it is beneficial to efficiently and accurately capture the log information during operation.
[0008] Optionally, the establishment of a communication connection between the user client and the wireless network card device includes: After the user client detects the wireless network card device, it reads the identity information of the wireless network card device; after the identity information is verified, the user client displays the candidate data transmission channels mapped between the user client and the wireless network card on the user interaction interface. The user client selects the candidate data transmission channel as the target data transmission channel according to the selection instruction from the user, and establishes a communication connection with the wireless network card device based on the target data transmission channel; among them, the target data transmission channel includes the network data transmission channel.
[0009] Beneficial effects: After the user client detects the wireless network card device, it automatically identifies the identity information of the wireless network card device, and after the identity information is verified, a communication connection is established with the wireless network card device. The target data transmission channel of the specific communication connection is selected according to the selection instruction of the user, that is, the user can choose to establish a command data transmission channel, a network data transmission channel, a log data transmission channel, etc.
[0010] Since the user client needs to add additional structures to monitor the operating status of the command data transmission channel and the log data transmission channel, this case prefers to set the target data transmission channel as the network data transmission channel.
[0011] Optionally, after the user client establishes a communication connection with the wireless network card device, it sends a log capture instruction to the wireless network card device, including: The user client displays a parameter configuration template on the user interface according to the log capture request from the user; based on the target parameters input by the user on the user interface and in combination with the parameter configuration template, it generates a log capture instruction and a heartbeat packet. The user client sends the log capture instruction and the heartbeat packet encapsulated according to the network transmission protocol to the wireless network card device according to the network data transmission channel indicated by the target parameters, so that the wireless network card device can unpack them and execute the log capture instruction according to the heartbeat packet to obtain the original log data.
[0012] Beneficial effects: The user client displays a parameter configuration template according to the log capture request for the user to input target parameters. A part of the target parameters is used to generate a user-customized log capture instruction and a heartbeat packet, and another part of the target parameters is used to indicate the data transmission channel through which the log capture instruction and the heartbeat packet are transmitted to the wireless network card device.
[0013] When the connection between the user client and the wireless network card device is through the network data transmission channel, the data transmission channel indicated by the target parameters is this network data transmission channel, and only the network data transmission channel is supported to operate normally between the user client and the wireless network card device. Since the command transmission channel cannot operate normally at this time, for the transmission of the log capture instruction and the heartbeat packet, it is still carried out through the network data transmission channel. Specifically: the log capture instruction and the heartbeat packet are encapsulated according to the network transmission protocol and then transmitted to the wireless network card device through the network data transmission channel. The wireless network card device unpacks them to obtain the log capture instruction and the heartbeat packet, and then generates the original log data.
[0014] Optionally, the target data transmission channel further includes a command data transmission channel; after the user client establishes a communication connection with the wireless network card device, it sends a log capture instruction to the wireless network card device, including: The user client displays a parameter configuration template on the user interface according to the log capture request from the user; based on the target parameters input by the user on the user interface and in combination with the parameter configuration template, it generates a log capture instruction and a heartbeat packet. The user client sends a log capture instruction and a heartbeat packet to the wireless network card device according to the command data transmission channel indicated by the target parameter, so that the wireless network card device executes the log capture instruction according to the heartbeat packet to obtain the original log data.
[0015] Beneficial effects: When the target data transmission channel includes a command data transmission channel and a network data transmission channel, both the command data transmission channel and the network data transmission channel are operating normally.
[0016] There are two data transmission channels indicated by the target parameter, namely the command data transmission channel and the network data transmission channel. When the data transmission channel indicated by the target parameter is the command data transmission channel, the log capture instruction and the heartbeat packet are directly transmitted through the command data transmission channel. When the data transmission channel indicated by the log parameter is the network data transmission channel, the log capture instruction and the heartbeat packet are encapsulated according to the network transmission protocol and then transmitted through the network data transmission channel.
[0017] Optionally, the user client receives the intermediate log data from the wireless network card device through the network data transmission channel, including: The user client receives the intermediate log data from one end of the network data transmission channel through the first network adapter; the intermediate log data is transmitted into the other end of the network data transmission channel by the wireless network card device through the second network adapter.
[0018] Beneficial effects: When data is transmitted between the wireless network card device and the user client through the network data transmission channel, network adapters need to be used for data encapsulation and decapsulation respectively to ensure the stability of data transmission through the network data transmission channel.
[0019] Optionally, the method further includes: The user client monitors the operation information of the network data transmission channel, and the operation information includes the total data throughput, the channel operation status, and the data transmission speed; The user client displays the operation information on the user interaction interface according to the monitoring request from the user.
[0020] Beneficial effects: The user client can monitor the operation information of the network data transmission channel and display it on the user interaction interface. Compared with the traditional log data transmission channel for transmitting log information, where the user client needs to add additional structures to view the operation status of the log data transmission channel, in this case, the network data transmission channel is directly reused for log transmission, supporting direct monitoring by the user client.
[0021] Optionally, the conversion of the original log data into a format for storage and output includes: The user client performs format conversion processing on the original log data to generate target log data; stores the target log data in a target memory at a specified location for the user client to read and display the target log data from the target memory according to a viewing request from the user. The user client outputs the target log data and an operation instruction from the user to an analysis and diagnosis terminal for the analysis and diagnosis terminal to perform corresponding operations on the target log data according to the operation instruction, where the operation instruction includes a viewing instruction, an analysis instruction, and a diagnosis instruction.
[0022] Beneficial effects: After receiving the intermediate log data, the user client unpacks it to obtain the original log data, and then converts the format of the original log data into a more easily processed format for storage and reading. The user client supports the user to read the target log data through a viewing request and display it on the user interaction interface, that is, the user can view the content corresponding to the target log data stored in the user client through the user interaction interface at any time. The user client can also send the target log data to the analysis and diagnosis terminal for the analysis and diagnosis terminal to perform log viewing, log analysis, and fault diagnosis based on the log.
[0023] The present invention also provides a user client for cooperating with a wireless network card device, and the user client includes: A first sending unit for sending a log capture instruction to the wireless network card device after establishing a communication connection between the user client and the wireless network card device for the wireless network card device to generate original log data according to the log capture instruction. A first receiving unit for receiving intermediate log data from the wireless network card device through a network data transmission channel and sending it to the log processing unit after establishing a communication connection between the user client and the wireless network card device, where the intermediate log data is encapsulated by the wireless network card device for the original log data according to a network transmission protocol. A log processing unit for unpacking the intermediate log data to obtain the original log data and performing format conversion processing on the original log data to generate target log data. A log storage unit for storing the target log data in a target memory at a specified location. An output unit for outputting the target log data.
[0024] Beneficial effects: After a communication connection is established between the user client and the wireless network card device, the log data transmission between the user client and the wireless network card device multiplexes the network data transmission channel, avoiding the situation where log data cannot be transmitted in case of a failure of the log data transmission channel. The user client performs format conversion and storage of the target log data, and the wireless network card device only needs to be responsible for generating the original log data, so the operating efficiency of the wireless network card device is higher; after receiving the encapsulated original log data, the user client performs format conversion storage and sending of the original log data, and provides the analysis and diagnosis terminal with the log data after format conversion in the user client, so as to diagnose the failure of the wireless network card device adapted to the user client. Overall, it is beneficial to efficiently and accurately capture the log information during operation.
[0025] Optionally, the user client further includes: A log capture control unit, configured to display a parameter configuration template on the user interaction interface according to a log capture request from the user, and generate a log capture instruction according to the input target parameters in combination with the parameter configuration template; After the user client and the wireless network card device establish a communication connection, the first sending unit sends the log capture instruction encapsulated according to the network transmission protocol to the second network adapter of the wireless network card device through the first network adapter via the network data transmission channel; or, after the user client and the wireless network card device establish a communication connection, the first sending unit sends the log capture instruction to the wireless network card device through the command data transmission channel; A log viewing unit, configured to read and display the target log data from the target memory according to a viewing request from the user; The output unit sends the target log data and the operation instructions from the user to the analysis and diagnosis terminal, so that the analysis and diagnosis terminal performs corresponding operations on the target log data according to the operation instructions, and the operation instructions include viewing instructions, analysis instructions, and diagnosis instructions.
[0026] Beneficial effects: The user client displays a parameter configuration template according to the log capture request, configures the corresponding log capture instruction according to the target parameters and sends it to the wireless network card device to control the wireless network card device to generate the original log data; subsequently, the intermediate log data encapsulated by the wireless network card device according to the original log data is obtained through the multiplexed network data transmission channel, and the intermediate log data is unpacked and format-converted into the target log data for storage for the user to view and send to the analysis and diagnosis terminal.
[0027] The present invention further provides a USB wireless network card log capture system, including an analysis and diagnosis terminal, the above-mentioned user client, and the above-mentioned wireless network card device, for implementing the above-mentioned USB wireless network card log capture method.
[0028] Through the above technical solution, after the wireless network card device is inserted, the user client automatically recognizes and establishes a communication connection with the wireless network card device, without manual intervention by the user, improving the operation convenience. The wireless network card device only needs to be responsible for generating the original log data, and the operation efficiency of the wireless network card device is higher. The user client supports directly monitoring the operation information of the network data transmission channel, and can understand the log transmission status without additional new structures. The user client automatically performs format conversion on the original log data to the target log data, and the target log data adopts an easy-to-process format, improving the readability and reusability of the target log information. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a schematic flowchart of the USB wireless network card log capturing method provided by the first embodiment of the present invention; Figure 2 is Figure 1 a schematic flowchart of step 101 in Figure 3 a schematic diagram of the user client displaying the data channels to be selected; Figure 4 is Figure 1 a schematic flowchart of one way of step 102 in Figure 5 a schematic diagram of the parameter configuration template; Figure 6 is Figure 4 a schematic diagram of the interaction between the corresponding user client and the wireless network card device; Figure 7 is Figure 1 a schematic flowchart of another way of step 102 in Figure 8 is Figure 7 a schematic diagram of the interaction between the corresponding user client and the wireless network card device; Figure 9 is Figure 1 a schematic flowchart of step 103 in Figure 10 is Figure 1 a schematic flowchart of step 104 in Figure 11 is a schematic diagram of the modules of the user client provided by the second embodiment of the present invention; Figure 12 is a schematic diagram of the modules of the wireless network card device provided by the third embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein shall have the ordinary meaning as understood by those of ordinary skill in the art in the field to which the present invention pertains. The words such as "including" used herein mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects.
[0031] The first embodiment of the present invention provides a method for capturing USB wireless network card logs, which is applied to a USB wireless network card log capture system as shown in Figure 7 The USB wireless network card log capture system 200 includes a user client 10 and a wireless network card device 20.
[0032] Referring to Figure 1 as shown, the USB wireless network card log capture method includes the following steps: Step 101, the user client establishes a communication connection with the wireless network card device.
[0033] Specifically, the user client 10 can establish a communication connection with the wireless network card device 20 in various ways. It can establish a communication connection with the wireless network card device 20 through a wired communication transmission method (such as a data transmission signal line), or through a wireless communication transmission method, or through an interface communication method such as a USB communication interface to establish a communication connection with the wireless network card device 20.
[0034] In one example, referring to Figure 2 as shown, the user client 10 establishing a communication connection with the wireless network card device 20 includes: S1-1, the user client 10 detects the wireless network card device 20; S1-2, the user client reads the identity information of the wireless network card device 20; S1-3, after the identity information verification passes, the user client 10 displays the candidate data transmission channels mapped between the user client 10 and the wireless network card device 20 on the user interaction interface; S1-4, the user client 10 selects the candidate data transmission channel as the target data transmission channel according to the selection instruction from the user, and the target data transmission channel includes a network data transmission channel; S1-5. The user client 10 establishes a communication connection with the wireless network card device 20 based on the target data transmission channel.
[0035] In S1-1, the user client 10 is in a silent state under normal circumstances and switches to the working state when detecting the wireless network card device 20. There are the following several ways for the user client 10 to detect the wireless network card device 20: Firstly, the user client 10 in the silent state keeps detecting the objects within a preset distance (such as 0.2 m) nearby. According to whether there is a wireless network card device 20 within the range corresponding to the detected preset distance, it is determined whether the wireless network card device 20 is detected. For example, the user client 10 emits an a signal. If the wireless network card device 20 receives the a signal, it will generate a b signal for user feedback. The user client determines whether the wireless network card device 20 is detected according to whether the feedback b signal is received. Another example is that the user client 10 takes pictures of the range within the preset distance nearby. When the picture obtained by taking pictures meets the similarity requirement corresponding to the standard wireless network card device picture after image comparison processing, it is determined that the wireless network card device is detected.
[0036] Secondly, the user client 10 sets a first connector, and the wireless network card device 20 sets a second connector. During application, the second connector of the wireless network card is connected to the first connector. The user client 10 detects the wireless network card device 20 by whether there is a second connector matching the first connector. For example, the first connector is a USB slot, and the second connector is a USB socket. The user client 10 determines whether there is a connected wireless network card device 20 currently by whether a USB socket is detected in the USB slot. Another example is that the first connector is a plug, and the second connector is a socket. The user client 10 determines whether there is a connected wireless network card device 20 currently by whether the plug has been inserted into the socket.
[0037] In S1-2, the user client 10 reads the identity information of the wireless network card device 20. Each wireless network card device 20 has identity information representing its own model and performance. This identity information can be unique or shared by the wireless network card devices 20 with the same performance of the same model and batch. When the user client 10 fails to read the identity information of the wireless network card device 20, it is determined that the wireless network card device 20 is invalid, and the user client 10 issues a warning sound, lights up a warning light, sends a warning message to a preset contact person, etc. for warning.
[0038] In S1-3, when the user client 10 successfully reads the identity information of the wireless network card device 20, the user client 10 verifies the identity information according to the pre-stored identity standard range in itself. When the identity information falls within the identity standard range, the identity verification is determined to be passed. When the identity information is not within the identity standard range, the identity verification is determined to be failed. The user client 10 issues an alarm by means such as sounding an alarm, lighting an alarm lamp, and sending an alarm message to a preset contact. For the sake of distinction, the corresponding alarm behaviors in different cases can be different. Among them, the identity standard range usually indicates the model range of the wireless network card device 20 supported by the user client 10.
[0039] After the identity information of the wireless network card device 20 is verified by the user client 10, the user client 10 maps out the candidate data transmission channels formed between the user client and the wireless network card. There are multiple candidate data channels, and the same candidate data channel can have one or more. The user client displays all the mapped candidate data transmission channels on the user interaction interface. Take Figure 3 the shown user interaction interface as an example. Three candidate data channels are displayed on this user interaction interface. The name of the candidate data channel in the first row is "COM0", indicating the candidate data channel XY USB Serial AT, which belongs to the command transmission channel; the name of the candidate data channel in the second row is "COM1", indicating the candidate data channel XY USB Serial Log, which belongs to the log data transmission channel; the name of the candidate data channel in the third row is "COM2", indicating the candidate data channel USB serialdevice.
[0040] In S1-4, the user client 10 selects a target data transmission channel from these candidate data transmission channels according to the selection instruction from the user. The user's selection instruction can be generated by the user manipulating the user client 10. For example, it is edited by manipulating the keys of the user client 10, generated on the user interaction interface of the user client 10, and directly input to the user client 10 for the user client 10 to collect through a third-party remote control or other means.
[0041] When the user client 10 does not receive a selection instruction, the communication state between the user client 10 and the wireless network card device 20 is maintained. When the candidate data transmission channel indicated by the selection instruction received by the user client does not include a network data transmission channel, the selection instruction is invalidated. When the candidate data transmission channel indicated by the selection instruction received by the user client includes a network data transmission channel, the selection instruction is valid.
[0042] In S1-5, the user client 10 establishes a communication connection with the wireless network card device 20 based on the target data transmission channel. Specifically: When the target data transmission channel includes the command data transmission channel AT, a data connection is established between the user client 10 and the wireless network card device 20 through the command data transmission channel AT, and command instructions can be transmitted between the two parties; when the target data transmission channel includes the log data transmission channel (such as Log), a communication connection is established between the user client 10 and the wireless network card device 20 through the log data transmission channel, and log data can be transmitted between the two parties; when the target data transmission channel includes the network data transmission channel, a communication connection based on the network data transmission channel is established between the user client 10 and the wireless network card device 20, and data packets that meet the network transmission protocol can be transmitted between the two parties through the network adapter.
[0043] After detecting the wireless network card device 20, the user client 10 automatically identifies the identity information of the wireless network card device 20, and after the identity information is verified, a communication connection with the wireless network card device 20 is established. The target data transmission channel of the specific communication connection is selected according to the user's selection instruction, that is, the user can choose to establish a command data transmission channel (AT in Figure 3 ), a network data transmission channel (device in Figure 3 ), a log data transmission channel (Log in Figure 3 ), etc. Since additional structures need to be added to the user client to monitor the operating states of the command data transmission channel and the log data transmission channel, this case prefers to set the target data transmission channel as the network data transmission channel.
[0044] Step 102, the user client sends a log capture instruction to the wireless network card device so that the wireless network card device generates original log data according to the log capture instruction.
[0045] In one example, the log capture instruction can be edited by the user himself. This editing process can be completed outside and then imported into the user client, or directly edited using the user client to obtain the log capture instruction.
[0046] In one example, as shown in reference Figure 4 and Figure 7 : S2-1, the user client 10 displays a parameter configuration template on the user interaction interface according to the log capture request from the user. The log capture request can be input into the user client 10 by the user directly through a third-party device representing his own identity, or input by the user directly manipulating input devices such as buttons on the user client 10, or input by the user through the user display interface on the user client.
[0047] When the user client 10 receives / detects the log capture request, the user client 10 displays the reference on the user interaction interface Figure 5The parameter configuration template shown. In this parameter configuration template, there are a timing confirmation item 50, a time interval setting item 51, an instruction format item 52, an instruction channel control item 53, a command input item 54, a command sending item 55, an email address setting item 56, a capture control item 57, and an email sending control item 58.
[0048] For the timing confirmation item 50 and the time interval setting item 51: The user client 10 generates a heartbeat packet according to the timing confirmation item 50 ( Figure 5 "whether" to time in it) and the time interval setting item 51 ( Figure 5 1000 ms in it), and this heartbeat packet is used to send to the wireless network card device 20. The user client 10 determines the data format of the generated log capture instruction according to the instruction format item ( Figure 5 "whether" Hex in it).
[0049] For the instruction format item 52: The user client 10 determines the way to transmit the log capture instruction to the wireless network card device 20 according to the instruction channel control item ( Figure 5 "whether" AT in it) is that the command data transmission channel (corresponding to Figure 7 and Figure 8 ) or the network data transmission channel (corresponding to Figure 4 and Figure 6 ).
[0050] For the command input item 54 and the command sending item 55: The user client 10 edits the command instructions sent out according to the command input item 54 and the command sending item 55. On the one hand, when the user client 10 is connected to the wireless network card device 20, these command instructions are sent to the wireless network card device 20 to control the wireless network card device 20 to execute the corresponding operations of these command instructions. Among them, the command instructions include the log capture instruction in this example, that is, in this case, the log capture instruction can be edited through the command input item. The command instructions can also be other control instructions for controlling the wireless network card device 20. On the other hand, when the user client 10 is connected to the analysis and diagnosis terminal 30, these command instructions are sent to the analysis and diagnosis terminal 30, such as the operation instructions below (including the query instruction, the analysis instruction, and the diagnosis instruction), to control the analysis and diagnosis device to execute the corresponding operations.
[0051] For the capture control item 57: The user client 10 sends a log capture instruction with the default command content to the wireless network card device 20 according to the capture control item 57. When the content of the log capture instruction changes, a log capture instruction can be generated through the command input item in the previous text, and after this capture control item 57 is triggered, the updated log capture instruction is sent to the wireless network card device 20.
[0052] For the email address setting item 56: The user client 10 according to the email address setting item 56 ( Figure 5In toolman@xinyisemi.com), the email sending control item ( Figure 5 In SEND LOG), sends the target log data stored by itself to the analysis and diagnosis terminal 30 in the form of an email for the analysis and diagnosis terminal 30 to view, analyze, and diagnose the target log data.
[0053] S2-2, the user client 10 generates a log capture instruction and a heartbeat packet based on the target parameters input by the user on the user interaction interface and in combination with the parameter configuration template.
[0054] Among them, in one example, referring to Figure 4 As shown, S2-3, the user client sends the log capture instruction and the heartbeat packet encapsulated according to the network transmission protocol to the wireless network card device according to the network data transmission channel indicated by the target parameters. When the target parameters indicate that the log capture instruction is transmitted through the network data transmission channel, the user client 10 encapsulates the log capture instruction using the network transmission protocol, and then encapsulates the encapsulated log capture instruction and the heartbeat packet to the wireless network card device 20 and puts them into the network data transmission channel after encapsulation. Among them, the encapsulation process of the log capture instruction refers to Figure 6 As shown, first perform log protocol encapsulation outside the log capture instruction, and then continue to perform network transmission protocol encapsulation on the outer layer.
[0055] S2-4, the wireless network card device 20 unpacks and executes the log capture instruction according to the heartbeat packet to obtain the original log data. The wireless network card device 20 obtains the encapsulated heartbeat packet and log capture instruction through the network data transmission channel, and then unpacks them to obtain the heartbeat packet and the log capture instruction. This wireless network card device will only execute the log capture instruction according to the heartbeat packet to obtain the original log information when it receives the heartbeat packet and the log capture instruction.
[0056] When the connection between the user client 10 and the wireless network card device 20 is through the network data transmission channel, the data transmission channel indicated by the target parameters is this network data transmission channel. During execution, it is necessary to encapsulate the log capture instruction and the heartbeat packet according to the network transmission protocol, and then transmit them to the wireless network card device 20 through the network data transmission channel. The wireless network card device 20 unpacks them to obtain the log capture instruction and the heartbeat packet, and then generates the original log data.
[0057] In another example, referring to Figure 7 and Figure 8As shown, when the target parameter indicates that the log capture instruction is transmitted through the command data transmission channel, the target data transmission channel for establishing a communication connection between the user client 10 and the wireless network card device 20 further includes the command data transmission channel AT; the user client 10 sends the log capture instruction and the heartbeat packet to the wireless network card device through the command data transmission channel AT. The wireless network card device 20 directly obtains the heartbeat packet and the log capture instruction from the command data transmission channel, and executes the log capture instruction according to the heartbeat packet to obtain the original log data.
[0058] Step 103, after encapsulating the original log data according to the network transmission protocol, the wireless network card device sends it to the user client through the network data transmission channel.
[0059] Specifically, referring to Figure 9 As shown, the implementation of step 103 includes: S3-1, the wireless network card device 20 encapsulates the original log data according to the network transmission protocol to generate intermediate log data; S3-2, the wireless network card device 20 sends the intermediate log data to one end of the network data transmission channel through the second network adapter 21; S3-3, the user client 10 receives the intermediate log data from the other end of the network data transmission channel through the second network adapter 11.
[0060] Referring to Figure 9 、 Figure 6 and Figure 8 As shown, the wireless network card device 20 encapsulates the original log data to obtain intermediate log data, and then sends the intermediate log data to the user client 10 through the second network adapter 21. The first network adapter 11 of the user client 10 obtains the intermediate log data through the network data transmission channel, and then performs data encapsulation and unpacking, so as to ensure the stability of data transmission through the network data transmission channel.
[0061] Step 104, the user client receives the encapsulated original log data through the network data transmission channel, and stores and outputs the original log data after converting the format.
[0062] Specifically, for the implementation of step 104, referring to Figure 10 As shown includes: S4-1, the user client 10 receives the intermediate log data through the network data transmission channel, unpacks the intermediate log data correspondingly, and obtains the original log data; S4-2, the user client 10 performs format conversion processing on the original log data to generate target log data; S4-3, the user client 10 stores the target log data into a target storage at a designated location, so that the user client 10 reads and displays the target log data from the target storage according to a query request from the user; S4-4, the user client 10 outputs the target log data and the operation instructions from the user to the analysis and diagnosis terminal 30, so that the analysis and diagnosis terminal 30 performs corresponding operations on the target log data according to the operation instructions, and the operation instructions include reference instructions, analysis instructions and diagnosis instructions.
[0063] The user client 10 is equipped with a log processing unit to unpack the intermediate log data to obtain the original log data, organize the original log data, convert the format of the original log data into a format that is easy to process, generate the target log data, and improve the readability and usefulness of the log information in the target log data. After generating the target log data, the user client 10 stores the target log data in the target storage corresponding to the specified position according to the established storage rules. The target storage can be one or more. The access request can be generated by the user manually triggering a button, or it can be generated by the user through a third-party input device, or it can be generated by the user in the user interaction interface of the user client 10. According to the access request, the user client reads the target log data in one or more target storages indicated by the access request and displays it. The display here can be a direct print output, a display through a user interaction interface, a projection display, or a file sent for the user to view, etc. Here, the user client 10 supports a rough view of the target log data.
[0064] In S4-4, the operation instructions include viewing instructions, analysis instructions, and diagnosis instructions. The analysis and diagnosis terminal 30 displays the target log data according to the viewing instruction, analyzes the target log data according to the analysis instruction to obtain the analysis result, and diagnoses the target log data according to the diagnosis instruction to obtain the diagnosis result.
[0065] In addition, the method of this case also has step 105: the user client 10 monitors the operation information of the network data transmission channel, and the operation information includes the total data throughput, the channel operation status and the data transmission speed; the user client 10 displays the operation information on the user interaction interface according to the monitoring request from the user. Compared with the traditional log data transmission channel for transmitting log information, the user client 10 needs to add additional structures to be able to view the operation status of the log data transmission channel. In this case, the network data transmission channel is directly reused for log transmission, and the user client is supported to monitor directly.
[0066] In the method for capturing USB wireless network card logs in this case, the wireless network card device 20 and the user client 10 cooperate with each other. The wireless network card device 20 only needs to be responsible for generating original log data, and the user client 10 performs format conversion processing on the original log data and analyzes and diagnoses the original log data after format conversion processing. By the cooperation between the wireless network card device 20 and the user client 10, the overall operation function remains unchanged, making the operation efficiency of the wireless network card device 20 in this case higher.
[0067] The user client 10 automatically identifies the wireless network card device 20, and the user client 10 automatically connects to the wireless network card device 20. The wireless network card device 20 efficiently captures logs in response to the log capture instruction of the user client 10 to obtain original log data. After the user client 10 performs intelligent log processing (format conversion processing) on the original log data, storage and retrieval enrich the user interaction, realizing fast, accurate capture, conversion and storage of USB wireless network card log information. Moreover, the user client 10 in this case also supports visual display of the target log data generated after format conversion, and stores it at the specified location in the system and sends it by email for subsequent processing.
[0068] The step division of the above various methods is only for clear description. When implemented, they can be combined into one step or some steps can be split into multiple steps. As long as the same logical relationship is included, it is within the protection scope of this patent. Adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of its algorithm and process, are within the protection scope of this patent.
[0069] The second embodiment of the present invention also provides a user client 10, as shown in Figure 11 The user client 10 cooperates with the wireless network card device 20. The user client 10 includes a first network adapter 11, a log capture control unit 12, a first sending unit 13, a first receiving unit 14, a log processing unit 15, a log storage unit 16, a log retrieval unit 17, a network channel monitoring unit 18 and an output unit 19.
[0070] The log capture control unit 12 is used to display a parameter configuration template in the user interaction interface according to the log capture request from the user, and generate a log capture instruction according to the input target parameters in combination with the parameter configuration template; The first sending unit 13, connected to the log capture control unit 12, is used to send a log capture instruction to the wireless network card device 20 through a command data transmission channel after the user client 10 establishes a communication connection with the wireless network card device 20, or cooperate with the first network adapter 11 to send the log capture instruction to the wireless network card device 20 through a network data transmission channel, so that the wireless network card device 20 generates original log data according to the log capture instruction; The first receiving unit 14 is used to cooperate with the first network adapter 11 to receive intermediate log data from the wireless network card device 20 through a network data transmission channel after the user client 10 establishes a communication connection with the wireless network card device 20, and send it to the log processing unit 15, where the intermediate log data is encapsulated by the wireless network card device 20 according to the network transmission protocol for the original log data; The log processing unit 15, connected to the first receiving unit 14, is used to unpack the intermediate log data to obtain the original log data, and perform format conversion processing on the original log data to generate target log data; The log storage unit 16, connected to the log processing unit 15, the log viewing unit 17, and the output unit 19, is used to store the target log data in the target memory at a specified location; The log viewing unit 17, connected to the log storage unit 16, is used to read and display the target log data from the target memory according to a viewing request from the user; The network channel monitoring unit 18 is used to monitor and display the operation information of the data transmission channel after the user client 10 establishes a communication connection with the wireless network card device 20, and the operation information includes the total data throughput, the channel operation status, and the data transmission speed; The output unit 19, connected to the log storage unit 16, is used to send the target log data and operation instructions from the user to the analysis and diagnosis terminal 30, so that the analysis and diagnosis terminal 30 performs corresponding operations on the target log data according to the operation instructions; the operation instructions include a viewing instruction, an analysis instruction, and a diagnosis instruction; Among them, when the operation instruction includes a viewing instruction, the analysis and diagnosis terminal 30 retrieves the target log data from the target memory in the log storage unit 16; when the operation instruction includes an analysis instruction, the analysis and diagnosis terminal 30 reads the target log data from the target memory in the log storage unit 16 and analyzes the target log data; when the operation instruction includes a diagnosis instruction, the analysis and diagnosis terminal 30 reads the target log data from the target memory in the log storage unit 16 and diagnoses the target log data. The data transmission method between the output unit 19 and the analysis and diagnosis terminal 30 supports transmission through email (reference Figure 5 ), a data transmission line, and a port connection.
[0071] The log storage unit 16 includes one or more target memories at different locations. The log storage unit stores the target log data into the target memories according to the preset storage rules. A user interaction interface is set in the specified application of the user client 10. The user interaction interface is displayed after the user authentication is passed. The user interaction interface can be used to display the identity information of the wireless network card device 20 read by the user client 10 itself, can be used to display multiple candidate data transmission channels mapped by the user client 10 for the user to select at least one as the target data transmission channel to establish a communication connection between the user client 10 and the wireless network card device 20, can be used to display a parameter configuration template for the user to edit the target parameters to generate a log capture instruction, can be used for the log viewing unit 17 to display the retrieved target log data, and can be used for the network channel monitoring unit 18 to display the operation information obtained by monitoring the data transmission channel.
[0072] Other implementation details and working methods of the user client 10 disclosed in this application are the same as or similar to those described in the previous USB wireless network card log capture method, and will not be elaborated here.
[0073] The third embodiment of the present invention provides a wireless network card device, as shown in Figure 12 shown. The wireless network card device includes a second network adapter 21, a second receiving unit 22, a second sending unit 23, and a log generation unit 24; The second receiving unit 22 is configured to, after the user client 10 and the wireless network card device 20 establish a communication connection, receive the log capture instruction and the heartbeat packet generated by the user client 10 according to the log capture request through the command data transmission channel or in cooperation with the second network adapter 21 through the network data transmission channel; The log generation unit 24 is connected to the second receiving unit 22 and is configured to execute the log capture instruction according to the heartbeat packet to generate the original log data, and encapsulate the original log data according to the network transmission protocol to obtain the intermediate log data; The second sending unit 23 is connected to the log generation unit 24 and is configured to, after the user client 10 and the wireless network card device 20 establish a communication connection, cooperate with the second network adapter 21 to send the intermediate log data to the user client 10 through the network data transmission channel for the user client 10 to perform format conversion processing on the original log data obtained by unpacking the intermediate log data to generate the target log data and store and send it to the analysis and diagnosis terminal 30.
[0074] In this solution, after the wireless network card device 20 establishes a communication connection with the user client 10, the wireless network card device generates raw log data according to the log capture instruction from the user client 10. Subsequently, the second network adapter 21 encapsulates the raw log data according to the network transmission protocol to obtain intermediate log data, and then sends the intermediate log data to the user client 10 through the network data transmission channel for the user client 10 to unpack, perform format conversion, store, and send to the analysis and diagnosis terminal 30.
[0075] The wireless network card device 20 cooperates with the user client 10 above. The wireless network card device 20 only needs to be responsible for generating raw log data, and the user client 10 performs format conversion processing on the raw log data, and analyzes and diagnoses the raw log data after format conversion processing. The cooperation between the wireless network card device 20 and the user client 10 ensures that the overall operation function remains unchanged. The wireless network card device 20 has higher operating efficiency, which is overall beneficial to efficiently and accurately capture log information during operation.
[0076] The log transmission between the wireless network card device 20 and the user client 10 is through multiplexing the network data transmission channel, avoiding the situation where log transmission cannot be performed in the case of a log transmission channel failure, and also facilitating the user client 10 to understand the operation of log transmission by monitoring the network data transmission channel.
[0077] Other implementation details and working methods of the wireless network card device 20 disclosed in this application are the same as or similar to the USB wireless network card log capture method described above, and will not be elaborated here.
[0078] The present invention also provides a USB wireless network card log capture system, including an analysis and diagnosis terminal 30, the above-mentioned user client 10, and the above-mentioned wireless network card device 20, for implementing the above-mentioned USB wireless network card log capture method.
[0079] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of mutual distinction and do not limit the protection scope of the present invention. The specific working processes of the units and modules in the above-mentioned system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0080] Although the embodiments of the present invention have been described in detail above, it is obvious to those skilled in the art that various modifications and changes can be made to these embodiments. However, it should be understood that such modifications and changes are all within the scope and spirit of the present invention described in the claims. Moreover, the present invention described herein can have other embodiments and can be implemented or realized in various ways. It should be noted that in the specific description of these embodiments, for the sake of concise description, this specification cannot describe all features of the actual embodiments in detail. Without departing from the spirit and scope of the present invention, those skilled in the art can modify and replace the embodiments of the present invention, and the obtained embodiments are also within the protection scope of the present invention.
Claims
1. A USB wireless network card log capture method, characterized in that: Applied to a user client that cooperates with a wireless network card device, the log capture method includes: After the user client establishes a communication connection with the wireless network card device, the user client sends a log capture instruction to the wireless network card device, so that the wireless network card device generates original log data according to the log capture instruction, and encapsulates the original log data according to the network transmission protocol to obtain intermediate log data; The user client receives the intermediate log data from the wireless network card device through a network data transmission channel, unpacks the intermediate log data to obtain the original log data, and converts the format of the original log data before storing and outputting it.
2. The USB wireless network card log capture method according to claim 1, characterized in that: The user client establishes a communication connection with the wireless network card device, including: After detecting the wireless network card device, the user client reads the identity information of the wireless network card device; after the identity information is verified, the user client displays the selected data transmission channel formed by the mapping between the user client and the wireless network card on the user interaction interface; The user client selects the candidate data transmission channel as the target data transmission channel according to the selection instruction from the user, and establishes a communication connection based on the target data transmission channel with the wireless network card device; wherein the target data transmission channel includes a network data transmission channel.
3. The USB wireless network card log capture method according to claim 2, characterized in that: After the user client establishes a communication connection with the wireless network card device, a log capture instruction is sent to the wireless network card device, including: The user client displays a parameter configuration template on a user interaction interface according to a log capture request from the user; generates a log capture instruction and a heartbeat packet based on the target parameters input by the user on the user interaction interface and in combination with the parameter configuration template; The user client sends the log capture instruction and heartbeat packet encapsulated according to the network transmission protocol to the wireless network card device according to the network data transmission channel indicated by the target parameter, so that the wireless network card device can unpack and execute the log capture instruction according to the heartbeat packet to obtain the original log data.
4. The USB wireless network card log capture method according to claim 2, characterized in that: The target data transmission channel also includes a command data transmission channel; After the user client establishes a communication connection with the wireless network card device, a log capture instruction is sent to the wireless network card device, including: The user client displays a parameter configuration template on a user interaction interface according to a log capture request from the user; generates a log capture instruction and a heartbeat packet based on the target parameters input by the user on the user interaction interface and in combination with the parameter configuration template; The user client sends a log capture instruction and a heartbeat packet to the wireless network card device according to the command data transmission channel indicated by the target parameter, so that the wireless network card device executes the log capture instruction according to the heartbeat packet to obtain the original log data.
5. The USB wireless network card log capture method according to claim 2 or 3, characterized in that: The user client receives the intermediate log data from the wireless network card device through the network data transmission channel, including: The user client receives the intermediate log data from one end of the network data transmission channel through the first network adapter; the intermediate log data is transmitted from the wireless network card device to the other end of the network data transmission channel through the second network adapter.
6. The USB wireless network card log capture method according to claim 1, characterized in that: The method further comprises: The user client monitors the operation information of the network data transmission channel, wherein the operation information includes the total data throughput, the channel operation status and the data transmission speed; The user client displays the operation information on a user interaction interface according to a monitoring request from the user.
7. The USB wireless network card log capture method according to claim 5, characterized in that: The converting the format of the original log data into storage and outputting the format includes: The user client performs format conversion processing on the original log data to generate target log data; stores the target log data into a target storage at a specified location, so that the user client can read and display the target log data from the target storage according to a query request from the user; The user client outputs the target log data and the operation instructions from the user to the analysis and diagnosis terminal, so that the analysis and diagnosis terminal performs corresponding operations on the target log data according to the operation instructions, and the operation instructions include viewing instructions, analysis instructions and diagnosis instructions.
8. A user client, used to cooperate with a wireless network card device, characterized in that: The user client comprises: A first sending unit, configured to send a log capture instruction to the wireless network card device after the user client establishes a communication connection with the wireless network card device, so that the wireless network card device generates original log data according to the log capture instruction; A first receiving unit is used to receive intermediate log data from the wireless network card device through a network data transmission channel after the user client establishes a communication connection with the wireless network card device, and send the intermediate log data to the log processing unit, wherein the intermediate log data is the original log data encapsulated by the wireless network card device according to the network transmission protocol; The log processing unit is used to unpack the intermediate log data to obtain the original log data, and perform format conversion processing on the original log data to generate target log data; A log storage unit, used for storing the target log data into a target storage at a specified location; An output unit is used to output the target log data.
9. The user client according to claim 8, characterized in that: The user client further includes: A log capture control unit, used to display a parameter configuration template on a user interaction interface according to a log capture request from a user, and generate a log capture instruction according to an input target parameter combined with the parameter configuration template; After the user client establishes a communication connection with the wireless network card device, the first sending unit sends the log capture instruction encapsulated according to the network transmission protocol to the second network adapter of the wireless network card device through the first network adapter through the network data transmission channel; or, after the user client establishes a communication connection with the wireless network card device, the first sending unit sends the log capture instruction to the wireless network card device through the command data transmission channel; A log review unit, configured to read and display the target log data from the target storage according to a review request from a user; The output unit sends the target log data and an operation instruction from a user to the analysis and diagnosis terminal, so that the analysis and diagnosis terminal performs a corresponding operation on the target log data according to the operation instruction, wherein the operation instruction includes a review instruction, an analysis instruction, and a diagnosis instruction.
10. A USB wireless network card log capture system, characterized in that: It comprises the user client described in any one of claims 8-9, a wireless network card device cooperating with the user client, and an analysis and diagnosis terminal cooperating with the user client, so as to implement the USB wireless network card log capture method described in any one of claims 1-7.