Android log management method, storage medium and equipment

By creating log modules for Android devices and uploading them remotely, the problem of high maintenance costs of Android devices is solved, and the problem is quickly positioned and solved, reducing maintenance costs and improving user experience.

CN119902944APending Publication Date: 2025-04-29SHENZHEN DAS INTELLITECH CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411888894.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In the field of IoT, the software maintenance cost of Android devices is high, especially due to the wide distribution of equipment, low efficiency in on-site troubleshooting, and difficulty in reproducing problem conditions, resulting in a geometric increase in maintenance costs.

Method used

Design an Android log management method, by creating an Android log module for each Android device, recording different types of data to form a log, and locally saving and remote uploading are performed when the device is online, including the first remote upload and the second remote upload.

Benefits of technology

This method enables developers to quickly analyze logs, locate problems, improve response efficiency, reduce software maintenance costs, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902944A_ABST
    Figure CN119902944A_ABST
Patent Text Reader

Abstract

The invention relates to an Android log management method, a storage medium and equipment. The method comprises the following steps: S1, creating an Android log module for each piece of Android equipment; and S2, recording different types of data through an Android log module to form a log, and locally storing the log. And S3, when the Android device is online, performing first remote uploading and second remote uploading on the locally stored log. According to the method and the system, a developer can analyze the recorded log and quickly locate the problem, so that the customer problem can be timely responded and solved, the customer problem solving efficiency of the developer is improved, the project software maintenance cost is effectively reduced, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer and software technology, and in particular to an Android log management method, storage medium and device. Background Art

[0002] In the field of Internet of Things, the demand for software is increasing rapidly, and many customers have their own ideas, which makes the design logic more and more complicated. Unexpected problems in the program increase on site, and after the problem occurs, customers are required to send equipment or developers are required to troubleshoot the problem on site. This is not only inconvenient, but also increases maintenance costs.

[0003] In terms of maintenance costs, if you go to the site to investigate the problem after a problem occurs, this maintenance cost will increase exponentially. If there are many projects, the development site investigation may provide immediate support for nearby customers, but it will be very difficult for customers far away. In terms of devices, a project will use many Android devices. If each device has a problem, it will be inefficient to investigate and solve the problem one by one on site, and the speed of solving the problem will be slow. Sometimes it may be difficult to reproduce the conditions under which the software problem occurs when you go to the site.

[0004] In summary, if a company has more than one hundred projects in a year, and each project involves dozens or more than one hundred Android devices, if there is a problem, the workload will be huge if they are checked on site one by one, and the user experience will be very poor. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide an Android log management method, storage medium and device.

[0006] The technical solution adopted by the present invention to solve the technical problem is: an Android log management method, the method comprising the following steps: S1. Create an Android log module for each Android device; S2. Record different types of data through the Android log module to form a log, and save the log locally; S3. When the Android device is online, the locally stored log is uploaded remotely for the first time and the second time.

[0007] Furthermore, in the Android log management method described in this embodiment, the Android log module includes daily program logic records, data acquisition records, network data records, and crash problem records.

[0008] Further, in the Android log management method described in this embodiment, step S1 includes: Parameter configuration is performed in the Android log module; wherein the parameter configuration includes log size configuration, log preservation time configuration, log preservation path configuration, and log email information configuration.

[0009] Further, in the Android log management method described in this embodiment, in step S3 of uploading the locally stored logs to a first remote location, the method includes: Through the pre-set email configuration information, the locally saved logs are remotely uploaded to the designated company account via email.

[0010] Further, in the Android log management method described in this embodiment, before performing the first remote upload, the method further includes: Compress the logs saved locally.

[0011] Further, in the Android log management method described in this embodiment, in step S3 of performing a second remote upload of the locally stored log, the method includes: Upload the locally saved logs to the platform via the MQTT protocol or http.

[0012] Further, in the Android log management method described in this embodiment, in the step of uploading the locally stored log to the platform via the MQTT protocol or http method, it includes: Receive the log size acquisition instruction issued by the platform; Sending log page number information to the platform according to the log size acquisition instruction; Receive a log upload instruction issued by the platform, and upload the log to the platform according to the log upload instruction; wherein the log upload instruction is generated according to the log page number information; the log upload instruction is a log paging upload instruction or a log overall upload instruction.

[0013] Further, in the Android log management method described in this embodiment, the method also includes: Determine whether the log time and log size exceed the preset limit threshold. If both exceed, clear the previous log, and write the data record into the Android log module.

[0014] In addition, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps of the Android log management method as described above.

[0015] In addition, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the above-mentioned Android log management method by calling the computer program stored in the memory.

[0016] The implementation of the Android log management method, storage medium and device of the present invention has the following beneficial effects: the present invention can provide developers with logs for analyzing records, quickly locate problems, facilitate timely response and resolution of customer problems, improve the efficiency of developers in resolving customer problems, effectively reduce the cost of project software maintenance, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which: Figure 1 It is a flowchart of an Android log management method provided by an embodiment of the present invention; Figure 2 It is a flowchart of an Android log management method provided by some embodiments of the present invention. DETAILED DESCRIPTION

[0018] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, the specific implementation methods of the present invention are now described in detail with reference to the accompanying drawings. In the following description, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed", "set" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral body; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. When an element is referred to as being "on" or "under" another element, the element can be "directly" or "indirectly" located on the other element, or there may be one or more intermediate elements. The terms "first", "second", "third", etc. are only for the convenience of describing the present technical solution, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first", "second", "third", etc. can explicitly or implicitly include one or more of the features. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.

[0019] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0020] In a preferred embodiment, reference Figure 1The Android log management method of this embodiment includes the following steps: S1. Create an Android log module for each Android device. It can be understood that Android devices refer to various electronic devices running the Android operating system. They can be mobile terminals (such as smartphones), tablet computers, desktop computers, wearable devices, laptops, smart home devices, VR devices, AR devices, digital cameras, etc. In this step, an Android log module is created for each Android device.

[0021] S2. Record different types of data through the Android log module to form a log, and save the log locally. It can be understood that the Android log module includes but is not limited to daily program logic records, data acquisition records, network data records, crash problem records, etc. That is, different types of data include daily program logic data, data acquisition records, network data, crash problems, etc.

[0022] S3. When the Android device is online, the locally saved log is uploaded to the first remote upload and the second remote upload. That is to say, in this embodiment, the transmission method and transmission location of the log include software platform upload (corresponding to the second remote upload) and software local upload (corresponding to the first remote upload). It can be understood that the first remote upload and the second remote upload refer to two different remote upload methods.

[0023] This embodiment can provide developers with logs for analyzing records, quickly locate problems, facilitate timely response and resolution of customer problems, improve developers' efficiency in resolving customer problems, effectively reduce the cost of project software maintenance, and improve user experience.

[0024] In some embodiments, step S1 includes: performing parameter configuration in the Android log module. Wherein, the parameter configuration includes log size configuration, log storage time configuration, log storage path configuration, and log email information configuration. That is to say, in this embodiment, an Android log module is created for each Android device, and parameter configurations such as log size configuration, log storage time configuration, log storage path configuration, and log email information configuration are performed in the Android log module.

[0025] In some embodiments, in step S3, uploading the locally stored logs to a designated company account remotely via email using pre-set email configuration information. Optionally, the locally stored logs may be compressed first, and the compressed logs may be uploaded remotely to the designated company account via email.

[0026] In the second remote upload of the locally saved log in step S3, it includes: uploading the locally saved log to the platform via the MQTT protocol or http. That is to say, the log upload can be transmitted to the platform via the mqtt link, and can also be transmitted to the platform using http. In this step, the technical support personnel can get the log through the mailbox or platform, send it to the corresponding software development engineer to analyze the recorded log, quickly locate the problem, greatly reduce the maintenance cost, and also improve the efficiency of developers in solving customer problems, reducing the cost of the entire project maintenance.

[0027] Optionally, in the step of uploading the locally stored log to the platform via the MQTT protocol or http, the platform subscribes to the log topic and then issues a log size acquisition instruction to the corresponding Android device. The Android device receives the log size acquisition instruction issued by the platform and sends the log page number information to the platform according to the log size acquisition instruction. Receive the log upload instruction issued by the platform and upload the log to the platform according to the log upload instruction. Among them, the log upload instruction is generated according to the log page number information. The log upload instruction is a log paging upload instruction or a log overall upload instruction. It can be understood that in this step, the Android device receives the platform's log size acquisition instruction, performs log paging according to the instruction, and informs the platform of the log page number information. The platform issues the corresponding upload instruction according to the log page number information, and the local reads the log according to the paging and uploads it to the platform. For example, when the platform determines that the locally stored log is too large (exceeding the preset number of pages) based on the log page number information, it is considered that paging upload is required, and then the log paging upload instruction is issued. After receiving the log paging upload instruction, the local uploads the log to the platform in paging until the upload is completed. When the platform determines that the number of locally saved logs does not exceed the preset number of pages based on the log page number information, it believes that it does not need to be uploaded in pages, and then issues a command to upload the log as a whole. When the local receives the command to upload the log as a whole, it uploads the log as a whole to the platform.

[0028] In some embodiments, the method further includes: determining whether the log time and log size exceed a preset limit threshold, if both exceed, clearing the previous log, and then writing the data record to the Android log module. Exemplarily, regarding the log file recording process: first determine the type of log printing (such as whether it is installed print station output or local file output), determine whether the log time and log size exceed the corresponding preset limit threshold, if both exceed, clear the previous log, and write the data record to the Android log module. If the judgment condition is not met, write and save the log.

[0029] In a specific embodiment, reference Figure 2, create an Android project, such as LogManagerProj (Android log module), and reference the logLib module in the project, specify the configuration path and configuration parameters of WlLog, including log size configuration (such as the size limit of the saved log file), log storage time configuration (such as the time when the stored log file expires and is cleared), log storage path configuration, and log email information configuration. Specifically, configure the email account, password, and verification key of EmailUpload, configure the platform address of MQTTManager, connect to the platform, and verify. Collaborate with the platform to define the format of log upload, and upload the log in pages if it is too old. The platform registers the device, uploads the device information, and determines whether the device is online. The platform pulls the device's log file and stores it on the platform. The technical support staff downloads the log of the corresponding device on the platform according to the date through the terminal, and sends it to the corresponding terminal of the development engineer. The development engineer troubleshoots the problems that occur on the user's site and fixes the vulnerabilities in the software based on the program information recorded in the log.

[0030] This embodiment sends the logs generated by the device to the technical support staff, who then upgrade the user's software, thereby efficiently solving on-site problems. Through the above steps, the problem of high cost and low efficiency in daily troubleshooting of software can be quickly solved. This solution makes it easier for technical support staff to communicate with developers, without requiring developers to personally go to the site to help users solve problems.

[0031] In another preferred embodiment, the computer-readable storage medium of this embodiment stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps of the Android log management method of the above embodiment.

[0032] This embodiment can provide developers with logs for analyzing records, quickly locate problems, facilitate timely response and resolution of customer problems, improve developers' efficiency in resolving customer problems, effectively reduce the cost of project software maintenance, and improve user experience.

[0033] In another preferred embodiment, the computer device of this embodiment includes a memory and a processor, the memory stores a computer program, and the processor executes the steps of the Android log management method of the above embodiment by calling the computer program stored in the memory.

[0034] This embodiment can provide developers with logs for analyzing records, quickly locate problems, facilitate timely response and resolution of customer problems, improve developers' efficiency in resolving customer problems, effectively reduce the cost of project software maintenance, and improve user experience.

[0035] The computer-readable storage medium of the present invention may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which may store program codes.

[0036] The processor of the present invention is used to provide computing and control capabilities to support the operation of the device. It should be understood that in the embodiment of the present application, the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0037] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0038] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0039] It can be understood that the above embodiments only express the preferred implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the patent scope of the present invention. It should be pointed out that, for ordinary technicians in this field, the above technical features can be freely combined without departing from the concept of the present invention, and several deformations and improvements can be made, which all belong to the protection scope of the present invention. Therefore, all equivalent changes and modifications made to the scope of the claims of the present invention should belong to the coverage of the claims of the present invention.

Claims

1. An Android log management method, characterized in that: The method comprises the following steps: S1. Create an Android log module for each Android device; S2. Record different types of data through the Android log module to form a log, and save the log locally; S3. When the Android device is online, the locally stored log is uploaded remotely for the first time and the second time.

2. The Android log management method according to claim 1, characterized in that: The Android log module includes daily program logic records, data acquisition records, network data records, and crash problem records.

3. The Android log management method according to claim 1, characterized in that: Step S1 includes: Parameter configuration is performed in the Android log module; wherein the parameter configuration includes log size configuration, log preservation time configuration, log preservation path configuration, and log email information configuration.

4. The Android log management method according to claim 3, characterized in that: In step S3, the first remote uploading of the locally stored log includes: Through the pre-set email configuration information, the locally saved logs are remotely uploaded to the designated company account via email.

5. The Android log management method according to claim 1, characterized in that: Before performing the first remote uploading, the method further includes: Compress the logs saved locally.

6. The Android log management method according to claim 1, characterized in that: In step S3, the second remote uploading of the locally stored log includes: Upload the locally saved logs to the platform via the MQTT protocol or http.

7. The Android log management method according to claim 6, characterized in that: The step of uploading the locally saved log to the platform via the MQTT protocol or http includes: Receive the log size acquisition instruction issued by the platform; Sending log page number information to the platform according to the log size acquisition instruction; Receive a log upload instruction issued by the platform, and upload the log to the platform according to the log upload instruction; wherein the log upload instruction is generated according to the log page number information; the log upload instruction is a log paging upload instruction or a log overall upload instruction.

8. The Android log management method according to claim 1, characterized in that: The method further includes: Determine whether the log time and log size exceed the preset limit threshold. If both exceed, clear the previous log, and write the data record into the Android log module.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps of the Android log management method according to any one of claims 1 to 8.

10. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the Android log management method according to any one of claims 1 to 8 by calling the computer program stored in the memory.

Citation Information

Cited By

  • Micro-service log recording method and system supporting multiple terminal devices

    CN122332221A