CN112422345A - Log transmission method and device, storage medium and electronic device - Google Patents

Log transmission method and device, storage medium and electronic device Download PDF

Info

Publication number
CN112422345A
CN112422345A CN202011296470.9A CN202011296470A CN112422345A CN 112422345 A CN112422345 A CN 112422345A CN 202011296470 A CN202011296470 A CN 202011296470A CN 112422345 A CN112422345 A CN 112422345A
Authority
CN
China
Prior art keywords
log
error log
error
identifier
transmitting
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.)
Pending
Application number
CN202011296470.9A
Other languages
Chinese (zh)
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202011296470.9A priority Critical patent/CN112422345A/en
Publication of CN112422345A publication Critical patent/CN112422345A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • 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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

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

Abstract

The invention discloses a log transmission method and device, a storage medium and an electronic device, wherein the method comprises the following steps: receiving the operation of a first target object through a page end to obtain a web log corresponding to the operation; and under the condition that the error log exists in the webpage log is detected by the probe, transmitting the error log to a log database according to a designated storage mode, wherein the probe is arranged in the middleware, namely, the log is detected by the probe, and after the error log is detected, the error log is transmitted to the log database. By adopting the technical scheme, the problems that in the related art, when a page has a problem, active feedback needs to be carried out depending on a user, and then the feedback timeliness of the problem is poor, the problem recovery time is long and the like are solved.

Description

Log transmission method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a log transmission method and apparatus, a storage medium, and an electronic apparatus.
Background
With the rapid development of the internet of things, the development of the internet of things APP is an important link, and bears the main role of the entrance of the internet of things in the current and long-term future. With the great development of a mobile terminal hybrid development mode, most of the commercial internet of things APP adopts an H5+ native hybrid development mode. However, some JavaScript syntax errors and UI compatibility errors on the H5 page may cause the page to be blank when the errors are serious, resulting in a very poor user experience.
In the related art, after the internet of things APP is on line, when a user uses the internet of things APP, some problems that are not exposed in the test acceptance process can be sometimes encountered. For example, when the internet of things equipment is operated, the interface response is overtime and wrong, and a page displays a white screen. Such problems often have the characteristics of long time consumption and difficult reproduction, so that efficient positioning analysis is difficult for developers and technical support personnel. When the page of the Internet of things APP has a problem, the feedback and solution mechanism of the problem mainly depends on active feedback of a user, the problem enters development end investigation processing through an after-sale channel, the timeliness is poor, the problem recovery time is long, and the recovery degree cannot be guaranteed.
Aiming at the problems that in the related art, when a page has a problem, active feedback of a user needs to be relied on, so that the feedback timeliness of the problem is poor, the problem recovery time is long and the like, an effective solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a log transmission method and device, a storage medium and an electronic device, and aims to at least solve the problems that in the related art, when a page has a problem, active feedback of a user is required, the feedback timeliness of the problem is poor, the problem recovery time is long and the like.
According to an aspect of an embodiment of the present invention, there is provided a log transmission method, including: receiving the operation of a first target object through a page end to obtain a web log corresponding to the operation; and under the condition that a probe detects that an error log exists in the webpage log, transmitting the error log to a log database according to a specified storage mode, wherein the probe is arranged in the middleware.
In an exemplary embodiment, transmitting the error log to a log database in a specified storage manner includes: acquiring a first identifier of a first target object corresponding to the error log, wherein the first identifier is used for uniquely identifying the first target object; associating the error log with the first identifier; and transmitting the associated error log and the first identifier to the log database.
In an exemplary embodiment, transmitting the associated error log and the first identifier to the log database includes: acquiring a second identifier of the error log, wherein the second identifier is used for uniquely identifying the error log; associating the second identifier, and the error log with the first identifier; and transmitting the associated second identifier, the error log and the first identifier to the log database.
In an exemplary embodiment, after the error log is transmitted to the log database in a designated storage manner, the method further includes: sending notification information to a second target object to instruct the second target object to analyze the error log, wherein the notification information is used for notifying the second target object that the error log is saved in the target database.
In an exemplary embodiment, transmitting the error log to a log database in a specified storage manner includes: determining whether the following error logs exist in the web log: the back end interface error log, the grammar spelling error log and the Native end error log; and transmitting the error log to a log database according to a specified storage mode under the condition that the error log exists in the webpage log.
In an exemplary embodiment, transmitting the error log to a log database in a specified storage manner includes: calling a server interface through the middleware; and transmitting the error log to a log database through the server interface according to a specified storage mode.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus of a log transmission method, including: the acquisition module is used for receiving the operation of the first target object through a page end to obtain a webpage log corresponding to the operation; and the transmission module is used for transmitting the error log to a log database according to a specified storage mode under the condition that the error log is detected to exist in the webpage log through a probe, wherein the probe is arranged in the middleware.
In an exemplary embodiment, transmitting the error log to a log database in a specified storage manner includes: the transmission module is used for acquiring a first identifier of a first target object corresponding to the error log, wherein the first identifier is used for uniquely identifying the first target object; associating the error log with the first identifier; and transmitting the associated error log and the first identifier to the log database.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-mentioned log transmission method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the log transmission method through the computer program.
In the embodiment of the invention, the operation of a first target object is received through a page end, and a webpage log corresponding to the operation is obtained; the technical scheme is adopted, the problems that in the related art, when a page has a problem, the feedback timeliness of the problem is poor and the problem recovery time is long due to the fact that the user needs to rely on active feedback, and the like are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a computer terminal of a log transmission method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a log transmission method according to an embodiment of the present invention;
fig. 3 is a basic structure diagram of a log transmission method according to an embodiment of the present invention;
FIG. 4 is a basic flow diagram of error log transmission according to a specific embodiment of the present invention;
fig. 5 is a structural diagram of a log transmission apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method provided by the embodiment of the application can be executed in a computer terminal or a similar operation device. Taking an example of the method performed by a computer terminal, fig. 1 is a block diagram of a hardware structure of the computer terminal of the log transmission method according to the embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and in an exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of an application software and a module, such as a computer program corresponding to the log transmission method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a log transmission method is provided, which is applied to the computer terminal, and fig. 2 is a flowchart of the log transmission method according to the embodiment of the present invention, where the flowchart includes the following steps:
step S202, receiving operation of a first target object through a page end to obtain a webpage log corresponding to the operation;
and step S204, under the condition that the error log exists in the webpage log is detected through a probe, the error log is transmitted to a log database according to a specified storage mode, wherein the probe is arranged in the middleware.
Through the steps, receiving the operation of the first target object through the page end to obtain a webpage log corresponding to the operation; and under the condition that the error log exists in the webpage log is detected by the probe, transmitting the error log to a log database according to a designated storage mode, wherein the probe is arranged in the middleware, namely, the log is detected by the probe, and after the error log is detected, the error log is transmitted to the log database. By adopting the technical scheme, the problems that in the related art, when a page has a problem, active feedback needs to be carried out depending on a user, the feedback timeliness of the problem is poor, the problem recovery time is long and the like are solved, the log is monitored in real time, the error log is transmitted to the log database, the error log is directly checked, and the error reason is analyzed to solve the problem of the user in time.
In an embodiment of the present invention, before the error log is transmitted to the log database according to the designated storage manner, it is required to determine whether the following error logs exist in the weblog: the back end interface error log, the grammar spelling error log and the Native end error log; and transmitting the error log to a log database according to a specified storage mode under the condition that the error log exists in the webpage log.
That is, determining that the webpage log is stored in one or more of a backend interface error log, a grammar spelling error log and a Native end error log, and at the moment, transmitting the error log to a log database according to a specified storage mode. It should be noted that the back-end interface error log is a log generated by an error caused by unavailable service and an error caused by an abnormal condition not considered in the business data processing; the grammar spelling error log is a JavaScript error log, for example: the Uncaught TypeError is Cannot read property, TypeError is undefined is not an object, TypeError is null is not an object; the Native end error log is a log generated by the local operating system of the smart phone, such as iOS and Android errors.
In order to analyze the log more accurately, the operation data is required to be transmitted to the log database in a designated storage mode. The operation data includes: h5 Page operation: clicking an event and sliding a page; skipping a page; the Ajax network requests the data generated by the operation, etc. The embodiment of the present invention does not limit this, and any operation data generated by the operation of the first target object may be used.
In the embodiment of the present invention, a first identifier of a first target object corresponding to the error log is obtained, where the first identifier is used to uniquely identify the first target object; associating the error log with the first identifier; and transmitting the associated error log and the first identifier to the log database.
In other words, in order to transmit the error log to the log database, the first identifier of the first target object corresponding to the error log needs to be associated with the error log, and when the error log is checked through association, it can be accurately known that an error occurs when the first object operates the page side. It should be noted that the first identifier of the first target object is unique, and uniquely indicates the first target object.
Associating a first identifier of a first target object corresponding to an error log with the error log, and acquiring a second identifier of the error log, wherein the second identifier is used for uniquely identifying the error log; associating the second identifier, and the error log with the first identifier; and transmitting the associated second identifier, the error log and the first identifier to the log database.
In short, the specified storage manner of the error log is to associate the first identifier of the first target object, the second identifier of the error log, and the error log corresponding to the error log.
In order to remind a second target object of processing problems corresponding to an error log, after the error log is transmitted to a log database according to a specified storage mode, notification information is sent to the second target object to indicate the second target object to analyze the error log, wherein the notification information is used for notifying the second target object that the error log is stored in the target database.
When the error log is transmitted to a log database according to a specified storage mode, a server interface needs to be called through the middleware; and transmitting the error log to a log database through the server interface according to a specified storage mode.
In order to better understand the process of the log transmission method, the following describes the flow of the log transmission method with reference to an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present invention.
The first embodiment is as follows:
fig. 3 is a basic structure diagram of a log transmission method according to an embodiment of the present invention, and as shown in fig. 3, the basic structure of the log transmission method is mainly divided into five parts: h5 side (corresponding to the mobile side in the above-described embodiment), middleware, Native, Server (corresponding to the Server in the above-described embodiment), and DataBase (corresponding to the log DataBase in the above-described embodiment). The method comprises the following specific steps:
step 1: the H5 end sends call initialization and query interface data to the middleware;
step 2: the middleware sends basic information data of the query equipment to Native;
and step 3: native sends request to Server;
and 4, step 4: the Server sends a DataBase query request to the DataBase;
and 5: the DataBase returns the inquired data to the Server;
step 6: the Server sorts the data and returns to Native;
and 7: native returns query data to the middleware;
and 8: the middleware packages the data and returns it to H5;
and step 9: h5 processes the service by itself;
step 10: JavaScript is wrong, and the triggering log is reported to the middleware;
step 11: the middleware sorts the error log and sends the error log to Native;
step 12: native sends request to Server, calls Server interface;
step 13: the Server sends a request for writing the error log into the DataBase to the DataBase;
step 14: writing the error log into a DataBase by the DataBase;
step 15: when the network request has errors, triggering the log to be reported to the middleware;
step 16: the above-mentioned steps 11-14 are performed.
In the embodiment of the invention, the middleware is a bridge for receiving H5 and Native. The middleware is embedded with a probe for capturing an error log, so that the H5 can realize a non-inductive access monitoring system as long as the middleware is integrated.
The second embodiment is as follows:
fig. 4 is a basic flow of error log transmission according to an embodiment of the present invention, as shown in fig. 4, the specific steps are as follows:
s401: the user uses the Internet of things APP to operate the Internet of things equipment;
s402: checking whether an error occurs when a user operates the Internet of things equipment by using the Internet of things APP;
s403: if the user does not have an error when operating the Internet of things equipment by using the Internet of things APP, the Internet of things equipment can successfully respond and execute an operation instruction of the user;
s404: if an error occurs when the user operates the internet of things device by using the internet of things APP, for example, an API (application programming interface) request error or a JavaScript error; calling a middleware, wherein the middleware actively captures an error log and sorts the error log;
s405: calling a Server interface, and transmitting the error log to a log database;
s406: the database stores the error log according to the mode of < id.Data >;
s407: and informing relevant developers and technical support personnel to process the problems in time.
It should be noted that the problem processing method is to perform troubleshooting, positioning, and solving.
When the error log is transmitted to a log database, a data structure reported by the log needs to be defined firstly, when the data structure is defined, the corresponding relation between the log and a user needs to be considered, when a log table structure is designed, the userId of the user is used as a foreign key for association, and the main key _ id uses uuid to ensure uniqueness. The specific data structure is as follows:
log data structure:
{
uuid/Primary Key, unique identification of Log
Xxxxxxxx// foreign key, unique identification of user
Xxxxxxx/ip address
client id xxxxxxxx/client unique mark
resource name of resource name xxxxxxxx/H5 resource package
tag: xxxxxx// H5 resource Package tag number
type xxxxxxx// type causing error (e.g. API interface error, JavaScript error)
content xxxxxxxxx// specific error content
}。
According to the specific embodiment of the invention, through the mode of collecting H5 error logs and storing and analyzing error log data, the user use problems occurring in the use of the Internet of things APP are monitored in real time, the logs at the H5 end are monitored in real time, developers and technical support personnel are provided, the market application problems after the Internet of things APP is positioned on line are quickly tracked and timely solved, the defects of the traditional mode that the users find the problems, feed back the problems and the developers duplicate the positioning problems are avoided, and the optimization and improvement of the Internet of things APP after the Internet of things APP is on line are realized efficiently and comprehensively; meanwhile, a developer can draw experience from the network, and the user experience of the Internet of things APP can be improved.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a log transmission device is further provided, and the log transmission device is used to implement the foregoing embodiments and preferred embodiments, and the description of the log transmission device is omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a structure of a log transmission apparatus according to an embodiment of the present invention; as shown in fig. 5, includes:
the acquisition module 52: the method comprises the steps that operation of a first target object is received through a page end, and a page log corresponding to the operation is obtained;
the transmission module 54: and the system is used for transmitting the error log to a log database in a specified storage mode under the condition that the probe detects that the error log exists in the webpage log, wherein the probe is arranged in the middleware.
Receiving the operation of a first target object through a page end by the module to obtain a webpage log corresponding to the operation; and under the condition that the error log exists in the webpage log is detected by the probe, transmitting the error log to a log database according to a designated storage mode, wherein the probe is arranged in the middleware, namely, the log is detected by the probe, and after the error log is detected, the error log is transmitted to the log database. The problem of among the correlation technique, when there is the problem in the page, need rely on user's initiative feedback, and then lead to the feedback timeliness of problem relatively poor, problem recovery time is longer etc is solved.
Before transmitting the error log to a log database according to a specified storage mode, the acquisition module needs to determine whether the following error logs exist in the web page log: the back end interface error log, the grammar spelling error log and the Native end error log; and transmitting the error log to a log database according to a specified storage mode under the condition that the error log exists in the webpage log.
That is, determining that the webpage log is stored in one or more of a backend interface error log, a grammar spelling error log and a Native end error log, and at the moment, transmitting the error log to a log database according to a specified storage mode. It should be noted that the back-end interface error log is a log generated by an error caused by unavailable service and an error caused by an abnormal condition not considered in the business data processing; the grammar spelling error log is a JavaScript error log, for example: the Uncaught TypeError is Cannot read property, TypeError is undefined is not an object, TypeError is null is not an object; the Native end error log is a log generated by the local operating system of the smart phone, such as iOS and Android errors.
In order to analyze the log more accurately, the acquisition module acquires operation data of the first target object, and the transmission module transmits the operation data to the log database according to a specified storage mode. The operation data includes: h5 Page operation: clicking an event and sliding a page; skipping a page; the Ajax network requests the data generated by the operation, etc. The embodiment of the present invention does not limit this, and any operation data generated by the operation of the first target object may be used.
The transmission module is further configured to obtain a first identifier of a first target object corresponding to the error log, where the first identifier is used to uniquely identify the first target object; associating the error log with the first identifier; and transmitting the associated error log and the first identifier to the log database.
In order to transmit the error log to the log database, the acquisition module needs to associate the first identifier of the first target object corresponding to the error log with the error log, and through association, when the error log is checked, it can be accurately known that an error occurs when the first object operates the page side. It should be noted that the first identifier of the first target object is unique, and uniquely indicates the first target object.
The acquisition module is further configured to associate a first identifier of a first target object corresponding to an error log with the error log, and acquire a second identifier of the error log, where the second identifier is used to uniquely identify the error log; associating the second identifier, and the error log with the first identifier; and transmitting the associated second identifier, the error log and the first identifier to the log database.
In short, the specified storage manner of the error log is to associate the first identifier of the first target object, the second identifier of the error log, and the error log corresponding to the error log.
The log transmission device in the embodiment of the present invention further includes a notification module, configured to send notification information to a second target object after transmitting the error log to a log database according to a specified storage manner, so as to instruct the second target object to analyze the error log, where the notification information is used to notify the second target object that the error log is already stored in the target database.
In order to indicate the second target object to analyze the error log in time, after the error log is transmitted to the log database, the notification module sends notification information to the second target object, the second target object processes the problem in time, and the problem processing method includes troubleshooting, positioning and solving the problem.
The transmission module is also used for calling a server interface through the middleware when the error log is transmitted to a log database according to a specified storage mode; and transmitting the error log to a log database through the server interface according to a specified storage mode.
In short, the error log cannot be directly transmitted to the log database, and a server interface needs to be called through the middleware, so that the error log is transmitted to the log database through the server interface in a specified storage mode.
An embodiment of the present invention further provides a storage medium including a stored program, wherein the program executes any one of the methods described above.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, receiving the operation of the first target object through the page end to obtain a web log corresponding to the operation;
and S2, transmitting the error log to a log database according to a designated storage mode under the condition that the error log is detected to exist in the webpage log through a probe, wherein the probe is arranged in the middleware.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving the operation of the first target object through the page end to obtain a web log corresponding to the operation;
and S2, transmitting the error log to a log database according to a designated storage mode under the condition that the error log is detected to exist in the webpage log through a probe, wherein the probe is arranged in the middleware.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A log transmission method, comprising:
receiving the operation of a first target object through a page end to obtain a web log corresponding to the operation;
and under the condition that a probe detects that an error log exists in the webpage log, transmitting the error log to a log database according to a specified storage mode, wherein the probe is arranged in the middleware.
2. The method of claim 1, wherein transmitting the error log to a log database in a specified storage manner comprises:
acquiring a first identifier of a first target object corresponding to the error log, wherein the first identifier is used for uniquely identifying the first target object;
associating the error log with the first identifier;
and transmitting the associated error log and the first identifier to the log database.
3. The method of claim 2, wherein transmitting the associated error log and the first identifier to the log database comprises:
acquiring a second identifier of the error log, wherein the second identifier is used for uniquely identifying the error log;
associating the second identifier, and the error log with the first identifier;
and transmitting the associated second identifier, the error log and the first identifier to the log database.
4. The method of claim 1, wherein after transmitting the error log to a log database in a specified storage manner, the method further comprises:
sending notification information to a second target object to instruct the second target object to analyze the error log, wherein the notification information is used for notifying the second target object that the error log is saved in the target database.
5. The method of claim 1, wherein transmitting the error log to a log database in a specified storage manner comprises:
determining whether the following error logs exist in the web log: the back end interface error log, the grammar spelling error log and the Native end error log;
and transmitting the error log to a log database according to a specified storage mode under the condition that the error log exists in the webpage log.
6. The method of claim 1, wherein transmitting the error log to a log database in a specified storage manner comprises:
calling a server interface through the middleware;
and transmitting the error log to a log database through the server interface according to a specified storage mode.
7. A log transmission apparatus, comprising:
the acquisition module is used for receiving the operation of the first target object through a page end to obtain a webpage log corresponding to the operation;
and the transmission module is used for transmitting the error log to a log database according to a specified storage mode under the condition that the error log is detected to exist in the webpage log through a probe, wherein the probe is arranged in the middleware.
8. The apparatus of claim 7, wherein the transmission module is further configured to obtain a first identifier of a first target object corresponding to the error log, wherein the first identifier is used to uniquely identify the first target object; associating the error log with the first identifier; and transmitting the associated error log and the first identifier to the log database.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 6.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN202011296470.9A 2020-11-18 2020-11-18 Log transmission method and device, storage medium and electronic device Pending CN112422345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011296470.9A CN112422345A (en) 2020-11-18 2020-11-18 Log transmission method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011296470.9A CN112422345A (en) 2020-11-18 2020-11-18 Log transmission method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN112422345A true CN112422345A (en) 2021-02-26

