CN111680008B - Log processing method and system, readable storage medium and intelligent device - Google Patents

Log processing method and system, readable storage medium and intelligent device Download PDF

Info

Publication number
CN111680008B
CN111680008B CN202010804350.9A CN202010804350A CN111680008B CN 111680008 B CN111680008 B CN 111680008B CN 202010804350 A CN202010804350 A CN 202010804350A CN 111680008 B CN111680008 B CN 111680008B
Authority
CN
China
Prior art keywords
log
information
log information
storage
sub
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.)
Active
Application number
CN202010804350.9A
Other languages
Chinese (zh)
Other versions
CN111680008A (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.)
Guangzhou Xuanwu Wireless Technology Co Ltd
Original Assignee
Guangzhou Xuanwu Wireless 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 Guangzhou Xuanwu Wireless Technology Co Ltd filed Critical Guangzhou Xuanwu Wireless Technology Co Ltd
Priority to CN202010804350.9A priority Critical patent/CN111680008B/en
Publication of CN111680008A publication Critical patent/CN111680008A/en
Application granted granted Critical
Publication of CN111680008B publication Critical patent/CN111680008B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems

Landscapes

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

Abstract

The invention discloses a log processing method, a log processing system, a readable storage medium and intelligent equipment, which are applied to a mobile terminal of a multi-tenant platform, wherein the method comprises the following steps: judging whether the target application starts log collection authority or not through a log collection system; when the target application starts the log collection right, the obtained log information of the target application is written into a disk mapping cache, and time-sharing compression is carried out according to the emergency degree of the log information; and uploading the compressed log information to a cloud server by calling a sending queue, and deleting the corresponding log information in the disk mapping cache after the uploading is successful. The invention can solve the problems that when the existing application has logic errors and cannot finish the data acquisition work, the existing application usually adopts a method of taking a screen shot with words attention, the data is fed back to customer service personnel through a third party and then fed back to a project manager or a developer by the customer service personnel, and the incomplete or deviation of information is usually stored, so that the errors are difficult to trace or the efficiency of the investigation is low.

Description

Log processing method and system, readable storage medium and intelligent device
Technical Field
The invention relates to the technical field of data processing, in particular to a log processing method, a log processing system, a readable storage medium and intelligent equipment.
Background
With the rapid development of network technology, the mobile communication industry will move to the real mobile information era, and the mobile terminal is also changed from a simple conversation tool to a comprehensive information processing platform. The APP plays an important role in practical application as an important component of the mobile terminal.
As is well known, in the process of using APP, a user may perform different types of data collection in various complex environments according to business requirements. If the App has a logic error in the data acquisition process and cannot complete the data acquisition work, the App is fed back to customer service personnel through a third party by adopting a method of keeping a screen capture and characters, and then the App is fed back to a project manager or a developer by the customer service personnel.
However, the user usually has incomplete or biased information in the process of adding text attention to the screenshot, which causes the problem that the user is difficult to trace the error or the efficiency of the examination is low.
Disclosure of Invention
In order to solve the above problems, an object of the present invention is to provide a log processing method, a log processing system, a readable storage medium, and an intelligent device, which can reduce the difficulty of error finding and improve the efficiency of error finding by improving the efficiency and accuracy of log collection.
A log processing method is applied to a mobile terminal of a multi-tenant platform, and comprises the following steps:
judging whether the target application starts log collection authority or not through a log collection system;
when the target application starts the log collection right, writing the acquired log information of the target application into a disk mapping cache, and performing time-sharing compression according to the emergency degree of the log information;
and uploading the compressed log information to a cloud server by calling a sending queue, and deleting the corresponding log information in the disk mapping cache after the uploading is successful.
According to the log processing method provided by the invention, firstly, whether the log collection authority is opened by the target application is judged through the log collection system so as to avoid that information collection is still carried out under the condition that collection logic is closed, and the collected information is usually discarded without being uploaded to a cloud server, so that resource waste is caused; when the target application starts the log collection right, the obtained log information of the target application is written into a disk mapping cache, and time-sharing compression is carried out according to the emergency degree of the log information, so that the problems that the currently collected data is completely lost due to network jitter or application collapse, secondary logic errors are caused, and the problem troubleshooting difficulty is increased are avoided, and in addition, the method can avoid that the content with less byte number is written into a large amount instantly, and the obvious jam of an application interface is caused; the compressed log information is uploaded to a cloud server by calling a sending queue, and the corresponding log information in the disk mapping cache is deleted after the log information is uploaded successfully, so that the traceability of the information is improved, the acquisition of local logs is not influenced, and the user information can be independently compressed and encrypted, so that the acquisition system can identify the user and the user information is prevented from being snooped. The log processing method provided by the invention solves the problems that when the existing application has logic errors and cannot finish the data acquisition work, the existing application usually adopts a method of taking a screen capture and adding characters to pay attention, the data is fed back to customer service personnel through a third-party App, and then the data is fed back to a project manager or a developer by the customer service personnel, and the incomplete or deviation of information usually exists, so that the errors are difficult to trace or the efficiency of troubleshooting is low.
In addition, according to the log processing method of the present invention, the following additional technical features may be further provided:
further, the method further comprises:
when the log information is not uploaded successfully, calling and updating a timing task, and handing the log information which is not uploaded successfully to the timing task for management;
and when the target application is restarted, obtaining the log information which is not uploaded in the disk mapping cache, and uploading the log information in batches.
Further, the method for judging whether the target application opens the log collection authority through the log collection system comprises the following steps: and the APP business logic invokes a log acquisition interface, and the log acquisition interface judges whether the target application starts log acquisition permission or not through internal logic.
Further, the log information includes user information and log data, and the method further includes:
when the log information is the log information of the newly added user, taking out the user information of the user, generating a user ID and storing the user ID in a log acquisition system;
and encrypting the user information through an asymmetric encryption algorithm to obtain a user ciphertext, and sending the user ID and the user ciphertext to a cloud server.
Further, the method further comprises: and mapping the log information in the memory to the memory, and performing deserialization on the mapped memory to construct a two-dimensional fixed-length access space.
Further, the method for constructing the two-dimensional fixed-length access space comprises the following steps:
dividing the storage space of the memory into a plurality of sub-storage spaces, and setting a proofreading index in two adjacent storage spaces;
recording the storage state of each sub-storage space through a bitmap;
when the log storage amount of the sub-storage space in the current storage space is smaller than the preset log storage amount and is not accessed in the current storage period, deleting or transferring the log information in the sub-storage space to other sub-storage spaces, and compressing and recovering the current sub-storage space.
Further, the sub-storage space includes an address storage area and a data storage area, the address storage area is used for storing log addresses, the data storage area is used for storing log data, and the method further includes:
when the log information corresponding to the current log address is referred by any other log address, judging whether the reference count of the log information referred by other log addresses in the access period is smaller than a preset value;
if yes, deleting other log addresses and the referenced log information at the same time.
Another embodiment of the invention provides a log processing system, which solves the problems that when the existing App has logic errors and cannot complete data acquisition, the existing App usually adopts a method of taking a screen capture and word attention, the third-party App feeds back to customer service personnel, and the customer service personnel feeds back the information to a project manager or a developer, so that the incomplete or deviation of the information is usually stored, and the errors are difficult to track or the efficiency of troubleshooting is low.
The log processing system according to the embodiment of the present invention includes:
the judging module is used for judging whether the target application starts the log collection authority or not through the log collection system;
the write-in module is used for writing the acquired log information of the target application into a disk mapping cache when the target application starts the log acquisition right, and performing time-sharing compression according to the emergency degree of the log information;
and the transmission module is used for uploading the compressed log information to a cloud server by calling the sending queue and deleting the log information in the disk mapping cache after the log information is uploaded successfully.
Another embodiment of the invention also proposes a readable storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
Another embodiment of the present invention also proposes a smart device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above method when executing the program.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a flowchart of a log processing method according to a first embodiment of the present invention;
fig. 2 is a block diagram showing a log processing system according to a second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a log processing method according to a first embodiment of the present invention is applied to a mobile terminal of a multi-tenant platform, and includes steps S101 to S103:
and S101, judging whether the target application starts log collection permission or not through a log collection system.
According to the method provided by the embodiment, the execution main body is the mobile terminal, the mobile terminal is a mobile phone, a notebook computer, a tablet personal computer and a portable wearable device, the mobile terminal is communicated with the cloud server through the internet, the cloud server can store and perform error check on the log information collected by the mobile terminal, traceability of the log information and remote processing of batch errors are achieved, and therefore error check and processing efficiency are improved.
Specifically, the APP service logic invokes a log collection interface, and the log collection interface judges whether the target application starts a log collection permission or not through internal logic. It can be understood that, when the target application starts the log collection right, the log collection interface reversely calls the APP service logic, and constructs and acquires the collected information. And finally, returning the assembled log information to the interior of the log acquisition interface so as to upload the log information. Meanwhile, when the log collection right is not opened by the target application, the log collection interface corresponding to the target can be directly quitted. The information collection system can be used for collecting information under the condition that collection logic is closed, and the collected information can be discarded and cannot be uploaded to the cloud server, so that resource waste is avoided. The log collection interface may be a single target application for interfacing with multiple mobile terminals, or may be a plurality of log collection interfaces respectively interfacing with target applications of corresponding mobile terminals, which is not limited herein.
Step S102, when the target application starts the log collection authority, the acquired log information of the target application is written into a disk mapping cache, and time-sharing compression is carried out according to the emergency degree of the log information. Wherein the log information comprises user information and log data,
further, when the log information is the log information of the newly added user, the user information of the user is taken out, a user ID is generated and stored in a log acquisition system; and encrypting the user information through an asymmetric encryption algorithm to obtain a user ciphertext, and sending the user ID and the user ciphertext to a cloud server. According to the method and the device, the cloud server can acquire the ID of the user and encrypt the information of the user, so that the leakage of the user information caused by the complex running environment of a multi-tenant platform is avoided.
Specifically, when the log collection system collects a first piece of log data, the user information in the first piece of log data is preferentially taken out, the user ID is generated and stored in the log collection system, meanwhile, the user information is encrypted through an asymmetric encryption algorithm to obtain a user ciphertext, and finally, the user ID and the user ciphertext are sent to the cloud server to be stored. In other embodiments, since the user information is stored in the memory in the form of a character string, and the character codes corresponding to each character are unique and consistent at any time, the character codes of all characters in the character string can be taken out to be added, so as to obtain the encrypted and compressed user ID. Understandably, the user information is processed through a specific simple transformation compression algorithm, so that the system can identify the user, the information leakage can be prevented, and the safety of the multi-tenant platform user side is ensured.
In specific implementation, a working area is divided into a plurality of management areas according to regional information, each management area is provided with a plurality of cloud servers, the cloud servers form a multi-tenant platform of a target application, and the target application in the application is, for example, an introduction application. And if the address information of the mobile terminal belongs to the address of the current management area, acquiring the address of a target cloud server according to the access time and the state of each cloud server in the current management area, and establishing connection so as to realize reasonable resource allocation among a plurality of cloud servers in the same area. In addition, if the address information of the mobile terminal does not belong to the address of the current management area, a redirection instruction is initiated to the mobile terminal, namely, the connection with the current cloud server is disconnected, and the connection information is forwarded to the target cloud server. The log error checking method and the log error checking system have the advantages that the log information processing efficiency is improved through the division of the management area, the cloud server and the mobile terminal, the same log errors can be managed and processed in batches, the satisfaction degree of user log error checking experience is improved, and the actual application requirements are met.
Further, before the step of writing the acquired log information of the target application into the disk mapping cache, the method includes: and mapping the log information in the memory to the memory, and performing deserialization on the mapped memory to construct a two-dimensional fixed-length access space.
Specifically, the storage space of the memory is divided into a plurality of sub-storage spaces, and a proofreading index is arranged in two adjacent storage spaces, so that the reliability of data storage and index is improved; recording the storage state of each sub-storage space through a bitmap; when the log storage amount of the sub-storage space in the current storage space is smaller than the preset log storage amount and is not accessed in the current storage period, deleting or transferring the log information in the sub-storage space to other sub-storage spaces, and compressing and recycling the current sub-storage space.
The sub-storage space comprises an address storage area and a data storage area, the address storage area is used for storing log addresses, the data storage area is used for storing log data, and the method further comprises the following steps: when the log information corresponding to the current log address is referred by any other log address, judging whether the reference count of the log information referred by other log addresses in the access period is smaller than a preset value; if yes, deleting other log addresses and the referenced log information at the same time. It can be understood that the sub-storage area of the memory storage space of the storage device is divided into an address storage area and a data storage area, and the address (index) of the written data and the actually stored data content are managed separately, so that the duplication elimination of the written data is realized, and the storage space and the writing efficiency of the data are improved.
In the specific implementation, the data blocks are fixed in size and are size-aligned in the log storage. Therefore, in order to more accurately determine the storage state of each sub-storage space, each storage space address storage area can be divided into a plurality of small parts, the small parts can be uniformly divided or non-uniformly divided, the access state of each part and the storage state of the data of the part are recorded through a bitmap, and when the log storage amount of the sub-storage space in the current storage space is smaller than the preset log storage amount and is not accessed in the current storage period, the log information in the sub-storage space is deleted or transferred to other sub-storage spaces, and the current sub-storage space is compressed and recycled, so that the reliability of log storage is improved. In other embodiments, when the log information corresponding to the current log address is referred by any other log address and the reference count of the log information referred by other log addresses in the access cycle is smaller than a preset value, the other log addresses and the referred log information are deleted at the same time, thereby avoiding the overflow of log data and influencing the writing and uploading of key log information.
In addition, in other embodiments, the method for writing the acquired log information of the target application into the disk mapping cache further includes setting the memory start-stop address of the first dimension to be 0, setting the length to be 4096, and dividing 4 segments of access spaces within the length, where the access spaces are: a first index as a serial number of each piece of log data; a slave index as a segment sequence number for holding each piece of log data; a log data access area, a main access area of log data; and when the current area is insufficient to store the complete log data, the next slave index points to the next segment of access space through the area, and the log data is continuously stored. When the log data is written in, firstly, the maximum value of the index and the next section of free space are found by searching the pointer, the log data is directly copied to an access area by copying the offset of the pointer, and if the current fixed-length access space is found to be full in the writing process, the multiple fixed-length access space is continuously distributed; when a certain log data is deleted, the first index and the slave index occupied by the log data are found out by searching the pointer, and deletion marks are added to the first index and the slave index existing area.
In the embodiment, when the target application starts the log collection right, the obtained log information of the target application is written into the disk mapping cache, and time-sharing compression is performed according to the emergency degree of the log information, so that the problem that the currently collected data is completely lost due to network jitter or application crash, secondary logic errors are caused, the problem troubleshooting difficulty is increased is avoided, in addition, the application can avoid that the content with less byte number is written in a large amount instantly, the obvious jam of an application interface is caused, and the actual application requirements are met.
Step S103, uploading the compressed log information to a cloud server by calling a sending queue, and deleting the log information in the disk mapping cache after the uploading is successful.
As described above, the collected logs are divided into urgent logs and non-urgent logs according to the degree of urgency, and if the logs are urgent logs, the logs are compressed and sent immediately after being written into the disk mapping cache; if not, storing in a disk mapping cache, and taking out all logs together for compression and sending when the disk mapping cache reaches a specified maximum value. And when the log information is not uploaded successfully, calling and updating a timing task, and handing the log information which is not uploaded successfully to the timing task for management. Specifically, the log information which is not successfully uploaded is inserted into a corresponding log uploading queue according to the emergency degree and the data size of the log information, the log information is timed, the log information is not successfully uploaded within preset time or after preset uploading times, the working state and the operation data information of the current mobile terminal are obtained, the log information is analyzed, and the target application is debugged according to the analysis result, so that the data information uploading failure caused by the internal logic error of the target application is avoided.
Further, when the target application is restarted, obtaining the log information which is not uploaded in the disk mapping cache, and uploading the log information in batches. Specifically, when the target application is restarted due to an error or an emergency, the application program is loaded, the log information which is not uploaded in the disk mapping cache is acquired, and the logs are uploaded in batches according to the emergency degree of the log information, so that the difficulty of tracing the application error due to the omission of the key log information is avoided, the error checking efficiency is improved, and the actual application requirements are met.
In the embodiment, the compressed log information is uploaded to the cloud server by calling the sending queue, and the corresponding log information in the disk mapping cache is deleted after the uploading is successful, so that the traceability of the information is improved, the acquisition of local logs is not influenced, the user information can be independently compressed and encrypted, the acquisition system can be ensured to identify the user, and the user information is prevented from being snooped. The problem that when the existing application has logic errors and cannot finish data acquisition work, the existing application usually adopts a method of taking a screen capture and word attention, and the data are fed back to customer service personnel through a third-party App and then fed back to a project manager or developer by the customer service personnel, and the information is usually incomplete or biased, so that errors are difficult to trace or the efficiency of troubleshooting is low is solved, and the actual application requirements are met.
It should be noted that, in other implementations of the present invention, the method further includes: when the application data in the mobile terminal are acquired within the preset time, recording the current time as a first time, acquiring a second time of the application data in the mobile terminal at the same time, and judging whether the time difference between the first time and the second time is greater than a preset time value. The time difference between the two times is, for example, 24 hours, and the preset time is, for example, 12 hours, since the time difference is greater than the preset time value, it is described that the target application of the mobile terminal has a running logic error or data overflow, and therefore, it is necessary to detect the running condition of the target application, and avoid the situation that the application crashes due to an accumulated error.
According to the log processing method provided by the invention, firstly, whether the log collection authority is opened by the target application is judged through the log collection system so as to avoid that information collection is still carried out under the condition that collection logic is closed, and the collected information is usually discarded without being uploaded to a cloud server, so that resource waste is caused; when the target application starts the log collection right, the obtained log information of the target application is written into a disk mapping cache, and time-sharing compression is carried out according to the emergency degree of the log information, so that the problems that the currently collected data is completely lost due to network jitter or application collapse, secondary logic errors are caused, and the problem troubleshooting difficulty is increased are avoided, and in addition, the method can avoid that the content with less byte number is written into a large amount instantly, and the obvious jam of an application interface is caused; the compressed log information is uploaded to a cloud server by calling a sending queue, and the corresponding log information in the disk mapping cache is deleted after the log information is uploaded successfully, so that the traceability of the information is improved, the acquisition of local logs is not influenced, and the user information can be independently compressed and encrypted, so that the acquisition system can identify the user and the user information is prevented from being snooped. The log processing method provided by the invention solves the problems that when the existing application has logic errors and cannot finish the data acquisition work, the existing application usually adopts a method of taking a screen capture and adding characters to pay attention, the data is fed back to customer service personnel through a third-party App, and then the data is fed back to a project manager or a developer by the customer service personnel, and the incomplete or deviation of information usually exists, so that the errors are difficult to trace or the efficiency of troubleshooting is low.
Referring to fig. 2, based on the same inventive concept, a log processing system according to a second embodiment of the present invention includes:
and the judging module 10 is used for judging whether the target application starts the log collection authority or not through the log collection system.
Specifically, the APP service logic invokes a log collection interface, and the log collection interface judges whether the target application starts a log collection permission or not through internal logic.
And the write-in module 20 is configured to write the acquired log information of the target application into a disk mapping cache when the target application starts the log collection right, and perform time-sharing compression according to the emergency degree of the log information.
The log information comprises user information and log data, and when the log information is the log information of a newly added user, the user information of the user is taken out, a user ID is generated and stored in a log acquisition system; and encrypting the user information through an asymmetric encryption algorithm to obtain a user ciphertext, and sending the user ID and the user ciphertext to a cloud server.
Further, the write-in module 20 is further configured to map the log information in the storage to the memory, and perform deserialization on the mapped memory to construct a two-dimensional fixed-length access space.
Specifically, a storage space of the memory is divided into a plurality of sub-storage spaces, and two adjacent storage spaces are provided with a proofreading index; recording the storage state of each sub-storage space through a bitmap; when the log storage amount of the sub-storage space in the current storage space is smaller than the preset log storage amount and is not accessed in the current storage period, deleting or transferring the log information in the sub-storage space to other sub-storage spaces, and compressing and recycling the current sub-storage space.
The sub-storage space comprises an address storage area and a data storage area, the address storage area is used for storing log addresses, the data storage area is used for storing log data, and when log information corresponding to the current log address is quoted by any log address, whether the quote count quoted by other log addresses of the log information in the access period is smaller than a preset value is judged; if yes, deleting other log addresses and the referenced log information at the same time.
The transmission module 30 is configured to upload the compressed log information to a cloud server by calling a sending queue, and delete the corresponding log information in the disk mapping cache after the upload is successful.
Further, when the log information is not uploaded successfully, a timing task is called and updated, and the log information which is not uploaded successfully is managed by the timing task; and when the target application is restarted, obtaining the log information which is not uploaded in the disk mapping cache, and uploading the log information in batches.
According to the log processing system provided by the invention, whether the log collection authority is opened by the target application is judged through the log collection system so as to avoid that information collection is still carried out under the condition that collection logic is closed, and the collected information is usually discarded without being uploaded to a cloud server, so that resource waste is caused; when the target application starts the log collection right, the obtained log information of the target application is written into a disk mapping cache, and time-sharing compression is carried out according to the emergency degree of the log information, so that the problems that the currently collected data is completely lost due to network jitter or application collapse, secondary logic errors are caused, and the problem troubleshooting difficulty is increased are avoided, and in addition, the method can avoid that the content with less byte number is written into a large amount instantly, and the obvious jam of an application interface is caused; the compressed log information is uploaded to a cloud server by calling a sending queue, and the corresponding log information in the disk mapping cache is deleted after the log information is uploaded successfully, so that the traceability of the information is improved, the acquisition of local logs is not influenced, and the user information can be independently compressed and encrypted, so that the acquisition system can identify the user and the user information is prevented from being snooped. The log processing method provided by the invention solves the problems that when the existing application has logic errors and cannot finish the data acquisition work, the existing application usually adopts a method of taking a screen capture and adding characters to pay attention, the data is fed back to customer service personnel through a third-party App, and then the data is fed back to a project manager or a developer by the customer service personnel, and the incomplete or deviation of information usually exists, so that the errors are difficult to trace or the efficiency of troubleshooting is low.
The technical features and technical effects of the log processing system provided by the embodiment of the present invention are the same as those of the method provided by the embodiment of the present invention, and are not described herein again.
Furthermore, an embodiment of the present invention also proposes a readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the above-mentioned method.
Furthermore, an embodiment of the present invention also provides an intelligent device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. A log processing method is applied to a mobile terminal of a multi-tenant platform, and is characterized in that each working area is provided with a plurality of management areas, and each management area is internally provided with a plurality of cloud servers, wherein the method comprises the following steps:
dividing a storage space of an internal memory into a plurality of sub-storage spaces, arranging a proofreading index in each two adjacent storage spaces, recording the storage state of each sub-storage space through a bitmap, deleting or transferring log information in the sub-storage spaces to other sub-storage spaces when the log storage capacity of the sub-storage space in the current storage space is smaller than the preset log storage capacity and is not accessed in the current storage period, and compressing and recovering the current sub-storage space;
judging whether the target application starts log collection authority or not through a log collection system;
when the target application starts the log collection right, the log collection interface reversely calls the APP service logic to construct and obtain the collected information; writing the acquired log information of the target application into a sub-storage space for disk mapping and caching, and performing time-sharing compression according to the emergency degree of the log information;
uploading the compressed log information to a cloud server by calling a sending queue, and deleting the corresponding log information in the sub-storage space for disk mapping cache after the uploading is successful; and when the log information is not uploaded successfully, inserting the log information into a corresponding log uploading queue according to the emergency degree and the data size of the log information which is not uploaded successfully, timing the log information, and when the log information is not uploaded successfully within preset time or after preset uploading times, acquiring the working state and the operation data information of the current mobile terminal, analyzing the working state and the operation data information, and debugging the target application according to the analysis result.
2. The log processing method of claim 1, wherein the method further comprises:
when the log information is not uploaded successfully, calling and updating a timing task, and handing the log information which is not uploaded successfully to the timing task for management;
and when the target application is restarted, obtaining the log information which is not uploaded in the disk mapping cache, and uploading the log information in batches.
3. The log processing method according to claim 1, wherein the method for determining whether the log collection authority is opened by the target application through the log collection system comprises: and the APP business logic invokes a log acquisition interface, and the log acquisition interface judges whether the target application starts log acquisition permission or not through internal logic.
4. The log processing method according to claim 1, wherein the log information includes user information and log data, the method further comprising:
when the log information is the log information of the newly added user, taking out the user information of the user, generating a user ID and storing the user ID in a log acquisition system;
and encrypting the user information through an asymmetric encryption algorithm to obtain a user ciphertext, and sending the user ID and the user ciphertext to a cloud server.
5. The log processing method of claim 1, wherein the method further comprises: and mapping the log information in the memory to the memory, and performing deserialization on the mapped memory to construct a two-dimensional fixed-length access space.
6. The log processing method according to claim 1, wherein the sub-storage space includes an address storage area and a data storage area, the address storage area is used for storing log addresses, and the data storage area is used for storing log data, the method further comprising:
when the log information corresponding to the current log address is referred by any other log address, judging whether the reference count of the log information referred by other log addresses in the access period is smaller than a preset value;
if yes, deleting other log addresses and the referenced log information at the same time.
7. A log processing system, the system comprising:
the judging module is used for judging whether the target application starts the log collection authority or not through the log collection system;
the write-in module is used for dividing the storage space of the memory into a plurality of sub-storage spaces, a proofreading index is arranged in each two adjacent storage spaces, the storage state of each sub-storage space is recorded through a bitmap, and when the log storage capacity of the sub-storage space in the current storage space is smaller than the preset log storage capacity and is not accessed in the current storage period, the log information in the sub-storage space is deleted or transferred to other sub-storage spaces, and the current sub-storage space is compressed and recycled; when the target application starts the log collection right, the log collection interface reversely calls the APP service logic to construct and obtain the collected information; writing the acquired log information of the target application into a sub-storage space for disk mapping and caching, and performing time-sharing compression according to the emergency degree of the log information;
the transmission module is used for uploading the compressed log information to a cloud server by calling a sending queue, and deleting the corresponding log information in the sub-storage space for disk mapping cache after the log information is uploaded successfully; and when the log information is not uploaded successfully, inserting the log information into a corresponding log uploading queue according to the emergency degree and the data size of the log information which is not uploaded successfully, timing the log information, and when the log information is not uploaded successfully within preset time or after preset uploading times, acquiring the working state and the operation data information of the current mobile terminal, analyzing the working state and the operation data information, and debugging the target application according to the analysis result.
8. A readable storage medium, on 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 6.
9. An intelligent device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any one of claims 1 to 6 when executing the program.
CN202010804350.9A 2020-08-12 2020-08-12 Log processing method and system, readable storage medium and intelligent device Active CN111680008B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010804350.9A CN111680008B (en) 2020-08-12 2020-08-12 Log processing method and system, readable storage medium and intelligent device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010804350.9A CN111680008B (en) 2020-08-12 2020-08-12 Log processing method and system, readable storage medium and intelligent device

Publications (2)

Publication Number Publication Date
CN111680008A CN111680008A (en) 2020-09-18
CN111680008B true CN111680008B (en) 2020-11-27

Family

ID=72458294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010804350.9A Active CN111680008B (en) 2020-08-12 2020-08-12 Log processing method and system, readable storage medium and intelligent device

Country Status (1)

Country Link
CN (1) CN111680008B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612677A (en) * 2020-12-28 2021-04-06 北京天融信网络安全技术有限公司 Log storage method and device, electronic equipment and readable storage medium
CN113064869B (en) * 2021-03-23 2023-06-13 网易(杭州)网络有限公司 Log processing method, device, transmitting end, receiving end equipment and storage medium
CN112988549B (en) * 2021-04-27 2021-08-06 湖北亿咖通科技有限公司 Method for obtaining log based on vehicle machine system and electronic equipment
CN115333800A (en) * 2022-07-27 2022-11-11 中国第一汽车股份有限公司 Vehicle-mounted vehicle-cloud integrated log collecting and analyzing method, vehicle and cloud server

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101415166A (en) * 2007-10-19 2009-04-22 康佳集团股份有限公司 Method for processing share stock time-sharing map
CN105049357A (en) * 2015-06-18 2015-11-11 华北科技学院 Internet-of-things real-time monitoring remote transmission validity optimization method based on Big Dipper message
CN107045472A (en) * 2017-05-04 2017-08-15 武汉轻工大学 Mobile device information acquisition system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094007A (en) * 2007-07-10 2007-12-26 马建国 Handset capable of carrying out direct communication in close range, and operating method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101415166A (en) * 2007-10-19 2009-04-22 康佳集团股份有限公司 Method for processing share stock time-sharing map
CN105049357A (en) * 2015-06-18 2015-11-11 华北科技学院 Internet-of-things real-time monitoring remote transmission validity optimization method based on Big Dipper message
CN107045472A (en) * 2017-05-04 2017-08-15 武汉轻工大学 Mobile device information acquisition system

