Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, this method may include following the embodiment of the invention provides a kind of processing method of service request
Step:
Step 101: receiving service request, wherein include: type identification, current external odd numbers in service request.
It may include type identification, current external odd numbers, any one in business information or more in creation type service request
Kind.For example, user places an order in operation system A buys commodity B, the order number that operation system A is supplied to user is current external
Odd numbers.Creation type service request can be payment request, registration request etc..
May include in dependent form service request type identification, current external odd numbers, current internal odd numbers, in business information
Any one or more.Current internal odd numbers is corresponding with current external odd numbers.Dependent form service request can be refund request.
For example, user has purchased commodity B in operation system A (electric business platform), operation system A generates order number 001.The party
What method received operation system A transmission includes the creation type service request of order number 001, and determines that payment odd numbers is 002.
At this point, order number 001 is above-mentioned current external odd numbers.
When user retracts commodity B, what this method received operation system A transmission includes order number 001 and payment odd numbers 002
Dependent form service request.
At this point, order number 001 is above-mentioned current external odd numbers, payment odd numbers 002 is above-mentioned current internal odd numbers.
It should be noted that creation type service request refer to needing not rely on before business and the service request that generates,
And dependent form service request is generated based on existing business before.
Step 102: according to type identification, determining the type of service request.
The type of service request includes: creation type service request, and/or, dependent form service request.
Step 103: when the corresponding relationship that service request is creation type service request, the external odd numbers of storage and internal odd numbers
In be not present current external odd numbers when, service request is routed in new business system, and generate current internal odd numbers, storage is worked as
The corresponding relationship of preceding external odd numbers and current internal odd numbers.
" current external odd numbers is not present in the corresponding relationship of external odd numbers and internal odd numbers " refer to external odd numbers with it is interior
The corresponding relationship comprising current external odd numbers is not present in the corresponding relationship of portion's odd numbers.
When the type of service request be creation type when, illustrate the corresponding business of the service request be it is new, independent of it
His business can cut and flow in new business system.In embodiments of the present invention, current internal odd numbers is opposite with new business system
It answers.For creation type service request, above-mentioned payment odd numbers 002 is current internal odd numbers.
Current internal account can be identified for that the operation system of the corresponding service request of processing current external account.
This method passes through the corresponding relationship for storing external odd numbers and internal odd numbers, in the feelings for the work for not stopping operation system
Under condition, creation type service request is cut and flow to new business system, can guaranteed the availability of service, promote the experience of user.Together
When, the creation type service request that this method can guarantee that counterweight recurrence is sent carries out consistent processing, guarantees the quality of business service.
In one embodiment of the invention, in order to which the creation type service request for guaranteeing that counterweight recurrence is sent carries out consistent place
Reason, this method further include:
A1: current when existing in the corresponding relationship that service request is creation type service request, external odd numbers and internal odd numbers
When external odd numbers, according to the corresponding internal odd numbers of current external odd numbers, corresponding first operation system of service request is determined.
For creation type service request, when there are current external odd numbers in the corresponding relationship of external odd numbers and internal odd numbers
When, illustrate that the creation type service request has been processed once, creation type service request recurrence of attaching most importance to is sent, and the request is executed
Operation system should be consistent with predetermined operation system.Certainly, the creation type service request for repeating to send
Or dependent form service request, it can also refuse to execute, and prompt the creation type service request or dependent form service request is
It repeats to send.
A2: service request is routed to the first operation system;Wherein, the first operation system is new business system, or, old trade
Business system.
In one embodiment of the invention, this method further include: when service request is dependent form service request, determine
It whether there is current external odd numbers in the corresponding relationship of external odd numbers and internal odd numbers, if not, service request is routed to old
In operation system.
For dependent form service request, when there is no current external accounts in the corresponding relationship of external odd numbers and internal odd numbers
When, illustrate that the interior business that the dependent form service request is relied on should be more early pre-treatment, that is to say, that current internal
Account is relatively early generation before, it is believed that there is not yet new business system at that time.
In one embodiment of the invention, in order to which the dependent form service request for guaranteeing that counterweight recurrence is sent carries out consistent place
Reason, this method further include:
B1: when service request is dependent form service request, the corresponding relationship of the external odd numbers and internal odd numbers is determined
In whether there is the current external odd numbers, if so, determining service request according to the corresponding internal odd numbers of current external odd numbers
Corresponding second operation system.
For dependent form service request, when there are current external odd numbers in the corresponding relationship of external odd numbers and internal odd numbers
When, illustrate that the dependent form service request has been processed, dependent form service request recurrence of attaching most importance to is sent, and the industry of the request is executed
Business system should be consistent with predetermined operation system.
B2: service request is routed to the second operation system;Wherein, the second operation system is new business system, or, old trade
Business system.
It should be noted that the current internal odd numbers that can also be carried according to it is directly true for dependent form service request
Fixed second operation system, without according to the external odd numbers of storage and the corresponding relationship of internal odd numbers.
In one embodiment of the invention, in order to guarantee that new business system and the realization of old service system smoothly cut stream,
It prevents the flow of incision is excessive from causing new business system unstable, service request is routed in new business system, comprising:
The service request of first quantity in several service requests is routed in new business system, it will be in several service requests
The service request of second quantity is routed in old service system;Wherein, the first quantity and the second quantity, which meet, preset cuts stream ratio
Example.
It, can be according to the operating condition of new business system and old service system, to cutting stream ratio in practical application scene
Dynamically adjusted.It can also be according to cutting stream ratio, it is determined whether route to service request in new business system.
In one embodiment of the invention, it is docked to realize with new business system, the smooth of old service system, by industry
Business request is routed in new business system, comprising:
According to preset access way, service request is routed in new business system;Wherein, include: in access way
(Hyper Text Transfer Protocol surpasses by RPC (Remote Procedure Call, remote procedure call), HTTP
Text transfer protocol) and HTTPS (Hypertext Transfer Protocol Secure, Hyper text transfer security protocol) in
Any one or more.
Preferably, using RPC, service request is routed in new business system.Using HTTP or HTTPS, business is asked
It asks and is routed in old service system.
As shown in Fig. 2, the processing method of service request will be described in detail in the embodiment of the present invention, this method packet
It includes:
Step 201: receiving service request, wherein include: type identification, current external odd numbers in service request.
Step 202: according to type identification, determine the type of service request, when service request is creation type service request,
Step 203 is executed, when service request is dependent form service request, executes step 206.
In practical application scene, since different types of service request corresponds to different processing logics, to separate
Processing.I.e. creation type service request enters creation type ingress for service, and dependent form service request enters dependent form ingress for service.
Step 203: determining in the external odd numbers of storage and the corresponding relationship of internal odd numbers whether there is current external odd numbers,
If so, executing step 204, otherwise, step 205 is executed.
Step 204: according to the corresponding internal odd numbers of current external odd numbers, determining service request corresponding first business system
System, is routed to the first operation system for service request;Wherein, the first operation system is new business system, or, old service system.
Step 205: service request being routed in new business system, and generates current internal odd numbers, stores current external
The corresponding relationship of odd numbers and current internal odd numbers.
Step 206: determining in the corresponding relationship of external odd numbers and internal odd numbers whether there is current external odd numbers, if
It is to execute step 207, otherwise, executes step 208.
Step 207: according to the corresponding internal odd numbers of current external odd numbers, determining service request corresponding second business system
System;Service request is routed to the second operation system;Wherein, the second operation system is new business system, or, old service system.
Step 208: service request is routed in old service system.
In practical application scene, with the progress for cutting stream process, creation type service request realizes that 100% cuts stream, that is, connects
The creation type service request received all routes in new business system.At this point, since dependent form business is generally asynchronous industry
Business can do of short duration pause processing to dependent form service request.It, can be by old trade when pause handles dependent form service request
All data in business system are converted into the data format of new business system according to mapping ruler, and imported into new business system
In database.
Stream is cut when order creation class business and reaches 100%, and all requests request at this time needs to stop at this time into new system
Only rely on class business.Relying on class business under normal circumstances is all a kind of asynchronous service, such as reimbursement.Since this business is not immediately
Business result can be taken, it is possible to do short-term stopping.Class business will be relied at this time to stop, by all data roots of legacy system
It is converted into the data format of new system according to certain mapping ruler, and imported into the database of new system.Hereafter, it can open again
Begin processing dependent form service request, and all service requests will all route in new business system.
As shown in figure 3, the present invention provides a kind of processing units of service request, comprising:
Traffic ingress unit 301, for receiving service request, wherein include: type identification in service request, current outer
Portion's odd numbers;
Service distributing unit 302, for determining the type of service request according to type identification;
Stream unit 303 is cut, is used to determine external odd numbers and the inside of storage when service request is creation type service request
It whether there is current external odd numbers in the corresponding relationship of odd numbers, if not, service request is routed in new business system, and raw
At current internal odd numbers, the corresponding relationship of current external odd numbers and current internal odd numbers is stored.
In one embodiment of the invention, stream unit 303 is cut, is further used for when service request being that creation type business is asked
Ask, in the corresponding relationship of external odd numbers and internal odd numbers there are when current external odd numbers, according to current external odd numbers it is corresponding in
Portion's odd numbers determines corresponding first operation system of service request;Service request is routed to the first operation system;Wherein, first
Operation system is new business system, or, old service system.
In one embodiment of the invention, stream unit 303 is cut, is further used for when service request being that dependent form business is asked
When asking, determining in the corresponding relationship of external odd numbers and internal odd numbers whether there is current external odd numbers, if not, by service request
It is routed in old service system.
In one embodiment of the invention, stream unit 303 is cut, is further used for when service request being that dependent form business is asked
Ask, in the corresponding relationship of external odd numbers and internal odd numbers there are when current external odd numbers, according to current external odd numbers it is corresponding in
Portion's odd numbers determines corresponding second operation system of service request;Service request is routed to the second operation system;Wherein, second
Operation system is new business system, or, old service system.
In one embodiment of the invention, stream unit 303 is cut, for by the business of the first quantity in several service requests
Request is routed in new business system, and the service request of the second quantity in several service requests is routed in old service system;
Wherein, the first quantity and the second quantity, which meet, preset cuts stream ratio.
In one embodiment of the invention, stream unit 303 is cut, is used for according to preset access way, by service request
It is routed in new business system;It wherein, include: any one or more in RPC, HTTP and HTTPS in access way.
The embodiment of the invention provides a kind of processing equipments of service request, comprising: processor and memory;
Memory for store execute instruction, processor be used for execute memory storage execute instruction to realize above-mentioned
The method of one embodiment.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So
And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker
Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " is patrolled
Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development,
And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed is most generally used at present
Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer
This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages,
The hardware circuit for realizing the logical method process can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing
The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can
Read medium, logic gate, switch, specific integrated circuit (Application Specific Integrated Circuit,
ASIC), the form of programmable logic controller (PLC) and insertion microcontroller, the example of controller includes but is not limited to following microcontroller
Device: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320 are deposited
Memory controller is also implemented as a part of the control logic of memory.It is also known in the art that in addition to
Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic
Controller is obtained to come in fact in the form of logic gate, switch, specific integrated circuit, programmable logic controller (PLC) and insertion microcontroller etc.
Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it
The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions
For either the software module of implementation method can be the structure in hardware component again.
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.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit can be realized in the same or multiple software and or hardware when application.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
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.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence " including one ... ", it is not excluded that including described
There is also other identical elements in the process, method of element, commodity or equipment.
The application can describe in the general context of computer-executable instructions executed by a computer, such as program
Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group
Part, data structure etc..The application can also be practiced in a distributed computing environment, in these distributed computing environments, by
Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with
In the local and remote computer storage media including storage 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 system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art
For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal
Replacement, improvement etc., should be included within the scope of the claims of this application.