Family

ID=74773037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011296470.9A Pending CN112422345A (en) 2020-11-18 2020-11-18 Log transmission method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112422345A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681929A (en) * 2011-03-15 2012-09-19 腾讯科技(深圳)有限公司 Webpage script error monitoring method and system
CN102981943A (en) * 2012-10-29 2013-03-20 新浪技术(中国)有限公司 Method and system for monitoring application logs
CN107133240A (en) * 2016-02-29 2017-09-05 阿里巴巴集团控股有限公司 Page monitoring method, apparatus and system
CN107861852A (en) * 2017-06-26 2018-03-30 平安普惠企业管理有限公司 Webpage error handling method, system and readable storage medium storing program for executing
CN109213655A (en) * 2018-07-19 2019-01-15 东软集团股份有限公司 Method, apparatus, storage medium and equipment are determined for the solution of alarm
CN109240844A (en) * 2018-08-20 2019-01-18 成都国科微电子有限公司 A kind of journal obtaining method and system
CN109359026A (en) * 2018-08-15 2019-02-19 中国平安人寿保险股份有限公司 Log reporting method, device, electronic equipment and computer readable storage medium
CN109617726A (en) * 2018-12-14 2019-04-12 深圳壹账通智能科技有限公司 Error log acquisition method and server
CN109639559A (en) * 2017-10-09 2019-04-16 北京国双科技有限公司 A kind of wechat H5 propagates method for monitoring and analyzing and relevant device
CN111241048A (en) * 2020-01-03 2020-06-05 广东金赋科技股份有限公司 Web terminal log management method, device, medium and electronic equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681929A (en) * 2011-03-15 2012-09-19 腾讯科技(深圳)有限公司 Webpage script error monitoring method and system
CN102981943A (en) * 2012-10-29 2013-03-20 新浪技术(中国)有限公司 Method and system for monitoring application logs
CN107133240A (en) * 2016-02-29 2017-09-05 阿里巴巴集团控股有限公司 Page monitoring method, apparatus and system
CN107861852A (en) * 2017-06-26 2018-03-30 平安普惠企业管理有限公司 Webpage error handling method, system and readable storage medium storing program for executing
CN109639559A (en) * 2017-10-09 2019-04-16 北京国双科技有限公司 A kind of wechat H5 propagates method for monitoring and analyzing and relevant device
CN109213655A (en) * 2018-07-19 2019-01-15 东软集团股份有限公司 Method, apparatus, storage medium and equipment are determined for the solution of alarm
CN109359026A (en) * 2018-08-15 2019-02-19 中国平安人寿保险股份有限公司 Log reporting method, device, electronic equipment and computer readable storage medium
CN109240844A (en) * 2018-08-20 2019-01-18 成都国科微电子有限公司 A kind of journal obtaining method and system
CN109617726A (en) * 2018-12-14 2019-04-12 深圳壹账通智能科技有限公司 Error log acquisition method and server
CN111241048A (en) * 2020-01-03 2020-06-05 广东金赋科技股份有限公司 Web terminal log management method, device, medium and electronic equipment

Similar Documents

Publication Publication Date Title
US11016878B2 (en) System and method for data collection and analysis of information relating to mobile applications
CN105323640A (en) Method, system and equipment for realizing after-sales service of smart television based on Internet
CN111367760B (en) Log collection method and device, computer equipment and storage medium
CN115705190A (en) Method and device for determining dependence degree
CN110505177B (en) Information collection system, terminal equipment and remote host
CN111385157B (en) Server abnormity detection method and device
CN112422345A (en) Log transmission method and device, storage medium and electronic device
CN110087232B (en) Call processing method and device based on intelligent equipment and server
CN111200522A (en) Port detection method, device, equipment and storage medium
CN107317723B (en) Data processing method and server
CN113672460B (en) Service monitoring method and device
CN113965447B (en) Online cloud diagnosis method, device, system, equipment and storage medium
CN113934552A (en) Method and device for determining function code, storage medium and electronic device
CN113434399B (en) Service node log processing method and device, storage medium and electronic device
CN115827678B (en) Method, device, medium and electronic equipment for acquiring service data
CN117155890B (en) Method and device for processing applet message and electronic equipment
CN113778800B (en) Error information processing method, device, system, equipment and storage medium
CN113328907B (en) Method, core network, apparatus and medium for performance and error detection in a communication network
CN113141366B (en) Message submitting method and device, storage medium and electronic equipment
CN113938926B (en) Identification method, device, equipment, system and storage medium for 5G private network complaints
US20240129713A1 (en) Apparatus and method for diagnosing condition of communication service
KR101702038B1 (en) System for managing sever irregularity conditions of server, and method for managing sever irregularity conditions of server using the same
CN115665778A (en) Wireless operation and maintenance method based on multi-dimensional association
CN112579408A (en) Classification method of embedded point information
CN116668347A (en) Detection processing method, device, system, storage medium and electronic device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210226

RJ01 Rejection of invention patent application after publication