CN105988917B - Abnormal information acquisition method and device - Google Patents

Abnormal information acquisition method and device Download PDF

Info

Publication number
CN105988917B
CN105988917B CN201510088039.8A CN201510088039A CN105988917B CN 105988917 B CN105988917 B CN 105988917B CN 201510088039 A CN201510088039 A CN 201510088039A CN 105988917 B CN105988917 B CN 105988917B
Authority
CN
China
Prior art keywords
abnormal
log
network request
offline
request
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
CN201510088039.8A
Other languages
Chinese (zh)
Other versions
CN105988917A (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.)
Xiaomi Inc
Original Assignee
Xiaomi 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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510088039.8A priority Critical patent/CN105988917B/en
Publication of CN105988917A publication Critical patent/CN105988917A/en
Application granted granted Critical
Publication of CN105988917B publication Critical patent/CN105988917B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The disclosure discloses an abnormal information acquisition method and device, and belongs to the technical field of computers. The method comprises the following steps: acquiring a service log of an online service system; analyzing an abnormal network request from the service log, wherein the abnormal network request is a user request executed when the online service system is abnormal; sending the abnormal network request to an offline playback system; the offline playback system includes execution code, consistent with the online service system, for executing a user request; and acquiring abnormal information when the offline playback system executes the abnormal network request. According to the method and the device, the network request with the error execution of the online service system is put into the offline playback system consistent with the online service system for re-execution and the abnormal information is obtained, so that the influence on the online service environment is reduced, and the service quality of the online service system is improved.

Description

Abnormal information acquisition method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an abnormal information obtaining method and apparatus.
Background
No matter how perfect the network service system is, a vulnerability exists inevitably, and program codes which normally run during testing are also likely to be abnormal during actual use, so that abnormal information of the network service system in the actual running process needs to be acquired, so that developers can perfect and upgrade the network service system.
In the related art, the Sentry platform is mainly used for acquiring abnormal information when an operating network service system is abnormal. The Sentry platform comprises a Sentry client and a Sentry server, a developer can insert codes of the Sentry client into the codes which are easy to be abnormal in the network service system, when the codes in the network service system are abnormal, the Sentry client can collect abnormal information and send the information to the Sentry server, and the developer can check the collected abnormal information in the Sentry server.
Disclosure of Invention
The disclosure provides an abnormal information acquisition method and device. The technical scheme is as follows:
in a first aspect, a method for obtaining exception information is provided, where the method includes:
acquiring a service log of an online service system;
analyzing an abnormal network request from the service log, wherein the abnormal network request is a user request executed when the online service system is abnormal;
sending the abnormal network request to an offline playback system; the offline playback system includes execution code, consistent with the online service system, for executing a user request;
and acquiring abnormal information when the offline playback system executes the abnormal network request.
Optionally, the exception information includes at least one of an error code in the execution code and an error result returned by the execution code.
Optionally, the obtaining a service log of the online service system includes:
and acquiring the service log which is divided according to a preset time period.
Optionally, the service log includes each user request received by the online service system and a return result corresponding to each user request, and the analyzing an abnormal network request from the service log includes:
analyzing the type of the return result corresponding to each user request;
and acquiring the user request corresponding to the return result with the type of error as the abnormal network request.
In a second aspect, an anomaly information obtaining method is provided, and the method includes:
recording a service log of the online service system;
providing the recorded service log to an offline server, wherein the service log is used for enabling the offline server to analyze an abnormal network request from the service log, sending the abnormal network request to an offline playback system, and acquiring abnormal information when the offline playback system executes the abnormal network request;
wherein the offline playback system includes execution code, consistent with the online service system, for executing a user request.
Optionally, the service log includes each user request received by the online service system and a return result corresponding to each user request, where the return result includes a type of the return result.
Optionally, the method further includes:
and segmenting the service log according to a preset time period.
In a third aspect, an abnormality information acquisition apparatus is provided, the apparatus including:
the log acquisition module is used for acquiring a service log of the online service system;
the request analysis module is used for analyzing an abnormal network request from the service log, wherein the abnormal network request is a user request executed when the online service system is abnormal;
the request sending module is used for sending the abnormal network request to an offline playback system; the offline playback system includes execution code, consistent with the online service system, for executing a user request;
and the abnormal information acquisition module is used for acquiring the abnormal information when the offline playback system executes the abnormal network request.
Optionally, the exception information includes at least one of an error code in the execution code and an error result returned by the execution code.
Optionally, the log obtaining module is configured to obtain the service log partitioned according to a predetermined time period.
Optionally, the request parsing module includes:
the analysis submodule is used for analyzing the types of the return results corresponding to the user requests;
the obtaining submodule is used for obtaining the user request corresponding to the return result with the type of error as the abnormal network request;
wherein, the service log includes the user requests received by the online service system and the respective corresponding return results of the user requests.
In a fourth aspect, an abnormality information acquisition apparatus is provided, the apparatus including:
the log recording module is used for recording a service log of the online service system;
the log providing module is used for providing the recorded service log to an offline server, wherein the service log is used for enabling the offline server to analyze an abnormal network request from the service log, sending the abnormal network request to an offline playback system and acquiring abnormal information when the offline playback system executes the abnormal network request;
wherein the offline playback system includes execution code, consistent with the online service system, for executing a user request.
Optionally, the service log includes each user request received by the online service system and a return result corresponding to each user request, where the return result includes a type of the return result.
Optionally, the apparatus further comprises:
and the log segmentation module is used for segmenting the service log according to a preset time period.
In a fifth aspect, an abnormality information acquisition apparatus is provided, the apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring a service log of an online service system;
analyzing an abnormal network request from the service log, wherein the abnormal network request is a user request executed when the online service system is abnormal;
sending the abnormal network request to an offline playback system; the offline playback system includes execution code, consistent with the online service system, for executing a user request;
and acquiring abnormal information when the offline playback system executes the abnormal network request.
In a sixth aspect, there is provided an abnormality information acquisition apparatus, the apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
recording a service log of the online service system;
providing the recorded service log to an offline server, wherein the service log is used for enabling the offline server to analyze an abnormal network request from the service log, sending the abnormal network request to an offline playback system, and acquiring abnormal information when the offline playback system executes the abnormal network request;
wherein the offline playback system includes execution code, consistent with the online service system, for executing a user request.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the method comprises the steps of acquiring a service log of an online service system, analyzing an abnormal network request from the service log, sending the abnormal network request to an offline playback system which is consistent with the online service system and is used for executing an execution code of a user request, acquiring abnormal information when the offline playback system executes the abnormal network request, putting the network request with an error in execution of the online service system into the offline playback system which is consistent with the online service system to execute again and acquire the abnormal information, and inserting a code of a Sentry client into a code which is easy to generate an abnormality in the online service system is not needed, so that the influence on an online service environment is reduced, and the service quality of the online service system is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a schematic diagram of an implementation environment in which an anomaly information acquisition method according to some exemplary embodiments is described;
FIG. 2 is a flow diagram illustrating a method of exception information acquisition in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating a method of exception information acquisition in accordance with an exemplary embodiment;
FIG. 4 is a flow diagram illustrating a method of exception information acquisition in accordance with an exemplary embodiment;
FIG. 5 is a data flow diagram illustrating the retrieval of exception information in accordance with an exemplary embodiment;
fig. 6 is a block diagram illustrating an abnormality information acquisition apparatus according to an exemplary embodiment;
fig. 7 is a block diagram illustrating an abnormality information acquisition apparatus according to another exemplary embodiment;
fig. 8 is a block diagram illustrating an abnormality information acquisition apparatus according to an exemplary embodiment;
fig. 9 is a block diagram illustrating an abnormality information acquisition apparatus according to another exemplary embodiment;
fig. 10 is a block diagram illustrating an abnormality information acquisition apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1 is a schematic diagram of an implementation environment related to an anomaly information acquisition method according to an exemplary embodiment of the present disclosure. The implementation environment includes: an offline server 120, an online server 140, and at least one user terminal 160.
The offline server 120 and the online server 140 may be a server, a server cluster composed of several servers, or a cloud computing service center.
The online server 140 mounts an online service system for providing services to the user, and the online service system can receive and execute the user request sent by the user terminal 160 and return the execution result to the user terminal 160.
The offline server 120 is equipped with an offline playback system that includes execution code for executing a user request in accordance with the online service system.
The user terminal 160 may be a terminal with network access capability, such as a smart phone, a tablet computer, an e-book reader, or a personal computer.
The online server 140 is connected to the offline server 120 and the at least one terminal 160 through a priority or wireless network, respectively.
Alternatively, in another possible system environment, the offline server 120 and the online server 140 may be merged into the same server entity (not shown in fig. 1), and the deployment relationship between the offline server 120 and the online server 140 is not limited in the embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating an exception information acquisition method according to an example embodiment. The anomaly information acquisition method is used in the offline server 120 of the implementation environment shown in fig. 1. As shown in fig. 2, the abnormality information acquisition method may include the following steps.
In step 202, a service log of the online service system is obtained.
In step 204, an abnormal network request is parsed from the service log, where the abnormal network request is a user request executed when the online service system is abnormal.
In step 206, the abnormal network request is sent to the offline playback system; the offline playback system includes execution code, consistent with the online service system, for executing the user request.
In step 208, exception information is obtained when the offline playback system executes the network request for the exception.
Optionally, the exception information includes at least one of an error code in the execution code and an error result returned by the execution code.
Optionally, the obtaining the service log of the online service system includes:
the service log divided by a predetermined time period is acquired.
Optionally, the service log includes each user request received by the online service system and a return result corresponding to each user request, and the analyzing of the abnormal network request from the service log includes:
analyzing the type of the return result corresponding to each user request;
and acquiring the user request corresponding to the return result with the type of error as the abnormal network request.
In summary, the abnormal information obtaining method provided in the embodiment of the present disclosure obtains the service log of the online service system, analyzes the abnormal network request from the service log, sends the abnormal network request to the offline playback system that includes the execution code consistent with the online service system and used for executing the user request, obtains the abnormal information when the offline playback system executes the abnormal network request, puts the network request that the online service system executes the error into the offline playback system consistent with the online service system to execute again and obtain the abnormal information, does not require inserting the code of the Sentry client into the code that is easy to generate the abnormality in the online service system, reduces the influence on the online service environment, and improves the service quality of the online service system.
Fig. 3 is a flowchart illustrating an exception information acquisition method according to an example embodiment. The anomaly information acquisition method is used in an online server 140 implementing the environment shown in fig. 1. As shown in fig. 3, the abnormality information acquisition method may include the following steps.
In step 302, a service log of the online service system is recorded.
In step 304, the recorded service log is provided to the offline server, where the service log is used to enable the offline server to parse the abnormal network request from the service log, send the abnormal network request to the offline playback system, and obtain the abnormal information when the offline playback system executes the abnormal network request, where the offline playback system includes an execution code that is consistent with the online service system and is used to execute the user request.
Optionally, the service log includes each user request received by the online service system and a return result corresponding to each user request, where the return result includes a type of the return result.
Optionally, the method further includes:
the service log is partitioned according to a predetermined time period.
In summary, the abnormal information obtaining method provided in the embodiments of the present disclosure records the service log of the online service system, and providing the service log to an offline server, parsing the abnormal network request from the service log by the offline server, sending the abnormal network request to a server containing the network request consistent with the online service system, the offline playback system is used for executing an execution code requested by a user, acquiring abnormal information when the offline playback system executes the abnormal network request, putting the network request which is executed by the online service system in error into the offline playback system consistent with the online service system for re-execution and acquiring the abnormal information, and inserting a code of a Sentry client into a code which is easy to be abnormal in the online service system is not needed, so that the influence on the online service environment is reduced, and the service quality of the online service system is improved.
Fig. 4 is a flowchart illustrating an exception information acquisition method according to an example embodiment. The anomaly information acquisition method is used in an implementation environment as shown in fig. 1. As shown in fig. 4, the abnormality information acquisition method may include the following steps.
In step 402, the online server logs the service log of the online service system.
An online service system is deployed in the online server, a code for acquiring abnormal information does not need to be inserted into a code of the online service system, and the online server only needs to count service logs of the online service system.
The service log recorded by the online server comprises each user request received by the online service system and a return result corresponding to each user request, and the online server also distinguishes the type of the return result and adds the type of the return result in the return result. For example, when the online service system executes the user request normally, the type of the returned result may be set to info, and when the online service system executes the user request abnormally, the type of the returned result may be set to error.
In step 404, the online server splits the service log according to a predetermined time period.
In order to discover the abnormality in the online service system as soon as possible without affecting the recording of the service log of the online service system, the online server may record the service log in different files according to a certain time period (e.g., 1 hour) when recording the service log, and the file name of the service log may be named according to the time when the recording is started.
In step 406, the online server provides the split service log to the offline server.
The online server may actively send the recorded service log to the offline server, or the offline server may read the recorded service log from the online server.
In step 408, the offline server parses the type of the return result corresponding to each user request in the service log, and obtains the user request corresponding to the return result with the type of error as an abnormal network request.
And after the offline server acquires the service logs, analyzing the result types of all returned results in the service logs, and if one result type is error, acquiring the user request corresponding to the result type as an abnormal network request.
In step 410, the offline server sends the abnormal network request to the offline playback system, and obtains the abnormal information when the offline playback system executes the abnormal network request.
Wherein the exception information includes at least one of an error code in the execution code and an error result returned by the execution code.
The offline playback system includes execution code, consistent with the online service system, for executing the user request. Different from the online service system, the code for acquiring the exception information is also inserted in advance in the execution code of the offline playback system where the error or the exception is easy to occur, so as to acquire the exception information required by the network request for the offline playback system to execute the exception.
Referring to the data flow chart shown in fig. 5 when obtaining abnormal information, taking the example of inserting a code of a Sentry client into an execution code of an online-down playback system, an online server is provided with N groups of online service systems each providing a request service to a user, the online server records service logs of each online service system in segments according to a certain time interval, the offline server extracts the service logs of each online service system in the previous time interval, and analyzes the abnormal user request from the extracted service log and sends the abnormal user request to the offline playback system, a Sentry client in the offline playback system captures abnormal information when the offline playback system executes the abnormal user request, and the captured abnormal information is sent to a Sentry server, and developers of the online service system can log in the Sentry server and check the abnormal information in a Sentry interface.
In the embodiment of the present disclosure, only the online server and the offline server are taken as independent servers respectively for illustration, and in practical applications, the online server and the offline server may also be the same server entity, which is not limited in the embodiment of the present disclosure.
In summary, the abnormal information obtaining method provided in the embodiment of the present disclosure obtains the service log of the online service system, analyzes the abnormal network request from the service log, sends the abnormal network request to the offline playback system that includes the execution code consistent with the online service system and used for executing the user request, obtains the abnormal information when the offline playback system executes the abnormal network request, puts the network request that the online service system executes the error into the offline playback system consistent with the online service system to execute again and obtain the abnormal information, does not require inserting the code of the Sentry client into the code that is easy to generate the abnormality in the online service system, reduces the influence on the online service environment, and improves the service quality of the online service system.
Meanwhile, the abnormal information acquisition method provided in the embodiment of the present disclosure acquires the abnormal information by re-executing the abnormal user request by the offline playback system, and decouples the step of acquiring the abnormal information from the online service system, so that even if an error or a fault occurs during acquiring the abnormal information, the online service system is not affected, and the reliability of the online service is ensured.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 6 is a block diagram illustrating an anomaly information obtaining apparatus according to an exemplary embodiment, which may be used in the offline server 120 of the implementation environment shown in fig. 1, and performs the method shown in fig. 2 or the corresponding steps of the offline server in the method shown in fig. 4. As shown in fig. 6, the abnormality information acquiring device includes but is not limited to: a log obtaining module 601, a request analyzing module 602, a request sending module 603 and an abnormal information obtaining module 604;
the log obtaining module 601 is configured to obtain a service log of an online service system;
the request parsing module 602 is configured to parse an abnormal network request from the service log, where the abnormal network request is a user request executed when the online service system is abnormal;
the request sending module 603 is configured to send the abnormal network request to an offline playback system; the offline playback system includes execution code, consistent with the online service system, for executing a user request;
the abnormal information obtaining module 604 is configured to obtain abnormal information when the offline playback system executes the abnormal network request.
In summary, the abnormal information obtaining apparatus provided in the embodiment of the present disclosure obtains the service log of the online service system, analyzes the abnormal network request from the service log, sends the abnormal network request to the offline playback system that includes the execution code that is consistent with the online service system and used for executing the user request, obtains the abnormal information when the offline playback system executes the abnormal network request, puts the network request that the online service system executes the error into the offline playback system that is consistent with the online service system, and re-executes the network request and obtains the abnormal information.
Fig. 7 is a block diagram illustrating an anomaly information obtaining apparatus according to another exemplary embodiment, which may be used in the offline server 120 of the implementation environment shown in fig. 1, and performs the method shown in fig. 2 or the corresponding steps of the offline server in the method shown in fig. 4. As shown in fig. 7, the abnormality information acquiring device includes but is not limited to: a log obtaining module 601, a request analyzing module 602, a request sending module 603 and an abnormal information obtaining module 604;
the log obtaining module 601 is configured to obtain a service log of an online service system;
the request parsing module 602 is configured to parse an abnormal network request from the service log, where the abnormal network request is a user request executed when the online service system is abnormal;
the request sending module 603 is configured to send the abnormal network request to an offline playback system; the offline playback system includes execution code, consistent with the online service system, for executing a user request;
the exception information obtaining module 604 is configured to obtain exception information when the offline playback system executes the network request for the exception.
Optionally, the exception information includes at least one of an error code in the execution code and an error result returned by the execution code.
Optionally, the log obtaining module 601 is configured to obtain the service log partitioned according to a predetermined time period.
Optionally, the request parsing module 602 includes: an analysis submodule 602a and an acquisition submodule 602 b;
the analysis submodule is set for analyzing the type of the return result corresponding to each user request;
the obtaining submodule is set to be used for obtaining a user request corresponding to a return result with the type of error as the abnormal network request;
wherein, the service log includes the user requests received by the online service system and the respective corresponding return results of the user requests.
In summary, the abnormal information obtaining apparatus provided in the embodiment of the present disclosure obtains the service log of the online service system, analyzes the abnormal network request from the service log, sends the abnormal network request to the offline playback system that includes the execution code that is consistent with the online service system and used for executing the user request, obtains the abnormal information when the offline playback system executes the abnormal network request, puts the network request that the online service system executes the error into the offline playback system that is consistent with the online service system, and re-executes the network request and obtains the abnormal information.
Meanwhile, the abnormal information acquisition device provided in the embodiment of the present disclosure acquires the abnormal information by re-executing the abnormal user request by the offline playback system, and decouples the step of acquiring the abnormal information from the online service system, so that even if an error or a fault occurs during acquiring the abnormal information, the online service system is not affected, and the reliability of the online service is ensured.
Fig. 8 is a block diagram illustrating an anomaly information obtaining apparatus according to an exemplary embodiment, which may be used in an online server 140 of the implementation environment shown in fig. 1, and performs the steps corresponding to the method shown in fig. 3 or the online server in the method shown in fig. 4. As shown in fig. 8, the abnormality information acquiring device includes but is not limited to: a logging module 801 and a log providing module 802;
the logging module 801 is configured to log a service log of an online service system;
the log providing module 802 is configured to provide the recorded service log to an offline server, where the service log is used to enable the offline server to parse an abnormal network request from the service log, send the abnormal network request to an offline playback system, and obtain abnormal information when the offline playback system executes the abnormal network request;
wherein the offline playback system includes execution code, consistent with the online service system, for executing a user request.
In summary, the abnormal information acquiring apparatus provided in the embodiments of the present disclosure records the service log of the online service system, and providing the service log to an offline server, parsing the abnormal network request from the service log by the offline server, sending the abnormal network request to a server containing the network request consistent with the online service system, the offline playback system is used for executing an execution code requested by a user, acquiring abnormal information when the offline playback system executes the abnormal network request, putting the network request which is executed by the online service system in error into the offline playback system consistent with the online service system for re-execution and acquiring the abnormal information, and inserting a code of a Sentry client into a code which is easy to be abnormal in the online service system is not needed, so that the influence on the online service environment is reduced, and the service quality of the online service system is improved.
Fig. 9 is a block diagram illustrating an anomaly information obtaining apparatus according to another exemplary embodiment, which may be used in an online server 140 of the implementation environment shown in fig. 1, and performs the steps corresponding to the method shown in fig. 3 or the online server in the method shown in fig. 4. As shown in fig. 9, the abnormality information acquiring device includes but is not limited to: a logging module 801 and a log providing module 802;
the logging module 801 is configured to log a service log of an online service system;
the log providing module 802 is configured to provide the recorded service log to an offline server, where the service log is used to enable the offline server to parse an abnormal network request from the service log, send the abnormal network request to an offline playback system, and obtain abnormal information when the offline playback system executes the abnormal network request;
wherein the offline playback system includes execution code, consistent with the online service system, for executing a user request.
Optionally, the service log includes each user request received by the online service system and a return result corresponding to each user request, where the return result includes a type of the return result.
Optionally, the apparatus further comprises: a log splitting module 803;
the log splitting module 803 is arranged to split the service log according to a predetermined time period.
In summary, the abnormal information acquiring apparatus provided in the embodiments of the present disclosure records the service log of the online service system, and providing the service log to an offline server, parsing the abnormal network request from the service log by the offline server, sending the abnormal network request to a server containing the network request consistent with the online service system, the offline playback system is used for executing an execution code requested by a user, acquiring abnormal information when the offline playback system executes the abnormal network request, putting the network request which is executed by the online service system in error into the offline playback system consistent with the online service system for re-execution and acquiring the abnormal information, and inserting a code of a Sentry client into a code which is easy to be abnormal in the online service system is not needed, so that the influence on the online service environment is reduced, and the service quality of the online service system is improved.
Meanwhile, the abnormal information acquisition device provided in the embodiment of the present disclosure acquires the abnormal information by re-executing the abnormal user request by the offline playback system, and decouples the step of acquiring the abnormal information from the online service system, so that even if an error or a fault occurs during acquiring the abnormal information, the online service system is not affected, and the reliability of the online service is ensured.
Fig. 10 is a block diagram illustrating an abnormality information acquisition apparatus 1000 according to an exemplary embodiment. The apparatus 1000 may have relatively large differences due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 1022 (e.g., one or more processors) and a memory 1032, one or more storage media 1030 (e.g., one or more mass storage devices) storing applications 1042 or data 1044. Memory 1032 and storage medium 1030 may be, among other things, transient or persistent storage. The program stored on the storage medium 1030 may include one or more modules (not shown), each of which may include a sequence of instructions for operating on the device, and the sequence of instructions may be used to implement all or part of the steps of the method shown in fig. 2 or 3, or all or part of the steps performed by an online server or an offline server in the method shown in fig. 4. Still further, the central processor 1022 may be configured to communicate with the storage medium 1030 to execute a series of instruction operations in the storage medium 1030 on the apparatus 1000.
The device 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input-output interfaces 1058, one or more keyboards 1056, and/or one or more operating systems 1041, such as Windows Server, Mac OS XTM, UnixTM, &lTtTtranslation = "L" &gTtL &lTt/T &gTtinxTM, FreeBSDTM, and so forth.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be described in detail here.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (16)

1. An abnormal information acquisition method, characterized in that the method comprises:
acquiring a service log of an online service system;
analyzing an abnormal network request from the service log, wherein the abnormal network request is a user request executed when the online service system is abnormal;
sending the abnormal network request to an offline playback system; the offline playback system includes execution code, consistent with the online service system, for executing a user request;
and acquiring abnormal information when the offline playback system executes the abnormal network request.
2. The method of claim 1, wherein the exception information comprises at least one of an error code in the execution code and an error result returned by the execution code.
3. The method of claim 1, wherein obtaining the service log of the online service system comprises:
and acquiring the service log which is divided according to a preset time period.
4. The method according to claim 1, wherein the service log includes each user request received by the online service system and a return result corresponding to each user request, and the parsing out the abnormal network request from the service log includes:
analyzing the type of the return result corresponding to each user request;
and acquiring the user request corresponding to the return result with the type of error as the abnormal network request.
5. An abnormal information acquisition method, characterized in that the method comprises:
recording a service log of the online service system;
providing the recorded service log to an offline server, wherein the service log is used for enabling the offline server to analyze an abnormal network request from the service log, sending the abnormal network request to an offline playback system, and acquiring abnormal information when the offline playback system executes the abnormal network request; the offline server is provided with the offline playback system;
wherein the offline playback system includes execution code, consistent with the online service system, for executing a user request.
6. The method according to claim 5, wherein the service log includes user requests received by the online service system and return results corresponding to the user requests, and the return results include types of the return results.
7. The method of claim 5, further comprising:
and segmenting the service log according to a preset time period.
8. An abnormality information acquisition apparatus characterized by comprising:
the log acquisition module is used for acquiring a service log of the online service system;
the request analysis module is used for analyzing an abnormal network request from the service log, wherein the abnormal network request is a user request executed when the online service system is abnormal;
the request sending module is used for sending the abnormal network request to an offline playback system; the offline playback system includes execution code, consistent with the online service system, for executing a user request;
and the abnormal information acquisition module is used for acquiring the abnormal information when the offline playback system executes the abnormal network request.
9. The apparatus of claim 8, wherein the exception information comprises at least one of an error code in the execution code and an error result returned by the execution code.
10. The apparatus of claim 8,
the log obtaining module is used for obtaining the service log which is divided according to a preset time period.
11. The apparatus of claim 8, wherein the request resolution module comprises:
the analysis submodule is used for analyzing the types of the return results corresponding to the user requests;
the obtaining submodule is used for obtaining the user request corresponding to the return result with the type of error as the abnormal network request;
wherein, the service log includes the user requests received by the online service system and the respective corresponding return results of the user requests.
12. An abnormality information acquisition apparatus characterized by comprising:
the log recording module is used for recording a service log of the online service system;
the log providing module is used for providing the recorded service log to an offline server, wherein the service log is used for enabling the offline server to analyze an abnormal network request from the service log, sending the abnormal network request to an offline playback system and acquiring abnormal information when the offline playback system executes the abnormal network request; the offline server is provided with the offline playback system;
wherein the offline playback system includes execution code, consistent with the online service system, for executing a user request.
13. The apparatus according to claim 12, wherein the service log includes user requests received by the online service system and return results corresponding to the user requests, and the return results include types of the return results.
14. The apparatus of claim 12, further comprising:
and the log segmentation module is used for segmenting the service log according to a preset time period.
15. An abnormality information acquisition apparatus characterized by comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring a service log of an online service system;
analyzing an abnormal network request from the service log, wherein the abnormal network request is a user request executed when the online service system is abnormal;
sending the abnormal network request to an offline playback system; the offline playback system includes execution code, consistent with the online service system, for executing a user request;
and acquiring abnormal information when the offline playback system executes the abnormal network request.
16. An abnormality information acquisition apparatus characterized by comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
recording a service log of the online service system;
providing the recorded service log to an offline server, wherein the service log is used for enabling the offline server to analyze an abnormal network request from the service log, sending the abnormal network request to an offline playback system, and acquiring abnormal information when the offline playback system executes the abnormal network request; the offline server is provided with the offline playback system;
wherein the offline playback system includes execution code, consistent with the online service system, for executing a user request.
CN201510088039.8A 2015-02-26 2015-02-26 Abnormal information acquisition method and device Active CN105988917B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510088039.8A CN105988917B (en) 2015-02-26 2015-02-26 Abnormal information acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510088039.8A CN105988917B (en) 2015-02-26 2015-02-26 Abnormal information acquisition method and device

