CN105260292A - Log recording method, apparatus and system - Google Patents

Log recording method, apparatus and system Download PDF

Info

Publication number
CN105260292A
CN105260292A CN201510649462.0A CN201510649462A CN105260292A CN 105260292 A CN105260292 A CN 105260292A CN 201510649462 A CN201510649462 A CN 201510649462A CN 105260292 A CN105260292 A CN 105260292A
Authority
CN
China
Prior art keywords
specific transactions
business processing
identifier
program
subroutine
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.)
Granted
Application number
CN201510649462.0A
Other languages
Chinese (zh)
Other versions
CN105260292B (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.)
PICC PROPERTY AND CASUALTY Co Ltd
Original Assignee
PICC PROPERTY AND CASUALTY 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 PICC PROPERTY AND CASUALTY Co Ltd filed Critical PICC PROPERTY AND CASUALTY Co Ltd
Priority to CN201510649462.0A priority Critical patent/CN105260292B/en
Publication of CN105260292A publication Critical patent/CN105260292A/en
Application granted granted Critical
Publication of CN105260292B publication Critical patent/CN105260292B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present application discloses a provided log recording method and apparatus, a service processing request method and apparatus and a log recording system. The log recording method comprises: receiving a service processing request that is corresponding to a specific service and that is sent by a calling party; using a program execution identifier as a transaction processing identifier corresponding to current execution of the specific service, wherein the program execution identifier is comprised in the service processing request and is generated by the calling party in advance; and executing the specific service, and corresponding to the current execution of the specific service, generating service processing log information identified by the transaction processing identifier. With the adoption of the method provided by the present application, the program execution identifier can be used as an association field of the log information of same transaction processing between the calling party and a called party, and during cross-system transaction processing, system log information related to same transaction processing can be conveniently associated, thereby facilitating tracking of various problems during the transaction processing.

Description

A kind of log recording method, Apparatus and system
Technical field
The application relates to technical field of data processing, is specifically related to a kind of log recording method and device.The application relates to a kind of requesting method and device of business processing simultaneously, and a kind of diary record system.
Background technology
Enterprise-level application refers to as establishment, large enterprise and creating and the solution of disposing and application.Along with the development of Internet technology, the enterprise-level application in the present age is no longer system separate one by one.In enterprise, general all can deployment to be multiplely connected to each other, mutually to carry out mutual enterprise-level application by different integrated level, these application simultaneously are all likely connected with the related application of other enterprise again, thus formation one distributed-distribution system that is baroque, that cross over Intranet and Internet is trooped.Under this system architecture, certain function in a system be realized, multiple system may be needed to cooperatively interact and just can complete.
In distributed-distribution system is trooped, the log information that each system produces is stored in respective front server usually.When a system acceptance is to business processing request, first the transaction identifier of this request corresponding is generated, by transaction identifier being passed to database in request processing procedure, realize the integrated monitoring of internal system whole processing procedure from middleware to database, establish the incidence relation of front server and the concrete processing logic of database.When this system needs to call other system with finishing service process request, other system will generate new transaction identifier.Visible, when a business processing request processes step by step in different system, for this request, the transaction identifier that each system generates is inconsistent, that is: do not have relevance between the log information that same issued transaction produces in different system.
Because the degree of coupling between each system that distributed-distribution system is trooped is higher, when a system produced problem, both may be the reason of this system itself, may be also the interactional result of other interconnected system.Judge which system is the root that problem produces, not only need to obtain the log information relevant to issued transaction from the front server of the system of explicit generation problem, also need to log in the front server of other system that this system is called, obtain the log information of other related system relevant to this issued transaction, these log informations are integrated and carries out case study, the root occurred with problem identificatioin.
Such as, a function of A system occurs running problem slowly in operational process, if the realization of this function needs to call the b interface of B system and the c interface of C system in A system, and the realization of the c interface of C system also needs the d interface calling d system, so when A system occur running slowly situation time, be likely what the interface provided due to B, C or D tri-systems caused.To analyze between above-mentioned different system produced problem in invoked procedure, need maintainer to be read out respectively by the log information of A, B, C, D four systems, and then association analysis is carried out to them.Especially, if these systems or clustered deploy(ment), then to obtain all daily records that an issued transaction is relevant, just need to find relevant log information from all preposition service of B, C, D tri-systems.
But, not there is relevance due between the log information that same issued transaction produces in different system, make to be difficult to obtain the relevant each system log message of same issued transaction, more cannot navigate to the root that problem produces.Therefore, there is the problem between log information that same issued transaction produces in different system without relevance in prior art.
Summary of the invention
The application provides a kind of log recording method and device, there is the problem between log information that same issued transaction produces in different system without relevance to solve prior art.The application provides a kind of requesting method and device of business processing in addition, and a kind of diary record system.
The application provides a kind of log recording method, comprising:
Receive the business processing request of the corresponding specific transactions that called side sends;
The program that the described called side that described business processing request comprises generated in advance performs identifier, performs corresponding transaction identifier as with this of described specific transactions;
Perform described specific transactions, and this of corresponding described specific transactions performs the business processing log information producing and identified by described transaction identifier.
Optionally, the described specific transactions of described execution comprises:
Before the subroutine that the described specific transactions of execution comprises, be that the program of the corresponding described subroutine of execution generation of described subroutine performs identifier;
Perform described subroutine, and the log information of the initial execution of execution generating subroutine of corresponding described subroutine and subroutine stop the log information of execution; The log information that the log information of the initial execution of described subroutine and subroutine stop performing performs identifier common ID by the described program of described transaction identifier and the described subroutine of correspondence.
Optionally, the execution of described subroutine needs to call next stage specific transactions;
Accordingly, the described subroutine of described execution comprises:
The business processing request of corresponding described next stage specific transactions is sent to the system performing described next stage specific transactions; The described program that the request of described next stage business processing comprises corresponding described subroutine performs identifier.
Optionally, described specific transactions comprises WebService application program.
Optionally, the described program that described business processing request comprises performs identifier and is stored in SOAP header file.
Optionally, after the business processing request of the corresponding specific transactions of described reception called side transmission, also comprise:
Verify whether described called side has the right to ask described specific transactions.
Optionally, after the business processing request of the corresponding specific transactions of described reception called side transmission, also comprise:
From described business processing request, obtain described program perform identifier, and bind it to the thread performing described specific transactions.
Optionally, if the program both not comprised described called side in described business processing request performs identifier, do not comprise called side transaction identifier yet, then, after the business processing request of the corresponding specific transactions of described reception called side transmission, also comprise:
Execution for described specific transactions generates described transaction identifier.
Optionally, described transaction identifier generates according at least one of the identifier of the IP address of described called side, the rise time of described transaction identifier and described business processing request.
Optionally, described program performs identifier and performs the program name of program corresponding to identifier and the rise time generation of described program execution identifier according to described program.
Accordingly, the application also provides a kind of log recording apparatus, comprising:
Receiving element, for receiving the business processing request of the corresponding specific transactions that called side sends;
Setting unit, program that the described called side for described business processing request being comprised generates in advance performs identifier, performs corresponding transaction identifier as with this of described specific transactions;
Performance element, for performing described specific transactions, and this of corresponding described specific transactions performs the business processing log information producing and identified by described transaction identifier.
Optionally, described performance element comprises:
Generating subelement, for before performing the subroutine that comprises of described specific transactions, is that the program that the execution of described subroutine generates corresponding described subroutine performs identifier;
Subroutine performs subelement, and for performing described subroutine, and the log information of the initial execution of execution generating subroutine of corresponding described subroutine and subroutine stop the log information of execution; The log information that the log information of the initial execution of described subroutine and subroutine stop performing performs identifier common ID by the described program of described transaction identifier and the described subroutine of correspondence.
Optionally, the execution of described subroutine needs to call next stage specific transactions;
Accordingly, described subroutine execution subelement comprises:
Request subelement, for sending the business processing request of corresponding described next stage specific transactions to the system performing described next stage specific transactions; The described program that the request of described next stage business processing comprises corresponding described subroutine performs identifier.
Optionally, also comprise:
Authentication unit, for verifying whether described called side has the right to ask described specific transactions.
In addition, the application also provides a kind of requesting method of business processing, comprising:
For the program generator sending business processing request performs identifier;
System to execution first specific transactions sends the described business processing request of corresponding described first specific transactions; Described business processing request comprises described program and performs identifier.
Optionally, described program performs identifier performs identifier rise time generation according to the program name of the program of its correspondence and described program.
Optionally, the specific transactions belonging to program sending described business processing request is the second specific transactions, and described method also comprises:
Receive the business processing request of described second specific transactions of correspondence that upper level called side sends;
If both do not comprised the program execution identifier that described upper level called side generates in advance in the business processing request of described second specific transactions of described correspondence, also not comprising the transaction identifier that described upper level called side generates in advance, is then the transaction identifier of corresponding described second specific transactions of execution generation of described second specific transactions;
Business processing request according to described second specific transactions of described correspondence performs described second specific transactions, and this of corresponding described second specific transactions performs generation business processing log information; Described business processing log information is identified by the transaction identifier of described second specific transactions of described correspondence.
Optionally, the transaction identifier of described second specific transactions of described correspondence generates according at least one of the identifier of the rise time of the transaction identifier of the IP address of described upper level called side, described second specific transactions of described correspondence and the business processing request of described second specific transactions of described correspondence.
Optionally, described first specific transactions comprises WebService application program.
Optionally, the described program that described business processing request comprises performs identifier and is stored in SOAP header file.
Accordingly, the application also provides a kind of request unit of business processing, comprising:
First generation unit, performs identifier for the program generator for sending business processing request;
Transmitting element, for sending the described business processing request of corresponding described first specific transactions to the system of execution first specific transactions; Described business processing request comprises described program and performs identifier.
Optionally, the specific transactions belonging to program sending described business processing request is the second specific transactions, and described device also comprises:
Receiving element, for receiving the business processing request of described second specific transactions of correspondence that upper level called side sends;
Second generation unit, if both do not comprised the program execution identifier that described upper level called side generates in advance in the business processing request for described second specific transactions of described correspondence, also not comprising the transaction identifier that described upper level called side generates in advance, is then the transaction identifier of corresponding described second specific transactions of execution generation of described second specific transactions;
Performance element, performs described second specific transactions for the business processing request according to described second specific transactions of described correspondence, and this of corresponding described second specific transactions performs generation business processing log information; Described business processing log information is identified by the transaction identifier of described second specific transactions of described correspondence.
In addition, the application also provides a kind of diary record system, comprising: the request unit of the log recording apparatus according to above-mentioned any one and the business processing described in any one.
The application also provides a kind of ...
Compared with prior art, the application has the following advantages:
The log recording method that the application provides, the requesting method of business processing and related device and system, by receiving the business processing request of corresponding specific transactions that called side sends, and the program called side that business processing request comprises generated in advance performs identifier performs corresponding transaction identifier as with this of specific transactions; When performing specific transactions, this of corresponding specific transactions performs the business processing log information producing and identified by transaction identifier, make it possible to program be performed the associate field of identifier as the log information of same issued transaction between called side and called side, thus in the issued transaction of cross-system, easily each system log message relevant for same issued transaction is associated, thus be convenient to the various problems of following the tracks of in this transaction process.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the log recording method embodiment of the application;
Fig. 2 is the data flow diagram of the log recording apparatus embodiment of the application;
Fig. 3 is the schematic diagram of the log recording apparatus embodiment of the application;
Fig. 4 is the process flow diagram of the requesting method embodiment of the business processing of the application;
Fig. 5 is the schematic diagram of the request unit embodiment of the business processing of the application;
Fig. 6 is the schematic diagram of the diary record system embodiment of the application.
Embodiment
Set forth a lot of detail in the following description so that fully understand the application.But the application can be much different from alternate manner described here to implement, those skilled in the art can when doing similar popularization without prejudice to when the application's intension, and therefore the application is by the restriction of following public concrete enforcement.
In this application, a kind of log recording method and device, a kind of requesting method of business processing and device and a kind of diary record system is provided.Be described in detail one by one in the following embodiments.
The log recording method that the application provides, the basic thought of its core is: between called side and called side, the log information of same issued transaction all adopts the program of called side execution identifier to identify, and makes can produce association between the correlation log information of the same issued transaction of different system.
Please refer to Fig. 1, it is the process flow diagram of the log recording method embodiment of the application.Described method comprises the steps:
Step S101: the business processing request receiving the corresponding specific transactions that called side sends.
Called side described in the embodiment of the present application comprises third-party application.Described third-party application refers to, using the internet application that receives business processing request as certain software of its partial function or application, third-party application can be the related software of its hetero-organization by non-internet application program establishment side or personal development.
Specific transactions described in the embodiment of the present application comprises internet application, such as: for developing the Webservice application program of distributed interoperability.Third-party application sends business processing request by web socket to the system running specific transactions.
Business processing request described in the embodiment of the present application comprises the program execution identifier that called side generates in advance.Program described in the embodiment of the present application performs identifier and refers to, the identifier that third-party application generates before sending business processing request, according to the program name of specific procedure and the time of generator program execution identifier that send business processing request.In actual applications, the specific procedure sending business processing request can be both third-party application itself, also can be the subroutines at different levels that third-party application comprises.If send business processing request by third-party application itself, then the program in business processing request performs identifier for the transaction identifier corresponding to performing with this of third-party application; If the subroutines at different levels comprised by third-party application send business processing request, then first need to perform identifier for this subroutine generates the program corresponding to performing with its this, and by this program execution identifier record in business processing request.
It should be noted that when the same subroutine of third-party application repeatedly calls specific transactions in same affairs, call each time and all can produce new program execution identifier, that is: program execution identifier is corresponding with each execution of subroutine.
In the present embodiment, specific transactions is Webservice application program.In order to the existing business logic of as far as possible few amendment specific transactions, the embodiment of the present application is in conjunction with the soaphead technology of Webservice, program execution identifier business processing request comprised is stored in SOAP header file and transmits, make when different system is carried out integrated thus, only need to do less adjustment to called side.
In addition, be easy to the program read in business processing request in order to make specific transactions in the process of implementation and perform identifier, the embodiment of the present application is after the business processing request receiving the corresponding specific transactions that called side sends, in conjunction with the ThreadLocal technology of Java, the program obtained is performed identifier be tied to the thread performing specific transactions from business processing request.
In actual applications, in order to avoid unauthorized called side illegally calls specific transactions, the embodiment of the present application is after the business processing request receiving the corresponding specific transactions that called side sends, also combine filtrator (filter) technology of Java, whether have the right to ask specific transactions by filtrator checking called side.
Step S103: the program that the described called side that described business processing request comprises generated in advance performs identifier, performs corresponding transaction identifier as with this of described specific transactions.
Received the business processing request of corresponding specific transactions by step S101 after, just enter into step S103, the program of called side in business processing request is performed identifier and performs corresponding transaction identifier as with this of specific transactions, thus be associated between two systems.
In actual applications, if the program both not comprised called side subroutine in the business processing request that called side sends performs identifier, the transaction identifier of called side specific transactions is not comprised yet, then after the business processing request receiving the corresponding specific transactions that called side sends, also comprise: the execution for described specific transactions generates described transaction identifier.
Such as, called side is client, when client user sends business processing request by browser to the system running specific transactions, the program not comprising called side in business processing request performs identifier or transaction identifier, this situation represents that a new issued transaction just starts, and now needs to generate transaction identifier for this of specific transactions performs.Concrete, newly-generated transaction identifier generates according at least one of the identifier (that is: requestId) of the IP address of called side, the rise time of transaction identifier and business processing request.
Step S105: perform described specific transactions, and this of corresponding described specific transactions performs the business processing log information producing and identified by described transaction identifier.
Got the transaction identifier corresponding to this execution of specific transactions by step S103 after, just can start to perform specific transactions, and be identified the business processing log information produced in implementation by this transaction identifier.Such as, the subroutine a of the specific transactions A of A system needs the specific transactions B calling B system in the process of implementation, the program that the log information that specific transactions B is produced in the process of implementation is generated by this execution for subroutine a performs identifier (as: XA) and identifies, the log information form of specific transactions B is as follows: transaction identifier (XA), the daily record rise time, log information description etc.
In the present embodiment, specific transactions comprises subroutine, in order to the implementation status of subroutine is monitored, and in order to be associated between this specific transactions with the log information of next stage specific transactions, the embodiment of the present application is when performing specific transactions, also comprising: 1) before performing the subroutine that comprises of described specific transactions, is that the program that the execution of described subroutine generates corresponding described subroutine performs identifier; 2) perform described subroutine, and the log information of the initial execution of execution generating subroutine of corresponding described subroutine and subroutine stop the log information of execution.
1) before performing the subroutine that comprises of described specific transactions, be that the program that the execution of described subroutine generates corresponding described subroutine performs identifier.
Identifier is performed by the execution generator program for specific transactions sub-routine, make when this subroutine needs to call next stage specific transactions, this program can be performed identifier is stored in the business processing request to next stage specific transactions, this program is performed the transaction identifier of identifier as this next stage specific transactions by next stage specific transactions simultaneously, can not only realize thus being associated between this specific transactions with the log information of next stage specific transactions, can also when system generation problem, be directly targeted to the root that problem produces, that is: the question classification of subroutine one-level is directly targeted to.
2) perform described subroutine, and the log information of the initial execution of execution generating subroutine of corresponding described subroutine and subroutine stop the log information of execution.
After execution generator program execution identifier for subroutine, performed the log information of the subroutine produced in identifier common ID subroutine implementation by the transaction identifier of specific transactions and the program of this subroutine.The log information of the subroutine that the embodiment of the present application produces comprises: the log information of the initial execution of subroutine and subroutine stop the log information performed.By the log information that log information and the subroutine termination of the initial execution of record subroutine perform, the implementation status of this subroutine can be got, judge whether this subroutine exists exception in operational process thus.
Please refer to Fig. 2, it is the data flow diagram of the log recording method embodiment of the application.In the present embodiment, the AOP technology of Spring framework is utilized to realize the record of the subroutine log information of specific transactions.On the one hand, before often performing a subroutine of specific transactions, first AOP intercept layer reads the transaction identifier of specific transactions from ThreadLocal, and the program generating the subroutine that will perform performs identifier, record the log information of the initial execution of subroutine, form is as follows simultaneously: transaction identifier (XA), and program performs identifier (as xa), the daily record rise time, log information description etc.On the other hand, after the subroutine often performing specific transactions, AOP intercept layer also will record the log information of subroutine termination execution, form is as follows: transaction identifier (XA), program performs identifier (as xa), the daily record rise time, log information description etc.; Meanwhile, also perform corresponding program with this of subroutine perform identifier by removing, that is: the scope of application of program execution identifier is only this implementation of subroutine.
In actual applications, if the execution of subroutine needs to call next stage specific transactions; Accordingly, the described subroutine of described execution comprises: the business processing request sending corresponding described next stage specific transactions to the system performing described next stage specific transactions; The described program that the request of described next stage business processing comprises corresponding described subroutine performs identifier.
In the above-described embodiment, provide a kind of log recording method, correspond, the application also provides a kind of log recording apparatus.This device is corresponding with the embodiment of said method.
Please refer to Fig. 3, it is the schematic diagram of the log recording apparatus embodiment of the application.Because device embodiment is substantially similar to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.The device embodiment of following description is only schematic.
A kind of log recording apparatus of the present embodiment, comprising:
Receiving element 301, for receiving the business processing request of the corresponding specific transactions that called side sends;
Setting unit 303, program that the described called side for described business processing request being comprised generates in advance performs identifier, performs corresponding transaction identifier as with this of described specific transactions;
Performance element 305, for performing described specific transactions, and this of corresponding described specific transactions performs the business processing log information producing and identified by described transaction identifier.
Optionally, described performance element 305 comprises:
Generating subelement, for before performing the subroutine that comprises of described specific transactions, is that the program that the execution of described subroutine generates corresponding described subroutine performs identifier;
Subroutine performs subelement, and for performing described subroutine, and the log information of the initial execution of execution generating subroutine of corresponding described subroutine and subroutine stop the log information of execution; The log information that the log information of the initial execution of described subroutine and subroutine stop performing performs identifier common ID by the described program of described transaction identifier and the described subroutine of correspondence.
Optionally, the execution of described subroutine needs to call next stage specific transactions;
Accordingly, described subroutine execution subelement comprises:
Request subelement, for sending the business processing request of corresponding described next stage specific transactions to the system performing described next stage specific transactions; The described program that the request of described next stage business processing comprises corresponding described subroutine performs identifier.
Optionally, also comprise:
Authentication unit, for verifying whether described called side has the right to ask described specific transactions.
Corresponding with above-mentioned log recording method, the application also provides a kind of requesting method of business processing.Please refer to Fig. 4, the schematic flow sheet of the embodiment of the requesting method of its a kind of business processing provided for the application, the part that the present embodiment is identical with the first embodiment content repeats no more, and refers to the appropriate section in embodiment one.The requesting method of a kind of business processing that the application provides comprises:
Step S301: for the program generator sending business processing request performs identifier.
The program of the transmission business processing request described in the embodiment of the present application, can be both third-party application itself, also can be the subroutines at different levels that third-party application comprises.If send business processing request by third-party application itself, then the program in business processing request performs identifier for the transaction identifier corresponding to performing with this of third-party application; If the subroutines at different levels comprised by third-party application send business processing request, then first need to perform identifier for this subroutine generates the program corresponding to performing with its this, and by this program execution identifier record in business processing request.The generation method that program performs identifier elaborates in above-described embodiment one, repeats no more herein, asks for an interview the relevant portion of embodiment one.
Step S303: the system to execution first specific transactions sends the described business processing request of corresponding described first specific transactions; Described business processing request comprises described program and performs identifier.
Due to have recorded in business processing request program perform identifier, thus can native system and perform the first specific transactions system log information between be associated.
The first specific transactions described in the embodiment of the present application comprises WebService application program.The described program that described business processing request comprises performs identifier and is stored in SOAP header file.In the present embodiment, the specific transactions belonging to the program of transmission business processing request is called the second specific transactions, and the program sending business processing request is the subroutine of the second specific transactions.
The program sending business processing request due to the embodiment of the present application also belongs to a specific transactions (i.e. above-mentioned second specific transactions), and therefore the requesting method of business processing also comprises: the business processing request 1) receiving described second specific transactions of correspondence that upper level called side sends; 2) program that described upper level called side generates in advance if both do not comprised in the business processing request of described second specific transactions of described correspondence performs identifier, also not comprising the transaction identifier that described upper level called side generates in advance, is then the transaction identifier of corresponding described second specific transactions of execution generation of described second specific transactions; 3) perform described second specific transactions according to the business processing request of described second specific transactions of described correspondence, and this of corresponding described second specific transactions performs generation business processing log information; Described business processing log information is identified by the transaction identifier of described second specific transactions of described correspondence.
By above-mentioned steps 1-3, do not comprise program in from the business processing request of upper level called side when performing identifier or transaction identifier, represent that the second specific transactions starts once new issued transaction, now need be the second specific transactions this perform generate transaction identifier.Concrete, newly-generated transaction identifier generates according at least one of the identifier (that is: requestId) of the IP address of upper level called side, the rise time of transaction identifier and business processing request.
In the above-described embodiment, provide a kind of requesting method of business processing, correspond, the application also provides a kind of request unit of business processing.This device is corresponding with the embodiment of said method.
Please refer to Fig. 5, it is the schematic diagram of the request unit embodiment of the business processing of the application.Because device embodiment is substantially similar to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.The device embodiment of following description is only schematic.
The request unit of a kind of business processing of the present embodiment, comprising:
First generation unit 501, performs identifier for the program generator for sending business processing request;
Transmitting element 503, for sending the described business processing request of corresponding described first specific transactions to the system of execution first specific transactions; Described business processing request comprises described program and performs identifier.
Optionally, the specific transactions belonging to program sending described business processing request is the second specific transactions, and described device also comprises:
Receiving element, for receiving the business processing request of described second specific transactions of correspondence that upper level called side sends;
Second generation unit, if both do not comprised the program execution identifier that described upper level called side generates in advance in the business processing request for described second specific transactions of described correspondence, also not comprising the transaction identifier that described upper level called side generates in advance, is then the transaction identifier of corresponding described second specific transactions of execution generation of described second specific transactions;
Performance element, performs described second specific transactions for the business processing request according to described second specific transactions of described correspondence, and this of corresponding described second specific transactions performs generation business processing log information; Described business processing log information is identified by the transaction identifier of described second specific transactions of described correspondence.
The embodiment of the present application additionally provides a kind of diary record system, and as shown in Figure 6, this system comprises the request unit 602 of log recording apparatus 601 described in above-described embodiment and business processing.Described log recording apparatus is deployed in server usually, but is not limited to server, also can be any equipment that can realize described log recording method; Namely the request unit of described business processing can be deployed in the terminal device such as mobile communication equipment, PC, PAD, iPad, can also be deployed in server.Such as, the request unit of business processing is disposed on a third party application server, identifier can be performed for the program generator sending business processing request, and the business processing request of corresponding specific transactions is sent to the system performing specific transactions, wherein business processing request comprises program execution identifier; Log recording apparatus is deployed on the server of execution specific transactions, the business processing request of the corresponding specific transactions that called side sends can be received, and the program that third-party application server business processing request comprised generates in advance performs identifier, corresponding transaction identifier is performed as with this of specific transactions, and when performing specific transactions, this of corresponding specific transactions performs the business processing log information producing and identified by this transaction identifier.
The log recording method that the application provides, the requesting method of business processing and related device and system, by receiving the business processing request of corresponding specific transactions that called side sends, and the program called side that business processing request comprises generated in advance performs identifier performs corresponding transaction identifier as with this of specific transactions; When performing specific transactions, this of corresponding specific transactions performs the business processing log information producing and identified by transaction identifier, make it possible to program be performed the associate field of identifier as the log information of same issued transaction between called side and called side, thus in the issued transaction of cross-system, easily each system log message relevant for same issued transaction is associated, thus be convenient to the various problems of following the tracks of in this transaction process.
Although the application with preferred embodiment openly as above; but it is not for limiting the application; any those skilled in the art are not departing from the spirit and scope of the application; can make possible variation and amendment, the scope that therefore protection domain of the application should define with the application's claim is as the criterion.
In one typically configuration, computing equipment comprises one or more processor (CPU), input/output interface, network interface and internal memory.
Internal memory may comprise the volatile memory in computer-readable medium, and the forms such as random access memory (RAM) and/or Nonvolatile memory, as ROM (read-only memory) (ROM) or flash memory (flashRAM).Internal memory is the example of computer-readable medium.
1, computer-readable medium comprises permanent and impermanency, removable and non-removable media can be stored to realize information by any method or technology.Information can be computer-readable instruction, data structure, the module of program or other data.The example of the storage medium of computing machine comprises, but be not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic RAM (DRAM), the random access memory (RAM) of other types, ROM (read-only memory) (ROM), Electrically Erasable Read Only Memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc ROM (read-only memory) (CD-ROM), digital versatile disc (DVD) or other optical memory, magnetic magnetic tape cassette, tape magnetic rigid disk stores or other magnetic storage apparatus or any other non-transmitting medium, can be used for storing the information can accessed by computing equipment.According to defining herein, computer-readable medium does not comprise non-temporary computer readable media (transitorymedia), as data-signal and the carrier wave of modulation.
2, it will be understood by those skilled in the art that the embodiment of the application can be provided as method, system or computer program.Therefore, the application can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the application can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code.

Claims (23)

1. a log recording method, is characterized in that, comprising:
Receive the business processing request of the corresponding specific transactions that called side sends;
The program that the described called side that described business processing request comprises generated in advance performs identifier, performs corresponding transaction identifier as with this of described specific transactions;
Perform described specific transactions, and this of corresponding described specific transactions performs the business processing log information producing and identified by described transaction identifier.
2. log recording method according to claim 1, is characterized in that, the described specific transactions of described execution comprises:
Before the subroutine that the described specific transactions of execution comprises, be that the program of the corresponding described subroutine of execution generation of described subroutine performs identifier;
Perform described subroutine, and the log information of the initial execution of execution generating subroutine of corresponding described subroutine and subroutine stop the log information of execution; The log information that the log information of the initial execution of described subroutine and subroutine stop performing performs identifier common ID by the described program of described transaction identifier and the described subroutine of correspondence.
3. log recording method according to claim 2, is characterized in that, the execution of described subroutine needs to call next stage specific transactions;
Accordingly, the described subroutine of described execution comprises:
The business processing request of corresponding described next stage specific transactions is sent to the system performing described next stage specific transactions; The described program that the request of described next stage business processing comprises corresponding described subroutine performs identifier.
4. log recording method according to claim 1, is characterized in that, described specific transactions comprises WebService application program.
5. log recording method according to claim 4, is characterized in that, the described program that described business processing request comprises performs identifier and is stored in SOAP header file.
6. log recording method according to claim 1, is characterized in that, after the business processing request of the corresponding specific transactions of described reception called side transmission, also comprises:
Verify whether described called side has the right to ask described specific transactions.
7. log recording method according to claim 1, is characterized in that, after the business processing request of the corresponding specific transactions of described reception called side transmission, also comprises:
From described business processing request, obtain described program perform identifier, and bind it to the thread performing described specific transactions.
8. log recording method according to claim 1, it is characterized in that, if the program both not comprised described called side in described business processing request performs identifier, called side transaction identifier is not comprised yet, then after the business processing request of the corresponding specific transactions of described reception called side transmission, also comprise:
Execution for described specific transactions generates described transaction identifier.
9. log recording method according to claim 8, is characterized in that, described transaction identifier generates according at least one of the identifier of the IP address of described called side, the rise time of described transaction identifier and described business processing request.
10. the log recording method according to claim 1-9 any one, is characterized in that, the rise time that described program performs the program name and described program execution identifier that identifier performs program corresponding to identifier according to described program generates.
11. 1 kinds of log recording apparatus, is characterized in that, comprising:
Receiving element, for receiving the business processing request of the corresponding specific transactions that called side sends;
Setting unit, program that the described called side for described business processing request being comprised generates in advance performs identifier, performs corresponding transaction identifier as with this of described specific transactions;
Performance element, for performing described specific transactions, and this of corresponding described specific transactions performs the business processing log information producing and identified by described transaction identifier.
12. log recording apparatus according to claim 11, is characterized in that, described performance element comprises:
Generating subelement, for before performing the subroutine that comprises of described specific transactions, is that the program that the execution of described subroutine generates corresponding described subroutine performs identifier;
Subroutine performs subelement, and for performing described subroutine, and the log information of the initial execution of execution generating subroutine of corresponding described subroutine and subroutine stop the log information of execution; The log information that the log information of the initial execution of described subroutine and subroutine stop performing performs identifier common ID by the described program of described transaction identifier and the described subroutine of correspondence.
13. log recording apparatus according to claim 12, is characterized in that, the execution of described subroutine needs to call next stage specific transactions;
Accordingly, described subroutine execution subelement comprises:
Request subelement, for sending the business processing request of corresponding described next stage specific transactions to the system performing described next stage specific transactions; The described program that the request of described next stage business processing comprises corresponding described subroutine performs identifier.
14. log recording apparatus according to claim 11, is characterized in that, also comprise:
Authentication unit, for verifying whether described called side has the right to ask described specific transactions.
The requesting method of 15. 1 kinds of business processing, is characterized in that, comprising:
For the program generator sending business processing request performs identifier;
System to execution first specific transactions sends the described business processing request of corresponding described first specific transactions; Described business processing request comprises described program and performs identifier.
The requesting method of 16. business processing according to claim 15, is characterized in that, described program performs identifier performs identifier rise time generation according to the program name of the program of its correspondence and described program.
The requesting method of 17. business processing according to claim 15, is characterized in that, the specific transactions belonging to program sending described business processing request is the second specific transactions, and described method also comprises:
Receive the business processing request of described second specific transactions of correspondence that upper level called side sends;
If both do not comprised the program execution identifier that described upper level called side generates in advance in the business processing request of described second specific transactions of described correspondence, also not comprising the transaction identifier that described upper level called side generates in advance, is then the transaction identifier of corresponding described second specific transactions of execution generation of described second specific transactions;
Business processing request according to described second specific transactions of described correspondence performs described second specific transactions, and this of corresponding described second specific transactions performs generation business processing log information; Described business processing log information is identified by the transaction identifier of described second specific transactions of described correspondence.
The requesting method of 18. business processing according to claim 17, it is characterized in that, the transaction identifier of described second specific transactions of described correspondence generates according at least one of the identifier of the rise time of the transaction identifier of the IP address of described upper level called side, described second specific transactions of described correspondence and the business processing request of described second specific transactions of described correspondence.
The requesting method of 19. business processing according to claim 15, is characterized in that, described first specific transactions comprises WebService application program.
The requesting method of 20. business processing according to claim 19, is characterized in that, the described program that described business processing request comprises performs identifier and is stored in SOAP header file.
The request unit of 21. 1 kinds of business processing, is characterized in that, comprising:
First generation unit, performs identifier for the program generator for sending business processing request;
Transmitting element, for sending the described business processing request of corresponding described first specific transactions to the system of execution first specific transactions; Described business processing request comprises described program and performs identifier.
The request unit of 22. business processing according to claim 21, is characterized in that, the specific transactions belonging to program sending described business processing request is the second specific transactions, and described device also comprises:
Receiving element, for receiving the business processing request of described second specific transactions of correspondence that upper level called side sends;
Second generation unit, if both do not comprised the program execution identifier that described upper level called side generates in advance in the business processing request for described second specific transactions of described correspondence, also not comprising the transaction identifier that described upper level called side generates in advance, is then the transaction identifier of corresponding described second specific transactions of execution generation of described second specific transactions;
Performance element, performs described second specific transactions for the business processing request according to described second specific transactions of described correspondence, and this of corresponding described second specific transactions performs generation business processing log information; Described business processing log information is identified by the transaction identifier of described second specific transactions of described correspondence.
23. 1 kinds of diary record systems, is characterized in that, comprising: the log recording apparatus according to the claims 11; And the request unit of business processing according to claim 21.
CN201510649462.0A 2015-10-09 2015-10-09 A kind of log recording method, apparatus and system Active CN105260292B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510649462.0A CN105260292B (en) 2015-10-09 2015-10-09 A kind of log recording method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510649462.0A CN105260292B (en) 2015-10-09 2015-10-09 A kind of log recording method, apparatus and system

Publications (2)

Publication Number Publication Date
CN105260292A true CN105260292A (en) 2016-01-20
CN105260292B CN105260292B (en) 2018-06-29

Family

ID=55099992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510649462.0A Active CN105260292B (en) 2015-10-09 2015-10-09 A kind of log recording method, apparatus and system

Country Status (1)

Country Link
CN (1) CN105260292B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502874A (en) * 2016-10-26 2017-03-15 南京途牛科技有限公司 A kind of call chain tracking
CN107180060A (en) * 2016-03-11 2017-09-19 北京京东尚科信息技术有限公司 The output intent and daily record output device of log information
CN108173706A (en) * 2017-11-29 2018-06-15 阿里巴巴集团控股有限公司 Service marker method, apparatus and equipment under a kind of multiservice system
CN108733698A (en) * 2017-04-19 2018-11-02 腾讯科技(深圳)有限公司 A kind of processing method and background service system of log information
CN109474669A (en) * 2018-10-19 2019-03-15 杭州安恒信息技术股份有限公司 A kind of correlating method of the Internet application system of high-accuracy
CN109933412A (en) * 2019-01-28 2019-06-25 武汉慧联无限科技有限公司 Distributed transaction processing method based on distributed message middleware
CN110619227A (en) * 2019-09-12 2019-12-27 北京浪潮数据技术有限公司 Audit log management method, device, equipment and readable storage medium
CN110727567A (en) * 2019-09-09 2020-01-24 平安证券股份有限公司 Software quality detection method and device, computer equipment and storage medium
CN113268401A (en) * 2021-06-16 2021-08-17 中移(杭州)信息技术有限公司 Log information output method and device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101646160A (en) * 2009-06-24 2010-02-10 中国联合网络通信集团有限公司 Method for browsing blog content and business processing device thereof
US20120216133A1 (en) * 2010-08-20 2012-08-23 Overtis Group Limited Secure cloud computing system and method
CN104156300A (en) * 2013-05-14 2014-11-19 利德科技发展有限公司 Log management system and log management method
CN104346365A (en) * 2013-07-30 2015-02-11 阿里巴巴集团控股有限公司 Device and method for determining specific service associated logs

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101646160A (en) * 2009-06-24 2010-02-10 中国联合网络通信集团有限公司 Method for browsing blog content and business processing device thereof
US20120216133A1 (en) * 2010-08-20 2012-08-23 Overtis Group Limited Secure cloud computing system and method
CN104156300A (en) * 2013-05-14 2014-11-19 利德科技发展有限公司 Log management system and log management method
CN104346365A (en) * 2013-07-30 2015-02-11 阿里巴巴集团控股有限公司 Device and method for determining specific service associated logs

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107180060A (en) * 2016-03-11 2017-09-19 北京京东尚科信息技术有限公司 The output intent and daily record output device of log information
CN106502874B (en) * 2016-10-26 2019-05-10 南京途牛科技有限公司 A kind of call chain tracking
CN106502874A (en) * 2016-10-26 2017-03-15 南京途牛科技有限公司 A kind of call chain tracking
CN108733698B (en) * 2017-04-19 2023-08-08 腾讯科技(深圳)有限公司 Log message processing method and background service system
CN108733698A (en) * 2017-04-19 2018-11-02 腾讯科技(深圳)有限公司 A kind of processing method and background service system of log information
WO2019105138A1 (en) * 2017-11-29 2019-06-06 阿里巴巴集团控股有限公司 Service marking method, apparatus and device under multi-service system
CN108173706A (en) * 2017-11-29 2018-06-15 阿里巴巴集团控股有限公司 Service marker method, apparatus and equipment under a kind of multiservice system
CN109474669A (en) * 2018-10-19 2019-03-15 杭州安恒信息技术股份有限公司 A kind of correlating method of the Internet application system of high-accuracy
CN109933412A (en) * 2019-01-28 2019-06-25 武汉慧联无限科技有限公司 Distributed transaction processing method based on distributed message middleware
CN110727567A (en) * 2019-09-09 2020-01-24 平安证券股份有限公司 Software quality detection method and device, computer equipment and storage medium
CN110727567B (en) * 2019-09-09 2024-02-02 平安证券股份有限公司 Method, device, computer equipment and storage medium for detecting software quality
CN110619227A (en) * 2019-09-12 2019-12-27 北京浪潮数据技术有限公司 Audit log management method, device, equipment and readable storage medium
CN113268401A (en) * 2021-06-16 2021-08-17 中移(杭州)信息技术有限公司 Log information output method and device and computer readable storage medium
CN113268401B (en) * 2021-06-16 2022-10-04 中移(杭州)信息技术有限公司 Log information output method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN105260292B (en) 2018-06-29

Similar Documents

Publication Publication Date Title
CN105260292A (en) Log recording method, apparatus and system
CN109478149B (en) Access services in a hybrid cloud computing system
CN109479062B (en) Usage tracking in hybrid cloud computing systems
CN109995523B (en) Activation code management method and device and activation code generation method and device
CN111355720B (en) Method, system and equipment for accessing intranet by application and computer storage medium
CN110032846B (en) Identity data anti-misuse method and device and electronic equipment
CN110309669B (en) Data labeling method, device and equipment
CN111861481A (en) Block chain account checking method and system
CN108040090A (en) A kind of system combination method of more Web
CN113220640B (en) Arbitration method and device based on block chain
CN107239475B (en) File calling method and device
CN115834443A (en) Flow playback method and device, computer equipment and storage medium
CN112434347B (en) Rental business processing method, device, equipment and system
CN110989984B (en) Data processing method, device and system
CN113987035A (en) Block chain external data access method, device, system, equipment and medium
CN111970286A (en) User login method and device and web server
CN106528423B (en) Dynamic journal recording method and device
CN115964193B (en) Service calling method, computer equipment and storage medium for grid environment application
CN111369246A (en) Calling authentication method and device of intelligent contract, electronic equipment and storage medium
US9608854B2 (en) Method and system for automatic execution of scripts on remote agent-less client machines
CN112257047B (en) Safety control method, device, equipment and medium for data sharing platform
CN115729593A (en) Request status code processing method and device, electronic equipment and storage medium
CN114363387A (en) Application pull-alive method and device, electronic equipment and storage medium
Javaid Testing of Android testing tools: development of a benchmark for the evaluation
CN117436050A (en) Big data component management method, device, equipment and storage medium

Legal Events

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