Specific implementation mode
Below in conjunction with the attached drawing in this specification embodiment, the technical solution in this specification embodiment is carried out clear
Chu is fully described by, it is clear that described embodiment is only this specification a part of the embodiment, rather than whole implementation
Example.The embodiment of base in this manual, those of ordinary skill in the art are obtained without creative efforts
Every other embodiment, should all belong to this specification protection range.
Also referring to Fig. 1, Fig. 2, Fig. 3, Fig. 4, Fig. 5 and Fig. 6.This specification embodiment provides a kind of data processing system
System.The data processing system may include control server, new business services device and old service server.
In the present embodiment, the control server can be a server, and it includes multiple servers that can also be
Server cluster.The data for carrying account identification that the control server can receive client or other servers are sent
Write request;The corresponding status indicator of the account identification can be obtained;It can be based on the status indicator, the data are write and are asked
It asks and is assigned to new business services device and/or old service server is handled.The client can be movable equipment, such as
Can be smart mobile phone, Flat electronic equipment, portable computer, personal digital assistant (PDA), mobile unit, POS machine or
Intelligent wearable device etc..Alternatively, the client can also be desk device, such as can be television set, server, industrial personal computer
(industrial control computer), personal computer (PC machine), all-in-one machine or intelligent self-service terminal (kiosk) etc..Other services
Device can be the server removed other than the control server, the new business services device and the old service server.Institute
It can be any type of request to state data write request, such as can be Accounting Request or request etc. of withholing.The account mark
Knowledge can be used for identifying account, such as can be cell-phone number or E-mail address etc..
The new business services device can be a server, can also be the server cluster for including multiple servers.
The new business services device can be based on new database and handle data write request.The new business services device can be in the new number
According to executing read and/or write in library.The old service server can be a server, and it includes multiple services that can also be
The server cluster of device.The old service server can be based on old database and handle data write request.The old service service
Device can execute read and/or write in the old database.
In an embodiment of the present embodiment, account information can also be carried in the data write request.It is described
Account information can be used for being credited to the account that the account identification is identified.The account information for example may include fund gold
Volume and order number etc..In the present embodiment, when new business services device handles the data write request, the new business
The account information can be charged to the account that the account identification is identified by server in the new database.In old trade
Described in server process of being engaged in when data write request, the old service server can be in the old database, by the account
Information charges to the account that the account identification is identified.
The data migration process that processing system based on the data introduced below is realized.
In the present embodiment, before data migration process starts, the control server can receive data write request;
Can the data write request old service server be assigned to handle.The old service server can receive institute
State the data write request of control server distribution;It can be based on the old database and handle the data write request.
In the present embodiment, the old database may include account identification and the corresponding account information of account identification.
In this way, the data migration process may include the transition process of the transition process and account information of account identification.It is moved in data
It moves past after journey starts, can first carry out the migration of account identification.Specifically, the old service server can be from the old number
According to obtaining account identification in library;The account identification obtained can be sent to the new business services device.The new business services device
Account identification can be received;The account identification of reception can be created in the new database.After creating an account mark, institute
New business services device is stated to identify for account mark setting first state in the new database.The first state
Mark can be used to indicate that the corresponding account information of account identification is migrated not yet.The first state identifies
" not migrating " etc..Developer can specifically run the first preset application program in the old service server.Described first
Preset application program may be implemented to obtain account identification from the old database after operation.
After account identification transition process stabilization, the migration of account information can be carried out.It should be noted that account here
Family mark transition process stablizes the completion for being not meant to account identification transition process.Such as it is executed in account identification transition process
It can think that account identification transition process is stablized after a period of time.Specifically, the old service server can be from described
Account information and the corresponding account identification of account information are obtained in old database;It can send and obtain to the new business services device
The account information and the corresponding account identification of account information taken.The new business services device can receive account information and account
The corresponding account identification of information of being engaged in;The account information of reception can be charged into account identification and identified in the new database
Account.After account information is charged to the account that account identification is identified, the new business services device can be described new
In database, for the second status indicator of account mark setting.Second status indicator can be used for identifying account identification pair
The account information answered has been migrated.Second status indicator is such as can be " having moved ".Developer specifically can be
The second preset application program is run in the old service server.The second preset application program is after operation, Ke Yishi
Account information and the corresponding account identification of account information are now obtained from the old database.
In the present embodiment, in data migration process, the control server can still receive client or other clothes
The data write request for carrying account identification that business device is sent.In this way, receiving client or what other servers were sent takes
After data write request with account identification, the control server can obtain the corresponding state mark of the account identification
Know;It can be based on the status indicator, determine the service server for handling the data write request;It can be by the data
Write request is assigned to the service server and is handled.
Specifically, the control server can send the account identification to the new business services device.The new industry
Business server can receive the account identification that the control server is sent;The account can be obtained from the new database
Identify corresponding status indicator;The status indicator that can be obtained to the control server feedback.The control server can be with
Reception state identifies;It can be based on the status indicator, determine the service server for handling the data write request;It can be with
The data write request is assigned to the service server to handle.
Specifically, the status indicator be first state identify under conditions of, the control server can will described in
Old service server is determined as the service server for handling the data write request;The data write request can be distributed
It is handled to the old service server.The data that the old service server can receive the control server distribution are write
Request;It can be based on the old database and handle the data write request.In the item that the status indicator is the second status indicator
Under part, the new business services device and the old service server can be determined as handling by the control server simultaneously
The service server of the data write request;The data write request can be assigned to the new business services device and described old
Service server is handled.The old service server can receive the data write request of the control server distribution;It can
The data write request is handled to be based on the old database.The new business services device can receive the control server point
The data write request matched;It can be based on the new database and handle the data write request.In this way, the data processing system can
With in the case where the business service of offer is unaffected, smoothly by the Data Migration in old database to new database.
In an embodiment of the present embodiment, the new business services device is sent receiving the control server
Account identification after, can search in the new database whether there is the account identification;In the new database not
It, can be to the control server feedback for indicating to be not present in the new database under conditions of the account identification
The information of the account identification.The control server can receive described information;The old service server can be determined
For the service server for handling the data write request;The data write request can be assigned to the old service service
Device is handled.The old service server can receive the data write request of the control server distribution;It can be based on institute
It states old database and handles the data write request.It is described new there are under conditions of the account identification in the new database
Service server can obtain the corresponding status indicator of the account identification from the new database;It can be taken to the control
The status indicator that device feedback of being engaged in obtains.
In an embodiment of the present embodiment, the control server can have migration rollback switch, described to move
It is moved back to and gets away pass and can at least have first state and the second state.The first state can be used to indicate that the migration rollback
Switch is closed, and second state can be used to indicate that the migration rollback switch is in open state.In data
After transition process starts, developer can set the state of the migration rollback switch to first state.It is moved in data
During shifting, in order to enable account information of the account identification in new database and the account information in old database keep one
It causes, the control server or other servers can obtain account identification from the new database;It may determine that the account
Mark in the new database corresponding account information in the old database corresponding account information it is whether consistent;If
It is no, prompt message can be sent out.Developer can set the state of the migration rollback switch to the second state in turn.
In this way, in the present embodiment, client is being received or other servers are sent carries account identification
After data write request, the control server can obtain the state of the migration rollback switch.It is opened in the migration rollback
It closes under conditions of first state, the control server can obtain the corresponding status indicator of the account identification.Institute
Migration rollback switch is stated under conditions of the second state, the old service server can be determined as by the control server
Service server for handling the data write request;The data write request can be assigned to the old service server
It is handled.The old service server can receive the data write request of the control server distribution;It can be based on described
The old database processing data write request.In this way, the data processing system can be believed in the account in the new database
Under conditions of account information in breath and the old database is inconsistent, it is still based on the old database and handles the data and write and ask
It asks, so as to avoid causing the business result of mistake.
In an embodiment of the present embodiment, the control server can have migration end switch, described to move
First state and the second state can at least be had by moving end switch.The first state can be used to indicate that the migration terminates
Switch is closed, and second state can be used to indicate that the migration end switch is in open state.In data
After transition process starts, developer can set the state of the migration end switch to first state.It is moved in data
After moving past journey completion, developer can set the state of the migration end switch to the second state.
In this way, after receiving client or what other servers were sent carry the data write request of account identification,
The control server can obtain the state of the migration end switch.It is in first state in the migration end switch
Under the conditions of, the control server can obtain the corresponding status indicator of the account identification.At the migration end switch
Under conditions of the second state, the new business services device can be determined as handling the data by the control server
The service server of write request;Can the data write request new business services device be assigned to handle.It is described new
Service server can receive the data write request of the control server distribution;It can be based on described in new database processing
Data write request.
In an embodiment of the present embodiment, in data migration process, the control server can still receive
The account creation request that client or other servers are sent.In this way, the control server can have account creation switch.
The account creation switch can at least have first state and the second state.The first state can be used to indicate that the account
Family creates switch and is closed, and second state can be used to indicate that the account creation switch is in open state.
After data migration process starts, developer can set the state that the account creation switchs to first state.
After account information transfer process is stablized, developer can set the state that the account creation switchs to the second state.
It should be noted that account information transfer process stablizes the completion for being not meant to account information transfer process here.Such as
Account information transfer process can think that account information transfer process is stablized after executing a period of time.
In this way, after receiving client or account creation request that other servers are sent, the control server
The state of the account creation switch can be obtained.Under conditions of account creation switch is in first state, the control
The account creation request can be assigned to the old service server and handled by control server.The old service server
The account creation request that the control server is sent can be received;Mark can be created an account in the old database.
Under conditions of the second state, the control server can distribute the account creation request account creation switch
It is handled to the new business services device.The new business services device can receive the account wound that the control server is sent
Build request;Mark can be created an account in the new database.After creating an account mark, the new business services device can
In the new database, to be identified for the account mark setting third state.The third state mark can be used to indicate that
Account identification is individually created in new database.The third state mark is such as can be " new to create ".
In the present embodiment, the corresponding status indicator of account identification can be first state mark in the new database
Know, the second status indicator or the third state identify.In this way, the control server can be sent to the new business services device
The account identification.The new business services device can receive the account identification that the control server is sent;It can be from described
The corresponding status indicator of the account identification is obtained in new database;The state mark that can be obtained to the control server feedback
Know.The control server can be identified with reception state;It can be based on the status indicator, determination is write for handling the data
The service server of request;Can the data write request service server be assigned to handle.
Specifically, the status indicator be first state identify under conditions of, the control server can will described in
Old service server is determined as the service server for handling the data write request;The data write request can be distributed
It is handled to the old service server.The data that the old service server can receive the control server distribution are write
Request;It can be based on the old database and handle the data write request.In the item that the status indicator is the second status indicator
Under part, the new business services device and the old service server can be determined as handling by the control server simultaneously
The service server of the data write request;The data write request can be assigned to the new business services device and described old
Service server is handled.The old service server can receive the data write request of the control server distribution;It can
The data write request is handled to be based on the old database.The new business services device can receive the control server point
The data write request matched;It can be based on the new database and handle the data write request.It is third shape in the status indicator
Under conditions of state mark, the new business services device can be determined as writing for handling the data asking by the control server
The service server asked;Can the data write request new business services device be assigned to handle.The new business
Server can receive the data write request of the control server distribution;It can be based on the new database and handle the data
Write request.
Please refer to Fig. 6 and Fig. 7.This specification embodiment provides a kind of data processing method.The data processing method with
Control server is executive agent, be may comprise steps of.
Step S10:Receive data write request.
In the present embodiment, the data write request can be any type of request, such as can be Accounting Request or
Withhold request etc..Account identification can be carried in the data write request.The account identification can be used for identifying account,
Such as can be cell-phone number or E-mail address etc..The data write request can be that client or other servers are sent.
In an embodiment of the present embodiment, account information can also be carried in the data write request.It is described
Account information can be used for being credited to the account that the account identification is identified.The account information for example may include fund gold
Volume and order number.
Step S12:Obtain the corresponding status indicator of the account identification.
In the present embodiment, the control server can send the account identification to the new business services device.Institute
The account identification that the control server is sent can be received by stating new business services device;The account can be obtained from new database
Family identifies corresponding status indicator;The status indicator that can be obtained to the control server feedback.The control server can
To receive the status indicator.
Step S14:Based on the status indicator, the service server for handling the data write request is determined.
Step S16:The data write request is assigned to the service server to handle.
In the present embodiment, the status indicator that the control server receives can be first state mark, the second state
Mark or third state mark.About the detailed of first state mark, the second status indicator and third state mark
Thin introduce may refer to aforementioned data processing system embodiment.Under conditions of the status indicator of reception is that first state identifies,
The old service server can be determined as the service server for handling the data write request by the control server;
Can the data write request old service server be assigned to handle.It is the second state in the status indicator of reception
Under conditions of mark, the new business services device and the old service server can be determined as by the control server simultaneously
Service server for handling the data write request;The data write request can be assigned to the new business services device
It is handled with the old service server.Under conditions of the status indicator of reception is that the third state identifies, the control clothes
The new business services device can be determined as the service server for handling the data write request by business device;It can will be described
Data write request is assigned to the new business services device and is handled.
In an embodiment of the present embodiment, the new business services device is sent receiving the control server
Account identification after, can search in the new database whether there is the account identification;In the new database not
It, can be to the control server feedback for indicating to be not present in the new database under conditions of the account identification
The information of the account identification.The control server can receive described information;The old service server can be determined
For the service server for handling the data write request;The data write request can be assigned to the old service service
Device is handled.There are under conditions of the account identification in the new database, the new business services device can be from institute
It states and obtains the corresponding status indicator of the account identification in new database;The state that can be obtained to the control server feedback
Mark.
In an embodiment of the present embodiment, the control server can have migration rollback switch, described to move
It is moved back to and gets away pass and can at least have first state and the second state.The first state can be used to indicate that the migration rollback
Switch is closed, and second state can be used to indicate that the migration rollback switch is in open state.In this way,
After receiving client or the data write request for carrying account identification that other servers are sent, the control server can
To obtain the state of migration rollback switch.Under conditions of migration rollback switch is in first state, the control service
Device can obtain the corresponding status indicator of the account identification.Under conditions of migration rollback switch is in the second state,
The old service server can be determined as the service server for handling the data write request by the control server;
Can the data write request old service server be assigned to handle.First about the migration rollback switch
Being discussed in detail for the second state of state and the migration rollback switch may refer to aforementioned data processing system embodiment.
In an embodiment of the present embodiment, the control server can have migration end switch, described to move
First state and the second state can at least be had by moving end switch.The first state can be used to indicate that the migration terminates
Switch is closed, and second state can be used to indicate that the migration end switch is in open state.In this way,
After receiving client or the data write request for carrying account identification that other servers are sent, the control server can
To obtain the state of migration end switch.Under conditions of the migration end switch is in first state, the control service
Device can obtain the corresponding status indicator of the account identification.Under conditions of the migration end switch is in the second state,
The new business services device can be determined as the service server for handling the data write request by the control server;
Can the data write request new business services device be assigned to handle.First about the migration end switch
Being discussed in detail for the second state of state and the migration end switch may refer to aforementioned data processing system embodiment.
In the present embodiment, the control server can receive the data write request for carrying account identification;It can obtain
Take the corresponding status indicator of the account identification;It can be based on the status indicator, determined for handling the data write request
Service server;The data write request is assigned to the server to handle.In this way, the control server can be with
The service server for handling data write request is determined based on the corresponding status indicator of account identification, so as in offer
In the case that business service is unaffected, by the Data Migration in old database to new database.
Please refer to Fig. 8.This specification embodiment provides a kind of server.The server may include with lower unit.
Receiving unit 80, for receiving data write request;Account identification is carried in the data write request;
Acquiring unit 82, for obtaining the corresponding status indicator of the account identification;
Determination unit 84 determines the business service for handling the data write request for being based on the status indicator
Device;
Allocation unit 86 is handled for the data write request to be assigned to the service server.
Please refer to Fig. 9.This specification embodiment provides a kind of server.The server may include memory and processing
Device.
In the present embodiment, the memory can be implemented in any suitable manner.For example, the memory can be
Read-only memory, mechanical hard disk, solid state disk or USB flash disk etc..The memory can be used for storing computer program instructions.
In the present embodiment, the processor can be implemented in any suitable manner.For example, processor can take example
Such as microprocessor or processor and storage can by (micro-) processor execute computer readable program code (such as software or
Firmware) computer-readable medium, logic gate, switch, application-specific integrated circuit (Application Specific
Integrated Circuit, ASIC), the form etc. of programmable logic controller (PLC) and embedded microcontroller.The processor
Include by executing the function that the computer program instructions are realized:Receive data write request;It is carried in the data write request
There is account identification;Obtain the corresponding status indicator of the account identification;Based on the status indicator, determine for handling the number
According to the service server of write request;The data write request is assigned to the service server to handle.
It should be noted that each embodiment in this specification is described in a progressive manner, each embodiment it
Between just to refer each other for identical similar part, each embodiment focuses on the differences from other embodiments.
For server example, since it is substantially similar to data processing method embodiment, so the comparison of description is simple
Single, related place illustrates referring to the part of data processing method embodiment.
Further it will be understood that one of ordinary skill in the art may not need creation after reading this specification file
Property labour some or all of expect in this specification file enumerating embodiment between can combine, these combinations are also in this explanation
In the range of book is disclosed and is protected.
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 2.Moreover, nowadays, substitution manually makes IC chip, and this programming is also used instead mostly
" logic compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development
Seemingly, and the source code before compiling also handy specific programming language is write, 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 are most generally used at present
Integrated Circuit Hardware Description Language) and Verilog2.Those skilled in the art
It will be apparent to the skilled artisan that only needing method flow slightly programming in logic and being programmed into integrated circuit with above-mentioned several hardware description languages
In, so that it may to be readily available the hardware circuit for realizing the logical method flow.
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.
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.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
The mode of required general hardware platform can be added to realize by software.Based on this understanding, the technical solution of this specification
Substantially the part that contributes to existing technology can be expressed in the form of software products in other words, the computer software
Product can be stored in a storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are used so that a computer
Equipment (can be personal computer, server either network equipment etc.) executes each embodiment of this specification or embodiment
Certain parts described in method.
This specification can be used in numerous general or special purpose computing system environments or configuration.Such as:Personal computer,
Server computer, handheld device or portable device, laptop device, multicomputer system, microprocessor-based system,
Set top box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer including any of the above system are set
Standby distributed computing environment etc..
This specification can describe in the general context of computer-executable instructions executed by a computer, such as journey
Sequence module.Usually, program module include routines performing specific tasks or implementing specific abstract data types, program, object,
Component, data structure etc..This specification can also be put into practice in a distributed computing environment, in these distributed computing environment
In, by executing task by the connected remote processing devices of communication network.In a distributed computing environment, program module
It can be located in the local and remote computer storage media including storage device.
Although depicting this specification by embodiment, it will be appreciated by the skilled addressee that there are many become for this specification
Shape and the spirit changed without departing from this specification, it is desirable to which the attached claims include these deformations and change without departing from this
The spirit of specification.