Publications (2)

Publication Number Publication Date
CN105988917A CN105988917A (en) 2016-10-05
CN105988917B true CN105988917B (en) 2020-08-04

Family

ID=57038712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510088039.8A Active CN105988917B (en) 2015-02-26 2015-02-26 Abnormal information acquisition method and device

Country Status (1)

Country Link
CN (1) CN105988917B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107580050A (en) * 2017-09-05 2018-01-12 成都知道创宇信息技术有限公司 A kind of server rolls back method during generation server 500
CN107678914A (en) * 2017-09-13 2018-02-09 咪咕音乐有限公司 A kind of log processing method and device, storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101438255A (en) * 2004-12-07 2009-05-20 思科技术公司 Network and application attack protection based on application layer message inspection
CN103034578A (en) * 2011-09-29 2013-04-10 北京新媒传信科技有限公司 Application data monitoring method and device
CN103795762A (en) * 2012-11-01 2014-05-14 百度在线网络技术(北京)有限公司 Reverse agent test system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060098622A1 (en) * 2004-11-05 2006-05-11 Vicotel, Inc. Architecture for a multi-media session controlled network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101438255A (en) * 2004-12-07 2009-05-20 思科技术公司 Network and application attack protection based on application layer message inspection
CN103034578A (en) * 2011-09-29 2013-04-10 北京新媒传信科技有限公司 Application data monitoring method and device
CN103795762A (en) * 2012-11-01 2014-05-14 百度在线网络技术(北京)有限公司 Reverse agent test system and method

Also Published As

Publication number Publication date
CN105988917A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
CN111522922B (en) Log information query method and device, storage medium and computer equipment
US9876696B2 (en) Method and system for processing browser crash information
US20200201744A1 (en) Real time application error identification and mitigation
CN109039787B (en) Log processing method and device and big data cluster
CN112395157B (en) Audit log acquisition method and device, computer equipment and storage medium
CN108241580B (en) Client program testing method and terminal
CN106547658B (en) Automatic testing method and device
CN112506755B (en) Log acquisition method, device, computer equipment and storage medium
CN109408361A (en) Monkey tests restored method, device, electronic equipment and computer readable storage medium
CN112162925A (en) Test method and system based on service virtualization
CN105988917B (en) Abnormal information acquisition method and device
CN110765089A (en) Distributed equipment and log recording method, device and storage medium thereof
CN114895879B (en) Management system design scheme determining method, device, equipment and storage medium
CN113282347B (en) Plug-in operation method, device, equipment and storage medium
CN112818204B (en) Service processing method, device, equipment and storage medium
CN115061924A (en) Automatic test case generation method and generation device
CN114416420A (en) Equipment problem feedback method and system
CN114064510A (en) Function testing method and device, electronic equipment and storage medium
CN113778709A (en) Interface calling method, device, server and storage medium
CN114079647B (en) Method, device, system and computing equipment for checking IP address record
CN111241437B (en) Data processing method, device, server side and storage medium
CN114071450B (en) Recognition method and device for card changing behavior of machine changing
CN118170578A (en) Fault positioning method and electronic equipment
CN117724931A (en) Request processing method and device, storage medium and electronic equipment
CN117312087A (en) Interface call processing method, device, computing equipment and storage medium

Legal Events

Date Code Title Description
C06 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