CN112953753A - Data acquisition method and device, terminal equipment and storage medium - Google Patents

Data acquisition method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN112953753A
CN112953753A CN201911346154.5A CN201911346154A CN112953753A CN 112953753 A CN112953753 A CN 112953753A CN 201911346154 A CN201911346154 A CN 201911346154A CN 112953753 A CN112953753 A CN 112953753A
Authority
CN
China
Prior art keywords
log file
storage area
application
local storage
uploaded
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.)
Granted
Application number
CN201911346154.5A
Other languages
Chinese (zh)
Other versions
CN112953753B (en
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.)
Shenzhen Mingyuan Cloud Chain Internet Technology Co ltd
Original Assignee
Shenzhen Mingyuan Cloud 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 Shenzhen Mingyuan Cloud Technology Co Ltd filed Critical Shenzhen Mingyuan Cloud Technology Co Ltd
Priority to CN201911346154.5A priority Critical patent/CN112953753B/en
Publication of CN112953753A publication Critical patent/CN112953753A/en
Application granted granted Critical
Publication of CN112953753B publication Critical patent/CN112953753B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application is applicable to the technical field of communication, and provides a data acquisition method, a device, terminal equipment and a storage medium, wherein the data acquisition method comprises the following steps: monitoring and acquiring switching operation information of a foreground and a background of an application; when the monitoring obtains that the application carries out foreground and background switching operation, checking whether an uploaded log file exists in a local storage area or not; and if the log file which is not uploaded exists in the local storage area, acquiring the log file of the local storage area and uploading the log file to a server. According to the application, the log file of the application program when the abnormal event occurs can be acquired and stored under the condition that the terminal equipment is not connected with the network, and the log file of the abnormal event is uploaded when the terminal equipment is connected with the network, so that developers can accurately and quickly acquire the abnormal condition information of the application program in each stage, and a solution can be rapidly formulated according to the information, the abnormal event solving speed is increased, and the user experience is greatly improved.

Description