Also Published As

Publication number Publication date
CN111680008A (en) 2020-09-18

Similar Documents

Publication Publication Date Title
CN111680008B (en) Log processing method and system, readable storage medium and intelligent device
CN110147411B (en) Data synchronization method, device, computer equipment and storage medium
CN111563368B (en) Report generation method, report generation device, computer equipment and storage medium
US20160283357A1 (en) Call stack relationship acquiring method and apparatus
KR20150076230A (en) Application program management method and apparatus, server, and terminal device
CN109885577B (en) Data processing method, device, terminal and storage medium
CN109710185A (en) Data processing method and device
CN110362547B (en) Method and device for encoding, analyzing and storing log file
CN111290956A (en) Brain graph-based testing method and device, electronic equipment and storage medium
WO2020232883A1 (en) Script defect scanning method and apparatus, computer device and storage medium
CN112256675A (en) Data migration method and device, terminal equipment and storage medium
US9104567B2 (en) Memory-leak identification
US20240168921A1 (en) File processing method, apparatus and device, and readable storage medium
CN111177113A (en) Data migration method and device, computer equipment and storage medium
CN113704790A (en) Abnormal log information summarizing method and computer equipment
CN108446224B (en) Performance analysis method of application program on mobile terminal and storage medium
CN112153375B (en) Front-end performance testing method, device, equipment and medium based on video information
CN108228611B (en) Document information copying method and device
US11467896B2 (en) Sections in crash dump files
CN111046393B (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN117131014A (en) Database migration method, device, equipment and storage medium
CN109656936A (en) Method of data synchronization, device, computer equipment and storage medium
Xu et al. A Reconstructing Android User Behavior Approach based on YAFFS2 and SQLite.
CN115599588A (en) Method and device for acquiring memory use information, storage medium and electronic device
CN109491699B (en) Resource checking method, device, equipment and storage medium of application program

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
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 510000 room 23bd, No. 109, TIYU West Road, Tianhe District, Guangzhou City, Guangdong Province

Patentee after: GUANGZHOU XUANWU WIRELESS TECHNOLOGY Co.,Ltd.

Address before: 32B, no.103b, TianLiHe Road, Guangzhou, 510000

Patentee before: GUANGZHOU XUANWU WIRELESS TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder