CN108959041B - Method for transmitting information, server and computer readable storage medium - Google Patents

Method for transmitting information, server and computer readable storage medium Download PDF

Info

Publication number
CN108959041B
CN108959041B CN201710353011.1A CN201710353011A CN108959041B CN 108959041 B CN108959041 B CN 108959041B CN 201710353011 A CN201710353011 A CN 201710353011A CN 108959041 B CN108959041 B CN 108959041B
Authority
CN
China
Prior art keywords
service
analyzed
log information
information
calling relation
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
CN201710353011.1A
Other languages
Chinese (zh)
Other versions
CN108959041A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710353011.1A priority Critical patent/CN108959041B/en
Publication of CN108959041A publication Critical patent/CN108959041A/en
Application granted granted Critical
Publication of CN108959041B publication Critical patent/CN108959041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The embodiment of the invention discloses an information sending method, which comprises the following steps: acquiring log information to be analyzed; testing the log information to be analyzed by adopting a preset test case to obtain a test result; if the test result meets the preset alarm condition, generating service calling relation information according to the test result, wherein the service calling relation information is used for expressing the calling relation between service layers; and sending the service calling relation information to a client. The invention also provides a server and a computer readable storage medium. The embodiment of the invention can generate and display the service calling relation information according to the test result, and the service calling relation information can directly represent the calling relation among all the service layers, so that the calling relation among the service layers is not required to be acquired by spending more time and energy, and the efficiency of positioning abnormal problems is improved.

Description