Data acquisition method and device, terminal equipment and storage medium
Technical Field
The present application belongs to the field of communications technologies, and in particular, to a data acquisition method, an apparatus, a terminal device, and a storage medium.
Background
A log (i.e., log) file is typically a record of some processing that has been completed by a portion of software for future reference. For example, a program developer can check whether some error records exist by checking a log file, then find a problem source of abnormal software use according to the error records, and improve the compatibility of the software in each use environment and the user experience by analyzing and processing the log.
However, most of existing software can be used only by networking, and only then can a log file be generated and stored locally or uploaded to a server, and the use experience of the software is affected to a certain extent due to the fact that the log file is obtained in real time and uploaded. And for the software in the disconnected state, log files cannot be recorded, and the log is uploaded to allow developers to check whether the application program is abnormal or not so as to improve the application program.
Disclosure of Invention
The embodiment of the application provides a data acquisition method, a data acquisition device, terminal equipment and a storage medium, and can solve the problem that application software log files cannot be acquired and checked in a disconnected state which can never be acquired in real time.
In a first aspect, an embodiment of the present application provides a data acquisition method, where the method includes:
monitoring and acquiring switching operation information of a foreground and a background of an application;
when the monitoring obtains that the application carries out foreground and background switching operation, checking whether an uploaded log file exists in a local storage area or not;
and if the log file which is not uploaded exists in the local storage area, acquiring the log file of the local storage area and uploading the log file to a server.
In a second aspect, an embodiment of the present application provides a data acquisition apparatus, including:
the monitoring module is used for monitoring and acquiring switching operation information of the foreground and the background of the application;
the checking module is used for checking whether the log files which are not uploaded exist in the local storage area when the application is monitored and obtained to carry out foreground and background switching operation;
and the uploading module is used for acquiring the log file of the local storage area and uploading the log file to a server if the log file which is not uploaded exists in the local storage area.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the data acquisition method when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and when being executed by a processor, the computer program implements the data acquisition method.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the data acquisition method described in any one of the above first aspects.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that: according to the application, the log file of the application program when the abnormal event occurs can be acquired and stored under the condition that the terminal equipment is not connected with the network, and the log file of the abnormal event is uploaded when the terminal equipment is connected with the network, so that developers can accurately and quickly acquire the abnormal condition information of the application program in each stage, and a solution can be rapidly formulated according to the information, the abnormal event solving speed is increased, and the user experience is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart diagram illustrating a data collection method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an acquisition process of a data acquisition method provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a data acquisition device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The data acquisition method provided by the embodiment of the Application can be applied to terminal devices such as a mobile phone, a tablet personal computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA) and the like, and is used for acquiring data information of an Application (Application) installed on the terminal device.
For example, the terminal device may be a Station (ST) in a WLAN, which may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with Wireless communication capability, a computing device or other processing device connected to a Wireless modem, a vehicle-mounted device, a vehicle-mounted networking terminal, a computer, a laptop, a handheld communication device, a handheld computing device, a satellite Wireless device, a Wireless modem card, a television set-top box (STB), a Customer Premises Equipment (CPE), and/or other devices for communicating over a Wireless system and a next generation communication system, such as a Mobile terminal in a 5G Network or a Public Land Mobile Network (future evolved, PLMN) mobile terminals in the network, etc.
Take the terminal device as a mobile phone as an example. The application program installed on the mobile phone can be generally set to be in a network state and used, and the log file of the application program is monitored and acquired in real time and uploaded to the server in the network state. And if the user is in an area where a mobile network base station is not erected or signals are shielded, the mobile phone is in a network-free state, the application program cannot be used due to the fact that the application program is not connected with a network, and developers cannot normally collect user operation log information of the application program.
Therefore, the data acquisition method provided by the application can better optimize the collection of the abnormal logs of the application program, so that developers can conveniently troubleshoot and solve problems, and the use experience of the application program is improved.
The data acquisition method provided by the present application is exemplarily described below by specific embodiments.
Referring to fig. 1, a schematic flow chart of a data acquisition method provided in an embodiment of the present application is shown. The execution main body of the data acquisition method in the embodiment is terminal equipment. The method comprises the following steps:
s101: and monitoring and acquiring the switching operation information of the foreground and the background of the application.
In this embodiment, in the process of operating the application program on the terminal device, when a user wants to operate another terminal device, the user often places the application program in the background from the current foreground use interface to continue to run by operating a key of the terminal device, such as a "home" key of the terminal device. The foreground and background switching operation refers to switching the application program from a current use state to a non-use and non-closed state, for example, switching a first application program currently used to a second application program, and using the second application program, where the first application program is running in a background, or switching to a desktop of the terminal device through a control key on the terminal device. The foreground and background switching operation information may be one or more of response information of a switching key of the operation terminal device and operation information of selecting other application programs.
S102: and when the monitoring result shows that the application is subjected to foreground and background switching operation, checking whether the log file which is not uploaded exists in a local storage area.
In this embodiment, if the monitoring obtains that the application is switched to the background operation of the terminal device, whether a log file related to the application exists in the local storage area of the terminal device is checked, so that the log file is uploaded to the server, and developers can troubleshoot and solve the abnormal problem of the application according to the uploaded log file. The local storage area may be a local independent storage area or a local general storage area. The log files comprise abnormal log files and normal log files, wherein the abnormal log files are log files recorded when a user uses the application process to be abnormal, the abnormality can be the problems of application flash backing, application blocking and the like, and the log files can be log files recorded under a network environment or log files recorded under a network-free environment. The normal log file is a common operation log of the user in the application process, and can be a log file recorded in a network environment or a log file recorded in a non-network environment.
S103: and if the log file which is not uploaded exists in the local storage area, acquiring the log file of the local storage area and uploading the log file to a server.
In this embodiment, the log file in the local storage area may be a log file generated when the user uses the application, and may be a log file that was not successfully uploaded due to a network reason last time, for example, when the user is in a network-free environment, the user uses the application to generate a corresponding log file, but does not upload the log file to the server due to no network.
With reference to fig. 2, optionally, for step S102, the checking whether the local storage area has the non-uploaded log file includes checking whether the local storage area has the non-uploaded compressed log file and the non-uploaded log file, and if the local storage area has the non-uploaded compressed log file, that is, the number of the non-uploaded compressed log files is greater than 0, setting the upload level of the compressed file to be the first priority; and the uploading level of the uncompressed log file is set as a second priority. Preferably, the compressed log file may be in a compressed format of one or more of Zip, rar or 7 z.
If the uncompressed log files exist in the local storage area, compressing the log files into a plurality of compressed log files according to a preset file number threshold. The preset file number threshold may be freely set, for example, 10, that is, 10 uncompressed log files in the local storage area are obtained and compressed into 1 compressed log file.
Optionally, in step S103, when it is monitored that the application performs a foreground-background switching operation and the log file of the application that is not uploaded exists in the local storage area, it is checked whether the terminal device is connected to a network, and it is further determined whether the application is connected to the network, so as to determine whether the application can be connected to the server through the communication network. And if the application is connected to the network, acquiring the log file of the application which is not uploaded in the local storage area and uploading the log file to a server. Wherein the network may be a wireless network accessing a communication standard based, such as WiFi, 2G or 3G, 4G LTE, 5G NR, or a combination thereof.
Optionally, when it is monitored that the application performs a foreground-background switching operation, it is also monitored whether a log file uploading function of the application is disabled, and if the log file uploading function is not disabled, it is checked whether the terminal device is connected to a network, so as to determine whether the application is connected to the network.
In one embodiment, log files with the same uploading priority are uploaded according to the generation time sequence of each log file. For example, there are 3 compressed log files in the local storage area, that is, the compressed log files are respectively arranged as a first compressed log file, a second log file and a third log file according to the sequence of the generation time, and the previously generated log files are preferentially uploaded within the same priority level.
Optionally, if the log file recording the application exception exists in the log files of the same uploading priority, the log file recording the application exception is preferentially uploaded.
In an embodiment, when the log file in the local storage area is uploaded to the server, a Security verification identifier (Security Token) of the log file is further obtained, the log file is subjected to Security verification according to the Security verification identifier, and if the log file passes the Security verification, the log file is uploaded to the server, so that damage to the server due to the fact that an unauthorized log file is uploaded to the server is avoided, for example, a log file infected with a computer virus is uploaded to the server, and damage to the server is caused. And the uncompressed log file and the compressed log file are both provided with the safety verification identifier.
In an embodiment, after the log file operation in the local storage area is uploaded, the uploaded log file may not be successfully sent to the server due to a network reason, for example, the terminal device is suddenly disconnected from the network in the process of uploading the log file, or the server is disconnected from the network.
Therefore, an embodiment of the present application further provides a data acquisition method, which mainly relates to a processing process after the log file is uploaded. The method comprises the following steps:
and checking the uploading state of the log file, and deleting the corresponding log file in the local storage area if the log file is uploaded successfully.
If the log file is not uploaded, the corresponding log file is reserved in the local storage area. And the log file which fails to be uploaded is stored in the local storage area, and is uploaded to the server when uploading operation is triggered when the next foreground and background switching of the application is reserved.
In an embodiment, it may be that, in a use process of the application, the application is abnormal, and an abnormal log file is generated, and if the abnormal log file is uploaded to the server after waiting for the switching operation between the front and the back of the application, and a developer performs troubleshooting and resolution on a problem according to the log file, so that the application is always in an abnormal state or frequently in an abnormal state in the process, and a use experience of a user on the application is reduced.
Therefore, an embodiment of the application further provides a data acquisition method, which mainly relates to an uploading process of log files when the application is abnormal in the application process when a user uses the application. The method comprises the following steps:
when the application detects an abnormal event, acquiring an abnormal log of the application;
checking whether the application is connected to a network;
if the application is connected to the network, uploading the abnormal log to a server;
otherwise, storing the abnormal log in a local storage area.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 3 shows a block diagram of a data acquisition apparatus provided in an embodiment of the present application, which corresponds to the data acquisition method described in the above embodiment, and only shows portions related to the embodiment of the present application for convenience of description.
Referring to fig. 3, the apparatus includes: monitoring module 100, inspection module 200, upload module 300.
The monitoring module 100 is configured to monitor and acquire application foreground and background switching operation information.
The checking module 200 is configured to check whether an un-uploaded log file exists in a local storage area when the monitoring result indicates that the application performs a foreground-background switching operation.
The uploading module 300 is configured to, if the log file not uploaded exists in the local storage area, acquire the log file in the local storage area and upload the log file to the server.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 4, the terminal device 4 of this embodiment includes: at least one processor 40 (only one processor is shown in fig. 4), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, the steps in any of the various data acquisition method embodiments described above being implemented when the computer program 42 is executed by the processor 40.
The terminal device 4 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of the terminal device 4, and does not constitute a limitation of the terminal device 4, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, and the like.
The Processor 40 may be a Central Processing Unit (CPU), and the Processor 40 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may in some embodiments be an internal storage unit of the terminal device 4, such as a hard disk or a memory of the terminal device 4. In other embodiments, the memory 41 may also be an external storage device of the terminal device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the terminal device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the terminal device 4. The memory 41 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional modules are only used for distinguishing one functional module from another, and are not used for limiting the protection scope of the application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method of data acquisition, the method comprising:
monitoring and acquiring switching operation information of a foreground and a background of an application;
when the monitoring obtains that the application carries out foreground and background switching operation, checking whether an uploaded log file exists in a local storage area or not;
and if the log file which is not uploaded exists in the local storage area, acquiring the log file of the local storage area and uploading the log file to a server.
2. The data acquisition method of claim 1, wherein if the local storage area has logs that are not uploaded, obtaining a log file of the local storage area and uploading the log file to a server, further comprising:
when the log file which is not uploaded exists in the local storage area, checking whether the application is connected to a network;
and if the application is connected to the network, uploading the log file which is not uploaded to the server.
3. The data collection method of claim 1, wherein said checking whether an un-uploaded log file exists in the local storage area further comprises:
and checking whether the local storage area has the compressed log file which is not uploaded.
4. The data collection method of claim 3, wherein the obtaining the log file of the local storage area and uploading the log file to a server comprises:
when the local storage area has the compressed log file which is not uploaded, the compressed log file is preferentially uploaded to a server;
and otherwise, compressing the log files into a plurality of compressed log files according to a preset file number threshold value, and uploading the compressed log files to a server.
5. A method of data acquisition as claimed in claim 1, the method comprising:
acquiring a security verification identifier of the log file;
and uploading the log file to the server according to the security verification identifier.
6. The data collection method of claim 1, wherein after obtaining the log file of the local storage area and uploading the log file to a server, the method comprises:
checking the uploading state of the log file, and if the log file is uploaded successfully, deleting the corresponding log file in the local storage area;
if the log file is not uploaded, the corresponding log file is reserved in the local storage area.
7. The data acquisition method of claim 1, wherein the method further comprises:
when detecting that the application has an abnormal event, acquiring an abnormal log of the application;
checking whether the application is connected to a network;
if the application is connected to the network, uploading the abnormal log to a server;
otherwise, storing the abnormal log in a local storage area.
8. A data acquisition device, the device comprising:
the monitoring module is used for monitoring and acquiring switching operation information of the foreground and the background of the application;
the checking module is used for checking whether the log files which are not uploaded exist in the local storage area when the application is monitored and obtained to carry out foreground and background switching operation;
and the uploading module is used for acquiring the log file of the local storage area and uploading the log file to a server if the log file which is not uploaded exists in the local storage area.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN201911346154.5A 2019-12-24 2019-12-24 Data acquisition method and device, terminal equipment and storage medium Active CN112953753B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911346154.5A CN112953753B (en) 2019-12-24 2019-12-24 Data acquisition method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911346154.5A CN112953753B (en) 2019-12-24 2019-12-24 Data acquisition method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112953753A true CN112953753A (en) 2021-06-11
CN112953753B CN112953753B (en) 2023-11-28

Family

ID=76234447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911346154.5A Active CN112953753B (en) 2019-12-24 2019-12-24 Data acquisition method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112953753B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124679A (en) * 2021-09-03 2022-03-01 深圳市有方科技股份有限公司 Internet of things terminal log uploading method and device and internet of things terminal
CN114238018A (en) * 2021-12-17 2022-03-25 天翼爱音乐文化科技有限公司 Method, system and device for detecting integrity of log collection file and storage medium
CN115223269A (en) * 2021-09-06 2022-10-21 广州汽车集团股份有限公司 Automobile log uploading method and device, computer equipment and automobile
CN115834575A (en) * 2023-02-28 2023-03-21 新云网科技集团股份有限公司 Log reporting method, system, equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844172A (en) * 2016-12-28 2017-06-13 福建三元达网络技术有限公司 The log recording method and system of a kind of efficient alignment system failure
CN108124252A (en) * 2017-12-29 2018-06-05 深圳市金立通信设备有限公司 A kind of method, terminal and computer readable storage medium for obtaining information
CN109640347A (en) * 2019-02-28 2019-04-16 努比亚技术有限公司 Journal file automatically grabs method, apparatus, mobile terminal and readable storage medium storing program for executing
CN110109841A (en) * 2019-05-17 2019-08-09 深圳前海微众银行股份有限公司 Localization method, device, equipment and the computer readable storage medium of abnormal problem
CN110457195A (en) * 2019-08-05 2019-11-15 深圳乐信软件技术有限公司 Acquisition methods, device, server and the storage medium of client local log

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844172A (en) * 2016-12-28 2017-06-13 福建三元达网络技术有限公司 The log recording method and system of a kind of efficient alignment system failure
CN108124252A (en) * 2017-12-29 2018-06-05 深圳市金立通信设备有限公司 A kind of method, terminal and computer readable storage medium for obtaining information
CN109640347A (en) * 2019-02-28 2019-04-16 努比亚技术有限公司 Journal file automatically grabs method, apparatus, mobile terminal and readable storage medium storing program for executing
CN110109841A (en) * 2019-05-17 2019-08-09 深圳前海微众银行股份有限公司 Localization method, device, equipment and the computer readable storage medium of abnormal problem
CN110457195A (en) * 2019-08-05 2019-11-15 深圳乐信软件技术有限公司 Acquisition methods, device, server and the storage medium of client local log

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124679A (en) * 2021-09-03 2022-03-01 深圳市有方科技股份有限公司 Internet of things terminal log uploading method and device and internet of things terminal
CN115223269A (en) * 2021-09-06 2022-10-21 广州汽车集团股份有限公司 Automobile log uploading method and device, computer equipment and automobile
CN114238018A (en) * 2021-12-17 2022-03-25 天翼爱音乐文化科技有限公司 Method, system and device for detecting integrity of log collection file and storage medium
CN114238018B (en) * 2021-12-17 2023-03-24 天翼爱音乐文化科技有限公司 Method, system and device for detecting integrity of log collection file and storage medium
CN115834575A (en) * 2023-02-28 2023-03-21 新云网科技集团股份有限公司 Log reporting method, system, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112953753B (en) 2023-11-28

Similar Documents

Publication Publication Date Title
CN112953753B (en) Data acquisition method and device, terminal equipment and storage medium
CN108108286A (en) Method of data capture and device, server, storage medium
CN107948744B (en) Interface detection method, interface detection device, and computer-readable storage medium
CN112311617A (en) Configured data monitoring and alarming method and system
CN111464513A (en) Data detection method, device, server and storage medium
CN112948224A (en) Data processing method, device, terminal and storage medium
CN109274534B (en) Network slice supervision method and equipment and communication system
CN109918221B (en) Hard disk error reporting analysis method, system, terminal and storage medium
CN113423120A (en) Data distribution processing method and device based on private network terminal and electronic equipment
CN112712610B (en) Vehicle diagnosis log processing method and device, terminal equipment and readable storage medium
CN114157662B (en) Cloud platform parameter adaptation method, device, terminal equipment and storage medium
CN106603625B (en) Data protection method and device
US11507396B2 (en) Method, device and computer program product for storage management
CN112948013B (en) Application probe configuration method and device, terminal equipment and storage medium
CN111736859B (en) Version updating method of operating system, server and terminal
CN112073739A (en) Mobile recording and broadcasting control system and method
CN112865970A (en) Electronic test equipment and configuration method of matching function
CN113297149A (en) Method and device for monitoring data processing request
CN112948225A (en) Link monitoring method and device, monitoring equipment and storage medium
CN113792014B (en) Nuclear power station file management method and device, terminal equipment and storage medium
CN109285036B (en) Internet of things service processing method and device and storage medium
CN114386097B (en) User information management method based on cloud architecture and related equipment
CN108513287B (en) SIM card activation method, device, terminal and storage medium
CN109446166B (en) Method for detecting file directory, computer readable storage medium and terminal device
CN108965214B (en) Data processing method, device and computer storage medium

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
TA01 Transfer of patent application right

Effective date of registration: 20231026

Address after: 518000, Building A, Jindiwei New Center, No. 16 Gaoxin South 10th Road, Gaoxin Community, Yuehai Street, Nanshan District, Shenzhen, Guangdong Province, China

Applicant after: Shenzhen Mingyuan cloud chain Internet Technology Co.,Ltd.

Address before: 518000 501-509, east block, Skyworth semiconductor design building, No.18, Gaoxin South 4th Road, high tech Zone community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen Mingyuan Cloud Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant