Terminal log processing method and system
By analyzing and filtering the parameters and time periods in the log upload instructions in real time, combined with the FTP address and communication protocol, the intelligent terminal logs are efficiently exported, solving the problems of long export time and large traffic in the existing technology, and improving work efficiency. .
Patent Information
- Application Number
- CN202410552082.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-05-07
AI Technical Summary
Existing technology takes a long time to export smart terminal logs and requires a lot of export traffic, which reduces work efficiency.
By receiving the user's log upload instructions in real time, parsing and processing the log upload parameters and acquisition time period, filtering the target log information, uploading it to the preset storage database, and displaying it on the user terminal in real time, using delimiters and sentence header parsing to extract parameters and time period, use FTP address configuration to generate target identification, and upload logs through the target communication protocol.
The log export is completed in a short period of time, which improves work efficiency and reduces the consumption of export traffic.
Smart Images

Figure CN118227582B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a terminal log processing method and system. Background Art
[0002] With the development of the times and the advancement of science and technology, computer technology and Internet technology have become popular in people's daily lives, and have been deeply applied in many fields, greatly facilitating people's lives.
[0003] Among them, people have developed various intelligent terminals using existing computer technology and Internet technology. Specifically, the existing intelligent terminals will generate various operation logs during actual use to save the terminal usage records in real time.
[0004] Furthermore, due to the limited storage space of existing smart terminals, it is necessary to export the logs generated by the smart terminals regularly. However, in actual operation, most of the existing technologies will only export all the logs generated in the smart terminal at one time according to the export instructions input by the user. In this process, it takes a long time and consumes a lot of export traffic, which reduces the work efficiency of the staff. Summary of the invention
[0005] Based on this, the purpose of the present invention is to provide a terminal log processing method and system to solve the technical problem that in the process of exporting logs in the prior art, it takes a long time and consumes a lot of export traffic.
[0006] The first aspect of the embodiment of the present invention proposes:
[0007] A terminal log processing method, wherein the method comprises:
[0008] Receive the log upload instruction issued by the user in real time, and parse and process the log upload instruction in real time to extract the log upload parameters and log acquisition time period respectively contained in the log upload instruction in real time;
[0009] According to the log acquisition time period, corresponding target log information is screened out in real time in a preset log database, and a corresponding target identifier is added to the target log information through the log upload parameter;
[0010] The target log information is uploaded to a preset storage database according to the target identifier, and the logs in the preset storage database are displayed in real time on the user terminal of the user.
[0011] The beneficial effect of the present invention is that by receiving the log upload instruction sent by the user in real time and further parsing the required log upload parameters and the log acquisition time period, based on this, the required target log information can be obtained in a targeted manner. Furthermore, in order to enable the user to obtain the target log information, the current target log information needs to be further uploaded to a preset storage database for aggregation and finally displayed on the user terminal, so that the log export can be completed in a targeted manner under the premise of consuming a short time, thereby improving work efficiency.
[0012] Furthermore, the step of parsing the log upload instruction in real time to extract the log upload parameters and the log acquisition time period respectively included in the log upload instruction in real time includes:
[0013] When the log upload instruction is obtained in real time, the instruction sequence contained in the log upload instruction is detected in real time;
[0014] Detecting in real time the starting point and the ending point corresponding to the instruction sequence, and detecting in real time a number of separators sequentially included in the instruction sequence according to the starting point and the ending point;
[0015] The log upload parameters and the log acquisition time period are extracted respectively based on a plurality of the separators, and each of the separators is unique.
[0016] Furthermore, the step of extracting the log upload parameters and the log acquisition time period based on the plurality of delimiters includes:
[0017] When a plurality of the separators are obtained in real time, the instruction sequence is split into a plurality of corresponding instruction statements by each of the separators;
[0018] Parsing each of the instruction statements to detect in real time the statement header and the target character string respectively contained in each of the instruction statements;
[0019] According to the statement header, the plurality of instruction statements are correspondingly split into the log upload parameters and the log acquisition time period, and each of the statement headers is unique.
[0020] Furthermore, the step of splitting the plurality of instruction statements into the log upload parameters and the log acquisition time period according to the statement header includes:
[0021] When the statement headers corresponding to each of the instruction statements are obtained in real time, the statement identifiers contained in the statement headers are detected in real time, and it is determined in real time whether the statement identifiers belong to the first target type or the second target type:
[0022] If it is determined in real time that the statement identifier belongs to the first target type, then the instruction statement corresponding to the current statement identifier is determined to be the log upload parameter;
[0023] If it is determined in real time that the statement identifier belongs to the second target type, the instruction statement corresponding to the current statement identifier is determined to be the log acquisition time period, and each statement identifier is unique.
[0024] Further, the step of adding a corresponding target identifier to the target log information through the log upload parameter includes:
[0025] When the log upload parameters are obtained in real time, the FTP data contained in the log upload parameters is detected in real time;
[0026] Parsing the FTP data to extract the corresponding FTP address configuration number and FTP address in real time;
[0027] The target identifier is added to the target log information according to the FTP address configuration number and the FTP address, and the target identifier is unique.
[0028] Further, the step of adding the target identifier to the target log information according to the FTP address configuration number and the FTP address includes:
[0029] When the FTP address configuration number and the FTP address are acquired in real time, a corresponding initial address data link is constructed according to the FTP address configuration number and the FTP address;
[0030] The initial address data chain is simplified to generate a corresponding target address data chain in real time, and the target address data chain is set as the target identifier of the target log information.
[0031] Furthermore, the step of uploading the target log information to a preset storage database according to the target identifier includes:
[0032] When the target identifier is obtained, calling up a corresponding initial communication protocol in a preset communication database according to the target identifier;
[0033] The target identifier is integrated into the initial communication protocol to generate a corresponding target communication protocol, and the target log information is correspondingly uploaded to the preset storage database through the target communication protocol, and the target communication protocol is unique.
[0034] The second aspect of the embodiment of the present invention proposes:
[0035] A terminal log processing system, wherein the system comprises:
[0036] An extraction module, used to receive the log upload instruction issued by the user in real time, and parse and process the log upload instruction in real time to extract the log upload parameters and log acquisition time period respectively contained in the log upload instruction in real time;
[0037] A screening module, used to screen out corresponding target log information in real time in a preset log database according to the log acquisition time period, and add a corresponding target identifier to the target log information through the log upload parameter;
[0038] The display module is used to upload the target log information to a preset storage database according to the target identifier, and display the logs in the preset storage database in real time on the user terminal of the user.
[0039] Furthermore, the extraction module is specifically used for:
[0040] When the log upload instruction is obtained in real time, the instruction sequence contained in the log upload instruction is detected in real time;
[0041] Detecting in real time the starting point and the ending point corresponding to the instruction sequence, and detecting in real time a number of separators sequentially included in the instruction sequence according to the starting point and the ending point;
[0042] The log upload parameters and the log acquisition time period are extracted respectively based on a plurality of the separators, and each of the separators is unique.
[0043] Furthermore, the extraction module is also specifically used for:
[0044] When a plurality of the separators are obtained in real time, the instruction sequence is split into a plurality of corresponding instruction statements by each of the separators;
[0045] Parsing each of the instruction statements to detect in real time the statement header and the target character string respectively contained in each of the instruction statements;
[0046] According to the statement header, the plurality of instruction statements are correspondingly split into the log upload parameters and the log acquisition time period, and each of the statement headers is unique.
[0047] Furthermore, the extraction module is also specifically used for:
[0048] When the statement headers corresponding to each of the instruction statements are obtained in real time, the statement identifiers contained in the statement headers are detected in real time, and it is determined in real time whether the statement identifiers belong to the first target type or the second target type:
[0049] If it is determined in real time that the statement identifier belongs to the first target type, then the instruction statement corresponding to the current statement identifier is determined to be the log upload parameter;
[0050] If it is determined in real time that the statement identifier belongs to the second target type, the instruction statement corresponding to the current statement identifier is determined to be the log acquisition time period, and each statement identifier is unique.
[0051] Furthermore, the screening module is specifically used for:
[0052] When the log upload parameters are obtained in real time, the FTP data contained in the log upload parameters is detected in real time;
[0053] Parsing the FTP data to extract the corresponding FTP address configuration number and FTP address in real time;
[0054] The target identifier is added to the target log information according to the FTP address configuration number and the FTP address, and the target identifier is unique.
[0055] Furthermore, the screening module is also specifically used for:
[0056] When the FTP address configuration number and the FTP address are acquired in real time, a corresponding initial address data link is constructed according to the FTP address configuration number and the FTP address;
[0057] The initial address data chain is simplified to generate a corresponding target address data chain in real time, and the target address data chain is set as the target identifier of the target log information.
[0058] Furthermore, the display module is specifically used for:
[0059] When the target identifier is obtained, calling up a corresponding initial communication protocol in a preset communication database according to the target identifier;
[0060] The target identifier is integrated into the initial communication protocol to generate a corresponding target communication protocol, and the target log information is correspondingly uploaded to the preset storage database through the target communication protocol, and the target communication protocol is unique.
[0061] The third aspect of the embodiment of the present invention proposes:
[0062] A computer comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the terminal log processing method as described above when executing the computer program.
[0063] The fourth aspect of the embodiments of the present invention proposes:
[0064] A readable storage medium stores a computer program, wherein the program, when executed by a processor, implements the terminal log processing method as described above.
[0065] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 A flowchart of a terminal log processing method provided by the first embodiment of the present invention;
[0067] Figure 2 This is a structural block diagram of a terminal log processing system provided by a sixth embodiment of the present invention.
[0068] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0069] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0070] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0072] See also Figure 1 , which shows the terminal log processing method provided by the first embodiment of the present invention. The terminal log processing method provided by this embodiment can export logs in a targeted manner under the premise of consuming a relatively short time, thereby improving work efficiency.
[0073] Specifically, this embodiment provides:
[0074] A terminal log processing method specifically comprises the following steps:
[0075] Step S10, receiving the log upload instruction issued by the user in real time, and parsing the log upload instruction in real time to extract the log upload parameters and the log acquisition time period respectively contained in the log upload instruction in real time;
[0076] Step S20, filtering out corresponding target log information in real time in a preset log database according to the log acquisition time period, and adding a corresponding target identifier to the target log information through the log upload parameter;
[0077] Step S30: uploading the target log information to a preset storage database according to the target identifier, and displaying the logs in the preset storage database in real time on the user terminal of the user.
[0078] Specifically, in this embodiment, it should be noted that in order to be able to process the logs generated by various smart terminals in a timely and effective manner, it is necessary to understand the needs of the user and what logs are specifically stored inside the smart terminal. Based on this, before performing specific processing, it is necessary to first receive the log upload instruction issued by the user and start the subsequent processing process accordingly. Furthermore, it is necessary to perform corresponding parsing processing on the current log upload instruction in real time to obtain the log upload parameters and log acquisition time period contained in the current log upload instruction, that is, to understand what type of log the current user specifically needs to obtain, so as to specifically obtain the logs generated in that time period.
[0079] Furthermore, the target log information needed by the current user can be further screened out from the log database pre-set in the current smart terminal according to the above log acquisition time period. At the same time, in order to accurately send the current target log information to the current user, it is necessary to further add a corresponding target identifier, i.e., an identification code, to the current target log information through the above log upload parameters. Based on this, the target log information acquired in real time can be further uploaded to the storage database pre-set in the background through the current target identifier, and the logs in the current storage database can be further displayed in real time on the user terminal of the above user, so that the user can directly observe the log information he needs, which correspondingly improves the user's work efficiency.
[0080] Second embodiment
[0081] Furthermore, the step of parsing the log upload instruction in real time to extract the log upload parameters and the log acquisition time period respectively included in the log upload instruction in real time includes:
[0082] When the log upload instruction is obtained in real time, the instruction sequence contained in the log upload instruction is detected in real time;
[0083] Detecting in real time the starting point and the ending point corresponding to the instruction sequence, and detecting in real time a number of separators sequentially included in the instruction sequence according to the starting point and the ending point;
[0084] The log upload parameters and the log acquisition time period are extracted respectively based on a plurality of the separators, and each of the separators is unique.
[0085] Specifically, in the present embodiment, it should be noted that after receiving the log upload instruction issued by the user in real time through the above steps, in order to accurately and effectively parse and process the current log upload instruction, it should be pointed out that since the log upload instruction is a computer instruction, and computer instructions are composed of corresponding computer sequence codes, based on this, the instruction sequence contained in the current log upload instruction can be further detected.
[0086] Furthermore, since the instruction sequences all have a certain length, it is necessary to further detect the starting point and the ending point of the current instruction sequence in real time, and within the range of the current starting point and the ending point, detect in real time several separators respectively contained in the current instruction sequence, and further split the above-mentioned log upload parameters and log acquisition time periods according to the current several separators, for subsequent processing.
[0087] Furthermore, the step of extracting the log upload parameters and the log acquisition time period based on the plurality of delimiters includes:
[0088] When a plurality of the separators are obtained in real time, the instruction sequence is split into a plurality of corresponding instruction statements by each of the separators;
[0089] Parsing each of the instruction statements to detect in real time the statement header and the target character string respectively contained in each of the instruction statements;
[0090] According to the statement header, the plurality of instruction statements are correspondingly split into the log upload parameters and the log acquisition time period, and each of the statement headers is unique.
[0091] Specifically, in this embodiment, it is also necessary to explain that after obtaining several required separators through the above steps, the above instruction sequence can be further split, that is, the above instruction sequence is segmented by the current several separators, and several instruction statements are formed accordingly. Further, the current instruction statement is parsed, and the statement header and target string respectively contained in the current instruction statement can be further detected, and the above log upload parameters and log acquisition time period are further formed respectively, so as to facilitate subsequent processing.
[0092] Third embodiment
[0093] Furthermore, the step of splitting the plurality of instruction statements into the log upload parameters and the log acquisition time period according to the statement header includes:
[0094] When the statement headers corresponding to each of the instruction statements are obtained in real time, the statement identifiers contained in the statement headers are detected in real time, and it is determined in real time whether the statement identifiers belong to the first target type or the second target type:
[0095] If it is determined in real time that the statement identifier belongs to the first target type, then the instruction statement corresponding to the current statement identifier is determined to be the log upload parameter;
[0096] If it is determined in real time that the statement identifier belongs to the second target type, the instruction statement corresponding to the current statement identifier is determined to be the log acquisition time period, and each statement identifier is unique.
[0097] In addition, in this embodiment, it should be noted that after the required instruction statements are further obtained through the above steps, since the type and content of each instruction statement are different, it is necessary to further parse and process each current instruction statement, and further obtain the sentence header of each instruction statement and the corresponding target string.
[0098] Furthermore, the statement identifiers contained in the statement headers of each current instruction statement are detected in real time, and it is further determined in real time whether the current statement identifier belongs to the pre-set first target type or the second target type, wherein the first target type is the parameter type and the second target type is the time type. Based on this, if it is determined to be the first target type, the instruction statement corresponding to the current statement identifier is immediately determined to be the above-mentioned log upload parameter. Correspondingly, if it is determined to be the second target type, the instruction statement corresponding to the current statement identifier is immediately determined to be the above-mentioned log acquisition time period, so as to facilitate subsequent processing.
[0099] Further, the step of adding a corresponding target identifier to the target log information through the log upload parameter includes:
[0100] When the log upload parameters are obtained in real time, the FTP data contained in the log upload parameters is detected in real time;
[0101] Parsing the FTP data to extract the corresponding FTP address configuration number and FTP address in real time;
[0102] The target identifier is added to the target log information according to the FTP address configuration number and the FTP address, and the target identifier is unique.
[0103] In addition, in the present embodiment, it is also necessary to explain that after the required target log information and target identifier are respectively obtained through the above steps, in order to be able to simply and quickly send the above target log information to the current user, it is necessary to further detect the FTP (File Transfer Protocol) data contained in the above target upload parameters, and further perform corresponding parsing processing on the current FTP data, and be able to further extract the required FTP address configuration number and FTP address, based on which, the above target identifier is generated in real time to facilitate subsequent processing.
[0104] Fourth embodiment
[0105] Further, the step of adding the target identifier to the target log information according to the FTP address configuration number and the FTP address includes:
[0106] When the FTP address configuration number and the FTP address are acquired in real time, a corresponding initial address data link is constructed according to the FTP address configuration number and the FTP address;
[0107] The initial address data chain is simplified to generate a corresponding target address data chain in real time, and the target address data chain is set as the target identifier of the target log information.
[0108] Among them, in this embodiment, it should be pointed out that after the required FTP address configuration number and FTP address are further obtained in real time through the above steps, the mapping relationship between the two can be directly constructed at this time, and further combined into the required initial address data chain. Further, since the initial address data chain contains certain redundant data, it is necessary to further simplify the current initial address data chain and finally generate the required target address data chain. Based on this, the current target address data chain is set as the transmission path of the above target log information, and is correspondingly set as the target identifier of the current target log information, so as to facilitate subsequent processing.
[0109] Fifth embodiment
[0110] Furthermore, the step of uploading the target log information to a preset storage database according to the target identifier includes:
[0111] When the target identifier is obtained, calling up a corresponding initial communication protocol in a preset communication database according to the target identifier;
[0112] The target identifier is integrated into the initial communication protocol to generate a corresponding target communication protocol, and the target log information is correspondingly uploaded to the preset storage database through the target communication protocol, and the target communication protocol is unique.
[0113] Among them, in this embodiment, it should be pointed out that after the required target identifier is further obtained in real time through the above steps, in order to further speed up the transmission of subsequent logs, the corresponding initial communication protocol will be further called out in the pre-set communication database according to the current target identifier.
[0114] Furthermore, the current initial communication protocol is integrated with the current target identifier, that is, the transmission path contained in the current target identifier is integrated into the interior of the current initial communication protocol to form a target communication protocol for final transmission. Based on this, the current target log information is uploaded to the above-mentioned preset storage database through the target communication protocol in real time, so that the user can quickly receive the log information he needs, thereby correspondingly improving the user's work efficiency.
[0115] See also Figure 2 , the sixth embodiment of the present invention provides:
[0116] A terminal log processing system, wherein the system comprises:
[0117] An extraction module, used to receive the log upload instruction issued by the user in real time, and parse and process the log upload instruction in real time to extract the log upload parameters and log acquisition time period respectively contained in the log upload instruction in real time;
[0118] A screening module, used to screen out corresponding target log information in real time in a preset log database according to the log acquisition time period, and add a corresponding target identifier to the target log information through the log upload parameter;
[0119] The display module is used to upload the target log information to a preset storage database according to the target identifier, and display the logs in the preset storage database in real time on the user terminal of the user.
[0120] Furthermore, the extraction module is specifically used for:
[0121] When the log upload instruction is obtained in real time, the instruction sequence contained in the log upload instruction is detected in real time;
[0122] Detecting in real time the starting point and the ending point corresponding to the instruction sequence, and detecting in real time a number of separators sequentially included in the instruction sequence according to the starting point and the ending point;
[0123] The log upload parameters and the log acquisition time period are extracted respectively based on a plurality of the separators, and each of the separators is unique.
[0124] Furthermore, the extraction module is also specifically used for:
[0125] When a plurality of the separators are obtained in real time, the instruction sequence is split into a plurality of corresponding instruction statements by each of the separators;
[0126] Parsing each of the instruction statements to detect in real time the statement header and the target character string respectively contained in each of the instruction statements;
[0127] According to the statement header, the plurality of instruction statements are correspondingly split into the log upload parameters and the log acquisition time period, and each of the statement headers is unique.
[0128] Furthermore, the extraction module is also specifically used for:
[0129] When the statement headers corresponding to each of the instruction statements are obtained in real time, the statement identifiers contained in the statement headers are detected in real time, and it is determined in real time whether the statement identifiers belong to the first target type or the second target type:
[0130] If it is determined in real time that the statement identifier belongs to the first target type, then the instruction statement corresponding to the current statement identifier is determined to be the log upload parameter;
[0131] If it is determined in real time that the statement identifier belongs to the second target type, the instruction statement corresponding to the current statement identifier is determined to be the log acquisition time period, and each statement identifier is unique.
[0132] Furthermore, the screening module is specifically used for:
[0133] When the log upload parameters are obtained in real time, the FTP data contained in the log upload parameters is detected in real time;
[0134] Parsing the FTP data to extract the corresponding FTP address configuration number and FTP address in real time;
[0135] The target identifier is added to the target log information according to the FTP address configuration number and the FTP address, and the target identifier is unique.
[0136] Furthermore, the screening module is also specifically used for:
[0137] When the FTP address configuration number and the FTP address are acquired in real time, a corresponding initial address data link is constructed according to the FTP address configuration number and the FTP address;
[0138] The initial address data chain is simplified to generate a corresponding target address data chain in real time, and the target address data chain is set as the target identifier of the target log information.
[0139] Furthermore, the display module is specifically used for:
[0140] When the target identifier is obtained, calling up a corresponding initial communication protocol in a preset communication database according to the target identifier;
[0141] The target identifier is integrated into the initial communication protocol to generate a corresponding target communication protocol, and the target log information is correspondingly uploaded to the preset storage database through the target communication protocol, and the target communication protocol is unique.
[0142] A seventh embodiment of the present invention provides a computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the terminal log processing method as described above when executing the computer program.
[0143] An eighth embodiment of the present invention provides a readable storage medium on which a computer program is stored, wherein the program, when executed by a processor, implements the terminal log processing method as described above.
[0144] In summary, the terminal log processing method and system provided by the above embodiments of the present invention can export logs in a targeted manner in a short time, thereby improving work efficiency.
[0145] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0146] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0147] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0148] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0149] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0150] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A terminal log processing method, characterized in that: The method comprises: Receive the log upload instruction issued by the user in real time, and parse and process the log upload instruction in real time to extract the log upload parameters and log acquisition time period respectively contained in the log upload instruction in real time; According to the log acquisition time period, corresponding target log information is screened in real time in a preset log database, and a corresponding target identifier is added to the target log information through the log upload parameter; Uploading the target log information to a preset storage database according to the target identifier, and displaying the logs in the preset storage database in real time on the user terminal of the user; The step of parsing the log upload instruction in real time to extract the log upload parameters and the log acquisition time period respectively included in the log upload instruction in real time includes: When the log upload instruction is obtained in real time, the instruction sequence contained in the log upload instruction is detected in real time; Detecting in real time the starting point and the ending point corresponding to the instruction sequence, and detecting in real time a number of separators sequentially included in the instruction sequence according to the starting point and the ending point; The log upload parameters and the log acquisition time period are respectively extracted based on a plurality of the separators, each of the separators being unique; The step of respectively extracting the log upload parameters and the log acquisition time period based on the plurality of delimiters comprises: When a plurality of the separators are obtained in real time, the instruction sequence is split into a plurality of corresponding instruction statements by each of the separators; Parsing each of the instruction statements to detect in real time the statement header and the target character string respectively contained in each of the instruction statements; Splitting the plurality of instruction statements into the log upload parameters and the log acquisition time period according to the statement header, wherein each of the statement headers is unique; The step of splitting the plurality of instruction statements into the log upload parameters and the log acquisition time period according to the statement header includes: When the statement headers corresponding to each of the instruction statements are obtained in real time, the statement identifiers contained in the statement headers are detected in real time, and it is determined in real time whether the statement identifiers belong to the first target type or the second target type: If it is determined in real time that the statement identifier belongs to the first target type, then the instruction statement corresponding to the current statement identifier is determined to be the log upload parameter; If it is determined in real time that the statement identifier belongs to the second target type, the instruction statement corresponding to the current statement identifier is determined to be the log acquisition time period, and each statement identifier is unique; The step of adding a corresponding target identifier to the target log information through the log upload parameter includes: When the log upload parameters are obtained in real time, the FTP data contained in the log upload parameters is detected in real time; Parsing the FTP data to extract the corresponding FTP address configuration number and FTP address in real time; Adding the target identifier to the target log information according to the FTP address configuration number and the FTP address, wherein the target identifier is unique; The step of adding the target identifier to the target log information according to the FTP address configuration number and the FTP address comprises: When the FTP address configuration number and the FTP address are acquired in real time, a corresponding initial address data link is constructed according to the FTP address configuration number and the FTP address; Simplifying the initial address data chain to generate a corresponding target address data chain in real time, and setting the target address data chain as the target identifier of the target log information; The step of uploading the target log information to a preset storage database according to the target identifier includes: When the target identifier is obtained, calling up a corresponding initial communication protocol in a preset communication database according to the target identifier; The target identifier is integrated into the initial communication protocol to generate a corresponding target communication protocol, and the target log information is correspondingly uploaded to the preset storage database through the target communication protocol, and the target communication protocol is unique.
2. A terminal log processing system, characterized in that: For implementing the terminal log processing method according to claim 1, the system comprises: An extraction module, used to receive the log upload instruction issued by the user in real time, and parse and process the log upload instruction in real time to extract the log upload parameters and log acquisition time period respectively contained in the log upload instruction in real time; A screening module, used to screen out corresponding target log information in real time in a preset log database according to the log acquisition time period, and add a corresponding target identifier to the target log information through the log upload parameter; The display module is used to upload the target log information to a preset storage database according to the target identifier, and display the logs in the preset storage database in real time on the user terminal of the user.
3. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the terminal log processing method according to claim 1 is implemented.
4. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the terminal log processing method as claimed in claim 1 is implemented.
