Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this
Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described
Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual,
Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
The determination that passed through code link is executed to solve business in the prior art depends on the subjectivity of analysis personnel
Judgement, thus the problem of inevitably occurring omitting or mistake, then also just will affect the accuracy of business diagnosis result, this specification
Embodiment provides a kind of generation method of code link for business diagnosis, is determined with realizing according to data on true line
Business executes passed through code link, further increases the subsequent accuracy that business diagnosis is carried out based on code link.It is as follows,
Following embodiments are shown to be illustrated this method:
Referring to Figure 1, a kind of code link for business diagnosis provided for one exemplary embodiment of this specification
The embodiment flow chart of generation method, method includes the following steps:
Step 102: receiving the service request from client.
Step 104: processing business request, and obtain the tune for the class called during handling the service request
With sequence, the method name of class name and its method for including.
Step 106: obtaining handling the generation that the service request is passed through according to the calling of class sequence, class name and method name
Code link.
It is as follows, step 102 to step 106 is illustrated:
In this specification embodiment, during the service request that processing step 102 receives, business can be monitored
The class that system is called then can use JAVA emission mechanism whenever monitoring that operation system calls a class, such as using
JAVA blocker obtains the class name of the called class, the method name for the method for including with such.It later, can be suitable according to obtaining
Sequence, the class name that will acquire and method name are written in a pre-set ordered list, for example, can be often to get a class
The class name method that includes with such method name, then the class name that can be will acquire and method name are written in the ordered list.
It is handled by this kind, then each successively called during recording the processing service request by ordered list may be implemented
Class calling sequence, class name, and its including method method name.
As an example it is assumed that ClassA, ClassB, ClassC are successively had invoked during processing business is requested,
ClassD, ClassE, ClassF, by as above handling, obtained ordered list can be as described in Table 1:
Table 1
ClassA |
ClassB |
ClassC |
ClassD |
ClassF |
ClassE |
It should be noted that in table 1 above, illustrate only the class name of called class, the actually ordered list
In the also record method that there is class to include method name, this specification do not remake example to this.
It is subsequent, in step 106, then can based on class recorded in ordered list exemplified by table 1 calling sequence,
Class name and method name obtain handling the code link that the service request is passed through, for example, as shown in Fig. 2, requesting for processing business
A kind of example of the code link passed through, code link exemplified by Fig. 2 are as follows:
Class A Method A>>Class A Method B>>Class B Method C>>Class C Method
D>>Class C Method E>>Class A Method A>>Class A Method B
In addition, in this specification embodiment, it is contemplated that when processing belongs to the service request of same type of service, passed through
Code link it is consistent, to get in the service request for being directed to a type of service and handle generation for being passed through of the service request
After code link, can in the corresponding relationship of code link for type of service belonging to the service request being locally stored with getting,
It is handled by this kind, subsequent reprocessing may be implemented when belonging to the service request of the same type of service, can be not repeated to obtain
It takes and handles the code link that the service request is passed through, to effectively save computing resource.
In one embodiment, characteristic dimension included by service request can be extracted, according to the feature dimensions extracted
It spends and determines that the type of service is known as target service type for convenience by type of service belonging to the service request.Citing
For, it is assumed that client initiates one for transferring accounts from bank card to the service request of Yuebao, then, which is wrapped
The characteristic dimension included are as follows: bank card is transferred accounts, Yuebao, and the target service type determined based on this feature dimension can be
" bank card is transferred accounts to Yuebao ";Again as an example it is assumed that client initiates one for transferring accounts from Yuebao to bank card
Service request, then, characteristic dimension included by the service request are as follows: Yuebao is transferred accounts, bank card, and this feature dimension is based on
The target service type determined can be " Yuebao is transferred accounts to bank card ".
As can be seen from the above description, although characteristic dimension included by service request is identical, put in order difference,
Affiliated target service type is not also just identical.
In one embodiment, after getting ordered list exemplified by above-mentioned table 1, which can be breathed out
Uncommon operation, obtains a cryptographic Hash, the cryptographic Hash then can one processing business of unique identification request passed through code link, base
In this, the code link can be stored to realize in the form of the cryptographic Hash is locally stored.Due in ordered list record have it is more
The class name of a class, and method name, and cryptographic Hash then only takes up limited byte number, to be handled by this kind, can effectively save
Save storage resource.
Based on foregoing description, in this specification embodiment, after determining target service type belonging to service request,
The target service type can be searched in the corresponding relationship of the type of service and cryptographic Hash that are locally stored first, if not finding
The target service type, then the code link that available processing service request is passed through;Conversely, if finding the target industry
Service type can then be not repeated that acquisition handles the code link that the service request is passed through.
It can be that each type of service for being locally stored is corresponding with cryptographic Hash in addition, in this specification embodiment
An existence duration is arranged in relationship, for example, the existence duration with " day " is that unit counts, then, from the correspondence is being locally stored
From at the time of relationship, every other day, then the duration that can survive to it is done plus 1 processing (initial value of existence duration is 0), when the life
It deposits duration and reaches preset life duration threshold value, such as when 30, then it can be by the corresponding relationship from local deletion.At this kind
Reason, can be effectively ensured the real-time and accuracy of code link.
In addition, in this specification embodiment, obtain processing business request by code link after, can be according to this
Code link statistics obtain some index values, for example, statistics obtains number, the call number for the class that the code link calls
Most class, etc. carries out business diagnosis to analyze personnel according to those index values.
Technical solution provided by this specification embodiment, by receiving the service request from client, processing business
Request, and obtaining during handle the service request, the calling of the class called sequentially, class name and it include
The method name of method obtains handling the code chain that the service request is passed through according to the calling of class sequence, class name and method name
Road, since finally obtained code link is determined by operation data true on line, so that the code link is accurate
Property it is higher, further can also improve it is subsequent based on code link carry out business diagnosis accuracy.
Corresponding to above method embodiment, this specification embodiment also provides a kind of code link for business diagnosis
Generating means, a kind of shown in Figure 3, the code link for business diagnosis provided for one exemplary embodiment of this specification
Generating means embodiment block diagram, the apparatus may include: receiving module 31, obtain module 32 and Link determination module
33。
In one embodiment, receiving module 31 can be used for receiving the service request from client;
Module 32 is obtained, can be used for handling the service request, and obtain during handling the service request,
Calling sequence, the method name of class name and its method for including for the class called;
Link determination module 33 can be used for obtaining processing institute according to calling sequence, class name and the method name of the class
State the code link that service request is passed through.
In one embodiment, the acquisition module 32 may include (being not shown in Fig. 3):
First acquisition submodule, for during handle the service request, whenever monitoring operation system calling
When one class, then the method name for the method that the class name of the class includes with it is obtained using JAVA reflection mechanism;
Submodule is written, preset ordered list is written in the class name and method name for will acquire according to acquisition sequence
In.
In one embodiment, described device can also include (being not shown in Fig. 3):
Extraction module, the characteristic dimension for including for extracting the service request;
Determination type module, for according to the characteristic dimension extracted determine the service request belonging to target service
Type;
Computing module obtains the code that the service request is passed through for carrying out Hash operation to the ordered list
The cryptographic Hash of link;
Memory module, in the code link for being locally stored the target service type and the service request is passed through
Cryptographic Hash corresponding relationship.
In one embodiment, the acquisition module 32 may include (being not shown in Fig. 3):
Search submodule, pair of type of service and cryptographic Hash for being locally stored according to the target service type search
It should be related to;
Second acquisition submodule, if obtaining and being asked in the processing business for not finding the target service type
During asking, calling sequence, the method name of class name and its method for including of the class called.
It is understood that receiving module 31, acquisition module 32 and Link determination module 33 are used as three kinds of functional independences
Module, both can as shown in Figure 3 simultaneously configuration in a device, can also individually configure in a device, therefore shown in Fig. 3
Structure should not be construed as the restriction to this specification example scheme.
In addition, the function of modules and the realization process of effect are specifically detailed in the above method corresponding step in above-mentioned apparatus
Rapid realization process, details are not described herein.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in
On reservoir and the computer program that can run on a processor, wherein processor realizes one kind above-mentioned when executing described program
The generation method of code link for business diagnosis.This method includes at least: receiving the service request from client;Processing
The service request, and obtain during handling the service request, the calling sequence for the class called, class name, with
And its including method method name;It obtains handling the business according to the calling of class sequence, class name and method name and ask
Seek passed through code link.
Fig. 4 show one kind provided by this specification embodiment more specifically service server hardware configuration signal
Figure, which may include: processor 410, memory 420, input/output interface 430, communication interface 440 and bus 450.
Wherein processor 410, memory 420, input/output interface 430 and communication interface 440 pass through between the realization of bus 450
Communication connection inside equipment.
Processor 410 can use general CPU (Central Processing Unit, central processing unit), micro process
Device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one or
The modes such as multiple integrated circuits are realized, for executing relative program, to realize technical solution provided by this specification embodiment.
Memory 420 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 420 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 420, and execution is called by processor 410.
Input/output interface 430 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 440 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 450 includes an access, in various components (such as the processor 410, memory 420, input/output of equipment
Interface 430 and communication interface 440) between transmit information.
It should be noted that although above equipment illustrates only processor 410, memory 420, input/output interface
430, communication interface 440 and bus 450, but in the specific implementation process, which can also include realizing to operate normally
Necessary other assemblies.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising realizing in above equipment
Component necessary to this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
A kind of generation method of code link for business diagnosis above-mentioned is realized when sequence is executed by processor.This method is at least wrapped
It includes: receiving the service request from client;The service request is handled, and is obtained in the process for handling the service request
In, calling sequence, the method name of class name and its method for including of the class called;According to the calling of class sequence,
Class name and method name obtain handling the code link that the service request is passed through.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description
Module may or may not be physically separated, can be each module when implementing this specification example scheme
Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or
Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor
Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.