CN113872793A - Method, device, medium and equipment for remotely capturing log - Google Patents

Method, device, medium and equipment for remotely capturing log Download PDF

Info

Publication number
CN113872793A
CN113872793A CN202110921710.8A CN202110921710A CN113872793A CN 113872793 A CN113872793 A CN 113872793A CN 202110921710 A CN202110921710 A CN 202110921710A CN 113872793 A CN113872793 A CN 113872793A
Authority
CN
China
Prior art keywords
remote
remote equipment
equipment
log
fault
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110921710.8A
Other languages
Chinese (zh)
Inventor
陈海波
金果
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Deep Blue Technology Shanghai Co Ltd
Original Assignee
Deep Blue Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Deep Blue Technology Shanghai Co Ltd filed Critical Deep Blue Technology Shanghai Co Ltd
Priority to CN202110921710.8A priority Critical patent/CN113872793A/en
Publication of CN113872793A publication Critical patent/CN113872793A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/22Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method, a device, a medium and equipment for remotely capturing logs, which are applied to local equipment, wherein the local equipment is in communication connection with remote equipment, and the method for remotely capturing logs comprises the following steps: acquiring prompt information of the remote equipment; wherein the prompt is issued by the remote device based on a fault log generated by the remote device, the fault log determined by the remote device; according to the prompt message and the address configuration file of the remote equipment, executing the operation of matching the remote equipment; wherein the address configuration file is stored at the local device; and when the matching of the remote equipment is successful, acquiring the fault log. The method and the device can solve the problem that in the prior art, time is extremely consumed due to the fact that the fault needs to be searched after all logs need to be captured.

Description

