WO2023168926A1 - 软件异常的确定方法、装置、存储介质及电子装置 - Google Patents

软件异常的确定方法、装置、存储介质及电子装置 Download PDF

Info

Publication number
WO2023168926A1
WO2023168926A1 PCT/CN2022/121040 CN2022121040W WO2023168926A1 WO 2023168926 A1 WO2023168926 A1 WO 2023168926A1 CN 2022121040 W CN2022121040 W CN 2022121040W WO 2023168926 A1 WO2023168926 A1 WO 2023168926A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
log
software
target log
file
Prior art date
Application number
PCT/CN2022/121040
Other languages
English (en)
French (fr)
Inventor
张鹏
Original Assignee
青岛海尔科技有限公司
海尔智家股份有限公司
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 青岛海尔科技有限公司, 海尔智家股份有限公司 filed Critical 青岛海尔科技有限公司
Publication of WO2023168926A1 publication Critical patent/WO2023168926A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • Embodiments of the present disclosure relate to the field of computer technology, and specifically, to a method, device, storage medium, and electronic device for determining software anomalies.
  • Embodiments of the present disclosure provide a method, device, storage medium, and electronic device for determining software anomalies.
  • a method for determining software anomalies including: upon receiving a request instruction for requesting feedback that an abnormality occurs in the target software, collecting a target log, wherein the target log is used to Display abnormal operation information of the target software; generate a target log file based on the target log; upload the target log file to the server to instruct the server to parse the target log file to obtain the target log , so that the target device determines the abnormality of the target software based on the target log.
  • a method for determining software anomalies including: receiving a target log file sent by the target software, wherein the target log file is generated by the target software based on the target log, so The target log is collected by the target software when the target software receives a request instruction for requesting feedback that an abnormality occurs in the target software; the target log file is parsed to obtain the target log, So that the target device determines the abnormality of the target software based on the target log.
  • a device for determining software anomalies including: a first collection module configured to collect target logs upon receiving a request instruction for requesting feedback that an abnormality occurs in the target software. , wherein the target log is used to display abnormal operation information of the target software; the generation module is configured to generate a target log file based on the target log; the first upload module is configured to upload the target log file to The server is configured to instruct the server to parse the target log file to obtain the target log, so that the target device determines an abnormality of the target software based on the target log.
  • a device for determining software anomalies including: a first receiving module configured to receive a target log file sent by the target software, wherein the target log file is the target software Generated based on the target log, which is collected by the target software when the target software receives a request instruction for requesting feedback that an abnormality occurs in the target software; the parsing module is configured to parse The target log file is used to obtain the target log, so that the target device determines the abnormality of the target software based on the target log.
  • an electronic device including a memory and a processor.
  • a computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the above. Steps in method embodiments.
  • the target software collects the target log when the abnormality occurs in the target software, generates a target log file, and then converts the target log into the target software.
  • the file is uploaded to the server to instruct the server to parse the target log file to obtain the target log, so that the target device can determine the abnormality of the target software based on the target log.
  • Figure 1 is a hardware structure block diagram of a mobile terminal of a method for determining software anomalies according to an embodiment of the present disclosure
  • Figure 2 is a flowchart 1 of a method for determining software anomalies according to an embodiment of the present disclosure
  • Figure 3 is a flow chart 2 of a method for determining software anomalies according to an embodiment of the present disclosure
  • Figure 4 is a system framework diagram for determining application APP anomalies according to a specific embodiment of the present disclosure
  • Figure 5 is a flow chart of a method for determining application APP anomalies according to a specific embodiment of the present disclosure
  • Figure 6 is a structural block diagram 1 of a device for determining software anomalies according to an embodiment of the present disclosure
  • Figure 7 is a structural block diagram 2 of a device for determining software anomalies according to an embodiment of the present disclosure
  • FIG. 8 is a structural block diagram of an electronic device for implementing a method for determining software anomalies according to an embodiment of the present disclosure.
  • FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for determining software anomalies according to an embodiment of the present disclosure.
  • the mobile terminal may include one or more (only one is shown in Figure 1) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 configured to store data, wherein the above-mentioned mobile terminal may also include a transmission device 106 configured as a communication function and an input and output device 108.
  • the structure shown in Figure 1 is only illustrative, and it does not limit the structure of the above-mentioned mobile terminal.
  • the mobile terminal may also include more or fewer components than shown in FIG. 1 , or have a different configuration than shown in FIG. 1 .
  • the memory 104 may be configured to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining software anomalies in the embodiment of the present disclosure.
  • the processor 102 runs the computer program stored in the memory 104, Thereby executing various functional applications and data processing, that is, realizing the above method.
  • Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include memory located remotely relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.
  • the transmission device 106 is arranged to receive or send data via a network.
  • Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal.
  • the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (Radio Frequency, RF for short) module, which is configured to communicate with the Internet wirelessly.
  • FIG. 2 is a flowchart 1 of a method for determining software anomalies according to an embodiment of the present disclosure. As shown in Figure 2, the process includes the following steps:
  • Step S202 Upon receiving a request instruction for requesting feedback that an abnormality occurs in the target software, collect a target log, where the target log is used to display abnormal operation information of the target software;
  • Step S204 generate a target log file based on the target log
  • Step S206 Upload the target log file to the server to instruct the server to parse the target log file to obtain the target log, so that the target device determines the abnormality of the target software based on the target log. .
  • the target software collects the target log when the abnormality occurs in the target software, generates a target log file, and then converts the target log into The file is uploaded to the server to instruct the server to parse the target log file to obtain the target log, so that the target device can determine the abnormality of the target software based on the target log. It avoids the problems existing in related technologies such as guessing the cause of software anomalies or determining software anomalies through the recurrence of anomalies, and solves the problem of low efficiency in locating software anomalies existing in related technologies, thereby achieving This has the effect of improving the efficiency of software abnormality problem diagnosis.
  • the execution subject of the above steps may be a terminal, or terminal software, such as an APP, or the above-mentioned target software, or a processor with human-computer interaction capabilities configured on a storage device, or a processing device with similar processing capabilities. or processing unit, etc., but not limited to this.
  • the following takes the terminal software to perform the above operations as an example (this is only an illustrative explanation, in actual operation, other devices or modules can also be used to perform the above operations):
  • the terminal software collects the target log when receiving a request instruction for requesting feedback that the target software (such as the APP) is abnormal.
  • the software when the software runs abnormally, it can be The user reports the abnormal situation on the software side. For example, the user can click the relevant buttons or controls in the software interface to trigger a request instruction to request feedback on the abnormal situation of the software. After receiving the request instruction, the software starts to collect the target log.
  • the target log is In order to reflect the abnormal operation information of the target software, optionally, in actual applications, when the software is running normally, the user can also trigger the request command by operating the relevant keys or controls on the software side, so that the software starts to collect the software operation.
  • the software will also generate target log files based on the collected target logs.
  • the software can encode and compress the collected logs to generate target log files; and then upload the target log files to the server to instruct the server to perform the following operations.
  • the server parses the target log file to obtain the target log of abnormal software operation, and stores the target log to the server.
  • the target log stored in the server allows The target device is searched through a predetermined search method, so that the target device can determine the abnormality of the target software based on the target log.
  • the developer can obtain the target log of abnormal software operation from the server through the search method on the terminal device or the web system.
  • generating a target log file based on the target log includes: encoding the target log to obtain an encoded file; and compressing the encoded file to obtain the target log file.
  • the target log file is obtained by encoding and compressing the target log.
  • the target log can be protobuf-encoded and then compressed to obtain the target log file.
  • the method further includes: upon receiving the request instruction for requesting feedback that an exception occurs in the target software, collecting the information that the target software runs when the exception occurs.
  • Target business log of the target business wherein the target business log is used to indicate logs within a predetermined time period before and after generating the target log; upload the target business log to the server.
  • the target software when the target software receives a request instruction to feedback that the target software is abnormal, it can also collect the target business logs of the target business running when the target software is abnormal, for example, before and after the target software is abnormal.
  • the target business log run within the predetermined time period is uploaded to the server at the same time.
  • uploading the target log file to the server includes: uploading the target log file to the server by calling a first server interface.
  • the target software can upload the target log file by calling the server interface.
  • FIG. 3 is a flow chart 2 of a method for determining software anomalies according to an embodiment of the present disclosure. As shown in Figure 3, the process includes the following steps:
  • Step S302 Receive a target log file sent by the target software, wherein the target log file is generated by the target software based on the target log, and the target log is generated when the target software receives a request for feedback on the target.
  • the software encounters abnormal request instructions, it is collected by the target software;
  • Step S304 Parse the target log file to obtain the target log so that the target device determines an abnormality of the target software based on the target log.
  • the target log file sent by the target software is received.
  • the target log file is obtained by collecting the target log of the target software running when the target software receives a request instruction requesting feedback of the abnormal situation when the target software is abnormal. Generated, and then parse the target log file to obtain the target log; thereby allowing the target device to determine the abnormality of the target software based on the target log. It avoids the problems existing in related technologies such as guessing the cause of software anomalies or determining software anomalies through the recurrence of anomalies, and solves the problem of low efficiency in locating software anomalies existing in related technologies, thereby achieving This has the effect of improving the efficiency of software abnormality problem diagnosis.
  • the execution subject of the above steps can be a server, such as a server, or a cloud, or a processor with human-computer interaction capabilities configured on a storage device, or a processing device or processing unit with similar processing capabilities, but Not limited to this.
  • the following takes the server to perform the above operations as an example (this is only an illustrative explanation. In actual operations, other devices or modules can also be used to perform the above operations) for explanation:
  • the server receives the target log file sent by the target software.
  • the target software such as the APP
  • the user can feedback the abnormal situation on the software side, for example, by clicking on the software interface.
  • Relevant buttons or controls trigger a request command to request feedback on software anomalies.
  • the software After receiving the request command, the software starts collecting target logs.
  • the target log is used to reflect abnormal operation information of the target software.
  • the user can also trigger the request command by operating the relevant buttons or controls on the software side, so that the software starts collecting logs related to the software's operation.
  • the software side After the software side collects the target logs, it will The log generates a target log file, and then uploads the target log file to the server; the server then parses the target log file, for example, decompresses and decodes the target log file to obtain the target log; in practical applications, the server
  • the obtained target log can be stored in the search engine ES.
  • the target log stored in the ES allows the target device to search for it through a predetermined search method, so that the target device can determine the abnormality of the target software based on the target log.
  • developers can obtain the target log of software abnormality from the server through search on the terminal device or web system, so as to determine the cause of the software abnormality. That is, through the software operation log, the problem and cause of the software abnormality can be quickly determined and solved.
  • the related technology has the problem of low efficiency in locating software abnormal problems, thereby achieving the effect of improving the efficiency of software abnormal problem diagnosis.
  • parsing the target log file to obtain the target log includes: periodically scanning a local memory at a predetermined frequency, wherein the local memory is configured to store the received log file; When the target log file is scanned, the target log file is parsed to obtain the target log.
  • the server can scan the local storage regularly, for example, scan the local storage periodically every 10 seconds, and the local storage is set to store the log file uploaded from the software side, and the log file can Including the above target log files, the local storage may include log files of different types of software abnormality problems uploaded by different users, or log files of normal operation of the software, and then parse the target log file to obtain the target log.
  • parsing the target log file to obtain the target log includes: decompressing the target log file to obtain the decompressed file; decoding the decompressed file to obtain the decompressed file. target log.
  • parsing the target log file includes decompressing the target log file and then performing a decoding operation to obtain the target log. Through this embodiment, the purpose of parsing the target log file to obtain the target log is achieved.
  • the method further includes: storing the target log to a search engine ES, wherein the The target log allows the target device to be searched through a predetermined search method.
  • the server can store the target log in the search engine ES, and the target log in the ES allows the target device to obtain it through search.
  • the developer can search on the terminal The device or web system side obtains the target log of the software running abnormality from the server through search, thereby determining the cause of the software abnormality, that is, quickly determining the problem and cause of the software abnormality through the software running log.
  • the method further includes: receiving a search request sent by the target device; determining whether the target keyword included in the search request is the same as If the target log matches, the target log is sent to the target device to display the target log on the target device.
  • the server can receive a search request sent by the target device.
  • the developer can obtain the target of abnormal software operation from the server through search on the terminal device or web system.
  • Log that is, the developer calls the server interface through the log search page of the target device to perform a conditional search of the log.
  • the server can send the corresponding target log to the target device.
  • the target device displays the target log, so that the developer can determine the problem and cause of the software exception based on the target log.
  • the purpose of obtaining the target log from the server through search is achieved, thereby achieving the purpose of determining the target software abnormality problem, and achieving the effect of improving the efficiency and convenience of locating software abnormality problems.
  • Figure 4 is a framework diagram of an application APP abnormality determination system according to a specific embodiment of the present disclosure. As shown in Figure 4, the system includes: a log collection module 402, a log upload module 404, a log analysis module 406, a log storage module 408 and a log Search module 410. The functions of each module are described below:
  • the log collection module 402 is configured to collect APP (corresponding to the aforementioned software) logs.
  • the APP terminal or mobile phone terminal collects logs, as shown in the mobile phone icon in Figure 4;
  • the log upload module 404 is configured to upload APP log files.
  • the mobile phone can upload log files to the server through HTTP transmission, which includes encoding and compressing the collected APP logs to obtain APP log files, and uploading the APP log files to the server ;
  • the log parsing module 406 is configured to parse the APP log file, which includes decompressing and decoding the APP log file to obtain the APP log, and then storing the parsed APP log in the search engine ES through the log storage module 408 ; It should be noted that the above-mentioned log parsing module 406 and log storage module 408 can be combined into one module, such as a log parsing and storage module;
  • the log search module 410 in Figure 4 is set to search APP logs, for example, to search logs for abnormal APP operation.
  • developers or users can log in to the log viewing system through a browser, and the log query service is based on the query conditions input by the user. Go to the ES system to query the logs, and then return the query results to the user;
  • log collection and log search are linked by the ES system to form the entire system.
  • Figure 5 is a flow chart of a method for determining application APP anomalies according to a specific embodiment of the present disclosure. As shown in Figure 5, the process includes the following steps:
  • S502 use the APP (corresponding to the aforementioned software) to report abnormal problems. For example, when the APP runs abnormally, click on the problem feedback and allow uploading of operation logs;
  • the APP side collects logs, which includes collecting error logs (corresponding to the aforementioned target logs) and part of the business logs (corresponding to the aforementioned target business logs).
  • the user can also feedback that the APP is normal through the APP side.
  • S506 Encode and compress APP logs (including the above error logs and some business logs), for example, protobuf encode the collected logs and write them into files;
  • the APP calls the server interface (corresponding to the aforementioned first server interface) to upload the log;
  • the server receives the log files and puts them on the host disk.
  • the received log files can be stored on a daily basis. For example, log files received on the same day can be placed in the same folder, and Locally stored log files can be cleaned regularly, for example, the host disk can be cleaned every month or ten days or other cycles to save storage space;
  • the server regularly scans the uploaded files with a scheduled task, for example, scans the directory regularly to check whether there are uploaded log files;
  • developers can call the server interface through the log search page to search for log conditions.
  • the target log will be sent to the web system or browser, so that developers can view the target log.
  • the abnormal log can be uploaded to the log server in real time.
  • the developer gets feedback on the abnormal operation of the APP, he can directly go to the system to retrieve the detailed abnormal log based on the relevant information.
  • Problem locating can help developers quickly locate abnormal operation problems on the APP side, which greatly improves the efficiency and convenience of APP side problem locating and solves problems faster; compared with related technologies, through description of the problem language and through use testing The accuracy and timeliness of locating the problem through machine recurrence are relatively low.
  • the embodiment of the present disclosure can directly obtain the running log at that time through this system, which is very direct and efficient.
  • the method according to the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is Better implementation.
  • the technical solution of the present disclosure can be embodied in the form of a software product in essence or that contributes to the existing technology.
  • the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present disclosure.
  • FIG. 6 is a structural block diagram of a device for determining software anomalies according to an embodiment of the present disclosure. As shown in Figure 6, the device includes:
  • the first collection module 602 is configured to collect target logs when receiving a request instruction for requesting feedback that an abnormality occurs in the target software, wherein the target log is used to display abnormal operation information of the target software;
  • the generation module 604 is configured to generate a target log file based on the target log
  • the first upload module 606 is configured to upload the target log file to the server to instruct the server to parse the target log file to obtain the target log, so that the target device determines the target log based on the target log. Anomalies in the target software.
  • the above-mentioned generation module 604 includes: an encoding unit configured to encode the target log to obtain an encoded file; a compression unit configured to compress the encoded file to obtain the encoded file. Target log file.
  • the above device further includes: a second collection module configured to, upon receiving the request instruction for requesting feedback that an abnormality occurs in the target software, collect all occurrences of an abnormality in the target software.
  • the second upload module is configured to upload the target business log Upload to the server.
  • FIG. 7 is a structural block diagram 2 of a device for determining software anomalies according to an embodiment of the present disclosure. As shown in Figure 7, the device includes:
  • the first receiving module 702 is configured to receive a target log file sent by the target software, wherein the target log file is generated by the target software based on the target log, and the target log is generated by the target software after receiving a message for Collected by the target software when requesting feedback of an abnormality request instruction in the target software;
  • the parsing module 704 is configured to parse the target log file to obtain the target log, so that the target device determines the abnormality of the target software based on the target log.
  • the above-mentioned parsing module 704 includes: a scanning unit configured to periodically scan a local memory at a predetermined frequency, wherein the local memory is configured to store received log files; a parsing unit configured to When the target log file is scanned, the target log file is parsed to obtain the target log.
  • the above-mentioned parsing module 704 includes: a decompression unit configured to decompress the target log file to obtain the decompressed file; and a decoding unit configured to decode the decompressed file to obtain the decompressed file. Describe the target log.
  • the above device further includes: a storage module configured to store the target log to the search engine ES after parsing the target log file to obtain the target log, wherein the ES The target log in allows the target device to be searched through a predetermined search method.
  • the above device further includes: a second receiving module configured to receive a search request sent by the target device after storing the target log to the search engine ES; and a sending module configured to receive the search request after determining If the target keyword included in the search request matches the target log, the target log is sent to the target device to display the target log on the target device.
  • each of the above modules can be implemented through software or hardware.
  • it can be implemented in the following ways, but is not limited to this: the above modules are all located in the same processor; or the above modules can be implemented in any combination.
  • the forms are located in different processors.
  • the computer-readable storage medium may include but is not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM) , mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.
  • ROM read-only memory
  • RAM random access memory
  • mobile hard disk magnetic disk or optical disk and other media that can store computer programs.
  • an electronic device for implementing the above method for determining software anomalies is also provided.
  • the electronic device includes a memory 802 and a processor 804.
  • the memory 802 stores There is a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.
  • the above-mentioned electronic device may be located in at least one network device among multiple network devices of the computer network.
  • the above-mentioned processor may be configured to perform the following steps through a computer program:
  • S3 Upload the target log file to the server to instruct the server to parse the target log file to obtain the target log, so that the target device determines the abnormality of the target software based on the target log.
  • the structure shown in Figure 8 is only illustrative, and the electronic device can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and a mobile Internet device (Mobile Internet Devices, MID), PAD and other terminal equipment.
  • FIG. 8 does not limit the structure of the above-mentioned electronic device.
  • the electronic device may also include more or fewer components (such as network interfaces, etc.) than shown in FIG. 8 , or have a different configuration than that shown in FIG. 8 .
  • the memory 802 may be configured to store software programs and modules, such as the program instructions/modules corresponding to the method and device for determining software anomalies in the embodiment of the present disclosure.
  • the processor 804 runs the software programs and modules stored in the memory 802, Thereby executing various functional applications and data processing, that is, realizing the above-mentioned method of determining software anomalies.
  • Memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 802 may further include memory located remotely relative to the processor 804, and these remote memories may be connected to the terminal through a network.
  • the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.
  • the memory 802 may include, but is not limited to, the first acquisition module 602 , the generation module 604 and the first upload module 606 in the device for determining software anomalies.
  • it may also include but is not limited to other module units in the above-mentioned software anomaly determination device, which will not be described again in this example.
  • the above-mentioned transmission device 806 is configured to receive or send data via a network.
  • Specific examples of the above-mentioned network may include wired networks and wireless networks.
  • the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through network cables to communicate with the Internet or a local area network.
  • the transmission device 806 is a radio frequency (Radio Frequency, RF) module, which is configured to communicate with the Internet wirelessly.
  • RF Radio Frequency
  • the above-mentioned electronic device also includes: a display 808 configured to display the above-mentioned second control instruction; and a connection bus 810 configured to connect various module components in the above-mentioned electronic device.
  • modules or steps of the present disclosure can be implemented using general-purpose computing devices, and they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices. They may be implemented in program code executable by a computing device, such that they may be stored in a storage device for execution by the computing device, and in some cases may be executed in a sequence different from that shown herein. Or the described steps can be implemented by making them into individual integrated circuit modules respectively, or by making multiple modules or steps among them into a single integrated circuit module. As such, the present disclosure is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种软件异常的确定方法、装置、存储介质及电子装置,其中,该方法包括:在接收到用于请求反馈目标软件出现异常的请求指令的情况下,采集目标日志,目标日志用于显示目标软件出现异常的运行信息(S202);基于目标日志生成目标日志文件(S204);将目标日志文件上传至服务端,以指示服务端解析目标日志文件以得到目标日志,以使目标设备基于目标日志确定目标软件的异常情况(S206)。

Description

软件异常的确定方法、装置、存储介质及电子装置
本公开要求于2022年3月9日提交中国专利局、申请号为202210234277.5、发明名称为“软件异常的确定方法、装置、存储介质及电子装置”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开实施例涉及计算机技术领域,具体而言,涉及一种软件异常的确定方法、装置、存储介质及电子装置。
背景技术
随着移动互联网技术和网络技术的快速发展,软件的使用也越来越多,例如,移动终端APP(Application),下面以移动APP为例进行说明,移动APP作为一个平台,其用户的人数在急速增长,APP的开发能力已成为相关企业的核心竞争力,对APP的运维工作也受到相关企业的高度重视,APP在使用中难免会出现各类问题,当APP端运行出现异常时,开发人员只能根据客户或测试人员的描述来猜测问题出现的原因,即相关技术中对软件异常问题定位的效率较低。如果能够得到软件的运行异常日志,无疑会提高问题定位的准确性及及时性。
针对相关技术中存在的对软件异常问题定位的效率低的问题,目前尚未提出有效的解决方案。
发明内容
本公开实施例提供了一种软件异常的确定方法、装置、存储介质及电子装置。
根据本公开的一个实施例,提供了一种软件异常的确定方法,包括:在接收到用于请求反馈目标软件出现异常的请求指令的情况下,采集目标 日志,其中,所述目标日志用于显示所述目标软件出现异常的运行信息;基于所述目标日志生成目标日志文件;将所述目标日志文件上传至服务端,以指示所述服务端解析所述目标日志文件以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
根据本公开的另一个实施例,提供了一种软件异常的确定方法,包括:接收目标软件发送的目标日志文件,其中,所述目标日志文件是所述目标软件基于目标日志所生成的,所述目标日志是所述目标软件在接收到用于请求反馈所述目标软件出现异常的请求指令的情况下,由所述目标软件采集的;解析所述目标日志文件,以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
根据本公开的又一个实施例,还提供了一种软件异常的确定装置,包括:第一采集模块,设置为在接收到用于请求反馈目标软件出现异常的请求指令的情况下,采集目标日志,其中,所述目标日志用于显示所述目标软件出现异常的运行信息;生成模块,设置为基于所述目标日志生成目标日志文件;第一上传模块,设置为将所述目标日志文件上传至服务端,以指示所述服务端解析所述目标日志文件以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
根据本公开的又一个实施例,还提供了一种软件异常的确定装置,包括:第一接收模块,设置为接收目标软件发送的目标日志文件,其中,所述目标日志文件是所述目标软件基于目标日志所生成的,所述目标日志是所述目标软件在接收到用于请求反馈所述目标软件出现异常的请求指令的情况下,由所述目标软件采集的;解析模块,设置为解析所述目标日志文件,以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
根据本公开的又一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
根据本公开的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。
通过本公开,当目标软件出现异常时,目标软件在接收到用于反馈软件出现异常情况的请求指令的情况下,采集目标软件出现异常时的目标日志,并生成目标日志文件,再将目标日志文件上传至服务端,以指示服务端对目标日志文件进行解析以得到目标日志,从而使得目标设备可基于目标日志确定出目标软件的异常情况。
附图说明
图1是本公开实施例的软件异常的确定方法的移动终端的硬件结构框图;
图2是根据本公开实施例的软件异常的确定方法的流程图一;
图3是根据本公开实施例的软件异常的确定方法的流程图二;
图4是根据本公开具体实施例的应用APP异常的确定系统框架图;
图5是根据本公开具体实施例的应用APP异常的确定方法的流程图;
图6是根据本公开实施例的软件异常的确定装置的结构框图一;
图7是根据本公开实施例的软件异常的确定装置的结构框图二;
图8是根据本公开实施例的用于实施软件异常的确定方法的电子装置的结构框图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本公开的实施例。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本公开实施例中所提供的方法实施例可以在移动终端、计算机终端或 者类似的运算装置中执行。以运行在移动终端上为例,图1是本公开实施例的软件异常的确定方法的移动终端的硬件结构框图。如图1所示,移动终端可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和设置为存储数据的存储器104,其中,上述移动终端还可以包括设置为通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
存储器104可设置为存储计算机程序,例如,应用软件的软件程序以及模块,如本公开实施例中的软件异常的确定方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输装置106设置为经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其设置为通过无线方式与互联网进行通讯。
在本实施例中提供了一种软件异常的确定方法,图2是根据本公开实施例的软件异常的确定方法的流程图一,如图2所示,该流程包括如下步骤:
步骤S202,在接收到用于请求反馈目标软件出现异常的请求指令的情况下,采集目标日志,其中,所述目标日志用于显示所述目标软件出现异常的运行信息;
步骤S204,基于所述目标日志生成目标日志文件;
步骤S206,将所述目标日志文件上传至服务端,以指示所述服务端解析所述目标日志文件以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
通过上述步骤,当目标软件出现异常时,目标软件在接收到用于反馈软件出现异常情况的请求指令的情况下,采集目标软件出现异常时的目标日志,并生成目标日志文件,再将目标日志文件上传至服务端,以指示服务端对目标日志文件进行解析以得到目标日志,从而使得目标设备可基于目标日志确定出目标软件的异常情况。避免了相关技术中存在的通过猜测以判断软件异常产生的原因或通过异常复现才能确定软件的异常情况等问题,解决了相关技术中存在的对软件异常问题定位的效率低的问题,进而达到了提高软件异常问题诊断的效率的效果。
其中,上述步骤的执行主体可以为终端,或终端软件,如APP端,或上述目标软件,或者为配置在存储设备上的具备人机交互能力的处理器,或者为具备类似处理能力的处理设备或处理单元等,但不限于此。下面以终端软件执行上述操作为例(仅是一种示例性说明,在实际操作中还可以是其他的设备或模块来执行上述操作)进行说明:
在上述实施例中,终端软件在接收到用于请求反馈目标软件(如APP端)出现异常的请求指令的情况下,采集目标日志,在实际应用中,当软件运行出现异常的情况下,可由用户在软件端反馈该异常情况,例如,可通过点击软件界面中相关按键或控件而触发请求指令,以请求反馈软件异常情况,而软件接收到该请求指令后,开始采集目标日志,目标日志用于反映目标软件出现异常的运行信息,可选地,在实际应用中,在软件运行正常的情况下,用户也可以通过操作软件端相关按键或控件以触发请求指 令,从而使软件开始采集软件运行情况的相关日志;软件端还将基于采集的目标日志生成目标日志文件,在实际应用中,软件端可对采集到的日志进行编码及压缩操作,以生成目标日志文件;再将目标日志文件上传至服务端,以指示服务端执行如下操作,例如,由服务端对目标日志文件进行解析以得到软件运行异常的目标日志,并将目标日志存储至服务端,存储在服务端中的目标日志允许目标设备通过预定搜索方式搜索得到,从而可以使得目标设备基于目标日志确定出目标软件的异常情况,例如,开发人员可在终端设备或web系统端通过搜索方式从服务端获取软件运行异常的目标日志,从而确定出软件异常的原因,即通过软件运行日志快速确定软件异常的问题及原因,解决了相关技术中存在的对软件异常问题定位的效率低的问题,进而达到了提高软件异常问题诊断的效率的效果。
在一个可选的实施例中,基于所述目标日志生成目标日志文件包括:对所述目标日志进行编码,以得到编码文件;对所述编码文件进行压缩,以得到所述目标日志文件。在本实施例中,通过对目标日志进行编码及压缩操作,以得到目标日志文件,在实际应用中,可对目标日志进行protobuf编码再进行压缩操作,以得到目标日志文件。通过本实施例,实现了对目标日志进行编码、压缩操作以得到目标日志文件的目的。
在一个可选的实施例中,所述方法还包括:在接收到用于请求反馈所述目标软件出现异常的所述请求指令的情况下,采集所述目标软件出现所述异常时所运行的目标业务的目标业务日志,其中,所述目标业务日志用于指示生成所述目标日志前后的预定时间段内的日志;将所述目标业务日志上传至所述服务端。在本实施例中,目标软件端在接收到反馈目标软件出现异常的请求指令的情况下,还可同时采集目标软件出现异常时所运行的目标业务的目标业务日志,例如,目标软件出现异常前后的预定时间段内所运行的目标业务日志,同时将目标业务日志也上传至服务端,通过本实施例,可实现基于目标日志及目标业务日志以更准确地确定目标软件异常问题的目的。
在一个可选的实施例中,将所述目标日志文件上传至服务端包括:通 过调用第一服务端接口的方式将所述目标日志文件上传至所述服务端。在在实际应用中,目标软件端可通过调用服务端接口的方式进行目标日志文件的上传。
在本实施例中还提供了一种软件异常的确定方法,图3是根据本公开实施例的软件异常的确定方法的流程图二,如图3所示,该流程包括如下步骤:
步骤S302,接收目标软件发送的目标日志文件,其中,所述目标日志文件是所述目标软件基于目标日志所生成的,所述目标日志是所述目标软件在接收到用于请求反馈所述目标软件出现异常的请求指令的情况下,由所述目标软件采集的;
步骤S304,解析所述目标日志文件,以得到所述目标日志以使目标设备基于所述目标日志确定所述目标软件的异常情况。
通过上述步骤,接收目标软件发送的目标日志文件,目标日志文件是在目标软件出现异常时,由目标软件接收到请求反馈该异常情况的请求指令的情况下,采集目标软件运行的目标日志后所生成的,再解析目标日志文件,以得到目标日志;从而使得目标设备可基于目标日志确定出目标软件的异常情况。避免了相关技术中存在的通过猜测以判断软件异常产生的原因或通过异常复现才能确定软件的异常情况等问题,解决了相关技术中存在的对软件异常问题定位的效率低的问题,进而达到了提高软件异常问题诊断的效率的效果。
其中,上述步骤的执行主体可以为服务端,如服务器,或云端,或者为配置在存储设备上的具备人机交互能力的处理器,或者为具备类似处理能力的处理设备或处理单元等,但不限于此。下面以服务端执行上述操作为例(仅是一种示例性说明,在实际操作中还可以是其他的设备或模块来执行上述操作)进行说明:
在上述实施例中,服务端接收目标软件发送的目标日志文件,例如,目标软件(如APP端)在运行中出现异常时,可由用户在软件端反馈该 异常情况,例如,可通过点击软件界面中相关按键或控件而触发请求指令,以请求反馈软件异常情况,而软件接收到该请求指令后,开始采集目标日志,目标日志用于反映目标软件出现异常的运行信息,可选地,在实际应用中,在软件运行正常的情况下,用户也可以通过操作软件端相关按键或控件以触发请求指令,从而使软件开始采集软件运行情况的相关日志,软件端在采集目标日志后,将基于目标日志生成目标日志文件,再将目标日志文件上传至服务端;服务端再对目标日志文件进行解析,例如,对目标日志文件进行解压、解码操作,以得到目标日志;在实际应用中,服务端可将所得到的目标日志存储至搜索引擎ES中,存储在ES中的目标日志允许目标设备通过预定搜索方式搜索得到,从而可以使得目标设备基于目标日志确定出目标软件的异常情况。例如,开发人员可在终端设备或web系统端通过搜索方式从服务端获取软件运行异常的目标日志,从而确定出软件异常的原因,即通过软件运行日志快速确定软件异常的问题及原因,解决了相关技术中存在的对软件异常问题定位的效率低的问题,进而达到了提高软件异常问题诊断的效率的效果。
在一个可选的实施例中,解析所述目标日志文件,以得到所述目标日志包括:按预定频率周期性地扫描本地存储器,其中,所述本地存储器中设置为存储接收到的日志文件;在扫描到所述目标日志文件的情况下,解析所述目标日志文件,以得到所述目标日志。在本实施例中,服务端可定时对本地存储器进行扫描,例如,按每隔10s时间周期性地扫描本地存储器,而本地存储器中设置为存储从软件端上传的日志文件,该日志文件中可包括上述目标日志文件,本地存储器中可包括不同用户上传的不同类的软件异常问题的日志文件,或软件正常运行的日志文件,然后解析目标日志文件,以得到目标日志。通过本实施例,实现了及时获取服务端所接收到的日志文件的目的,以及解析得到目标日志的目的。
在一个可选的实施例中,解析所述目标日志文件,以得到所述目标日志包括:对所述目标日志文件进行解压,以得到解压文件;对所述解压文件进行解码,以得到所述目标日志。在本实施例中,解析目标日志文件包 括对目标日志文件进行解压,再进行解码操作,从而得到目标日志。通过本实施例,实现了解析目标日志文件以得到目标日志的目的。
在一个可选的实施例中,在解析所述目标日志文件,以得到所述目标日志之后,所述方法还包括:存储所述目标日志至搜索引擎ES,其中,所述ES中的所述目标日志允许所述目标设备通过预定搜索方式搜索得到。在本实施例中,服务端在解析目标日志文件以得到目标日志之后,可将目标日志存储至搜索引擎ES中,而ES中的目标日志允许目标设备通过搜索得到,例如,开发人员可在终端设备或web系统端通过搜索方式从服务端获取软件运行异常的目标日志,从而确定出软件异常的原因,即通过软件运行日志快速确定软件异常的问题及原因。
在一个可选的实施例中,在存储所述目标日志至搜索引擎ES之后,所述方法还包括:接收所述目标设备发送的搜索请求;在确定所述搜索请求中包括的目标关键词与所述目标日志匹配的情况下,将所述目标日志发送至所述目标设备,以在所述目标设备上展示所述目标日志。在本实施例中,在将目标日志存储至ES后,服务端可接收目标设备发送的搜索请求,例如,由开发人员在终端设备或web系统端通过搜索方式从服务端获取软件运行异常的目标日志,即开发人员通过目标设备的日志搜索页面调用服务端接口进行日志的条件搜索,当搜索条件(如关键词)与目标日志匹配的情况下,服务端可将对应的目标日志发送至目标设备,以使目标设备展示目标日志,从而使得开发人员可根据目标日志确定出软件异常的问题及原因。通过本实施例,实现了通过搜索的方式从服务端获取目标日志的目的,进而实现确定目标软件异常的问题的目的,达到了提高软件异常问题定位的效率及便捷性的效果。
显然,上述所描述的实施例仅仅是本公开一部分的实施例,而不是全部的实施例。下面结合实施例对本公开进行具体说明:
图4是根据本公开具体实施例的应用APP异常的确定系统框架图,如图4所示,该系统包括:日志采集模块402,日志上传模块404,日志 解析模块406,日志存储模块408以及日志搜索模块410。下面对各模块功能进行说明:
日志采集模块402设置为采集APP(对应于前述软件)日志,例如由APP端(或手机端)进行日志的采集,如图4中的手机图标所示;日志上传模块404设置为上传APP日志文件,在实际应用中,手机端可通过HTTP传输方式,将日志文件上传到服务端,其中,包括对采集的APP日志进行编码、压缩,以得到APP日志文件,并将APP日志文件上传至服务端;日志解析模块406设置为对APP日志文件进行解析,其中,包括对APP日志文件进行解压、解码操作,以得到APP日志,再通过日志存储模块408将解析得到的APP日志存储到搜索引擎ES中;需要说明的是,上述日志解析模块406与日志存储模块408可合成为一个模块,如日志解析及存储模块;
图4中的日志搜索模块410设置为搜索APP日志,例如,搜索APP运行异常的日志,在实际应用中,开发人员或用户可通过浏览器登录日志查看系统,日志查询服务根据用户输入的查询条件到ES系统查询日志,然后将查询结果返回给用户;
在上述系统中,日志采集和日志搜索以ES系统为纽带,组成整个系统。
图5是根据本公开具体实施例的应用APP异常的确定方法的流程图,如图5所示,该流程包括如下步骤:
S502,使用APP(对应于前述软件)反馈异常问题,例如,APP端运行出现异常时,点击问题反馈,并允许上传运行日志;
S504,APP端进行日志收集,其中,包括采集错误日志(对应于前述目标日志)及部分业务日志(对应于前述目标业务日志),当然,在实际应用中,用户也可通过APP端反馈APP正常运行的日志;
S506,对APP日志(包括上述错误日志及部分业务日志)进行编码及压缩操作,例如,将采集到的日志进行protobuf编码后写入文件;
S508,APP端调用服务端接口(对应于前述第一服务端接口),进行日志的上传;
S510,服务端接收到日志文件后放到主机磁盘,在实际应用中,可对接收到的日志文件按天进行存放,例如,同一天接收到的日志文件可放入同一个文件夹中,还可定期地对本地存储的日志文件进行清理,例如,每个一个月或十天或其它周期对主机磁盘进行清理,以节约存储空间;
S512,服务端定时任务扫描上传的文件,例如,定时扫描目录,以查看是否有上传的日志文件;
S514,在扫描到存在新上传的日志文件的情况下,对日志文件进行解压、解码;
S516,将解压、解码后得到的日志保存到ES中;
S518,开发人员可通过日志搜索页面调用服务端接口进行日志的条件搜索,当搜索条件与目标日志匹配的情况下,将目标日志发送至web系统或浏览器端,以便于开发人员查看目标日志,从而确定APP异常的问题及原因。
通过上述实施例,通过日志的上传功能及检索功能,使异常日志可以实时的上传到日志服务器,到开发人员得到APP端运行异常反馈时,可以根据相关信息直接去本系统检索详细的异常日志,进行问题定位,可以帮助开发人员快速定位APP端运行异常问题,大大提高了APP端问题定位的效率及便捷性,使问题更快解决;相对于相关技术中通过对问题语言的描述和通过使用测试机复现的方式来定位问题,准确性和及时性都比较低,本公开实施例能够通过本系统直接拿到当时运行日志,非常的直接高效。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软 件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。
在本实施例中还提供了一种软件异常的确定装置,图6是根据本公开实施例的软件异常的确定装置的结构框图一,如图6所示,该装置包括:
第一采集模块602,设置为在接收到用于请求反馈目标软件出现异常的请求指令的情况下,采集目标日志,其中,所述目标日志用于显示所述目标软件出现异常的运行信息;
生成模块604,设置为基于所述目标日志生成目标日志文件;
第一上传模块606,设置为将所述目标日志文件上传至服务端,以指示所述服务端解析所述目标日志文件以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
在一个可选的实施例中,上述生成模块604包括:编码单元,设置为对所述目标日志进行编码,以得到编码文件;压缩单元,设置为对所述编码文件进行压缩,以得到所述目标日志文件。
在一个可选的实施例中,上述装置还包括:第二采集模块,设置为在接收到用于请求反馈所述目标软件出现异常的所述请求指令的情况下,采集所述目标软件出现所述异常时所运行的目标业务的目标业务日志,其中,所述目标业务日志用于指示生成所述目标日志前后的预定时间段内的日志;第二上传模块,设置为将所述目标业务日志上传至所述服务端。
在一个可选的实施例中,上述第一上传模块606包括:上传单元,设置为通过调用第一服务端接口的方式将所述目标日志文件上传至所述服务端。
在本实施例中还提供了一种软件异常的确定装置,图7是根据本公开实施例的软件异常的确定装置的结构框图二,如图7所示,该装置包括:
第一接收模块702,设置为接收目标软件发送的目标日志文件,其中, 所述目标日志文件是所述目标软件基于目标日志所生成的,所述目标日志是所述目标软件在接收到用于请求反馈所述目标软件出现异常的请求指令的情况下,由所述目标软件采集的;
解析模块704,设置为解析所述目标日志文件,以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
在一个可选的实施例中,上述解析模块704包括:扫描单元,设置为按预定频率周期性地扫描本地存储器,其中,所述本地存储器中设置为存储接收到的日志文件;解析单元,设置为在扫描到所述目标日志文件的情况下,解析所述目标日志文件,以得到所述目标日志。
在一个可选的实施例中,上述解析模块704包括:解压单元,设置为对所述目标日志文件进行解压,以得到解压文件;解码单元,设置为对所述解压文件进行解码,以得到所述目标日志。
在一个可选的实施例中,上述装置还包括:存储模块,设置为在解析所述目标日志文件,以得到所述目标日志之后,存储所述目标日志至搜索引擎ES,其中,所述ES中的所述目标日志允许所述目标设备通过预定搜索方式搜索得到。
在一个可选的实施例中,上述装置还包括:第二接收模块,设置为在存储所述目标日志至搜索引擎ES之后,接收所述目标设备发送的搜索请求;发送模块,设置为在确定所述搜索请求中包括的目标关键词与所述目标日志匹配的情况下,将所述目标日志发送至所述目标设备,以在所述目标设备上展示所述目标日志。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
本公开的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。
根据本公开实施例的又一个方面,还提供了一种用于实施上述软件异常的确定方法的电子装置,如图8所示,该电子装置包括存储器802和处理器804,该存储器802中存储有计算机程序,该处理器804被设置为通过计算机程序执行上述任一项方法实施例中的步骤。
可选地,在本实施例中,上述电子装置可以位于计算机网络的多个网络设备中的至少一个网络设备。
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:
S1,在接收到用于请求反馈目标软件出现异常的请求指令的情况下,采集目标日志,其中,所述目标日志用于显示所述目标软件出现异常的运行信息;
S2,基于所述目标日志生成目标日志文件;
S3,将所述目标日志文件上传至服务端,以指示所述服务端解析所述目标日志文件以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
可选地,本领域普通技术人员可以理解,图8所示的结构仅为示意,电子装置也可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图8其并不对上述电子装置的结构造成限定。例如,电子装置还可包括比图8中所示更多或者更少的组件(如网络接口等),或者具有与图8所示不同的配置。
其中,存储器802可设置为存储软件程序以及模块,如本公开实施例中的软件异常的确定方法和装置对应的程序指令/模块,处理器804通过运行存储在存储器802内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的软件异常的确定方法。存储器802可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器802可进一步包括相对于处理器804远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。作为一种示例,如图8所示,上述存储器802中可以但不限于包括上述软件异常的确定装置中的第一采集模块602、生成模块604和第一上传模块606。此外,还可以包括但不限于上述软件异常的确定装置中的其他模块单元,本示例中不再赘述。
可选地,上述的传输装置806设置为经由一个网络接收或者发送数据。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置806包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置806为射频(Radio Frequency,RF)模块,其设置为通过无线方式与互联网进行通讯。
此外,上述电子装置还包括:显示器808,设置为显示上述第二控制指令;和连接总线810,设置为连接上述电子装置中的各个模块部件。
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或 者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。

Claims (19)

  1. 一种软件异常的确定方法,包括:
    在接收到用于请求反馈目标软件出现异常的请求指令的情况下,采集目标日志,其中,所述目标日志用于显示所述目标软件出现异常的运行信息;
    基于所述目标日志生成目标日志文件;
    将所述目标日志文件上传至服务端,以指示所述服务端解析所述目标日志文件以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
  2. 根据权利要求1所述的软件异常的确定方法,其中,基于所述目标日志生成目标日志文件包括:
    对所述目标日志进行编码,以得到编码文件;
    对所述编码文件进行压缩,以得到所述目标日志文件。
  3. 根据权利要求1所述的软件异常的确定方法,其中,所述方法还包括:
    在接收到用于请求反馈所述目标软件出现异常的所述请求指令的情况下,采集所述目标软件出现所述异常时所运行的目标业务的目标业务日志,其中,所述目标业务日志用于指示生成所述目标日志前后的预定时间段内的日志;
    将所述目标业务日志上传至所述服务端。
  4. 根据权利要求1所述的软件异常的确定方法,其中,将所述目标日志文件上传至服务端包括:
    通过调用第一服务端接口的方式将所述目标日志文件上传至所述服务端。
  5. 一种软件异常的确定方法,包括:
    接收目标软件发送的目标日志文件,其中,所述目标日志文件是所述目标软件基于目标日志所生成的,所述目标日志是所述目标软件在接收到用于请求反馈所述目标软件出现异常的请求指令的情况下,由所述目标软件采集的;
    解析所述目标日志文件,以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
  6. 根据权利要求5所述的软件异常的确定方法,其中,解析所述目标日志文件,以得到所述目标日志包括:
    按预定频率周期性地扫描本地存储器,其中,所述本地存储器中用于存储接收到的日志文件;
    在扫描到所述目标日志文件的情况下,解析所述目标日志文件,以得到所述目标日志。
  7. 根据权利要求6中所述的软件异常的确定方法,其中,解析所述目标日志文件,以得到所述目标日志包括:
    对所述目标日志文件进行解压,以得到解压文件;
    对所述解压文件进行解码,以得到所述目标日志。
  8. 根据权利要求5所述的软件异常的确定方法,其中,在解析所述目标日志文件,以得到所述目标日志之后,所述方法还包括:
    存储所述目标日志至搜索引擎ES,其中,所述ES中的所述目标日志允许所述目标设备通过预定搜索方式搜索得到。
  9. 根据权利要求8所述的软件异常的确定方法,其中,在存储所述目标日志至搜索引擎ES之后,所述方法还包括:
    接收所述目标设备发送的搜索请求;
    在确定所述搜索请求中包括的目标关键词与所述目标日志匹配的情况下,将所述目标日志发送至所述目标设备,以在所述目标设备上 展示所述目标日志。
  10. 一种软件异常的确定装置,包括:
    第一采集模块,设置为在接收到用于请求反馈目标软件出现异常的请求指令的情况下,采集目标日志,其中,所述目标日志用于显示所述目标软件出现异常的运行信息;
    生成模块,设置为基于所述目标日志生成目标日志文件;
    第一上传模块,设置为将所述目标日志文件上传至服务端,以指示所述服务端解析所述目标日志文件以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
  11. 根据权利要求10所述的装置,其中,所述生成模块包括:
    编码单元,设置为对所述目标日志进行编码,以得到编码文件;
    压缩单元,设置为对所述编码文件进行压缩,以得到所述目标日志文件。
  12. 根据权利要求10所述的装置,其中,所述装置还包括:
    第二采集模块,设置为在接收到用于请求反馈所述目标软件出现异常的所述请求指令的情况下,采集所述目标软件出现所述异常时所运行的目标业务的目标业务日志,其中,所述目标业务日志用于指示生成所述目标日志前后的预定时间段内的日志;
    第二上传模块,设置为将所述目标业务日志上传至所述服务端。
  13. 根据权利要求10所述的装置,其中,所述第一上传模块包括:
    上传单元,设置为通过调用第一服务端接口的方式将所述目标日志文件上传至所述服务端。
  14. 一种软件异常的确定装置,包括:
    第一接收模块,设置为接收目标软件发送的目标日志文件,其中, 所述目标日志文件是所述目标软件基于目标日志所生成的,所述目标日志是所述目标软件在接收到用于请求反馈所述目标软件出现异常的请求指令的情况下,由所述目标软件采集的;
    解析模块,设置为解析所述目标日志文件,以得到所述目标日志,以使目标设备基于所述目标日志确定所述目标软件的异常情况。
  15. 根据权利要求14所述的装置,其中,所述解析模块包括:
    扫描单元,设置为按预定频率周期性地扫描本地存储器,其中,所述本地存储器中用于存储接收到的日志文件;
    解析单元,设置为在扫描到所述目标日志文件的情况下,解析所述目标日志文件,以得到所述目标日志。
  16. 根据权利要求14所述的装置,其中,所述装置还包括:
    存储模块,设置为在解析所述目标日志文件,以得到所述目标日志之后,存储所述目标日志至搜索引擎ES,其中,所述ES中的所述目标日志允许所述目标设备通过预定搜索方式搜索得到。
  17. 根据权利要求14所述的装置,其中,所述装置还包括:
    第二接收模块,设置为在存储所述目标日志至搜索引擎ES之后,接收所述目标设备发送的搜索请求;
    发送模块,设置为在确定所述搜索请求中包括的目标关键词与所述目标日志匹配的情况下,将所述目标日志发送至所述目标设备,以在所述目标设备上展示所述目标日志。
  18. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被处理器执行时实现所述权利要求1至4或5至9任一项中所述的方法的步骤。
  19. 一种电子装置,包括存储器、处理器以及存储在所述存储器 上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现所述权利要求1至4或5至9任一项中所述的方法的步骤。
PCT/CN2022/121040 2022-03-09 2022-09-23 软件异常的确定方法、装置、存储介质及电子装置 WO2023168926A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210234277.5A CN114780377A (zh) 2022-03-09 2022-03-09 软件异常的确定方法、装置、存储介质及电子装置
CN202210234277.5 2022-03-09

Publications (1)

Publication Number Publication Date
WO2023168926A1 true WO2023168926A1 (zh) 2023-09-14

Family

ID=82422798

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/121040 WO2023168926A1 (zh) 2022-03-09 2022-09-23 软件异常的确定方法、装置、存储介质及电子装置

Country Status (2)

Country Link
CN (1) CN114780377A (zh)
WO (1) WO2023168926A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117331754A (zh) * 2023-10-17 2024-01-02 书行科技(北京)有限公司 异常问题还原方法、系统、电子设备和计算机存储介质
CN117522349A (zh) * 2024-01-04 2024-02-06 山东保医通信息科技有限公司 一种多源数据业务的自动化处理方法、设备及介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114780377A (zh) * 2022-03-09 2022-07-22 青岛海尔科技有限公司 软件异常的确定方法、装置、存储介质及电子装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150379008A1 (en) * 2014-06-25 2015-12-31 International Business Machines Corporation Maximizing the information content of system logs
CN109992485A (zh) * 2019-03-20 2019-07-09 珠海天燕科技有限公司 一种调试日志提供方法、终端设备及服务器
CN110688286A (zh) * 2018-07-05 2020-01-14 北京三快在线科技有限公司 应用程序运行信息传送方法及装置、存储介质、电子设备
CN111625381A (zh) * 2020-04-09 2020-09-04 腾讯音乐娱乐科技(深圳)有限公司 应用程序的运行场景复现方法、装置、设备及存储介质
CN114780377A (zh) * 2022-03-09 2022-07-22 青岛海尔科技有限公司 软件异常的确定方法、装置、存储介质及电子装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150379008A1 (en) * 2014-06-25 2015-12-31 International Business Machines Corporation Maximizing the information content of system logs
CN110688286A (zh) * 2018-07-05 2020-01-14 北京三快在线科技有限公司 应用程序运行信息传送方法及装置、存储介质、电子设备
CN109992485A (zh) * 2019-03-20 2019-07-09 珠海天燕科技有限公司 一种调试日志提供方法、终端设备及服务器
CN111625381A (zh) * 2020-04-09 2020-09-04 腾讯音乐娱乐科技(深圳)有限公司 应用程序的运行场景复现方法、装置、设备及存储介质
CN114780377A (zh) * 2022-03-09 2022-07-22 青岛海尔科技有限公司 软件异常的确定方法、装置、存储介质及电子装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117331754A (zh) * 2023-10-17 2024-01-02 书行科技(北京)有限公司 异常问题还原方法、系统、电子设备和计算机存储介质
CN117331754B (zh) * 2023-10-17 2024-04-19 书行科技(北京)有限公司 异常问题还原方法、系统、电子设备和计算机存储介质
CN117522349A (zh) * 2024-01-04 2024-02-06 山东保医通信息科技有限公司 一种多源数据业务的自动化处理方法、设备及介质
CN117522349B (zh) * 2024-01-04 2024-03-29 山东保医通信息科技有限公司 一种多源数据业务的自动化处理方法、设备及介质

Also Published As

Publication number Publication date
CN114780377A (zh) 2022-07-22

Similar Documents

Publication Publication Date Title
WO2023168926A1 (zh) 软件异常的确定方法、装置、存储介质及电子装置
CN105611330B (zh) 智能电视维护方法、系统及一种服务器、一种移动终端
EP3318991B1 (en) Monitoring processes running on a platform as a service architecture
US8788699B2 (en) Information processing apparatus and document data producing method
US10033796B2 (en) SAAS network-based backup system
CN111522922A (zh) 日志信息查询方法、装置、存储介质及计算机设备
US20140229423A1 (en) Data consistency and rollback for cloud analytics
CN111143163B (zh) 数据监控方法、装置、计算机设备和存储介质
US11163943B2 (en) Method and system for partial application data collection
RU2013121558A (ru) Способ и устройство получения информации обратной связи от устройства
CN113687974B (zh) 客户端日志处理方法、装置及计算机设备
CN107957940B (zh) 一种测试日志处理方法、系统及终端
US10387370B2 (en) Collecting test results in different formats for storage
CN110851324B (zh) 基于日志的巡检处理方法、装置以及电子设备、存储介质
CN112685248A (zh) 智能网卡监控日志获取方法、装置、电子设备及存储介质
EP3754998A1 (en) Streaming media quality monitoring method and system
CN113821254A (zh) 接口数据处理方法、装置、存储介质及设备
CN117271584A (zh) 数据处理方法及装置、计算机可读存储介质和电子设备
US9374437B2 (en) Schema validation proxy
CN112788090A (zh) 一种网络资源传输方法、装置及系统
CN111045934A (zh) 页面分析方法、装置、客户端、存储介质及电子设备
CN109474386B (zh) 信令跟踪方法、系统、网元设备和存储介质
CN110928547A (zh) 公共文件的提取方法、装置、终端和存储介质
CN114385457A (zh) 应用程序数据采集方法、装置、设备及存储介质
CN112965767A (zh) 作业的处理方法和装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22930551

Country of ref document: EP

Kind code of ref document: A1