CN111611021B - Log data transmission method, device, computer equipment and storage medium - Google Patents

Log data transmission method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN111611021B
CN111611021B CN202010303341.1A CN202010303341A CN111611021B CN 111611021 B CN111611021 B CN 111611021B CN 202010303341 A CN202010303341 A CN 202010303341A CN 111611021 B CN111611021 B CN 111611021B
Authority
CN
China
Prior art keywords
log data
uploading
terminal
log
terminals
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
CN202010303341.1A
Other languages
Chinese (zh)
Other versions
CN111611021A (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.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
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 Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202010303341.1A priority Critical patent/CN111611021B/en
Publication of CN111611021A publication Critical patent/CN111611021A/en
Application granted granted Critical
Publication of CN111611021B publication Critical patent/CN111611021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a log data transmission method, a log data transmission device, computer equipment and a storage medium. The method comprises the following steps: when a plurality of terminals are in an online state, starting an application program, and automatically triggering and monitoring a plurality of terminal connection threads; when receiving a log data reporting request sent by at least two terminals, acquiring port configuration parameters corresponding to each terminal according to the log data reporting request; acquiring a preconfigured equipment identification information table; matching the port configuration parameters corresponding to the terminals with the equipment identification information table; and when the matching is successful, returning the connection result to the corresponding terminal, connecting the terminal for communication, uploading the log data to a designated path according to an uploading protocol, and storing. By adopting the method, the operation flow can be effectively simplified, a great deal of manpower and time are not required to be consumed, and the efficiency of log data transmission is effectively improved.

Description

Log data transmission method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a log data transmission method, apparatus, computer device, and storage medium.
Background
With the development of computer technology, various types of electronic devices such as personal computers and smart phones are increasing, and especially when the communication device is in a debugging and testing stage, in order to quickly find the location problem, the generated log data needs to be read in real time. In the conventional manner, after the communication device is connected to the test computer, a logging tool is installed on the test computer, and the corresponding logging data is copied to the test computer by using the logging tool for reading and analyzing.
However, in the current common logging tool mode, because different platforms have different types of logging tools, when a plurality of communication devices with different platforms need to be debugged, a plurality of different logging tools need to be installed on each communication device at the same time to acquire corresponding log data, so that the operation flow is complex, and a great deal of manpower and time are required to be consumed.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a log data transmission method, apparatus, computer device, and storage medium capable of improving log data transmission efficiency.
A method of log data transmission, the method comprising:
when a plurality of terminals are in an online state, starting an application program, and automatically triggering and monitoring a plurality of terminal connection threads;
when receiving a log data reporting request sent by at least two terminals, acquiring port configuration parameters corresponding to each terminal according to the log data reporting request;
acquiring a preconfigured equipment identification information table;
matching the port configuration parameters corresponding to the terminals with the equipment identification information table;
and when the matching is successful, returning the connection result to the corresponding terminal, connecting the terminal for communication, uploading the log data to a designated path according to an uploading protocol, and storing.
In one embodiment, after the matching the port configuration parameters corresponding to the terminals with the device identification information table, the method further includes:
setting the time length of uploading the log file, the size of uploading the log file and the time interval of uploading the log file at fixed time by an application program;
when the total capacity of the log files reaches a preset threshold value, automatically stopping uploading the log files or automatically covering the uploaded log files.
In one embodiment, the uploading the log data under the designated path according to the uploading protocol and storing includes:
automatically uploading the log data according to the time sequence of generating the log data and storing the log data in a classified manner;
and uploading the log data automatically according to the equipment identification numbers corresponding to the plurality of terminals and storing the log data in a classified mode.
In one embodiment, the method further comprises:
when receiving a log data acquisition request sent by at least two terminals, checking log data authority of each terminal;
and after passing the log data authority verification, sending the corresponding log data to the corresponding terminal.
In one embodiment, the method further comprises:
when uploading log data, monitoring the capacity of each log file in real time;
when the monitored log file capacity is larger than a preset threshold value, the log file is automatically segmented, and the segmented log file is uploaded.
In one embodiment, after the log data is uploaded under a specified path according to an upload protocol and stored, the method further includes:
when uploading of the log data corresponding to the terminal is completed, the uploading mark is automatically triggered and cleared through the application program.
A log data transmission apparatus, the apparatus comprising:
the starting module is used for starting an application program when the terminals are in an online state and automatically triggering and monitoring a plurality of terminal connection threads;
the acquisition module is used for acquiring port configuration parameters corresponding to each terminal according to the log data reporting request when the log data reporting request sent by at least two terminals is received; acquiring a preconfigured equipment identification information table;
the matching module is used for matching the port configuration parameters corresponding to the terminals with the equipment identification information table;
and the uploading module is used for returning the connection result to the corresponding terminal when the matching is successful, connecting the terminal for communication, uploading the log data to the designated path according to the uploading protocol and storing the log data.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
when a plurality of terminals are in an online state, starting an application program, and automatically triggering and monitoring a plurality of terminal connection threads;
when receiving a log data reporting request sent by at least two terminals, acquiring port configuration parameters corresponding to each terminal according to the log data reporting request;
acquiring a preconfigured equipment identification information table;
matching the port configuration parameters corresponding to the terminals with the equipment identification information table;
and when the matching is successful, returning the connection result to the corresponding terminal, connecting the terminal for communication, uploading the log data to a designated path according to an uploading protocol, and storing.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
when a plurality of terminals are in an online state, starting an application program, and automatically triggering and monitoring a plurality of terminal connection threads;
when receiving a log data reporting request sent by at least two terminals, acquiring port configuration parameters corresponding to each terminal according to the log data reporting request;
acquiring a preconfigured equipment identification information table;
matching the port configuration parameters corresponding to the terminals with the equipment identification information table;
and when the matching is successful, returning the connection result to the corresponding terminal, connecting the terminal for communication, uploading the log data to a designated path according to an uploading protocol, and storing.
According to the log data transmission method, the log data transmission device, the computer equipment and the storage medium, when a plurality of terminals are in an on-line state, an application program is started, and the monitoring of a plurality of terminal connection threads is automatically triggered. When a log data reporting request sent by at least two terminals is received, acquiring port configuration parameters corresponding to each terminal according to the log data reporting request, and matching the port configuration parameters corresponding to each terminal with the equipment identification information table by acquiring a pre-configured equipment identification information table relative to a traditional log data transmission mode. And when the matching is successful, returning the connection result to the corresponding terminal, communicating by the connection terminal, uploading the log data to the designated path according to the uploading protocol, and storing. Therefore, even when debugging and testing are carried out on a plurality of different platforms or different types of terminal equipment at the same time, log data generated by the different terminal equipment in real time can be automatically transmitted to a path corresponding to a designated server according to an uploading protocol and stored in a preset time period. The method has the advantages that the operation flow can be effectively simplified, a large amount of labor and time are not required to be consumed, log data generated by different types of terminal equipment can be rapidly uploaded in real time even in an open-air mobile test environment, the efficiency of log data transmission is effectively improved, and meanwhile, the efficiency of testing a terminal system is also improved.
Drawings
FIG. 1 is a diagram of an application environment of a method for transmitting log data according to one embodiment;
FIG. 2 is a flowchart of a method for transmitting log data according to an embodiment;
FIG. 3 is a flowchart illustrating a step of monitoring the total capacity of an upload log file in one embodiment;
FIG. 4 is a flowchart illustrating a real-time monitoring step for each uploading log file capacity according to another embodiment;
FIG. 5 is a block diagram illustrating a structure of a log data transmission device according to an embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The log data transmission method provided by the application can be applied to an application environment shown in fig. 1. Wherein the terminals 102, 104 communicate with the server 106 over a network. When the plurality of terminals 102, 104 are online, the server 106 initiates an application program that automatically triggers listening to the plurality of terminal 102, 104 connection threads. When the server 106 receives the log data reporting request sent by at least two terminals 102 and 104, the server 106 obtains the port configuration parameters corresponding to each terminal 102 and 104 according to the log data reporting request. The server 106 acquires a pre-configured device identification information table, and the server 106 matches the port configuration parameters corresponding to the terminals 102 and 104 with the device identification information table. When the matching is successful, the server 106 returns the connection result to the corresponding terminal 102, 104, the server 106 connects the terminal 102, 104 for communication, and the log data is uploaded to the designated path according to the uploading protocol and stored. The terminals 102 and 104 may be, but not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices, and the server 106 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a log data transmission method is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
step 202, when a plurality of terminals are in an on-line state, starting an application program, and automatically triggering monitoring a plurality of terminal connection threads.
The terminal can communicate with the server through the network and maintain an online state through a network communication connection. For example, different types of terminal devices may be transported using an operator-stabilized network after connection to a wireless network or a local area network. When a plurality of terminal devices are in an online state, namely, communication connection is kept, the server can start an application program through triggering operation, namely, background log service is started, and monitoring of a plurality of terminal connection threads is automatically triggered. In the debugging stage, developers can set different types of accessed terminals in a unified way in advance through the server, for example, IP addresses, uploading service marks and the like of the connection server can be set through a configuration tool, and meanwhile, the problem of network security after the terminal equipment is used commercially is avoided. The application program may be a pre-deployed application program supporting high concurrency multiple connections at the server, for example, a Service program supporting file uploading, where the Service program may be automatically started and stopped along with the system. Meanwhile, corresponding configuration files can be set in the application program in advance, for example, related information tables of a plurality of terminal devices can be configured in the application program. The server can monitor the states corresponding to the plurality of terminal devices in real time by starting the application program.
And 204, when receiving a log data reporting request sent by at least two terminals, acquiring port configuration parameters corresponding to each terminal according to the log data reporting request.
The server automatically monitors the real-time states of the plurality of terminal connection threads by starting the application program. When the server receives the log data reporting request sent by at least two terminals, the server acquires the port configuration parameters corresponding to the terminals according to the log data reporting request. The port configuration parameters corresponding to each terminal may include a link type of the port, configuration of transmitting information, configuration of receiving information, a hardware identification number, and the like, and may also include a model number, a baud rate, a stop bit, a check bit, and the like of the port configuration. Specifically, when the server receives a log data reporting request sent by at least two terminals, that is, the server can trigger to automatically scan through a configuration tool, can scan a plurality of terminal devices at the same time, record corresponding terminal port configuration parameters after scanning and identifying one of the terminal devices, then scan and identify the parameters of the next terminal device, and complete scanning after traversing all the terminal port configuration parameters. And the server acquires the port configuration parameter information table corresponding to each terminal by scanning the port configuration parameters corresponding to each terminal according to the log data reporting request.
Step 206, obtaining a preconfigured device identification information table.
After the server acquires the port configuration parameters corresponding to each terminal according to the log data reporting request, the server acquires a preconfigured equipment identification information table. The device identification information table may include a device identification number, a key, a connection status, and a connection authority. Different terminal devices have a unique device identification number, i.e. IMEI number.
And step 208, matching the port configuration parameters corresponding to the terminals with the equipment identification information table.
And 210, returning the connection result to the corresponding terminal when the matching is successful, communicating the connection terminal, uploading the log data to the designated path according to the uploading protocol, and storing the log data.
And the server matches the port configuration parameters corresponding to the terminals with the equipment identification information table. And when the matching is successful, returning the connection result to the corresponding terminal, communicating by the connection terminal, uploading the log data to the designated path according to the uploading protocol, and storing. The uploading protocol is a set of standard protocol for file transmission on the network, and belongs to the application layer of the network transmission protocol. Common upload protocols may include connection oriented services (TCP protocol) and connectionless services (UDP protocol) as well as the trivial file transfer protocol (TFTP protocol). Specifically, the server may analyze the log data reporting request according to the log data reporting request, and obtain an equipment identification number (IMEI number), a key password, and a corresponding connection right corresponding to the log data reporting request. For example, the server may obtain, according to a received log data reporting request of a certain terminal, a port configuration parameter of the terminal corresponding to the log data reporting request is C39VVAJ3JCL6, that is, an IOS system device, where a model name of the terminal device is Iphone X. Further, the server acquires information of a device identification information table which is pre-configured in the database, and searches the content which is matched with the port configuration parameter C39VVAJ3JCL6 in the device identification information table. When the matching is successful, that is, the server searches the equipment identification number, the key and the permission of connection permission matched with the port configuration parameter C39VVAJ3JCL6 in the equipment identification information table, the server returns the connection result to the corresponding IOS system terminal, and connects the terminal for communication, and log data is automatically uploaded to a designated path and stored according to different preset uploading protocols. When the matching fails, the result of the connection failure is returned to the corresponding terminal, the corresponding terminal cannot be connected for communication, and a developer is required to be contacted for reconfiguring the corresponding parameters.
In this embodiment, when a plurality of terminals are in an online state, an application program is started, and monitoring of a plurality of terminal connection threads is automatically triggered. When a log data reporting request sent by at least two terminals is received, acquiring port configuration parameters corresponding to each terminal according to the log data reporting request, and matching the port configuration parameters corresponding to each terminal with the equipment identification information table by acquiring a pre-configured equipment identification information table relative to a traditional log data transmission mode. And when the matching is successful, returning the connection result to the corresponding terminal, communicating by the connection terminal, uploading the log data to the designated path according to the uploading protocol, and storing. Therefore, even when debugging and testing are carried out on a plurality of different platforms or different types of terminal equipment at the same time, log data generated by the different terminal equipment in real time can be automatically transmitted to a path corresponding to a designated server according to an uploading protocol and stored in a preset time period. The method has the advantages that the operation flow can be effectively simplified, a large amount of labor and time are not required to be consumed, log data generated by different types of terminal equipment can be rapidly uploaded in real time even in an open-air mobile test environment, the efficiency of log data transmission is effectively improved, and meanwhile, the efficiency of testing a terminal system is also improved.
In one embodiment, as shown in fig. 3, after the port configuration parameters corresponding to each terminal are matched with the device identification information table, the method further includes a step of monitoring the total capacity of the upload log file, and specifically includes:
step 302, setting, by an application program, a log file uploading duration, a log file uploading size and a time interval for uploading log files regularly.
And 304, automatically stopping uploading the log file or automatically covering the uploaded log file when the total capacity of the log file reaches a preset threshold value.
And the server matches the port configuration parameters corresponding to the terminals with the equipment identification information table. And when the matching is successful, the server is connected with the terminal for communication. Meanwhile, the server can also set the time length for automatically uploading the log file, the size of uploading the log file and the time interval for uploading the log file at fixed time through the application program. The server can set how long to upload the log file automatically every interval according to the types and the memory sizes of different terminals, for example, the time interval for uploading the log file at regular time can be set to 30min for a terminal device with smaller memory, namely, the server can automatically acquire log data generated in 30min corresponding to the terminal device every 30min, through an application program, and the log data is stored under a designated path in the server according to the time sequence of generating the log data. When the real-time log data corresponding to the terminal is automatically uploaded to a designated path and stored, the server can monitor the size of the uploaded log file in real time through an application program. When the server monitors that the total capacity of the log files reaches a preset threshold value through the application program, uploading of the log files is automatically stopped or the uploaded log files are automatically covered. Specifically, parameters corresponding to uploading the log files may be set in the configuration file in advance, and in addition to a corresponding threshold value may be set for the capacity of each log file, a corresponding threshold value may be set for the total capacity of the log files. For example, when the memory of the terminal device is large, the threshold value of the total capacity of the log file may be set to 60MB, that is, when the server monitors that the total capacity of the log file reaches 60MB through the application program, a corresponding selection frame interface is popped up, and the uploading of the log file may be stopped or the uploaded log file may be covered according to the requirement of the debugger. The method can also set parameters corresponding to automatically stopping uploading the log file or automatically covering the uploaded log file in the configuration file in advance, and automatically stopping uploading the log file or automatically covering the uploaded log file when the total capacity of the log file is monitored to reach 60 MB. When the memory of the terminal equipment is smaller, the threshold value of the total capacity of the log file can be set to 20MB, namely when the server monitors that the total capacity of the log file reaches 20MB through an application program, a corresponding selection frame interface is popped up, and uploading of the log file can be stopped or the uploaded log file can be covered according to the requirement of a debugger. Therefore, when debugging and testing are carried out on a plurality of different platforms or different types of terminal equipment, automatic effective transmission of log data can be realized, when the total capacity of the log files reaches a preset threshold value, uploading of the log files is automatically stopped or the uploaded log files are automatically covered according to preset configuration parameters, complicated processes of manual operation are avoided, effective automatic management and uploading of the log data generated in real time can be carried out quickly and effectively, operation processes are simplified, and therefore the efficiency of log data transmission is effectively improved.
In one embodiment, the step of uploading the log data under the specified path and storing according to the uploading protocol includes:
and automatically uploading the log data according to the time sequence of generating the log data and storing the log data in a classified manner.
And uploading the log data automatically according to the equipment identification numbers corresponding to the terminals and storing the log data in a classified mode.
When the server performs debugging test on a plurality of different platforms or different types of terminal equipment at the same time, the server matches port configuration parameters corresponding to the terminals with the equipment identification information table. When the matching is successful, the server is connected with each terminal for communication, and the server can automatically upload and store the log data corresponding to each terminal according to the uploading protocol and the time sequence of generating the log data, or automatically upload and store the log data corresponding to each terminal according to the equipment identification number corresponding to each terminal. Specifically, when the server needs to perform debugging test on a plurality of terminal devices of different types in batches, the server can match the port configuration parameters corresponding to each terminal with the device identification information table. After the matching is successful, the server is connected with each terminal for communication, the server can be preset in the configuration file, and log data corresponding to each terminal are automatically uploaded according to the equipment identification number corresponding to each terminal and are classified and stored. The log data of the test terminal equipment of various types can be read at the same time, and the comparison and judgment of which type of the log data of the terminal equipment has problems and has poor performance. When the server needs to perform debugging test on a plurality of terminal devices of the same type in batches, the server can match port configuration parameters corresponding to the terminals with the device identification information table. After the matching is successful, the server is connected with each terminal for communication, the server can be preset in the configuration file, and log data corresponding to each terminal are automatically uploaded according to the time sequence of generating the log data and are classified and stored. Therefore, the log data corresponding to the same type of test terminal equipment can be read at the same time, and the specific terminal equipment with better performance can be rapidly judged by comparing the operation log data of a plurality of the same type of terminal equipment in the same time period. Therefore, manual complicated operation in the log data transmission process is avoided, the operation flow of simultaneously transmitting various log data is simplified, the log data corresponding to various different terminal devices can be simultaneously transmitted, and the log data can be automatically uploaded and classified and stored according to the device identification numbers corresponding to the terminals, so that the log data transmission efficiency is effectively improved.
In one embodiment, the method further comprises the step of checking log data permissions, specifically comprising:
when receiving a log data acquisition request sent by at least two terminals, checking log data authority of each terminal.
And after passing the log data authority verification, sending the corresponding log data to the corresponding terminal.
When the server performs debugging test on a plurality of different platforms or different types of terminal equipment at the same time, the server matches port configuration parameters corresponding to the terminals with the equipment identification information table. When the plurality of terminals are successfully matched, and the corresponding log data is uploaded to a designated path of the server according to an uploading protocol and stored, the server can send the corresponding log data to the corresponding terminals according to the log data authority corresponding to different verification terminal devices. Specifically, when the server receives acquisition requests for log data of different types sent by a plurality of different terminals, the server will verify the log data authority of each terminal. The log data rights may include various types of rights, such as read only rights, read download rights, editable rights, and the like, among others. When the server passes the verification of different log data authorities of each terminal, the server can open the operation authorities of the terminal for reading, downloading, editing and the like of the appointed log data according to the types of the different authorities. Therefore, when different terminal equipment needs to acquire log data in a specific time period or a specific type, the permission type of the different terminal equipment is checked, so that the rapid and effective log data transmission can be realized, and the efficiency of the log data transmission is improved.
In one embodiment, as shown in fig. 4, the method further includes a step of monitoring the capacity of each upload log file in real time, specifically including:
step 402, when uploading log data, monitoring the capacity of each log file in real time.
And step 404, when the monitored capacity of the log file is larger than a preset threshold value, automatically dividing the log file, and uploading the divided log file.
And the server matches the port configuration parameters corresponding to the terminals with the equipment identification information table. And when the matching is successful, the server is connected with the terminal for communication. Meanwhile, the server can also set the time length for automatically uploading the log file, the size of uploading the log file and the time interval for uploading the log file at fixed time through the application program. When the real-time log data corresponding to the terminal is automatically uploaded to a designated path and stored, the server can monitor the size of the uploaded log file in real time through an application program. When uploading the log data, the server monitors the capacity of each log file in real time through an application program. When the capacity of the log file monitored by the server through the application program is larger than a preset threshold, the log file is automatically segmented, and the segmented log file is uploaded. Specifically, when uploading log data of a plurality of different terminals, the server can monitor the capacity of each log file in real time, namely monitor the size of the uploaded log file in real time, through an application program according to a pre-configured configuration file. When the server monitors that the capacity of the uploading log file is larger than a preset threshold value through the application program, the uploading log file is automatically segmented, and the segmented log file is uploaded. For example, corresponding parameters of the uploading log files may be set in the configuration file in advance, and the capacity threshold of each log file may be set to 5MB, that is, when the server monitors that the log file capacity is greater than 5MB through the application program, the uploading log file is automatically segmented, the segmented log files are uploaded, and the segmented uploading log files have capacities not greater than 5MB. Furthermore, the server can store the log files uploaded in real time by the application program according to the time interval generated by the log files in a classified manner, and can also store the log files under a specified path of the server according to the class type or the equipment identification number of the log files in a classified manner. Therefore, when the server needs to read the log data of a plurality of terminals at the same time, the log data can be accurately transmitted according to the time of generating the log data or serial numbers of different types of terminal equipment, so that error data of uploading the log file caused by overlarge capacity of the log file is avoided, and even if debugging and testing are carried out on a plurality of different platforms or different types of terminal equipment at the same time, the automatic rapid and accurate transmission and storage of the log data can be realized, thereby effectively improving the accuracy and efficiency of the log data transmission.
In one embodiment, after uploading the log data under the designated path according to the uploading protocol and storing, the method further includes the step of clearing the uploading flag, specifically including:
when uploading of the log data corresponding to the terminal is completed, the uploading mark is automatically triggered and cleared through the application program.
When the uploading of the log data corresponding to the terminal is completed, the server automatically triggers and clears the uploading mark through the application program. Specifically, when the server performs debugging test on a plurality of different platforms or different types of terminal equipment at the same time, when uploading of log data corresponding to one of the terminal equipment is completed, the server can automatically trigger and clear an uploading mark corresponding to the terminal equipment through an application program to indicate that the uploading is finished, and if the data transmission is required subsequently, the server can upload again. . In addition, the clearing instruction can clear log data uploaded by a certain terminal device in a specific time period, or can clear log data of the type locally stored by a plurality of terminal devices according to different types of logs at the same time according to a specific log type. For example, the low-to-high level types of log information may include: the debug < info < wave < Error < Fatal, debug log represents all detailed information for debugging. The Info log represents some critical jumps, logs that prove that the software is operating properly. The Warning log indicates that some accidents occur, and the software cannot be processed, but still can run normally. Error log means that due to some serious problems, the software cannot perform some functions normally but still can run. The critical/far log indicates very serious errors, and the software cannot run continuously. For example, since the terminal a and the terminal B are currently operating normally, the server may send an instruction for clearing the Info type log data to the terminal a and the terminal B through the application program, and then the server clears the Info type log data locally corresponding to the terminal a and the terminal B. Therefore, the server can regularly and effectively clear the storage space of different types of terminal equipment, unnecessary log data are cleared, the situation that the log data generated due to insufficient storage space cannot be uploaded or error data are generated is avoided, the uploading mark is automatically triggered and cleared, the transmission state of the log data can be intuitively known, the operation flow is simplified, the convenience for managing the log data transmission is greatly improved, and the efficiency of the log data transmission is effectively improved.
It should be understood that, although the steps in the flowcharts of fig. 1-4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in FIGS. 1-4 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
In one embodiment, as shown in fig. 5, there is provided a log data transmission apparatus, including: a starting module 502, an obtaining module 504, a matching module 506, and an uploading module 508, wherein:
the starting module 502 is configured to start an application when the plurality of terminals are in an online state, and automatically trigger to monitor connection threads of the plurality of terminals.
The obtaining module 504 is configured to obtain, when receiving a log data reporting request sent by at least two terminals, port configuration parameters corresponding to each terminal according to the log data reporting request; a preconfigured device identification information table is obtained.
And the matching module 506 is configured to match the port configuration parameters corresponding to each terminal with the device identification information table.
And the uploading module 508 is used for returning the connection result to the corresponding terminal when the matching is successful, the connection terminal communicates, and the log data is uploaded to the designated path according to the uploading protocol and stored.
In one embodiment, the apparatus further comprises: the device comprises a setting module and a monitoring module.
The setting module is used for setting the time length of uploading the log file, the size of uploading the log file and the time interval of uploading the log file at fixed time through the application program. And the monitoring module is used for automatically stopping uploading of the log data or automatically covering the uploaded log file when the total capacity of the log file reaches a preset threshold value.
In one embodiment, the uploading module 508 is further configured to automatically upload and store the log data in a sorted manner according to a time sequence of generating the log data; and uploading the log data automatically according to the equipment identification numbers corresponding to the terminals and storing the log data in a classified mode.
In one embodiment, the apparatus further comprises: the device comprises a verification module and a sending module.
The verification module is used for verifying the log data reading authority of each terminal when the log data acquisition requests sent by at least two terminals are received. The sending module is used for sending the corresponding log data to the corresponding terminal after passing the log data reading permission verification.
In one embodiment, the monitoring module is further configured to monitor each log file capacity in real time as the log data is uploaded. When the monitored log file capacity is larger than a preset threshold value, automatically dividing the log file, and uploading the divided log file.
In one embodiment, the apparatus further comprises: and (5) a clearing module.
And the clearing module is used for automatically triggering and clearing the uploading mark through the application program when the uploading of the log data corresponding to the terminal is completed.
The specific limitation of the log data transmission device can be referred to the limitation of the log data transmission method hereinabove, and will not be described herein. The respective modules in the log data transmission device described above may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing log data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a log data transmission method.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the various method embodiments described above when the computer program is executed.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method of log data transmission, the method comprising:
when a plurality of terminals are in an online state, starting an application program, and automatically triggering and monitoring a plurality of terminal connection threads;
when receiving a log data reporting request sent by at least two terminals, acquiring port configuration parameters corresponding to each terminal according to the log data reporting request;
acquiring a preconfigured equipment identification information table;
matching the port configuration parameters corresponding to the terminals with the equipment identification information table;
and when the matching is successful, returning the connection result to the corresponding terminal, connecting the terminal for communication, uploading the log data to a designated path according to an uploading protocol, and storing.
2. The method according to claim 1, wherein after the matching the port configuration parameters corresponding to the terminals with the device identification information table, the method further comprises:
setting the time length of uploading the log file, the size of uploading the log file and the time interval of uploading the log file at fixed time by an application program;
when the total capacity of the log files reaches a preset threshold value, automatically stopping uploading the log files or automatically covering the uploaded log files.
3. The method of claim 1, wherein uploading the log data under the designated path and storing according to the upload protocol comprises:
automatically uploading the log data according to the time sequence of generating the log data and storing the log data in a classified manner;
and uploading the log data automatically according to the equipment identification numbers corresponding to the plurality of terminals and storing the log data in a classified mode.
4. A method according to claim 3, characterized in that the method further comprises:
when receiving a log data acquisition request sent by at least two terminals, checking log data authority of each terminal;
and after passing the log data authority verification, sending the corresponding log data to the corresponding terminal.
5. The method according to claim 1, wherein the method further comprises:
when uploading log data, monitoring the capacity of each log file in real time;
when the monitored log file capacity is larger than a preset threshold value, the log file is automatically segmented, and the segmented log file is uploaded.
6. The method of claim 1, wherein after uploading the log data under the designated path and storing according to the upload protocol, the method further comprises:
when uploading of the log data corresponding to the terminal is completed, the uploading mark is automatically triggered and cleared through the application program.
7. A log data transmission device, the device comprising:
the starting module is used for starting an application program when the terminals are in an online state and automatically triggering and monitoring a plurality of terminal connection threads;
the acquisition module is used for acquiring port configuration parameters corresponding to each terminal according to the log data reporting request when the log data reporting request sent by at least two terminals is received; acquiring a preconfigured equipment identification information table;
the matching module is used for matching the port configuration parameters corresponding to the terminals with the equipment identification information table;
and the uploading module is used for returning the connection result to the corresponding terminal when the matching is successful, connecting the terminal for communication, uploading the log data to the designated path according to the uploading protocol and storing the log data.
8. The log data transmitting apparatus of claim 7, wherein the apparatus further comprises:
the setting module is used for setting the length of uploading the log file, the size of uploading the log file and the time interval for uploading the log file at fixed time through the application program;
and the monitoring module is used for automatically stopping uploading of the log data or automatically covering the uploaded log file when the total capacity of the log file reaches a preset threshold value.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202010303341.1A 2020-04-17 2020-04-17 Log data transmission method, device, computer equipment and storage medium Active CN111611021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010303341.1A CN111611021B (en) 2020-04-17 2020-04-17 Log data transmission method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010303341.1A CN111611021B (en) 2020-04-17 2020-04-17 Log data transmission method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111611021A CN111611021A (en) 2020-09-01
CN111611021B true CN111611021B (en) 2023-06-20

Family

ID=72198041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010303341.1A Active CN111611021B (en) 2020-04-17 2020-04-17 Log data transmission method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111611021B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113192232A (en) * 2021-03-15 2021-07-30 深圳市广通远驰科技有限公司 Log acquisition method and log acquisition system
CN113051243A (en) * 2021-03-31 2021-06-29 上海阵量智能科技有限公司 Log processing method, device, system, chip, equipment and storage medium
CN113360468A (en) * 2021-05-12 2021-09-07 武汉联影医疗科技有限公司 Log data uploading method and device, computer equipment and readable storage medium
CN113259448A (en) * 2021-05-27 2021-08-13 四川长虹网络科技有限责任公司 Method and system for transmitting and monitoring log data
CN113641639A (en) * 2021-07-09 2021-11-12 北京百度网讯科技有限公司 Log reporting method and device, electronic equipment and storage medium
CN116820895B (en) * 2023-08-29 2024-01-05 深圳市广和通无线通信软件有限公司 Log grabbing method, device, equipment and medium based on artificial intelligence

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110401949A (en) * 2019-06-19 2019-11-01 北京友宝在线科技股份有限公司 Terminal device running log method for uploading and device
CN110990362A (en) * 2019-11-15 2020-04-10 浙江大搜车软件技术有限公司 Log query processing method and device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110401949A (en) * 2019-06-19 2019-11-01 北京友宝在线科技股份有限公司 Terminal device running log method for uploading and device
CN110990362A (en) * 2019-11-15 2020-04-10 浙江大搜车软件技术有限公司 Log query processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111611021A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN111611021B (en) Log data transmission method, device, computer equipment and storage medium
CN108427613B (en) Abnormal interface positioning method and device, computer equipment and storage medium
CN107623698B (en) Method and device for remotely debugging network equipment
CN112989330B (en) Container intrusion detection method, device, electronic equipment and storage medium
CN112039900A (en) Network security risk detection method, system, computer device and storage medium
CN110943984B (en) Asset safety protection method and device
CN113572780A (en) Equipment security policy configuration method
CN109218407B (en) Code management and control method based on log monitoring technology and terminal equipment
CN114237498A (en) Snapshot generation method and system for cloud native storage data volume
CN114138590A (en) Operation and maintenance processing method and device for Kubernetes cluster and electronic equipment
EP4142238A1 (en) Pico base station configuration method and apparatus, and storage medium and electronic apparatus
CN112650674A (en) Method for remotely acquiring and debugging webpage log, computer equipment and storage medium
CN112115060A (en) Audio test method and system based on terminal
CN111338644A (en) Task script deployment method and system
CN116302738A (en) Method, system, equipment and storage medium for testing chip
CN112329021B (en) Method and device for checking application loopholes, electronic device and storage medium
CN110880990A (en) Configuration checking method and device for big data cluster component and computing equipment
CN114780412A (en) Page testing method, system, device and medium
CN114448665A (en) Method and device for detecting WEB application firewall rules and electronic equipment
CN112468356B (en) Router interface testing method, device, electronic equipment and storage medium
CN116107781A (en) Log tracking method, device, electronic equipment and computer program product
CN108255715B (en) Test result processing method and terminal equipment
CN117033237A (en) Log test method and device, electronic equipment and storage medium
CN112306551B (en) Historical configuration information acquisition method, system and device
CN114003419B (en) Method, system and device for automatically testing RAS characteristics of memory based on OSES

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