Method, device, medium and equipment for remotely capturing log
Technical Field
The application relates to the technical field of computers, in particular to a method, a device, a medium and equipment for remotely capturing logs.
Background
The logs record various important log events of each system in the network, and the running state, network attack, error abnormality and the like of the system can be known according to the logs. With the rise of artificial intelligence, an artificial intelligence platform is usually deployed at a remote end, and log checking needs to be carried out on site, so that management and maintenance of remote equipment are inconvenient.
Disclosure of Invention
The present application is proposed to solve the above-mentioned technical problems. The embodiment of the application provides a method, a device, a medium and equipment for remotely capturing logs, and can solve the problem that in the prior art, time is consumed for searching for a fault after all logs are captured.
According to one aspect of the application, a remote log capturing method is provided, and is applied to local equipment, the local equipment is in communication connection with remote equipment, and the remote log capturing method includes: acquiring prompt information of the remote equipment; wherein the prompt is issued by the remote device based on a fault log generated by the remote device, the fault log determined by the remote device; according to the prompt message and the address configuration file of the remote equipment, executing the operation of matching the remote equipment; wherein the address configuration file is stored at the local device; and when the matching of the remote equipment is successful, acquiring the fault log.
In an embodiment, said obtaining said fault log when matching said remote device is successful comprises: when the remote equipment is matched successfully, a fault image acquisition instruction is sent to the remote equipment; and acquiring the fault image from the remote device; and the remote equipment intercepts the video stream acquired by the remote equipment according to the fault image acquisition instruction to obtain the fault image.
In one embodiment, said obtaining said fault image from said remote device comprises: acquiring a plurality of frame images in a video stream acquired by the remote equipment; the multi-frame image comprises an image which is acquired within preset time after the remote equipment receives the fault image acquisition instruction.
In an embodiment, before the obtaining of the prompt information of the remote device, the remote log crawling method further includes: performing connection operation with the remote equipment for multiple times within a preset period; after the connection operation with the remote device is performed for multiple times in the preset period, the remote log capturing method further includes: and when the multiple connection operations with the remote equipment fail within the preset period, determining that the remote equipment fails.
In an embodiment, the performing, within a preset period, a plurality of connection operations with the remote device further includes: and when the connection with the remote equipment fails, recording the address information of the remote equipment.
In an embodiment, the connecting with the remote device for a plurality of times within a preset period includes: starting a thread to connect the remote equipment according to the address configuration file of the remote equipment; and when the thread can not be connected with the remote equipment, replacing the thread for reconnection.
In one embodiment, the remote log scraping method further comprises: and when all threads cannot be connected with the remote equipment, sending an equipment fault prompt signal.
In an embodiment, before the obtaining of the prompt information of the remote device, the remote log crawling method further includes: and recording the address information and the configuration information of the remote equipment to form an address configuration file.
In an embodiment, the performing, according to the prompt message and the address configuration file of the remote device, an operation of matching the remote device includes: obtaining the login authority of the remote equipment according to the prompt message; and executing the operation of matching the remote equipment according to the address configuration file.
In an embodiment, the remote device comprises an edge computing platform or an edge computing device.
According to another aspect of the present application, there is provided a remote log crawling apparatus, including: the acquisition prompting module is used for acquiring prompting information of the remote equipment; wherein the prompt is issued by the remote device based on a fault log generated by the remote device, the fault log determined by the remote device; the matching module is used for executing the operation of matching the remote equipment according to the prompt information and the address configuration file of the remote equipment; wherein the address configuration file is stored at the local device; and the log obtaining module is used for obtaining the fault log when the remote equipment is matched successfully.
In one embodiment, the get log module includes: the sending instruction unit is used for sending a fault image acquisition instruction to the remote equipment when the remote equipment is matched successfully; and an image acquisition unit for acquiring the fault image from the remote device; and the remote equipment intercepts the video stream acquired by the remote equipment according to the fault image acquisition instruction to obtain the fault image.
In one embodiment, the acquiring the image unit includes: the image acquisition subunit is used for acquiring a plurality of frames of images in the video stream acquired by the remote equipment; the multi-frame image comprises an image which is acquired within preset time after the remote equipment receives the fault image acquisition instruction.
In one embodiment, the obtaining prompt module includes: the connection unit is used for performing connection operation with the remote equipment for multiple times in a preset period; wherein, the remote log grabbing device further comprises: and the determining module is used for determining that the remote equipment fails when the multiple connection operations with the remote equipment fail within the preset period.
In one embodiment, the connection unit includes: and the recording subunit is used for recording the address information of the remote equipment when the connection with the remote equipment fails.
In one embodiment, the connection unit includes: the starting sub-unit is used for starting a thread to connect the remote equipment according to the address configuration file of the remote equipment; and the replacing subunit is used for replacing the thread to reconnect when the thread can not connect the remote equipment.
In one embodiment, the remote log ripping apparatus further includes: and the prompting module is used for sending out an equipment fault prompting signal when all threads cannot be connected with the remote equipment.
In one embodiment, the remote log ripping apparatus further includes: and the forming module is used for recording the address information and the configuration information of the remote equipment and forming an address configuration file.
In one embodiment, the matching module comprises: the login unit is used for acquiring login permission of the remote equipment according to the prompt information; and the operation unit is used for executing the operation of matching the remote equipment according to the address configuration file.
According to another aspect of the present application, a computer-readable storage medium is provided, which stores a computer program for executing the method for remote log capture described in any of the above embodiments.
According to another aspect of the present application, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; the processor is configured to execute the remote log capturing method according to any of the embodiments.
The method, the device, the medium and the equipment for remotely capturing the log can analyze and process data at a remote equipment end by remote equipment, judge a fault by self to form a fault log, search the remote equipment according to the recorded address configuration file of the remote equipment after the local equipment acquires the prompt information sent by the remote equipment according to the fault log, establish connection with the remote equipment in a matching way, log the local equipment in the process of the remote equipment after the local equipment successfully matches the remote equipment, and download the fault log from a directory of the fault log stored in the remote equipment, can directly acquire the fault log from the remote equipment without checking the log of the remote equipment on site, reduce the condition that the storage pressure is improved because the local equipment periodically acquires the log of the remote equipment, reduce the step of retrieving the fault from the log, and improve the processing efficiency of the local equipment, it is more convenient to manage and maintain the remote device.
Drawings
The above and other objects, features and advantages of the present application will become more apparent by describing in more detail embodiments of the present application with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the principles of the application. In the drawings, like reference numbers generally represent like parts or steps.
Fig. 1 is a flowchart illustrating a method for remotely scraping a log according to an exemplary embodiment of the present application.
Fig. 2 is a flowchart illustrating a method for remotely scraping logs according to another exemplary embodiment of the present application.
Fig. 3 is a flowchart illustrating a method for remotely scraping logs according to another exemplary embodiment of the present application.
Fig. 4 is a flowchart illustrating a method for remotely scraping logs according to another exemplary embodiment of the present application.
Fig. 5 is a flowchart illustrating a method for remotely scraping logs according to another exemplary embodiment of the present application.
Fig. 6 is a flowchart illustrating a method for remote log crawling according to another exemplary embodiment of the present application.
Fig. 7 is a flowchart illustrating a method for remotely scraping logs according to another exemplary embodiment of the present application.
FIG. 8 is a schematic diagram illustrating a method for remote log crawling according to an exemplary embodiment of the present application.
Fig. 9 is a schematic structural diagram of a remote log crawling apparatus according to an exemplary embodiment of the present application.
Fig. 10 is a schematic structural diagram of a remote log ripping apparatus according to another exemplary embodiment of the present application.
Fig. 11 is a block diagram of an electronic device provided in an exemplary embodiment of the present application.
Detailed Description
Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be understood that the described embodiments are only some embodiments of the present application and not all embodiments of the present application, and that the present application is not limited by the example embodiments described herein.
Exemplary System
The utility model provides a remote log snatchs equipment, includes local equipment, and local equipment and remote equipment communication are connected, and remote equipment can include marginal computing platform or marginal computing equipment, and remote equipment can directly deploy nvidia jetson platform, utilizes Python technique to call the order and carry out remote operation, and Python's design has characteristics quick, firm, portability, scalability, very is fit for artificial intelligence. The local device and the remote device can read Python calling instructions, so that the local device can directly manage and maintain the remote device through a process of logging in the remote device, the time that a user needs to maintain the remote device on site is saved, the remote device needs to collect data and process the data at a remote end, edge calculation is achieved, meanwhile, the local device can be directly connected with the remote device locally, and the running state, daily events, fault events and the occurrence date of the events of the remote device can be known by reading system logs of the remote device.
For example, the remote device may be configured with a camera, and the remote device is installed at, for example, an airport, a mine, or a mine, and is used for monitoring the on-site environment, or monitoring whether the advertisement content played by the advertisement screen is abnormal, such as the screen is shown to be lost, the power is cut off, or the played content does not meet the expected requirement. The remote equipment has the functions of model analysis and model training, correct samples are input by a user in advance, the remote equipment can directly record, acquire and analyze data on site to obtain a result after comparison and analysis, and the result is directly fed back to the local equipment for the user to check. The user can directly check whether the data stream collected by the remote equipment in the preset period is inconsistent with the expectation or not, and then the data stream inconsistent with the expectation is analyzed to find out the fault reason, or the remote equipment directly feeds back the result to be correct, so that the local equipment is prompted to be abnormal in the set period, samples of other data streams can be set to continuously detect other data streams, and the time for downloading data and analyzing and searching by the user is saved.
The remote equipment can directly judge the fault event by self, the fault log for recording the fault event is stored in the specific directory, the local equipment can directly read the fault log, the process of finding the fault is omitted, the number of data transmission can be reduced, the storage capacity is saved for the local equipment, the remote equipment with the nvidia jetson platform is more convenient to remotely manage and maintain, except that the remote equipment has a hardware fault, a user does not need to check the log on site to manage and maintain the remote equipment, and the time of the user is saved.
Exemplary method
Fig. 1 is a schematic flowchart of a remote log capturing method according to an exemplary embodiment of the present application, and as shown in fig. 1, the remote log capturing method is applied to a local device, and the local device is in communication connection with a remote device, and the remote log capturing method includes:
step 100: acquiring prompt information of remote equipment; wherein the prompt is issued by the remote device based on a fault log generated by the remote device, the fault log being determined by the remote device.
The remote equipment can automatically collect and analyze data to form a fault log, a specific directory is stored in the remote equipment and used for storing the fault log so as to distinguish logs generated by other events, when the fault log is generated in the remote equipment, the remote equipment sends prompt information to the local equipment, and after the local equipment acquires the prompt information of the remote equipment, corresponding measures can be taken.
Step 200: according to the prompt message and the address configuration file of the remote equipment, executing the operation of matching the remote equipment; wherein the address configuration file is stored on the local device.
The local equipment finds the address of the remote equipment sending the prompt information according to the prompt information sent by the remote equipment and the stored address configuration file of the remote equipment, matches the address with the remote equipment, namely, establishes remote control connection with the remote equipment, so that the local equipment can remotely control the remote equipment, and can log in the process of the remote equipment through Python calling script sshpass to capture the log.
Step 300: and when the matching of the remote equipment is successful, acquiring a fault log.
When the local device and the remote device are successfully matched, that is, after the local device obtains the right to operate the remote device and establishes connection with the remote device, the local device can capture a fault log in a specific directory of the remote device for storing the fault log, and the fault log can be transmitted through an ethernet or a data network.
The remote log capturing method provided by the application can analyze and process data at the remote equipment end by the remote equipment, and judges the fault by itself to form a fault log, after the local equipment acquires the prompt information sent by the remote equipment according to the fault log, searching the remote equipment according to the recorded address configuration file of the remote equipment, matching and establishing connection with the remote equipment, logging the local equipment into the process of the remote equipment after matching is successful, the method and the device can directly acquire the fault log from the remote equipment without checking the log of the remote equipment on site, reduce the storage pressure increase caused by periodically acquiring the log of the remote equipment by the local equipment, the steps of retrieving faults from the log are reduced, the processing efficiency of the local equipment is improved, and the remote equipment is managed and maintained more conveniently.
Fig. 2 is a flowchart illustrating a method for remote log crawling according to another exemplary embodiment of the present application, and as shown in fig. 2, step 300 may include:
step 310: and when the matching of the remote equipment is successful, sending a fault image acquisition instruction to the remote equipment.
When the local device is successfully matched with the remote device, namely after the local device is connected with the remote device, the local device can send a fault image acquisition instruction to the remote device, namely the local device can call a Screen command by adopting Python to control the remote device to perform screenshot.
Step 320: acquiring a fault image from remote equipment; and the fault image is obtained by intercepting the video stream acquired by the remote equipment according to the fault image acquisition instruction.
When the local equipment is connected with the remote equipment, the remote equipment usually determines that a fault log exists, so that the local equipment can control the remote equipment to capture a picture, thereby obtaining a fault image when a fault occurs, wherein the fault image can come from a video stream collected by a camera installed on the remote equipment, and the transmission quantity of the whole data stream is directly obtained to be overlarge, so that only one frame or multiple frames of images in the video stream can be captured, and the purposes of rapid transmission and convenient fault finding are achieved.
For example, the remote device is provided with a camera, the remote device is located in public places such as airports, mines or outdoor places, the remote device can play a monitoring role, a user can input a correct sample in advance, the remote device obtains whether the acquired data accords with a result expected by the user by comparing the correct sample with acquired video data and image data, and feeds the result back to the local device, if the result is inconsistent, the local device can log in the process of the remote device to intercept any frames of images of a data stream stored by the remote device, and analyzes the images to find out the reason of the inconsistent result. Or after the local equipment receives the prompt information, the local equipment is matched with the remote equipment to remotely control the remote equipment, a screenshot instruction is sent to the remote equipment, and an image is directly captured from a monitoring picture of the remote equipment at the moment.
Correspondingly, the specific implementation manner of step 320 may be: acquiring a plurality of frame images in a video stream acquired by remote equipment; the multi-frame image comprises an image which is acquired within preset time after the remote equipment receives a fault image acquisition instruction.
The local device may acquire a multi-frame image, for example, the remote device is configured to acquire an advertisement stream, and may acquire the advertisement stream by recording an advertisement screen, and when the advertisement screen is in a screen-splash or power-off state, the time of the screen-splash or power-off state may be determined by using a first abnormal picture and a last abnormal picture in the acquired multi-frame image, so as to determine a failure time period.
Fig. 3 is a flowchart of a remote log crawling method according to another exemplary embodiment of the present application, and as shown in fig. 3, before step 100, the remote log crawling method may further include:
step 400: and performing connection operation with the remote equipment for multiple times in a preset period.
The local equipment and the remote equipment are connected for many times in a preset period, if the connection is successful, the connection is stopped, and if the connection is unsuccessful, the connection is repeatedly carried out with the remote equipment in a certain period.
Correspondingly, the specific implementation manner of step 400 may be: and when the connection operation with the remote equipment fails for a plurality of times within a preset period, determining that the remote equipment fails.
If the connection with the remote device fails repeatedly within the preset period, it can be determined that the remote device has a hardware fault and needs to go to the site manually to check or replace the hardware facility of the remote device, and a single or a small number of connection failures may be the cause of the network fault.
Correspondingly, when the connection with the remote equipment fails, the address information of the remote equipment is recorded.
The method comprises the steps of recording address information of the remote equipment, accurately positioning the remote equipment with failed connection when the remote equipment is connected with a plurality of remote devices, recording the address information of the remote equipment from the time of the failed connection, checking the recorded information after a preset period, and judging that the remote equipment has a fault and needs to arrive at a site for maintenance if the user still cannot be connected with the remote equipment, namely the address information of the remote equipment is still recorded.
Fig. 4 is a flowchart illustrating a method for remote log crawling according to another exemplary embodiment of the present application, and as shown in fig. 4, step 400 may include:
step 410: and starting a thread to connect the remote equipment according to the address configuration file of the remote equipment.
The local device can be connected with a plurality of remote devices, the plurality of devices are connected in a thread concurrent mode, and the local device can start a Python thread to be connected with the remote devices according to the address configuration file of each remote device.
Step 420: when the thread can not connect with the remote device, the thread is replaced and reconnected.
When one thread cannot be connected with the remote equipment, the same thread can be adopted to be repeatedly connected with the remote equipment, and the thread can be replaced to be connected with the remote equipment again, so that the probability of connecting the remote equipment is improved.
Fig. 5 is a flowchart illustrating a method for remote log ripping according to another exemplary embodiment of the present application, where as shown in fig. 5, the method for remote log ripping may further include:
step 600: and when all the threads cannot be connected with the remote equipment, sending an equipment fault prompt signal.
When all the threads in the multiple threads can not be connected with the remote equipment, the problem of network lines can be eliminated, and the hardware of the remote equipment is determined to be in fault, so that an equipment fault prompt signal is sent out to prompt a user that the threads are needed to maintain the remote equipment.
Fig. 6 is a flowchart illustrating a method for remote log ripping according to another exemplary embodiment of the present application, as shown in fig. 6, before step 100, the method for remote log ripping may further include:
step 700: and recording the address information and the configuration information of the remote equipment to form an address configuration file.
When the local device is matched with the remote device, the address configuration file can be directly read and analyzed through a program to obtain the internet protocol address of the remote device, so that the address information and the configuration information can be simply obtained through analysis in the standard format table on the premise of not modifying the program, and when the internet protocol address of the remote device is changed, the address configuration file can be directly adjusted, the coupling degree is reduced, and the use by a user is more convenient.
Fig. 7 is a flowchart illustrating a method for remote log crawling according to another exemplary embodiment of the present application, and as shown in fig. 7, step 200 may include:
step 210: and obtaining the login authority of the remote equipment according to the prompt message.
When the remote device sends prompt information to the local device, the remote device can be granted access (for example, access is set in the form of an account number and a password) to the local device, so that the remote device can log in the process of the remote device to capture logs and send instructions, remotely control the remote device, and manage and maintain the remote device.
Step 220: and executing the operation of matching the remote equipment according to the address configuration file.
After the local device obtains the login authority of the remote device, the operation of matching the remote device can be executed, namely the operation of logging in the remote device can be executed, the connection relation with the remote device is established, and after the local device is successfully matched with the remote device, the local device can remotely control the remote device.
Fig. 8 is a schematic diagram of a remote log capture method according to an exemplary embodiment of the present application, as shown in fig. 8, a local device reads an address configuration file of a remote device and parses the address configuration file (step 910), obtains a network protocol address of a corresponding remote device and opens a thread connection (step 920), determines whether the local device and the remote device are successfully connected (step 930), if the thread connection to the remote device is successfully started, the local device logs into the remote device, and can perform a remote operation on the remote device, for example, obtain a fault log stored in a specific directory in the remote device, or the local device invokes a screen command to make the remote device perform a screen capture operation (step 940), if the thread connection is not successful, the same thread may be adopted to repeatedly connect or a thread is replaced to continue to connect the remote device to determine whether there is a problem in the network connection, if the same thread is repeatedly connected or the thread is changed and the connection cannot be successfully connected with the remote equipment, the fact that the connection of the local equipment is unsuccessful is prompted, and the network protocol address of the remote equipment which cannot be successfully connected is recorded (step 950), so that a user can conveniently check the network protocol address during subsequent inspection.
Exemplary devices
Fig. 9 is a schematic structural diagram of a remote log ripping apparatus according to an exemplary embodiment of the present application, and as shown in fig. 9, the remote log ripping apparatus 8 includes: the acquisition prompting module 81 is used for acquiring prompting information of the remote equipment; the prompt message is sent by the remote equipment based on a fault log generated by the remote equipment, and the fault log is determined by the remote equipment; the matching module 82 is used for executing the operation of matching the remote equipment according to the prompt message and the address configuration file of the remote equipment; wherein the address configuration file is stored in the local device; and an obtain log module 83 for obtaining a fault log when the matching of the remote device is successful.
The remote log capturing device 8 provided by the application can analyze and process data at a remote device end by remote equipment, judge a fault by self to form a fault log, after the local device obtains prompt information sent by the remote device according to the fault log through the obtaining prompt module 81, search the remote device according to a recorded address configuration file of the remote device, match and establish connection with the remote device through the matching module 82, after matching is successful, the local device logs in the process of the remote device, and downloads the fault log from a directory of the fault log stored in the remote device through the obtaining log module 83, can directly obtain the fault log from the remote device, does not need to check the log of the remote device on site, reduces the condition of improving storage pressure because the local device obtains the log of the remote device periodically, and reduces the step of searching the fault from the log, the processing efficiency of the local equipment is improved, and the remote equipment is more convenient to manage and maintain.
Fig. 10 is a schematic structural diagram of a remote log crawling apparatus according to another exemplary embodiment of the present application, and as shown in fig. 10, the log obtaining module 83 includes: a transmission instruction unit 831 for transmitting a failure image acquisition instruction to the remote device when matching of the remote device is successful; and an image acquisition unit 832 for acquiring a failure image from the remote device; and the fault image is obtained by intercepting the video stream acquired by the remote equipment according to the fault image acquisition instruction.
In one embodiment, as shown in FIG. 10, the acquire image unit 832 includes: an acquire image sub-unit 8321 configured to acquire a plurality of frames of images from a video stream acquired by a remote device; the multi-frame image comprises an image which is acquired within preset time after the remote equipment receives a fault image acquisition instruction.
In one embodiment, as shown in fig. 10, the acquiring hint module 81 includes: a connection unit 811 for performing a plurality of connection operations with a remote device within a preset period; wherein, the remote log capturing device 8 further comprises: the determining module 84 is configured to determine that the remote device fails when a plurality of connection operations with the remote device fail within a preset period.
In one embodiment, as shown in fig. 10, the connection unit 811 includes: a recording subunit 8111, configured to record address information of the remote device when the connection with the remote device fails.
In one embodiment, as shown in fig. 10, the connection unit 811 includes: the starting sub-unit 8112 is used for starting a thread to connect with the remote equipment according to the address configuration file of the remote equipment; and the replacing subunit is used for replacing the thread to reconnect when the thread cannot be connected with the remote equipment.
In one embodiment, as shown in fig. 10, the remote log crawling apparatus 8 further includes: the prompt module 85 sends out a device failure prompt signal when all threads cannot connect to the remote device.
In one embodiment, as shown in fig. 10, the remote log crawling apparatus 8 further includes: and a forming module 86, configured to record address information and configuration information of the remote device, and form an address configuration file.
In one embodiment, as shown in fig. 10, the matching module 82 includes: the login unit 821 is used for acquiring login permission of the remote equipment according to the prompt information; and an operation unit 822 for performing an operation of matching the remote device according to the address profile.
Exemplary electronic device
Next, an electronic apparatus according to an embodiment of the present application is described with reference to fig. 11. The electronic device may be either or both of the first device and the second device, or a stand-alone device separate from them, which stand-alone device may communicate with the first device and the second device to receive the acquired input signals therefrom.
FIG. 11 shows a block diagram of an electronic device according to an embodiment of the application.
As shown in fig. 11, the electronic device 10 includes one or more processors 11 and memory 12.
The processor 11 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
Memory 12 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by processor 11 to implement the remote log ripping method of the various embodiments of the present application described above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, etc. may also be stored in the computer-readable storage medium.
In one example, the electronic device 10 may further include: an input device 13 and an output device 14, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
When the electronic device is a stand-alone device, the input means 13 may be a communication network connector for receiving the acquired input signals from the first device and the second device.
The input device 13 may also include, for example, a keyboard, a mouse, and the like.
The output device 14 may output various information including the determined distance information, direction information, and the like to the outside. The output devices 14 may include, for example, a display, speakers, a printer, and a communication network and its connected remote output devices, among others.
Of course, for the sake of simplicity, fig. 11 shows only some of the components of the electronic device 10 relevant to the present application, and components such as buses, input/output interfaces, and the like are omitted. In addition, the electronic device 10 may include any other suitable components depending on the particular application.
The computer program product may be written with program code for performing the operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description has been presented for purposes of illustration and description. Furthermore, the description is not intended to limit embodiments of the application to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (21)

1. A remote log capturing method is applied to local equipment, the local equipment is in communication connection with remote equipment, and the remote log capturing method is characterized by comprising the following steps:
acquiring prompt information of the remote equipment; wherein the prompt is issued by the remote device based on a fault log generated by the remote device, the fault log determined by the remote device;
according to the prompt message and the address configuration file of the remote equipment, executing the operation of matching the remote equipment; wherein the address configuration file is stored at the local device; and
and when the matching of the remote equipment is successful, acquiring the fault log.
2. The method of claim 1, wherein the obtaining the fault log when matching the remote device is successful comprises:
when the remote equipment is matched successfully, a fault image acquisition instruction is sent to the remote equipment; and
acquiring the fault image from the remote device; and the remote equipment intercepts the video stream acquired by the remote equipment according to the fault image acquisition instruction to obtain the fault image.
3. The method of claim 2, wherein the obtaining the fault image from the remote device comprises:
acquiring a plurality of frame images in a video stream acquired by the remote equipment; the multi-frame image comprises an image which is acquired within preset time after the remote equipment receives the fault image acquisition instruction.
4. The method of claim 1, further comprising, before the obtaining the prompt message of the remote device:
performing connection operation with the remote equipment for multiple times within a preset period;
wherein, the connecting operation with the remote device for a plurality of times in a preset period comprises:
and when the multiple connection operations with the remote equipment fail within the preset period, determining that the remote equipment fails.
5. The method according to claim 4, wherein the connecting with the remote device for a plurality of times within a preset period further comprises:
and when the connection with the remote equipment fails, recording the address information of the remote equipment.
6. The method for remotely grabbing logs according to claim 4, wherein the connecting operation with the remote device for a plurality of times in a preset period comprises:
starting a thread to connect the remote equipment according to the address configuration file of the remote equipment;
and when the thread can not be connected with the remote equipment, replacing the thread for reconnection.
7. The method of claim 6, further comprising:
and when all threads cannot be connected with the remote equipment, sending an equipment fault prompt signal.
8. The method of claim 1, further comprising, before the obtaining the prompt message of the remote device:
and recording the address information and the configuration information of the remote equipment to form an address configuration file.
9. The method of claim 1, wherein the performing the operation of matching the remote device according to the hint information and the address profile of the remote device comprises:
obtaining the login authority of the remote equipment according to the prompt message; and
and executing the operation of matching the remote equipment according to the address configuration file.
10. The remote log ripping method of claim 1, wherein the remote device comprises an edge computing platform or an edge computing device.
11. A remote log crawling apparatus, comprising:
the acquisition module is used for acquiring prompt information of the remote equipment; wherein the prompt is issued by the remote device based on a fault log generated by the remote device, the fault log determined by the remote device;
the matching module is used for executing the operation of matching the remote equipment according to the prompt information and the address configuration file of the remote equipment; wherein the address configuration file is stored at the local device; and
and the log obtaining module is used for obtaining the fault log when the remote equipment is successfully matched.
12. The apparatus of claim 11, wherein the means for obtaining a log comprises:
the sending instruction unit is used for sending a fault image acquisition instruction to the remote equipment when the remote equipment is matched successfully; and
an acquisition image unit for acquiring the failure image from the remote device; and the remote equipment intercepts the video stream acquired by the remote equipment according to the fault image acquisition instruction to obtain the fault image.
13. The remote log capture device of claim 11, wherein the means for obtaining an image comprises:
the image acquisition subunit is used for acquiring a plurality of frames of images in the video stream acquired by the remote equipment; the multi-frame image comprises an image which is acquired within preset time after the remote equipment receives the fault image acquisition instruction.
14. The apparatus according to claim 11, wherein the means for obtaining a hint comprises:
the connection unit is used for performing connection operation with the remote equipment for multiple times in a preset period;
wherein, the remote log grabbing device further comprises: and the determining module is used for determining that the remote equipment fails when the multiple connection operations with the remote equipment fail within the preset period.
15. The remote log ripping apparatus of claim 14, wherein the connection unit includes:
and the recording subunit is used for recording the address information of the remote equipment when the connection with the remote equipment fails.
16. The remote log ripping apparatus of claim 14, wherein the connection unit includes:
the starting sub-unit is used for starting a thread to connect the remote equipment according to the address configuration file of the remote equipment;
and the replacing subunit is used for replacing the thread to reconnect when the thread can not connect the remote equipment.
17. The remote log ripping apparatus of claim 16, further comprising:
and the prompting module is used for sending out an equipment fault prompting signal when all threads cannot be connected with the remote equipment.
18. The remote log ripping apparatus of claim 11, further comprising:
and the forming module is used for recording the address information and the configuration information of the remote equipment and forming an address configuration file.
19. The remote log ripping apparatus of claim 11, wherein the matching module includes:
the login unit is used for acquiring login permission of the remote equipment according to the prompt information; and
and the operation unit is used for executing the operation of matching the remote equipment according to the address configuration file.
20. A computer-readable storage medium, storing a computer program for executing the method of claim 1-10.
21. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor configured to perform the method of any of claims 1-10.
CN202110921710.8A 2021-08-11 2021-08-11 Method, device, medium and equipment for remotely capturing log Pending CN113872793A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110921710.8A CN113872793A (en) 2021-08-11 2021-08-11 Method, device, medium and equipment for remotely capturing log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110921710.8A CN113872793A (en) 2021-08-11 2021-08-11 Method, device, medium and equipment for remotely capturing log

Publications (1)

Publication Number Publication Date
CN113872793A true CN113872793A (en) 2021-12-31

Family

ID=78990449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110921710.8A Pending CN113872793A (en) 2021-08-11 2021-08-11 Method, device, medium and equipment for remotely capturing log

Country Status (1)

Country Link
CN (1) CN113872793A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632918A (en) * 2017-08-30 2018-01-26 中国工商银行股份有限公司 Calculate the monitoring system and method for storage device
CN111913867A (en) * 2020-09-07 2020-11-10 京东数字科技控股股份有限公司 Fault feedback method, device, equipment and storage medium
CN112650674A (en) * 2020-12-23 2021-04-13 平安普惠企业管理有限公司 Method for remotely acquiring and debugging webpage log, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632918A (en) * 2017-08-30 2018-01-26 中国工商银行股份有限公司 Calculate the monitoring system and method for storage device
CN111913867A (en) * 2020-09-07 2020-11-10 京东数字科技控股股份有限公司 Fault feedback method, device, equipment and storage medium
CN112650674A (en) * 2020-12-23 2021-04-13 平安普惠企业管理有限公司 Method for remotely acquiring and debugging webpage log, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107688530B (en) Software testing method and device
CN105472417B (en) Method and device for acquiring video player abnormity
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN114077525A (en) Abnormal log processing method and device, terminal equipment, cloud server and system
CN111966465B (en) Method, system, equipment and medium for modifying host configuration parameters in real time
EP3295311A1 (en) Method and system for automating the process of testing of software application
US20210096940A1 (en) Storage medium, information processing method, and information processing apparatus
CN109273045B (en) Storage device online detection method, device, equipment and readable storage medium
US20110090346A1 (en) Remote video device monitoring
CN111934953B (en) Batch test method based on domestic processor computer platform
CN107360036B (en) Network fault positioning method, terminal and server
CN112911283B (en) Smart television testing method and device
CN110134558B (en) Method and device for detecting server
CN111245917B (en) Katalon-based work order entry device and implementation method thereof
KR20120071175A (en) Mobile phone loading web-platform, method for offering log information using the same mobile phone, verification system and method for web-platform
CN113872793A (en) Method, device, medium and equipment for remotely capturing log
CN115514677B (en) Method and system for server dial testing
CN110995538A (en) Network data acquisition method, device, system, equipment and storage medium
CN116302738A (en) Method, system, equipment and storage medium for testing chip
US20050210232A1 (en) System and method for monitoring BIOS messages of remote computers by a local server
CN114095409A (en) Remote detection method, device, equipment and storage medium for terminal equipment fault
CN113010422A (en) Mirror image file testing method and device, electronic equipment and readable storage medium
CN113010187A (en) Application installation method and device and electronic equipment
CN115883822B (en) Method and device for debugging camera of online examination system and storage medium
CN106294060B (en) Operation and maintenance auditing method, device and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20211231