CN114020500A - Method, server and equipment for acquiring equipment fault information - Google Patents

Method, server and equipment for acquiring equipment fault information Download PDF

Info

Publication number
CN114020500A
CN114020500A CN202111197451.5A CN202111197451A CN114020500A CN 114020500 A CN114020500 A CN 114020500A CN 202111197451 A CN202111197451 A CN 202111197451A CN 114020500 A CN114020500 A CN 114020500A
Authority
CN
China
Prior art keywords
equipment
information
log file
fault
server
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
CN202111197451.5A
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.)
Mobai Beijing Information Technology Co Ltd
Original Assignee
Mobai Beijing Information Technology 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 Mobai Beijing Information Technology Co Ltd filed Critical Mobai Beijing Information Technology Co Ltd
Priority to CN202111197451.5A priority Critical patent/CN114020500A/en
Publication of CN114020500A publication Critical patent/CN114020500A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a method, a server and equipment for acquiring equipment fault information, wherein the method comprises the following steps: the method comprises the steps that a server obtains first equipment identification information of first equipment, wherein the first equipment is identified as equipment with equipment failure; the server sends a log file uploading instruction to the first equipment according to the first equipment identification information; the first equipment responds to the log file uploading instruction, a first log file generated according to a set first equipment fault log generation rule is uploaded to the server, and information of equipment faults existing in the first equipment is recorded in the first log file; and the server acquires first equipment fault information corresponding to the first equipment according to the log file, wherein the first equipment fault information comprises equipment fault information existing in the first equipment.

Description

Method, server and equipment for acquiring equipment fault information
Technical Field
The embodiment of the disclosure relates to the technical field of communication, and in particular relates to a method, a server and equipment for acquiring equipment fault information.
Background
For the on-line equipment which is already put into operation, the equipment can have faults, so that the normal use of the equipment is influenced. As such, for a device having a failure, it is necessary to acquire device failure information thereof.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a new technical solution for acquiring device failure information.
According to a first aspect of the present disclosure, there is provided a method for acquiring device failure information, including: the method comprises the steps that a server obtains first equipment identification information of first equipment, wherein the first equipment is identified as equipment with equipment failure; the server sends a log file uploading instruction to the first equipment according to the first equipment identification information; the first equipment responds to the log file uploading instruction, a first log file generated according to a set first equipment fault log generation rule is uploaded to the server, and information of equipment faults existing in the first equipment is recorded in the first log file; and the server acquires first equipment fault information corresponding to the first equipment according to the first log file, wherein the first equipment fault information comprises equipment fault information existing in the first equipment.
Optionally, the obtaining, by the server, first device fault information corresponding to the first device according to the first log file includes: and the server extracts information corresponding to the keyword in the first log file according to the set keyword to obtain first equipment fault information corresponding to the first equipment.
Optionally, the keywords include: at least one of a keyword for error reporting, a keyword for warning.
Optionally, before the server obtains the first device identification information of the first device, the method further includes: the method comprises the steps that a test device obtains second equipment identification information of second equipment, the equipment type of the second equipment is the same as that of first equipment, the second equipment is equipment with set faults, and the test device is connected with the second equipment through a physical line; the testing device acquires a second log file corresponding to the second equipment through the physical line according to the second equipment identification information, and acquires a third log file uploaded to the server by the second equipment from the server; the second log file records the information of the set fault, and the third log file is generated by the second equipment according to a set second equipment fault log generation rule; and the testing device acquires the first equipment fault log generation rule according to the second log file and the third log file.
Optionally, the obtaining, by the testing apparatus, the first device fault log generation rule according to the second log file and the third log file includes: the testing device obtains target information corresponding to the set fault according to the second log file; the testing device obtains second equipment fault information corresponding to the second equipment according to the third log file; the testing device detects whether the second equipment fault information comprises the target information; and the testing device adjusts the second equipment fault log generation rule to obtain the first equipment fault log generation rule under the condition that the second equipment fault information does not include the target information.
Optionally, the detecting, by the testing apparatus, whether the second device failure information includes the target information includes: the testing device detects whether the information corresponding to the timestamp in the third log file comprises the target information according to the timestamp corresponding to the target information in the second log file; wherein the second device failure information does not include the target information, including: a case where information in the third log file corresponding to the time stamp does not include the target information.
Optionally, the obtaining, by the testing device, target information corresponding to the set fault according to the second log file includes: the testing device extracts each first timestamp and information corresponding to the first timestamp in the second log file according to the second log file to obtain third equipment fault information, wherein the third equipment fault information comprises the target information, and the information corresponding to each first timestamp is information of one equipment fault existing in the second equipment;
the testing device obtains second device fault information corresponding to the second device according to the third log file, and the method comprises the following steps: the testing device extracts each second timestamp in the third log file and information corresponding to the second timestamp according to the third log file to obtain second equipment fault information, wherein the information corresponding to each second timestamp is information of one equipment fault existing in the second equipment;
the detecting, by the testing apparatus, whether the second device failure information includes the target information includes: aligning the third equipment fault information and the second equipment fault information based on the same timestamp to obtain an information alignment result; and the testing device detects whether the second equipment fault information comprises the target information according to the information alignment result.
Optionally, the first device comprises any one of a smart lock of a bicycle, a smart helmet, and a smart battery.
According to a second aspect of the present disclosure, there is also provided a server comprising a memory for storing a first computer program and a processor; the processor is adapted to execute the first computer program to implement the method according to the first aspect of the present disclosure.
According to a third aspect of the present disclosure, there is also provided a first device comprising a memory for storing a second computer program and a processor; the processor is adapted to execute the second computer program to implement the method according to the first aspect of the present disclosure.
One beneficial effect of the embodiments of the present disclosure is that, a server obtains first device identification information of a first device, where the first device is a device identified as having a device fault; the server sends a log file uploading instruction to the first equipment according to the first equipment identification information; the first equipment responds to the log file uploading instruction, a first log file generated according to a set first equipment fault log generation rule is uploaded to the server, and information of equipment faults existing in the first equipment is recorded in the first log file; and the server acquires first equipment fault information corresponding to the first equipment according to the log file, wherein the first equipment fault information comprises equipment fault information existing in the first equipment. Therefore, the embodiment can realize automatic acquisition of the equipment fault information of the fault equipment, and can provide convenience for maintenance personnel to check the equipment fault information.
Other features of embodiments of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which is to be read in connection with the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the embodiments of the disclosure.
FIG. 1 is a schematic diagram of an implementation environment to which a method of acquiring device failure information according to one embodiment can be applied, and a system component structure that can implement the method;
FIG. 2 is a flow diagram of a method of obtaining device fault information, according to one embodiment;
FIG. 3 is a flow diagram of a method of obtaining device fault information according to another embodiment;
FIG. 4 is a hardware architecture diagram of a server, according to one embodiment;
fig. 5 is a hardware configuration diagram of a first device according to an embodiment.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< implementation Environment and hardware configuration >
Fig. 1 is a schematic diagram of a system 100 for acquiring device failure information according to an embodiment of the disclosure.
As shown in fig. 1, the system 100 includes a server 2000, a terminal device 1000, a vehicle 3000, and a test apparatus 5000.
The server 2000 and the terminal device 1000, and the server 2000 and the vehicle 3000, and the server 2000 and the testing apparatus 5000 may be communicatively connected through a network 4000. The vehicle 3000 and the server 2000, and the network 4000 through which the terminal device 1000 communicates with the server 2000 and the test apparatus 5000 may be the same or different. The network 4000 may be a wireless communication network or a wired communication network, and may be a local area network or a wide area network.
The server 2000 provides a service point for processes, databases, and communications facilities. The server 2000 may be a monolithic server, a distributed server across multiple computers, a computer data center, a cloud server, or a cloud-deployed server cluster, etc. The server may be of various types, such as, but not limited to, a web server, a news server, a mail server, a message server, an advertisement server, a file server, an application server, an interaction server, a database server, or a proxy server. In some embodiments, each server may include hardware, software, or embedded logic components or a combination of two or more such components for performing the appropriate functions supported or implemented by the server. The specific configuration of the server 2000 may include, but is not limited to, a processor 2100, a memory 2200, an interface device 2300, and a communication device 2400. Processor 2100 is used to execute computer programs written in an instruction set of an architecture such as x86, Arm, RISC, MIPS, SSE, and so on. The memory 2200 is, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, or the like. The interface device 2300 is, for example, a USB interface, a serial interface, a parallel interface, or the like. The communication device 2400 is, for example, capable of wired communication or wireless communication, and may include, for example, WiFi communication, bluetooth communication, 2G/3G/4G/5G communication, and the like.
As applied to the disclosed embodiment, the memory 2200 of the server 2000 is configured to store a computer program for controlling the processor 2100 to operate so as to support the implementation of the method according to the disclosed embodiment. The skilled person can design the computer program according to the solution disclosed in the present disclosure. How the computer program controls the processor to operate is well known in the art and will not be described in detail here.
It will be understood by those skilled in the art that the server 2000 may include other devices besides the devices shown in fig. 1, and is not limited thereto.
In this embodiment, the terminal device 1000 is, for example, a mobile phone, a portable computer, a tablet computer, a palmtop computer, a wearable device, or the like.
The terminal device 1000 is installed with a vehicle-using application client, and a user can operate the vehicle-using application client to achieve the purpose of using the vehicle 3000.
The terminal apparatus 1000 may include, but is not limited to, a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. The processor 1100 may be a central processing unit CPU, a graphics processing unit GPU, a microprocessor MCU, or the like, and is configured to execute a computer program, and the computer program may be written by using an instruction set of architectures such as x86, Arm, RISC, MIPS, and SSE. The memory 1200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a serial interface, a parallel interface, and the like. The communication device 1400 is capable of wired communication using an optical fiber or a cable, or wireless communication, and specifically may include WiFi communication, bluetooth communication, 2G/3G/4G/5G communication, and the like. The display device 1500 is, for example, a liquid crystal display panel, a touch panel, or the like. The input device 1600 may include, for example, a touch screen, a keyboard, a somatosensory input, and the like. The speaker 1170 is used to output audio signals. The microphone 1180 is used to pick up audio signals.
As applied to the embodiments of the present disclosure, the memory 1200 of the terminal device 1000 is used for storing a computer program for controlling the processor 1100 to operate so as to support the implementation of the method according to the embodiments of the present disclosure, and how the computer program controls the processor to operate is well known in the art and therefore will not be described in detail herein. The terminal device 1000 may be installed with an intelligent operating system (e.g., Windows, Linux, android, IOS, etc.) and application software.
It should be understood by those skilled in the art that although a plurality of means of the terminal device 1000 are shown in fig. 1, the terminal device 1000 of the embodiments of the present disclosure may refer to only some of the means therein, for example, only the processor 1100, the memory 1200, and the like.
The vehicle 3000 may be a bicycle shown in fig. 1, and may be various types such as a tricycle, an electric scooter, a motorcycle, and a four-wheeled passenger vehicle, and is not limited thereto.
The vehicle 3000 may include, but is not limited to, a processor 3100, a memory 3200, an interface device 3300, a communication device 3400, a display device 3500, an input device 3600, and the like. The processor 3100 may be a microprocessor MCU or the like. The memory 3200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface 3300 includes, for example, a USB interface, a serial interface, a parallel interface, and the like. The communication device 3400 can perform wired communication using an optical fiber or a cable, for example, or perform wireless communication, and specifically may include WiFi communication, bluetooth communication, 2G/3G/4G/5G communication, or the like. The display device 3500 may be, for example, a liquid crystal display panel, a touch panel, or the like. The input device 3600 may include, for example, a touch panel, a keyboard, or the like, and may input voice information through a microphone.
As applied to the disclosed embodiment, the memory 3200 of the vehicle 3000 is used to store a computer program for controlling the processor 3100 to operate in support of the implementation of the method according to the disclosed embodiment. How the computer program controls the processor to operate is well known in the art and will not be described in detail here.
Although a plurality of devices of the vehicle 3000 are shown in fig. 1, the present invention may relate only to some of the devices, for example, the vehicle 3000 relates only to the processor 3100, the memory 3200, and the communication device 3400.
In this embodiment, the testing device 5000 is, for example, a mobile phone, a portable computer, a tablet computer, a palm computer, a wearable device, or the like.
The test apparatus 5000 is provided with a vehicle application client, and a user can use the vehicle 3000 by operating the vehicle application client.
The testing device 5000 can include, but is not limited to, a processor 5100, a memory 5200, an interface device 5300, a communication device 5400, a display device 5500, an input device 5600, a speaker 5700, a microphone 5800, and the like. The processor 5100 may be a central processing unit CPU, a graphics processing unit GPU, a microprocessor MCU, or the like, and is configured to execute a computer program, which may be written using an instruction set of architectures such as x86, Arm, RISC, MIPS, and SSE. The memory 5200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 5300 includes, for example, a USB interface, a serial interface, a parallel interface, and the like. The communication device 5400 can perform wired communication using an optical fiber or a cable, or wireless communication, for example, and specifically may include WiFi communication, bluetooth communication, 2G/3G/4G/5G communication, or the like. The display device 5500 is, for example, a liquid crystal display panel, a touch panel, or the like. The input device 5600 may include, for example, a touch panel, a keyboard, a motion sensing input, or the like. The speaker 5700 is used to output an audio signal. The microphone 5800 is used to pick up audio signals.
The memory 5200 of the test apparatus 5000, as applied in the embodiments of the present disclosure, is used to store a computer program for controlling the processor 5100 to operate to support the implementation of the methods according to the embodiments of the present disclosure, which is well known in the art and therefore will not be described in detail herein. The testing device 5000 may be installed with an intelligent operating system (e.g., Windows, Linux, android, IOS, etc.) and application software.
It should be understood that although fig. 1 shows only one server 2000, terminal device 1000, vehicle 3000, and test apparatus 5000, it is not meant to limit the number of each, and a plurality of servers 2000, a plurality of terminal devices 1000, a plurality of vehicles 3000, and a plurality of test apparatuses 5000 may be included in the present system.
Various embodiments and examples according to the present invention are described below with reference to the accompanying drawings.
< method examples >
FIG. 2 is a flow diagram of a method of obtaining device fault information, according to one embodiment. The implementation subject of the present embodiment may be the system 100 for acquiring device failure information as shown in fig. 1.
As shown in fig. 2, the method for acquiring device failure information of the present embodiment may include the following steps S210 to S240:
step S210, the server obtains first device identification information of a first device, where the first device is identified as a device with a device failure.
In detail, for an online device that has been put into operation, when the device has a fault, the server may obtain device identification information, such as a device ID, of the faulty device, so that the device may be accurately located accordingly, thereby obtaining fault information of the device.
In one embodiment of the present disclosure, the first device includes any one of a smart lock of a bicycle, a smart helmet, and a smart battery.
Taking an intelligent lock as an example, according to the execution condition of the locking and unlocking operation of the intelligent lock, the intelligent lock fault condition reported by a maintainer, and the intelligent lock fault condition reported by a bicycle user, the intelligent locks with faults can be identified, that is, the intelligent locks are identified as the locks with equipment faults.
In a possible implementation, the server may send the reported device identification information of the faulty device to a maintenance person. Therefore, a maintainer can input an equipment identification information list according to needs through any terminal equipment, and the list can list equipment identification information of each fault equipment which is required to obtain equipment fault information and put into operation by the maintainer. The terminal equipment can further send the list to the server, and the server can further obtain equipment fault information of corresponding fault equipment according to the equipment identification information in the list.
In this embodiment, the maintenance personnel can select the faulty equipment which needs to acquire the equipment fault information as required, so that not only can the requirements of the maintenance personnel be met, but also the data processing pressure of the server can be reduced.
In another feasible implementation manner, the server may also directly obtain the device failure information of the device as long as the device has a failure according to the reported device identification information of the failed device, so that the device failure information can be comprehensively obtained, and the automation degree is high.
Step S220, the server sends a log file uploading instruction to the first device according to the first device identification information.
In this embodiment, in order to support troubleshooting of the device failure, when the first device has a failure, the relevant failure information may be recorded in the generated log file. In this way, the server may send a log file uploading instruction to the first device, so that the first device may upload the generated log file accordingly.
In detail, log analysis is a very effective way to solve software defects, and is suitable for devices such as an intelligent vehicle lock operated in a vehicle in an outdoor scene, so that during operation of the intelligent vehicle lock, the vehicle can generate a corresponding log to record a failure condition of the vehicle lock.
In detail, for the implementation mode of acquiring the device failure information from the order service frame and the periodic report frame, the amount of information obtained in the implementation mode is limited, and information loss is also caused under the condition of a poor network state, which is very unfavorable for repairing the device failure. In the embodiment, the device fault information is acquired through the log, so that the device fault information can be accurately acquired, and convenience is provided for device fault repair.
Step S230, in response to the log file uploading instruction, the first device uploads a first log file generated according to a set first device failure log generation rule to the server, where the first log file records information of device failure of the first device.
In detail, after receiving the log file uploading instruction, the first device may upload the generated log file to the server.
In detail, the first device generates a log file according to a set rule, so that the generated log file can accurately record the information of the fault of the first device, and the situations of fault omission, fault error recording and the like are avoided.
Since the first device has a device failure, the log file records information about the failure of the first device, so that the server can obtain the information about the device failure recorded therein according to the log file.
In an embodiment of the present disclosure, the log file generated by the first device may be an encrypted compressed log, and the server may correspondingly decrypt and analyze the log, so as to obtain corresponding device failure information from the decrypted and analyzed file.
Step S240, the server obtains first device failure information corresponding to the first device according to the first log file, where the first device failure information includes information of device failure existing in the first device.
As described above, the server may obtain, from the log file generated by the first device, device failure information of the first device, where the device failure information indicates a device failure existing in the first device.
In general, the server may send the obtained device failure information to a corresponding maintenance person, so that the maintenance person may view the device failure information and perform corresponding maintenance processing accordingly.
For example, the maintenance personnel can check the error/alarm information of the equipment on the display interface and check the fault and defect of the equipment more quickly according to the information. In addition, the fault and defect data of the equipment can be recorded by the system, data statistics is carried out, and a statistical report is generated, so that maintenance personnel can check more intuitive information conveniently.
For the implementation mode that the maintenance personnel manually and sequentially salvage the log files from the server and analyze the log files in the terminal equipment to obtain the equipment fault information, the integration is poor because the equipment fault information is processed in the terminal equipment, so that the sharing use of the equipment fault information among the maintenance personnel is not facilitated, and the statistical analysis processing of a large amount of equipment fault data is not convenient to perform. In addition, the implementation mode also needs to execute operations such as log uploading completion state query, log salvage and the like, so that the whole operation flow is relatively complicated. Moreover, the implementation method has large human input and low efficiency, and especially, the analysis processing of the analyzed logs needs extra time.
In the embodiment, the server directly processes the log file to obtain the equipment fault information, the integration is high, the equipment fault information can be conveniently shared and used among maintenance personnel, the statistical analysis and processing of a large amount of equipment fault data are facilitated, and the overall operation flow can be simplified. In addition, the embodiment has the advantages of low human input, high automation degree and good effect of acquiring equipment fault information.
In an embodiment of the present disclosure, the obtaining, by the server, first device failure information corresponding to the first device according to the first log file includes: and the server extracts information corresponding to the keyword in the first log file according to the set keyword to obtain first equipment fault information corresponding to the first equipment.
In this embodiment, the equipment fault information is extracted according to the keywords, so that the equipment fault information can be accurately and quickly acquired.
In a feasible implementation manner, the information recorded behind the keywords is the information corresponding to one equipment fault, so that the information behind each keyword can be extracted.
In one embodiment of the present disclosure, the keywords include: at least one of a keyword for error reporting, a keyword for warning.
In detail, the keyword for error reporting may be set to "error", for example, and the keyword for warning may be set to "warning", for example.
Therefore, the method provided by the embodiment can realize automatic troubleshooting of the online equipment, has the effects of quickly tracking the failure reason of the equipment and saving the labor detection cost, and solves the problem that the online equipment which is put into operation is difficult to troubleshoot when the equipment fails.
As can be seen from the above, the present embodiment provides a method for acquiring device failure information, where the method includes: the method comprises the steps that a server obtains first equipment identification information of first equipment, wherein the first equipment is identified as equipment with equipment failure; the server sends a log file uploading instruction to the first equipment according to the first equipment identification information; the first equipment responds to the log file uploading instruction, a first log file generated according to a set first equipment fault log generation rule is uploaded to the server, and information of equipment faults existing in the first equipment is recorded in the first log file; and the server acquires first equipment fault information corresponding to the first equipment according to the log file, wherein the first equipment fault information comprises equipment fault information existing in the first equipment. Therefore, the embodiment can realize automatic acquisition of the equipment fault information of the fault equipment, and can provide convenience for maintenance personnel to check the equipment fault information.
As described above, the first device generated log file is generally generated by a set rule. In order to avoid the problem that the generated log file has key information omission and the like to influence the integrity of the log, the rule can be tested, and the rule is optimized based on the test result until the log file generated according to the optimized rule can accurately reflect the equipment failure condition.
In this way, the validity of the device fault log generation rule can be tested before the device is put into operation. Based on this, in an embodiment of the present disclosure, before the server acquires the first device identification information of the first device, the method may further include the following steps a1 to A3:
step A1, a testing apparatus obtains second device identification information of a second device, the device type of the second device is the same as the device type of the first device, the second device is a device with a set fault, and the testing apparatus is connected with the second device through a physical line.
In detail, the tester may input identification information of the second device to the test apparatus.
In this embodiment, the testing apparatus is connected to the second device through a physical line, for example, may be connected through a serial port line, so that the serial port output log of the second device may be directly collected through the serial port. The testing device may be a desktop computer, a personal computer, or the like.
The second plant corresponds to a plant which is not put into operation, in comparison with the first plant.
Taking the first device as an intelligent vehicle lock as an example, the second device is also an intelligent vehicle lock, and the first device and the second device are of the same type, such as the intelligent vehicle lock of the same model. By testing the second device, the effect of testing the first device can be achieved. If the log file generated by the second device according to a rule can accurately indicate the device fault, the log file generated by the first device according to the rule can also accurately indicate the device fault.
Under the condition that the rule does not need to be optimized and adjusted, the log file generated by the second device according to the rule and the fault information of the device reflected by the log file output through the physical line are consistent, so that the validity of the rule can be evaluated by comparing the consistency of the two log files. Meanwhile, in order to evaluate consistency, the two log files of the second device are generated synchronously.
In addition, in order to evaluate the consistency of the two log files so as to evaluate the validity of the rule, the second device is a device with at least one fault, and the fault existing in the device can be realized by human intervention of a tester.
Step a2, the testing apparatus obtains, according to the second device identification information, a second log file corresponding to the second device through the physical line, and obtains, from the server, a third log file uploaded to the server by the second device.
The second log file records the information of the set fault, and the third log file is generated by the second device according to the set second device fault log generation rule.
In the case that the test apparatus is connected with more than one second device, the test apparatus may determine the corresponding second device according to the device identification information, so as to obtain a log file, for example, a serial output log, according to a physical line connected to the second device. Based on the equipment identification information, the accurate comparison of two log files of the same equipment can be conveniently realized.
In this step, two log files of the second device are acquired. The second log file is directly obtained through a physical line, so that the equipment fault condition can be accurately reflected, and the information of the fault of the second equipment is recorded in the second log file. The third log file is generated by the second device according to the current rule. In order to evaluate the consistency of the two log files, the embodiment will compare the two log files subsequently.
Step a3, the testing apparatus obtains the first device fault log generation rule according to the second log file and the third log file.
In this step, the two obtained log files are compared, and if the two log files are consistent, the log file generated based on the current rule can accurately reflect the equipment fault condition, so that the rule is not required to be optimized and adjusted, that is, the rule can be used for generating the rule for the first equipment fault log. Otherwise, the current rule can be optimized and adjusted according to the comparison result, and consistency evaluation can be performed on the adjusted rule again until the rule does not need to be optimized and adjusted, so that the rule obtained after final optimization and adjustment can be used as the first equipment fault log generation rule.
Therefore, by taking the second log file as the serial port output log and the third log file as the encrypted compression log as an example, the integrity of the encrypted compression log generated after the device is put into operation can be ensured by comparing the serial port output log with the encrypted compression log.
Therefore, the embodiment executes the fault automatic troubleshooting statistics of the online equipment on the basis of detecting whether the generated log has fault information omission, and can realize the automatic and accurate troubleshooting of the online equipment.
Based on the above, in an embodiment of the present disclosure, the step A3, where the testing apparatus obtains the first device failure log generation rule according to the second log file and the third log file, may include the following steps a31 to a 34:
step a31, the testing device obtains the target information corresponding to the set fault according to the second log file.
Since there is a setting fault in the second device, the second log file includes information corresponding to the setting fault, i.e., the target information, which can be obtained in this step.
Step a32, the testing apparatus obtains second device fault information corresponding to the second device according to the third log file.
In this step, the device failure information of the second device, that is, the second device failure information, may also be obtained according to the third log file. As described above, if the current rule does not need to be optimized, the second device failure information includes the target information, and the denial may not include the target information. That is, if the target information is not included, the rule may be considered to need to be optimized.
Step a33, the testing apparatus detects whether the second device failure information includes the target information.
The step of performing a detection of whether the second device failure information includes the target information to determine whether the rule needs to be optimized.
Step a34, the testing apparatus adjusts the second device fault log generation rule to obtain the first device fault log generation rule when the second device fault information does not include the target information.
As described above, since the second device has the setting fault and the second device fault information does not include the corresponding target information, it indicates that the log file generated according to the current rule cannot accurately reflect the device fault condition, so that the current rule can be optimized and adjusted according to the detection result. If applicable, the adjusted rule may be directly used as the first device fault log generation rule.
In another embodiment, the consistency evaluation may be performed again after the rule adjustment, the adjustment may be performed again if the rule is not consistent, and the current rule may be used as the first device fault log generation rule if the rule is consistent without adjustment.
In an embodiment of the present disclosure, the step a33, where the testing apparatus detects whether the second device failure information includes the target information, may include: and the testing device detects whether the information corresponding to the time stamp in the third log file comprises the target information according to the time stamp corresponding to the target information in the second log file.
Wherein the second device failure information does not include the target information, including: a case where information in the third log file corresponding to the time stamp does not include the target information.
In detail, there is a setup failure in the second device, and a time stamp when the second device transmits the setup failure may be recorded in a log file. If the two log files have consistency, the two log files not only contain the same fault information, but also the timestamps of the fault information in the two log files should have little difference. I.e. both log files should contain fault information with accurate time stamps.
In this way, for the timestamp of the target information, it can be detected whether the information corresponding to the timestamp in the third log file includes the target information. The information corresponding to one time stamp may only include information under the time stamp, and may also include information in an error range of adjacent time of the time stamp.
In this way, if it is detected that the information corresponding to the timestamp in the third log file does not include the target information, it is described that the information does not include the target information with an accurate timestamp and thus the device failure condition cannot be accurately reflected, so it may be considered that the third log file does not include the target information and thus the rule adjustment processing needs to be performed.
Therefore, in the embodiment, whether the target information exists is detected by combining the timestamp, so that the accurate judgment of whether the target information exists can be realized, that is, the accurate judgment of the rule validity can be realized, and thus support can be provided for the accurate acquisition of the equipment fault information of the on-line equipment which is put into operation.
In an embodiment of the present disclosure, in the step a31, the obtaining, by the testing apparatus, the target information corresponding to the set fault according to the second log file may include: and the testing device extracts each first timestamp and information corresponding to the first timestamp in the second log file according to the second log file to obtain third equipment fault information, wherein the third equipment fault information comprises the target information, and the information corresponding to each first timestamp is equipment fault information existing in the second equipment.
In detail, the second device has a setting fault, and the second log file can accurately reflect the fault condition of the device, so the second log file may include information of each setting fault occurring in the second device and a timestamp corresponding to the fault occurrence.
Therefore, the testing device can extract the time stamp when the second equipment fails every time and the fault information corresponding to the time stamp, and the extracted contents can be sequentially arranged according to the time stamp sequence to serve as the third equipment fault information.
Correspondingly, in step a32, the obtaining, by the testing apparatus, second device fault information corresponding to the second device according to the third log file may include: and the testing device extracts each second timestamp in the third log file and information corresponding to the second timestamp according to the third log file to obtain the second equipment fault information, wherein the information corresponding to each second timestamp is the information of one equipment fault existing in the second equipment.
Because the second device has the set fault, the third log file can include the information of part or all set faults of the second device and the time stamp corresponding to the fault, and the extracted contents can be sequentially arranged according to the time stamp sequence as the fault information of the second device.
In order to facilitate consistency evaluation of two log files based on the time stamp and corresponding information and to evaluate validity of the rule, the testing device may also extract the time stamp of each time of failure of the second device and failure information corresponding to the time stamp.
Based on the above, in step a33, the step a33, where the testing apparatus detects whether the second device failure information includes the target information, may include the following steps a331 to a 332:
step a331, based on the same timestamp, aligning the third device failure information and the second device failure information to obtain an information alignment result.
In this step, the extracted two types of device fault information may be aligned based on the time stamp factor, for example, the same time stamp in the two types of device fault information, that is, the corresponding fault information, is in the same row of the cell file, so that the test apparatus may perform accurate comparison accordingly.
Step a332, the testing apparatus detects whether the second device fault information includes the target information according to the information alignment result.
In this step, the test device detects whether the second device failure information includes the target information according to the information alignment result, that is, detects whether the current rule can support accurate reflection of the set failure.
Therefore, according to the embodiment, the fault information extracted from the two log files can be aligned through the time stamp, so that consistency evaluation of the two log files can be realized, validity of the rule can be accurately evaluated, and support is provided for accurate acquisition of the equipment fault information of the operated online equipment.
As can be seen from the above, the method for acquiring device fault information provided in this embodiment may have at least the following features:
1) the operation flow of defect checking of the on-line equipment is simplified, manpower is liberated, and the efficiency of defect checking of the on-line equipment is improved;
2) the information integrity of the encrypted compressed log of the online equipment is improved, important error reporting/warning information omitted in the encrypted compressed log is more efficiently found through alignment and comparison of the encrypted compressed log and the serial port printing log, and the comprehensiveness of defect problem detection of the online equipment is ensured;
3) the method can better perform centralized management on the defects of the on-line equipment and perform centralized statistics on the defect data of the on-line equipment.
Fig. 3 is a flowchart illustrating a method for acquiring device failure information according to an embodiment. As shown in fig. 3, the method for acquiring device failure information of this embodiment may include the following steps S301 to S310:
step S301, a testing device obtains second device identification information of a second device, the second device is a device with a set fault, and the testing device is connected with the second device through a physical line.
In detail, the second device includes any one of an intelligent lock of a bicycle, an intelligent helmet, and an intelligent battery.
Step S302, the testing device obtains a second log file corresponding to the second device through the physical line according to the second device identification information, and obtains a third log file uploaded to the server by the second device from the server; the second log file records the information of the set fault, and the third log file is generated by the second device according to the set second device fault log generation rule.
Step S303, the testing device obtains target information corresponding to the set fault according to the second log file.
Step S304, the testing apparatus obtains second device fault information corresponding to the second device according to the third log file.
Step S305, the testing apparatus detects whether the information corresponding to the timestamp in the third log file includes the target information according to the timestamp corresponding to the target information in the second log file.
Step S306, when the information corresponding to the timestamp in the third log file does not include the target information, the testing apparatus adjusts the second device fault log generation rule to obtain the first device fault log generation rule.
Step S307, the server obtains first device identification information of a first device, where the first device is identified as a device with a device fault, and the device type of the second device is the same as the device type of the first device.
Step S308, the server sends a log file uploading instruction to the first device according to the first device identification information.
Step S309, in response to the log file uploading instruction, the first device uploads a first log file generated according to the first device fault log generation rule to the server, where the first log file records information of the device fault of the first device.
Step S310, the server extracts, according to a set keyword, information corresponding to the keyword in the first log file to obtain first device fault information corresponding to the first device, where the first device fault information includes information of a device fault existing in the first device.
In detail, the keywords include: at least one of a keyword for error reporting, a keyword for warning.
The method provided by the embodiment can realize automatic troubleshooting of the online equipment, has the effects of quickly tracking the failure reason of the equipment and saving the labor detection cost, and solves the problem that the online equipment which is put into operation is difficult to troubleshoot when the equipment fails.
In addition, in the embodiment, on the basis of detecting whether the generated log has fault information omission, the fault automatic troubleshooting statistics of the online equipment is executed, so that the fault automatic and accurate troubleshooting of the online equipment can be realized.
< apparatus embodiment >
Fig. 4 is a schematic hardware configuration diagram of a server 400 according to another embodiment.
As shown in fig. 4, the server 400 comprises a processor 410 and a memory 420, the memory 420 being adapted to store an executable computer program, the processor 410 being adapted to perform a method according to any of the above method embodiments, under control of the computer program.
The server 400 may be the server 2000 in fig. 1.
The modules of the server 400 may be implemented by the processor 410 in the present embodiment executing the computer program stored in the memory 420, or may be implemented by other circuit structures, which is not limited herein.
Fig. 5 is a hardware configuration diagram of a first device 500 according to another embodiment.
As shown in fig. 5, the first device 500 comprises a processor 510 and a memory 520, the memory 520 being adapted to store an executable computer program, the processor 510 being adapted to perform a method according to any of the above method embodiments, under control of the computer program.
The first device 500 may be a smart lock, a smart battery, a smart helmet, etc. in the vehicle 3000 in fig. 1.
The modules of the first device 500 may be implemented by the processor 510 in the present embodiment executing the computer program stored in the memory 520, or may be implemented by other circuit structures, which is not limited herein.
The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present invention are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (10)

1. A method for obtaining equipment fault information is characterized by comprising the following steps:
the method comprises the steps that a server obtains first equipment identification information of first equipment, wherein the first equipment is identified as equipment with equipment failure;
the server sends a log file uploading instruction to the first equipment according to the first equipment identification information;
the first equipment responds to the log file uploading instruction, a first log file generated according to a set first equipment fault log generation rule is uploaded to the server, and information of equipment faults existing in the first equipment is recorded in the first log file;
and the server acquires first equipment fault information corresponding to the first equipment according to the first log file, wherein the first equipment fault information comprises equipment fault information existing in the first equipment.
2. The method of claim 1, wherein the obtaining, by the server, first device failure information corresponding to the first device from the first log file comprises:
and the server extracts information corresponding to the keyword in the first log file according to the set keyword to obtain first equipment fault information corresponding to the first equipment.
3. The method of claim 2, wherein the keywords comprise: at least one of a keyword for error reporting, a keyword for warning.
4. The method of claim 1, wherein before the server obtains the first device identification information of the first device, the method further comprises:
the method comprises the steps that a test device obtains second equipment identification information of second equipment, the equipment type of the second equipment is the same as that of first equipment, the second equipment is equipment with set faults, and the test device is connected with the second equipment through a physical line;
the testing device acquires a second log file corresponding to the second equipment through the physical line according to the second equipment identification information, and acquires a third log file uploaded to the server by the second equipment from the server;
the second log file records the information of the set fault, and the third log file is generated by the second equipment according to a set second equipment fault log generation rule;
and the testing device acquires the first equipment fault log generation rule according to the second log file and the third log file.
5. The method of claim 4, wherein obtaining, by the testing device, the first device fault log generation rule according to the second log file and the third log file comprises:
the testing device obtains target information corresponding to the set fault according to the second log file;
the testing device obtains second equipment fault information corresponding to the second equipment according to the third log file;
the testing device detects whether the second equipment fault information comprises the target information;
and the testing device adjusts the second equipment fault log generation rule to obtain the first equipment fault log generation rule under the condition that the second equipment fault information does not include the target information.
6. The method of claim 5, wherein the testing device detecting whether the second device failure information includes the target information comprises:
the testing device detects whether the information corresponding to the timestamp in the third log file comprises the target information according to the timestamp corresponding to the target information in the second log file;
wherein the second device failure information does not include the target information, including: a case where information in the third log file corresponding to the time stamp does not include the target information.
7. The method of claim 5, wherein obtaining, by the testing device, target information corresponding to the set fault according to the second log file comprises:
the testing device extracts each first timestamp and information corresponding to the first timestamp in the second log file according to the second log file to obtain third equipment fault information, wherein the third equipment fault information comprises the target information, and the information corresponding to each first timestamp is information of one equipment fault existing in the second equipment;
the testing device obtains second device fault information corresponding to the second device according to the third log file, and the method comprises the following steps:
the testing device extracts each second timestamp in the third log file and information corresponding to the second timestamp according to the third log file to obtain second equipment fault information, wherein the information corresponding to each second timestamp is information of one equipment fault existing in the second equipment;
the detecting, by the testing apparatus, whether the second device failure information includes the target information includes:
aligning the third equipment fault information and the second equipment fault information based on the same timestamp to obtain an information alignment result;
and the testing device detects whether the second equipment fault information comprises the target information according to the information alignment result.
8. The method of claim 1, wherein the first device comprises any one of a smart lock of a bicycle, a smart helmet, and a smart battery.
9. A server comprising a memory and a processor, the memory for storing a first computer program; the processor is adapted to perform the method steps implemented by the server according to any of claims 1-8 under control of the first computer program.
10. A first device comprising a memory and a processor, the memory for storing a second computer program; the processor is adapted to perform the method steps as claimed in any of claims 1-8, carried out by the first device, under control of the second computer program.
CN202111197451.5A 2021-10-14 2021-10-14 Method, server and equipment for acquiring equipment fault information Pending CN114020500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111197451.5A CN114020500A (en) 2021-10-14 2021-10-14 Method, server and equipment for acquiring equipment fault information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111197451.5A CN114020500A (en) 2021-10-14 2021-10-14 Method, server and equipment for acquiring equipment fault information

Publications (1)

Publication Number Publication Date
CN114020500A true CN114020500A (en) 2022-02-08

Family

ID=80056126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111197451.5A Pending CN114020500A (en) 2021-10-14 2021-10-14 Method, server and equipment for acquiring equipment fault information

Country Status (1)

Country Link
CN (1) CN114020500A (en)

Similar Documents

Publication Publication Date Title
CN111475370A (en) Operation and maintenance monitoring method, device and equipment based on data center and storage medium
CN109379251B (en) Automatic testing method and system for GOOSE and SV communication of relay protection device process layer
CN110088744B (en) Database maintenance method and system
US20150100296A1 (en) Method and system for automated test and result comparison
CN112650685B (en) Automatic test method, device, electronic equipment and computer storage medium
CN107332765B (en) Method and apparatus for repairing router failures
CN105095052A (en) Fault detection method and fault detection device in SOA (Service-Oriented Architecture) environment
CN112395156A (en) Fault warning method and device, storage medium and electronic equipment
CN111046022A (en) Database auditing method based on big data technology
CN111221807A (en) Cloud service-oriented industrial equipment big data quality testing method and architecture
CN113112038B (en) Intelligent monitoring and diagnostic analysis system, device, electronic equipment and storage medium
CN113448795B (en) Method, apparatus and computer program product for obtaining system diagnostic information
CN117220917A (en) Network real-time monitoring method based on cloud computing
CN111309584B (en) Data processing method, device, electronic equipment and storage medium
CN110875832B (en) Abnormal service monitoring method, device and system and computer readable storage medium
CN114143169A (en) Micro-service application observability system
CN105825641A (en) Service alarm method and apparatus
CN116467110B (en) Method and system for detecting damage of tablet personal computer
CN114020500A (en) Method, server and equipment for acquiring equipment fault information
CN113691390A (en) Cloud-end-coordinated edge node alarm system and method
CN105827447A (en) Service alarm method and apparatus
CN112799957A (en) User behavior based fault handling method, system, device and medium
CN111865699A (en) Fault identification method and device, computing equipment and medium
CN117640357A (en) Processing method and device for network element data acquisition abnormality and related equipment
CN116340690B (en) Page abnormality detection method and device and computer equipment

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