Method for transmitting information, server and computer readable storage medium
Technical Field
The present invention relates to the field of internet communications, and in particular, to a method, a server, and a computer-readable storage medium for information transmission.
Background
With the continuous development of internet services, the architecture of a service system is more and more complex. Various problems may exist in the process of executing the business, and developers need to analyze and solve the problems by acquiring log information.
At present, a method for analyzing log information is provided, in which a log information collecting and analyzing system first obtains log information to be tested, then a test case is used to test the log information, and if an error is reported in the test process, the abnormal problem can be located according to a level calling relationship in a service system.
However, since the calling level of the service system often reaches five or six levels, or even deeper levels, if an error occurs in the testing process, it takes much time and effort to locate the abnormal problem according to the calling relationship between the levels, thereby reducing the efficiency of locating the abnormal problem.
Disclosure of Invention
Embodiments of the present invention provide an information sending method, a server, and a computer-readable storage medium, which can generate and display service invocation relationship information according to a test result, where the service invocation relationship information can directly represent invocation relationships between service layers, and it is not necessary to spend much time and effort to obtain the invocation relationships between the service layers, so as to improve efficiency of locating an abnormal problem.
In view of the above, a first aspect of the present invention provides an information sending method, including:
acquiring log information to be analyzed;
testing the log information to be analyzed by adopting a preset test case to obtain a test result;
if the test result meets the preset alarm condition, generating service calling relation information according to the test result, wherein the service calling relation information is used for expressing the calling relation between service layers;
and sending the service calling relation information to a client.
A second aspect of the present invention provides a server, comprising:
the first acquisition module is used for acquiring the log information to be analyzed;
the test module is used for testing the log information to be analyzed acquired by the first acquisition module by adopting a preset test case to obtain a test result;
the generating module is used for generating service calling relation information according to the test result if the test result obtained by the test module meets a preset alarm condition, wherein the service calling relation information is used for representing the calling relation between service layers;
and the sending module is used for sending the service calling relation information generated by the generating module to a client.
A third aspect of the present invention provides a server, comprising: a memory, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory and comprises the following steps:
acquiring log information to be analyzed;
testing the log information to be analyzed by adopting a preset test case to obtain a test result;
if the test result meets the preset alarm condition, generating service calling relation information according to the test result, wherein the service calling relation information is used for expressing the calling relation between service layers;
sending the service calling relation information to a client;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of the above-described aspects.
According to the technical scheme, the embodiment of the invention has the following advantages:
the embodiment of the invention provides an information sending method, which comprises the steps of firstly obtaining log information to be analyzed by a server, then testing the log information to be analyzed by adopting a preset test case to obtain a test result, and if the test result meets a preset alarm condition, generating service calling relation information by the server according to the test result, wherein the service calling relation information is used for representing calling relations among service layers and sending the service calling relation information to a client. By the mode, after the server detects the test result meeting the preset alarm condition, the service calling relation information can be generated and displayed according to the test result, the service calling relation information can directly represent the calling relation among all the service layers, and the calling relation among the service layers is not required to be acquired by spending much time and energy, so that the efficiency of positioning the abnormal problem is improved.
Drawings
Fig. 1 is an architecture diagram of an information delivery system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an embodiment of a method for sending information according to an embodiment of the present invention;
FIG. 3 is a diagram of an embodiment of a call relationship between service layers in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a flash of a log collection system according to an embodiment of the invention;
FIG. 5 is a schematic diagram of a distributed messaging system kafka in an embodiment of the present invention;
FIG. 6 is a block diagram of a log information analysis platform according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an interface of a log information analysis background in an application scenario of the present invention;
FIG. 8 is a diagram of one embodiment of a server in an embodiment of the invention;
FIG. 9 is a diagram of another embodiment of a server in an embodiment of the present invention;
FIG. 10 is a diagram of another embodiment of a server in an embodiment of the present invention;
FIG. 11 is a diagram of another embodiment of a server in an embodiment of the present invention;
FIG. 12 is a diagram of another embodiment of a server in an embodiment of the present invention;
FIG. 13 is a diagram of another embodiment of a server in an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a server in an embodiment of the present invention.
Detailed Description
Embodiments of the present invention provide an information sending method, a server, and a computer-readable storage medium, which can generate and display service invocation relationship information according to a test result, where the service invocation relationship information can directly represent invocation relationships between service layers, and it is not necessary to spend much time and effort to obtain the invocation relationships between the service layers, so as to improve efficiency of locating an abnormal problem.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, 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, for example, capable of operation in sequences other than those illustrated or otherwise 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.
It should be understood that the present invention is mainly applied to a scenario of analyzing log information, please refer to fig. 1, where fig. 1 is an architecture diagram of an information sending system in an embodiment of the present invention, and as shown in the figure, log information is collected by a log collection system flash in a log collection layer and is transmitted to a distributed message system kafka. The log filtering layer collects the required log information from the kafka, and the specific log information collecting process is that firstly, the required log information is requested to be filtered through a Common Gateway Interface (CGI), namely, the original log information is extracted from the kafka, then, the extraction of each part is carried out according to the log specification, namely, the log information of a CGI application program (APP) is merged, and the log information of a background service (midle) is merged.
The CGI APP log information and midle log information enter a distributed cache system (memcache) and a database of distributed file storage (mongo database, mongo db) through a data cleansing layer. The memcache is mainly used for data caching of CGI APP log information and midle log information, and is also used for caching of test resources in an Automatic Test Tool (ATT).
After the tester runs the automatic test case, the log analysis platform can analyze the log information by collecting CGI APP log information, midle log information and required test case resources in the memcache, obtain a test result, store the analysis result in the mongoDB for query and interface display, and the display mode includes but is not limited to a mail notification mode. It can be appreciated that the log analysis platform is primarily the request resources required to provide test cases to the ATT.
Referring to fig. 2, a method for sending information according to the present invention will be described below from the perspective of a server, where an embodiment of the method for sending information according to the present invention includes:
101. acquiring log information to be analyzed;
in this embodiment, first, the server obtains log information to be analyzed. Specifically, the server may access and obtain the original log information in the background, and then obtain the corresponding log information to be analyzed, where the log information to be analyzed may be CGI APP log information and midle log information, and the midle log information is log information of the background service.
102. Testing the log information to be analyzed by adopting a preset test case to obtain a test result;
in this embodiment, the server uses a preset test case to test the acquired log information to be analyzed, and obtains a test result.
A test case is a set of test inputs, execution conditions, and expected results tailored for a particular target to test a program path or verify that a particular requirement is met.
103. If the test result meets the preset alarm condition, generating service calling relation information according to the test result, wherein the service calling relation information is used for expressing the calling relation between service layers;
in this embodiment, if the obtained test result meets the preset alarm condition, corresponding service invocation relationship information needs to be generated according to the test result, where the service invocation relationship information is used to represent an invocation relationship between service layers.
Specifically, assuming that a preset test case is used for verifying whether log classification can be added, when detecting that log classification cannot be added, the preset alarm condition is considered to be met, at this time, the reason for the problem is found according to the result, and service invocation relation information is embodied in an intuitive mode such as an illustration or a list. Referring to fig. 3, fig. 3 is a schematic diagram of an embodiment of a call relationship between service layers according to an embodiment of the present invention, and as shown in the drawing, solid arrows indicate synchronous calls, for example, a service with a service name "jjjjjjjjjjjjjjjjjjjjjjjjjjjjj" may synchronously call another service with a service name "i _ iiii". The dashed arrows in the figure indicate asynchronous calls, e.g., a service named "jjjjjjjjjjjjjjjjjjjjjjjj" may asynchronously call another service named "aaa _ aaaa". The open arrows in the figure indicate the case where an alarm occurs, for example, a service named "dd _ dddd _ dddd _ dddddd" occurs, and the call relationship is that the service named "dd _ dddd _ dddd _ dddddddd _ dddd" is called for a service named "jjjjjjjjjjjjjjjjjjjjj" for a service.
In summary, the calling relationship between the business layers can be made clear for the operation and maintenance personnel through the content shown in fig. 3.
104. And sending the service calling relation information to the client.
In this embodiment, the server sends the service invocation relationship information to the client, and the client can display the service invocation relationship information on the display interface through rendering.
The embodiment of the invention provides an information sending method, which comprises the steps of firstly obtaining log information to be analyzed by a server, then testing the log information to be analyzed by adopting a preset test case to obtain a test result, and if the test result meets a preset alarm condition, generating service calling relation information by the server according to the test result, wherein the service calling relation information is used for representing calling relations among service layers and sending the service calling relation information to a client. By the mode, after the server detects the test result meeting the preset alarm condition, the service calling relation information can be generated and displayed according to the test result, the service calling relation information can directly represent the calling relation among all the service layers, and the calling relation among the service layers is not required to be acquired by spending much time and energy, so that the efficiency of positioning the abnormal problem is improved.
Optionally, on the basis of the embodiment corresponding to fig. 2, in a first optional embodiment of the information sending method provided in the embodiment of the present invention, acquiring log information to be analyzed may include:
and acquiring the log information to be analyzed through a distributed message system kafka, wherein the log information to be analyzed is acquired by a log collection system flash.
In this embodiment, the process of obtaining the log information to be analyzed by the server may be that a "water tank" (trough) of the log collection system stores a large amount of log information, and in order to relieve the pressure of the log information analysis platform, the distributed message system (kafka) provides a transit service for uploading the log information, so that the server can obtain the required log information to be analyzed from the kafka.
Specifically, the flash is a high-performance and high-availability open-source distributed log collection system provided by Cloudera, and supports various data senders customized in the log system for collecting data. Referring to fig. 4, fig. 4 is a schematic diagram of a flash of a log collection system according to an embodiment of the present invention, as shown in the figure, the core of the flash is to collect data from a data source (source), and send the collected data to a specified destination (sink). In order to ensure that the conveying process is successful, before the data is sent to a destination (sink), the data (channel) is cached, and after the data really reaches the sink, the flume deletes the cached data.
The source component is used for completing collection of log data, the channel component mainly provides a queue function and is used for simply caching data provided by the source component, and the sink component is used for taking out the data in the channel component and sending the data to a corresponding Hadoop Distributed File System (HDFS) realized by Hadoop distributed file system.
kafka is a high-throughput distributed publish-subscribe messaging system that can handle action flow data in consumer-scale web sites. Such actions (e.g., web browsing, searching, and other user actions) are a key factor in many social functions on modern networks, and such data is typically addressed by processing logs due to throughput requirements. Referring to fig. 5, fig. 5 is a schematic diagram of a distributed message system kafka according to an embodiment of the present invention, and as shown in the diagram, an object of publishing a subscription in kafka is a directory of message deposits, i.e., a topic (topic). We can create one topoc for each type of data, called the "producer" (producer) for clients publishing messages to the topoc and the "consumer" (consumer) for clients subscribing to messages from the topoc. The generators and consumers can read and write data from multiple topics simultaneously. A kafka cluster is composed of one or more servers that are responsible for persisting and backing up specific kafka messages. The Database (DB) is connected to the kafka cluster through a "connector" (connector) and provides a large amount of data. The application program is connected to the kafka cluster through a "stream processor" (stream processor) and is used for data processing.
Secondly, in the embodiment of the invention, the server acquires the log information to be analyzed through kafka, wherein the log information to be analyzed is acquired by flash. Through the mode, the fact that the kafka and the flash are adopted to acquire the log information to be analyzed has the following advantages that firstly, compared with a traditional log collecting system, the flash has better real-time performance, the change of log files can be monitored in real time, second-level log information is transmitted to a log information analyzing platform, secondly, the flash does not need to be installed, a starting script can be used, maintenance is basically not needed in the later stage, the primary log information based on a regular expression is received, configuration is simple, operation and maintenance cost is saved, further, the flash can customize third-party Java package extension, additionally carried information is customized during log information uploading, service names and the like are included, and therefore the flexibility of the scheme is improved. By adopting the kafka, the pressure of a log information analysis platform can be relieved, so that the working stability of the server is improved.
Optionally, on the basis of the first embodiment corresponding to fig. 2 and fig. 2, in a second optional embodiment of the method for sending information provided in the embodiment of the present invention, before testing the log information to be analyzed by using a preset test case, the method may further include:
acquiring a test case set;
recording the test case set into an ATT (automatic test kit) resource library of an automatic test tool, wherein the ATT resource library is used for storing preset test cases;
and extracting a preset test case from the ATT resource library.
In this embodiment, before the server tests the log information to be analyzed by using the preset test case, the server may further automatically obtain a test case set, where the test case set includes CGI and/or midle resources. Then, the test case set is input into an Automatic Testing Tool (ATT) resource library, and the server extracts preset test cases from the ATT resource library.
The ATT is a black box testing tool and can be used for completing function testing and regression testing, so that the testing efficiency is improved, and the testing labor cost is reduced. Automated testing is the direction of test development today and can help software development teams save testing time. The automatic test realizes the test automation by executing the test script, the execution speed of a single script is more than 10 times faster than that of manual execution, and a large amount of test time can be saved for people. The ATT repository contains at least one test case.
For easy understanding, please refer to table 1, where table 1 is the content of the test case set in the ATT repository, specifically:
TABLE 1
Figure BDA0001298334700000081
Figure BDA0001298334700000091
It should be noted that the test case in table 1 is only an illustration, and in practical applications, the ATT resource library may contain other test cases, which is not limited herein.
Secondly, in the embodiment of the invention, the server can directly extract the preset test cases from the ATT resource library, and the test case set in the ATT resource library is automatically acquired by the server, so that the user does not need to manually add the test case set.
Optionally, on the basis of the first or second embodiment corresponding to fig. 2 and fig. 2, in a third optional embodiment of the method for sending information provided in the embodiment of the present invention, generating the service invocation relationship information according to the test result may include:
and generating at least one item of the service calling sequence, the service server name and the service server address according to the test result.
In this embodiment, the service invocation relationship information may include at least one of a service invocation sequence, a service server name, and a service server address.
For convenience of understanding, please refer to fig. 3, where fig. 3 is a schematic diagram of an embodiment of a call relationship between service layers in an embodiment of the present invention, where a service call sequence is a sequence indicated by an arrow, and the arrow points to a server that represents a call. The service server name is the name of the service, such as "dd _ dddd _ dddd _ dddd" or "hhh _ hhhhh _ hhhhhhhhh _ hhhhhhhhhhh" in fig. 3. The service server address is the IP address of the server, for example "9.999.9.999" in fig. 3.
It should be noted that, this is merely an illustration, and in practical applications, the service invocation relation information may also include other information, which is not limited herein.
Thirdly, in the embodiment of the present invention, the server generates at least one of the service call sequence, the service server name and the service server address according to the test result. By the mode, the content in the service calling relation information is further introduced, the calling relation among the service system modules is graphically displayed, and the problem in which service module is found can be visually positioned, so that the practicability and the application efficiency of the scheme are improved.
Optionally, on the basis of any one of the first to third embodiments corresponding to fig. 2 and fig. 2, in a fourth optional embodiment of the information sending method provided in the embodiment of the present invention, after obtaining the log information to be analyzed, the method may further include:
and storing the log information to be analyzed in a distributed cache system (memcache) and a database mongoDB stored based on a distributed file, wherein the memcache is used for storing the log information to be analyzed corresponding to the obtained test result, and the mongoDB is used for storing the log information to be analyzed to be tested by adopting a preset test case.
In this embodiment, after the server obtains the log information to be analyzed, the log information to be analyzed may be further stored in a distributed cache system (memcache), and meanwhile, the log information to be analyzed may also be stored in a database (mongoDB) based on distributed file storage.
Specifically, referring to fig. 6, fig. 6 is an architectural schematic diagram of a log information analysis platform in an embodiment of the present invention, and as shown in the figure, the log analysis platform generates three data analysis threads, which are a CGI hypertext transfer protocol (http) thread, a midle APP thread, and a CGI APP thread, according to CGI APP log information and midle log information. The log analysis platform interacts with the data queue, and the data queue is used for providing transfer service of log information, so that the pressure of the log analysis platform can be relieved.
The data queue sends the CGI APP log information and midle log information to the memcache and the mongoDB, and the difference is that the mongoDB is used for storing a result after a test case is tested, namely the service calling relation information is mainly called from the mongoDB. And the memcache is mainly used for providing corresponding log information for carrying out case test.
The working flow of the memcache is as follows, firstly checking whether the request data of the client is in the memcache, if the request data is in the memcache, then directly returning the request data without any operation on the database, otherwise, if the request data is not in the memcache, then further checking the database, then returning the data obtained from the database to the client, and simultaneously caching the data into the memcache (the memcache is not in charge of the client and needs to be definitely realized by a program). And updating the data in the memcache while updating the database every time, so as to ensure consistency. When the memory space allocated to the memcache is exhausted, a Least Recently Used (LRU) policy is added to an expired stale policy, and stale data is replaced first and then later.
The memcache is a high-performance distributed memory object cache system, and can be used for storing data in various formats, including images, videos, files, database retrieval results and the like, by maintaining a uniform and huge hash table in a memory. In brief, data is called into the memory and then read from the memory, thereby greatly improving the reading speed.
mongoDB is a database based on distributed file storage, is written in C + + language and aims to provide an extensible high-performance data storage solution for webpage applications.
mongoDB is a product that is intermediate between relational and non-relational databases. The data structure supported by the method is very loose, and is a binary serialized document format (binary serialized document format) similar to JavaScript object markup language (json), so that more complex data types can be stored. The biggest characteristic of mongoDB is that the supported query language is very strong, the syntax of the mongoDB is similar to the object-oriented query language, almost the most functions of single-table query of similar relational databases can be realized, and the data is also supported to be indexed.
Secondly, in the embodiment of the invention, after the server acquires the log information to be analyzed, the server stores the log information to be analyzed in the memcache and the mongoDB, wherein the memcache is used for storing the log information to be analyzed corresponding to the obtained test result, and the mongoDB is used for storing the log information to be analyzed to be tested by adopting the preset test case. By adopting the mode, the memcache is used as the middleware, so that the input and the output of a disk can be reduced, and the operation speed of a scheme is increased. The mongoDB can provide good query performance, does not need installation, has the characteristics of high performance, easiness in deployment and usability, and is very convenient to store data.
Optionally, on the basis of any one of the first to fourth embodiments corresponding to fig. 2 and fig. 2, in a fifth optional embodiment of the information sending method provided in the embodiment of the present invention, sending service invocation relationship information to the client may include:
and sending the service calling relation information to the client within the preset time so that the client displays the service calling relation information.
In this embodiment, the server may also send the service invocation relationship information to the client within a preset time, and the client side renders the service invocation relationship information and displays the rendered service invocation relationship information to the user.
Specifically, the server may notify the user of the service invocation relationship information in the form of an email at regular time every day, where the service invocation relationship information includes interface change conditions and the like, so that the user can obtain the relevant information in time and perform corresponding operations.
It is understood that the preset time is usually a fixed time, or may be a fixed time period, such as 8 am every day, or 4 pm every day, or may be a periodic notification, such as notifying the server every 12 hours, which is not limited herein.
It should be noted that the client for receiving the service invocation relationship information may specifically be a mail client, or an instant messaging client, such as "WeChat" or "QQ", and may also perform notification by short message or telephone, which is not limited herein.
Secondly, in the embodiment of the invention, the server can send the service calling relation information to the client within the preset time so that the client can display the service calling relation information. By the mode, the server can automatically inform the user of the service calling relation information, so that the user can know the interface changing condition in real time conveniently, and can quickly and accurately position which module has a problem through the service calling relation information, and the application convenience of the scheme is improved.
For convenience of understanding, the following may describe a process of setting up an automated testing platform in a specific application scenario, please refer to fig. 7, where fig. 7 is an interface schematic diagram of a log information analysis background in the application scenario, specifically:
after the user imports the resources saved on the platform, the request package type, i.e., the format of the file, can be selected accordingly. The CGI name is then filled in and the CGI category is selected.
After completion, a CGI test responsible person, a CGI development responsible person, a CGI operation and maintenance responsible person, and a CGI product responsible person need to be further selected for filling. The items to which the user belongs may be selected from the attribution type, for example, "financial and payment" is selected in the present embodiment. The CGI description is filled in by the user to learn the content of the CGI. The request packet is a section of code automatically intercepted and used for case testing and analysis.
Referring to fig. 8, fig. 8 is a schematic diagram of an embodiment of a server in the embodiment of the present invention, where the server 20 includes:
a first obtaining module 201, configured to obtain log information to be analyzed;
the testing module 202 is configured to test the log information to be analyzed, which is acquired by the first acquiring module 201, by using a preset test case to obtain a test result;
a generating module 203, configured to generate service invocation relationship information according to the test result obtained by the testing module 202 if the test result meets a preset alarm condition, where the service invocation relationship information is used to represent invocation relationships between service layers;
a sending module 204, configured to send the service invocation relationship information generated by the generating module 203 to a client.
In this embodiment, a first obtaining module 201 obtains log information to be analyzed, a testing module 202 tests the log information to be analyzed obtained by the first obtaining module 201 by using a preset test case to obtain a testing result, if the testing result obtained by the testing module 202 meets a preset alarm condition, a generating module 203 generates service invocation relation information according to the testing result, wherein the service invocation relation information is used for representing invocation relations between service layers, and a sending module 204 sends the service invocation relation information generated by the generating module 203 to a client.
The embodiment of the invention provides a server, which is used for acquiring log information to be analyzed, testing the log information to be analyzed by adopting a preset test case to obtain a test result, and generating service calling relation information by the server according to the test result if the test result meets a preset alarm condition, wherein the service calling relation information is used for representing a calling relation between service layers and sending the service calling relation information to a client. By the mode, after the server detects the test result meeting the preset alarm condition, the service calling relation information can be generated and displayed according to the test result, the service calling relation information can directly represent the calling relation among all the service layers, and the calling relation among the service layers is not required to be acquired by spending much time and energy, so that the efficiency of positioning the abnormal problem is improved.
Alternatively, on the basis of the embodiment corresponding to fig. 8, referring to fig. 9, in another embodiment of the server 20 provided in the embodiment of the present invention,
the first obtaining module 201 includes:
the obtaining unit 2011 is configured to obtain the log information to be analyzed through the distributed message system kafka, where the log information to be analyzed is collected by the log collection system flash.
Secondly, in the embodiment of the invention, the server acquires the log information to be analyzed through kafka, wherein the log information to be analyzed is acquired by flash. Through the mode, the fact that the kafka and the flash are adopted to acquire the log information to be analyzed has the following advantages that firstly, compared with a traditional log collecting system, the flash has better real-time performance, the change of log files can be monitored in real time, second-level log information is transmitted to a log information analyzing platform, secondly, the flash does not need to be installed, a starting script can be used, maintenance is basically not needed in the later stage, the primary log information based on a regular expression is received, configuration is simple, operation and maintenance cost is saved, further, the flash can customize third-party Java package extension, additionally carried information is customized during log information uploading, service names and the like are included, and therefore the flexibility of the scheme is improved. By adopting the kafka, the pressure of a log information analysis platform can be relieved, so that the working stability of the server is improved.
Optionally, on the basis of the embodiment corresponding to fig. 8, referring to fig. 10, in another embodiment of the server 20 provided in the embodiment of the present invention, the server 20 further includes:
a second obtaining module 205, configured to obtain a test case set before the test module 202 tests the log information to be analyzed by using a preset test case;
a logging module 206, configured to log the test case set acquired by the second acquiring module 205 into an automatic test tool ATT resource library, where the ATT resource library is used to store the preset test case;
an extracting module 207, configured to extract the preset test case from the ATT repository logged by the logging module 206.
Secondly, in the embodiment of the invention, the server can directly extract the preset test cases from the ATT resource library, and the test case set in the ATT resource library is automatically acquired by the server, so that the user does not need to manually add the test case set.
Optionally, on the basis of the embodiment corresponding to fig. 8, fig. 9, or fig. 10, referring to fig. 11, in another embodiment of the server 20 provided in the embodiment of the present invention, the server 20 further includes:
the generating module 203 comprises:
a generating unit 2031, configured to generate at least one of a service invocation order, a service server name, and a service server address according to the test result.
Thirdly, in the embodiment of the present invention, the server generates at least one of the service call sequence, the service server name and the service server address according to the test result. By the mode, the content in the service calling relation information is further introduced, the calling relation among the service system modules is graphically displayed, and the problem in which service module is found can be visually positioned, so that the practicability and the application efficiency of the scheme are improved.
Alternatively, referring to fig. 12 on the basis of the embodiment corresponding to fig. 8, in another embodiment of the server 20 provided in the embodiment of the present invention,
the server 20 further includes:
the storage module 208 is configured to, after the first obtaining module 201 obtains log information to be analyzed, store the log information to be analyzed in a distributed cache system memcache and a database mongoDB stored based on a distributed file, where the memcache is configured to store the log information to be analyzed corresponding to the obtained test result, and the mongoDB is configured to store the log information to be analyzed to be tested by using the preset test case.
Secondly, in the embodiment of the invention, after the server acquires the log information to be analyzed, the server stores the log information to be analyzed in the memcache and the mongoDB, wherein the memcache is used for storing the log information to be analyzed corresponding to the obtained test result, and the mongoDB is used for storing the log information to be analyzed to be tested by adopting the preset test case. By adopting the mode, the memcache is used as the middleware, so that the input and the output of a disk can be reduced, and the operation speed of a scheme is increased. The mongoDB can provide good query performance, does not need installation, has the characteristics of high performance, easiness in deployment and usability, and is very convenient to store data.
Alternatively, referring to fig. 13 on the basis of the embodiment corresponding to fig. 8, in another embodiment of the server 20 provided in the embodiment of the present invention,
the sending module 204 includes:
a sending unit 2041, configured to send the service invocation relationship information to the client within a preset time, so that the client displays the service invocation relationship information.
Secondly, in the embodiment of the invention, the server can send the service calling relation information to the client within the preset time so that the client can display the service calling relation information. By the mode, the server can automatically inform the user of the service calling relation information, so that the user can know the interface changing condition in real time conveniently, and can quickly and accurately position which module has a problem through the service calling relation information, and the application convenience of the scheme is improved.
Fig. 14 is a schematic diagram of a server 300 according to an embodiment of the present invention, where the server 300 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) for storing applications 342 or data 344. Memory 332 and storage media 330 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Still further, the central processor 322 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the server 300.
The server 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and the like.
The steps performed by the server in the above embodiment may be based on the server structure shown in fig. 14.
The central processing unit 322 is configured to perform the following steps:
acquiring log information to be analyzed;
testing the log information to be analyzed by adopting a preset test case to obtain a test result;
if the test result meets the preset alarm condition, generating service calling relation information according to the test result, wherein the service calling relation information is used for expressing the calling relation between service layers;
and sending the service calling relation information to a client.
Optionally, the central processor 322 is specifically configured to execute the following steps:
and acquiring the log information to be analyzed through a distributed message system kafka, wherein the log information to be analyzed is acquired by a log collection system flash.
Optionally, the central processor 322 is further configured to perform the following steps:
acquiring a test case set;
inputting the test case set into an automatic test tool ATT (automatic test kit) resource library, wherein the ATT resource library is used for storing the preset test cases;
and extracting the preset test case from the ATT resource library.
Optionally, the central processor 322 is specifically configured to execute the following steps:
and generating at least one item of a service calling sequence, a service server name and a service server address according to the test result.
Optionally, the central processor 322 is further configured to perform the following steps:
and storing the log information to be analyzed in a distributed cache system (memcache) and a database mongoDB stored based on a distributed file, wherein the memcache is used for storing the log information to be analyzed corresponding to the obtained test result, and the mongoDB is used for storing the log information to be analyzed to be tested by adopting the preset test case.
Optionally, the central processor 322 is specifically configured to execute the following steps:
and sending the service calling relation information to the client within preset time so that the client displays the service calling relation information.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for transmitting information, comprising:
acquiring log information to be analyzed;
storing the log information to be analyzed in a distributed cache system (memcache) and a database mongoDB stored based on a distributed file, wherein the memcache is used for storing the log information to be analyzed corresponding to the obtained test result, and the mongoDB is used for storing the log information to be analyzed to be tested by adopting a preset test case;
testing the log information to be analyzed by adopting a preset test case to obtain a test result, wherein the content of the test case comprises a primary module name, a secondary module name, a case number, a case purpose and an operation step;
if the test result meets the preset alarm condition, generating service calling relation information according to the test result, wherein the service calling relation information comprises at least one item of service calling sequence, service server name and service server address, and the service calling relation information is used for expressing the calling relation between service layers;
and sending the service calling relation information to a client, and adopting a solid arrow to represent synchronous calling, adopting a dotted arrow to represent asynchronous calling, and adopting an empty arrow to represent alarm occurrence in the service calling relation information.
2. The method of claim 1, wherein the obtaining log information to be analyzed comprises:
and acquiring the log information to be analyzed through a distributed message system kafka, wherein the log information to be analyzed is acquired by a log collection system flash.
3. The method according to claim 1, wherein before the testing the log information to be analyzed by using the preset test case, the method further comprises:
acquiring a test case set;
inputting the test case set into an automatic test tool ATT (automatic test kit) resource library, wherein the ATT resource library is used for storing the preset test cases;
and extracting the preset test case from the ATT resource library.
4. The method of claim 1, wherein sending the service invocation relationship information to the client comprises:
and sending the service calling relation information to the client within preset time so that the client displays the service calling relation information.
5. A server, comprising:
the first acquisition module is used for acquiring the log information to be analyzed;
the test module is used for testing the log information to be analyzed acquired by the first acquisition module by adopting a preset test case to obtain a test result, wherein the content of the test case comprises a primary module name, a secondary module name, a case number, a case purpose and an operation step;
the generating module is used for generating service calling relation information according to the test result if the test result obtained by the testing module meets a preset alarm condition, wherein the service calling relation information comprises at least one of a service calling sequence, a service server name and a service server address, and the service calling relation information is used for representing a calling relation between service layers;
the sending module is used for sending the service calling relation information generated by the generating module to a client, and the service calling relation information adopts a solid arrow to represent synchronous calling, adopts a dotted arrow to represent asynchronous calling and adopts a hollow arrow to represent alarm occurrence;
the server further comprises:
the storage module is used for storing the log information to be analyzed in a distributed cache system (memcache) and a distributed file storage-based database mongoDB after the first acquisition module acquires the log information to be analyzed, wherein the memcache is used for storing the log information to be analyzed corresponding to the obtained test result, and the mongoDB is used for storing the log information to be analyzed to be tested by adopting the preset test case.
6. The server according to claim 5, wherein the first obtaining module comprises:
and the acquisition unit is used for acquiring the log information to be analyzed through a distributed message system kafka, wherein the log information to be analyzed is acquired by a log collection system flash.
7. The server according to claim 5, further comprising:
the second obtaining module is used for obtaining a test case set before the test module adopts a preset test case to test the log information to be analyzed;
the recording module is used for recording the test case set acquired by the second acquisition module into an automatic test tool ATT (automatic test kit) resource library, wherein the ATT resource library is used for storing the preset test case;
and the extracting module is used for extracting the preset test case from the ATT resource library recorded by the recording module.
8. A server, comprising: a memory, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory and comprises the following steps:
acquiring log information to be analyzed;
storing the log information to be analyzed in a distributed cache system (memcache) and a database mongoDB stored based on a distributed file, wherein the memcache is used for storing the log information to be analyzed corresponding to the obtained test result, and the mongoDB is used for storing the log information to be analyzed to be tested by adopting a preset test case;
testing the log information to be analyzed by adopting a preset test case to obtain a test result, wherein the content of the test case comprises a primary module name, a secondary module name, a case number, a case purpose and an operation step;
if the test result meets the preset alarm condition, generating service calling relation information according to the test result, wherein the service calling relation information comprises at least one item of service calling sequence, service server name and service server address, and the service calling relation information is used for expressing the calling relation between service layers;
sending the service calling relation information to a client, adopting a solid arrow to represent synchronous calling, adopting a dotted arrow to represent asynchronous calling, and adopting a hollow arrow to represent alarm occurrence in the service calling relation information;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
9. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of claims 1-4.
CN201710353011.1A 2017-05-18 2017-05-18 Method for transmitting information, server and computer readable storage medium Active CN108959041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710353011.1A CN108959041B (en) 2017-05-18 2017-05-18 Method for transmitting information, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710353011.1A CN108959041B (en) 2017-05-18 2017-05-18 Method for transmitting information, server and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108959041A CN108959041A (en) 2018-12-07
CN108959041B true CN108959041B (en) 2021-09-07

Family

ID=64462890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710353011.1A Active CN108959041B (en) 2017-05-18 2017-05-18 Method for transmitting information, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108959041B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221952B (en) * 2019-04-18 2023-04-07 北京互金新融科技有限公司 Service data processing method and device and service data processing system
CN114205273B (en) * 2020-08-26 2023-09-15 腾讯科技(深圳)有限公司 System test method, device and equipment and computer storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070006037A1 (en) * 2005-06-29 2007-01-04 Microsoft Corporation Automated test case result analyzer
CN102231686B (en) * 2011-06-24 2017-08-11 北京天融信科技有限公司 A kind of system and method for realizing automated test of network security equipment
CN103077111B (en) * 2011-10-26 2016-02-10 阿里巴巴集团控股有限公司 A kind of localization method of continuous integrating failure use-case and system
CN105207806A (en) * 2015-08-20 2015-12-30 百度在线网络技术(北京)有限公司 Monitoring method and apparatus of distributed service

Also Published As

Publication number Publication date
CN108959041A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
US10560465B2 (en) Real time anomaly detection for data streams
US11775501B2 (en) Trace and span sampling and analysis for instrumented software
US20190095478A1 (en) Information technology networked entity monitoring with automatic reliability scoring
CN107370806B (en) HTTP status code monitoring method, device, storage medium and electronic equipment
US9697104B2 (en) End-to end tracing and logging
CN113254466B (en) Data processing method and device, electronic equipment and storage medium
CN109684052B (en) Transaction analysis method, device, equipment and storage medium
CN111881011A (en) Log management method, platform, server and storage medium
US10657099B1 (en) Systems and methods for transformation and analysis of logfile data
CA3059738A1 (en) Behaviour data processing method, device, electronic device and computer readable medium
US9131002B2 (en) Web application monitoring
US11609913B1 (en) Reassigning data groups from backup to searching for a processing node
CN109039787A (en) log processing method, device and big data cluster
CN110928934A (en) Data processing method and device for business analysis
CN111782692A (en) Frequency control method and device
CN111258971A (en) Application state monitoring alarm system and method based on access log
CN108959041B (en) Method for transmitting information, server and computer readable storage medium
CN114490268A (en) Full link monitoring method, device, equipment, storage medium and program product
CN113778810A (en) Log collection method, device and system
CN107480189A (en) A kind of various dimensions real-time analyzer and method
US11392605B1 (en) Integration in computer analytics system
CN114756301A (en) Log processing method, device and system
CN114153703A (en) Micro-service exception positioning method and device, electronic equipment and program product
CN113778777A (en) Log playback method and device
CN111698109A (en) Method and device for monitoring log

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant