Client, information processing method and reading/writing method and device
Technical field
The present invention relates to the information processing technology, more particularly to a kind of client, information processing method and reading/writing method and
Device.
Background technology
In e-commerce platform or social platform, due to the customer datas such as contact method, user name, buddy list with
Transaction record and chat record are compared, and the frequency of modification is relatively low, so that client often regard customer data as state type
Data are designed and handled.
Although the memory space that state type data take is smaller, and the system with modification authority can be to state type
Data are changed, and are relatively flexible so as to change, still, during actual maintenance, and discovery concurrently changes same in many ways
In the case of the customer data of client, it is this using customer information as the mode of state type data, easily there is data record wrong
By mistake.For example, as shown in figure 1, as system A and system B while to the customer information of same client, using different cell-phone numbers
In the case of carrying out " modification cell-phone number " operation, it is possible that system A and system B return to successfully modified prompting, but it is right
The cell-phone number of the client is different for different system, for system A, and the cell-phone number of the client is 137, and for system B come
Say, the cell-phone number of the client is 138, and the cell-phone number that reality is safeguarded in client is one in 138 and 137.It is aobvious
So, this mode easily causes data corruption, Data Consistency occurs.
According to lock mechanism, when a side modifies to customer data, the customer data is locked, the opposing party can not
Same customer data is modified, although Data Consistency can be solved to a certain extent, due to for the moment
Carving can only be operated by the side in multi-party to customer data, cause systematic function and capacity decline.
The content of the invention
The present invention provides a kind of client, information processing method and reading/writing method and device, the one of the embodiment of the present invention
Individual purpose is to solve Data Consistency.
To reach above-mentioned purpose, embodiments of the invention are adopted the following technical scheme that:
First aspect is there is provided a kind of information processing method based on client, and the client includes being used to tie up
The active node of shield activity table, the base node for safeguarding underlying table, and the instrument node for maintenance tool table, it is described
Method includes:
The active node obtains the object run request operated to customer information from operation system;
The active node asks entrained operation stream water gauge to be known according to the object run, in movable each bar of table
In operation note, inquire about the operation stream water and identify whether uniquely;Wherein, the operation note is used to indicate operation system to visitor
Historical operation performed by the information of family;
When the active node determines that the operation stream water gauge knows unique, the instrument node is according to the object run
Request, is updated to the manipulative indexing field in the instrument table, and the message being updated successfully is returned to the active node;
Wherein, the instrument table is used to be indexed the customer information that the underlying table is recorded;
The active node is received after the message being updated successfully, to the object run in the movable table
Request is recorded.
Second aspect is there is provided a kind of information processing method based on client, and the client includes being used to tie up
The active node of shield activity table, the base node for safeguarding underlying table, and the instrument node for maintenance tool table, it is described
Method includes:
The active node obtains the target query request inquired about customer information from operation system;
The active node is inquired about in the operation note of the movable table, if be related to the visitor in the target query request
Family;
When inquiring the operation note of the client in the movable table, send and inquired to the base node
Client operation note;
The base node asks involved look into by the instrument table in the instrument node according to the target query
Ask field to be indexed, in the underlying table, to inquire correspondence customer information record;
The base node is recorded with the customer information inquired according to the operation note of the client inquired and carried out
Data merge;
The base node sends the customer information record that data merging is obtained to the operation system.
The third aspect includes there is provided a kind of customer information write method, methods described:
The object run for being operated to customer information for receiving operation system transmission is asked;
Entrained operation stream water gauge is asked to be known according to the object run, in each bar operation note of movable table, inquiry
The operation stream water is identified whether uniquely;Wherein, the operation note is used to indicate operation system to performed by customer information
Historical operation;
When operation stream water gauge knowledge is unique, asked according to the object run, to the corresponding rope in the instrument table
Draw field to be updated;Wherein, the instrument table is used to be indexed the customer information that the underlying table is recorded;
Object run request is recorded in the movable table.
Fourth aspect reads method there is provided a kind of customer information, and methods described includes:
The target query request inquired about customer information is obtained from operation system;
Whether client in the target query request is related in the operation note of inquiry activity table;
, please to the target query by instrument table when inquiring the operation note of the client in the movable table
Involved inquiry field is asked to be indexed, in the underlying table, to inquire correspondence customer information record;
Data merging is carried out according to the operation note of the client inquired and the customer information inquired record;
The customer information record that data merging is obtained is sent to the operation system.
5th aspect is there is provided a kind of client, and the client includes active node, base node, Yi Jigong
Has node;
The active node, after obtaining the object run operated to customer information request from operation system,
Ask entrained operation stream water gauge to be known according to the object run, in each bar operation note of movable table, inquire about the operation
Flowing water is identified whether uniquely;Wherein, the operation note is used to indicate operation system to the historical operation performed by customer information;
The instrument node, for when the active node determines that the operation stream water gauge knows unique, according to the mesh
Mark operation requests, the manipulative indexing field in instrument table is updated, and to the active node return be updated successfully disappear
Breath;Wherein, the instrument table is used to be indexed the customer information that the underlying table is recorded;
The movable table, after being additionally operable to receive the message being updated successfully, to the mesh in the movable table
Mark operation requests are recorded;
The base node, for according to the movable table, customer information to be recorded in underlying table.
6th aspect is there is provided a kind of client, and the client includes active node, base node, Yi Jigong
Has node;
The active node, for obtaining the target query inquired about customer information request from operation system;Inquiry
In the operation note of the movable table, if be related to the client in the target query request;When the inquiry in the movable table
To the client operation note when, the operation note of inquired client is sent to the base node;
The instrument node, for asking involved inquiry field according to the target query, using instrument table, to base
Plinth table is indexed;
The base node, for according to the instrument table, the corresponding customer information indexed in the underlying table to be remembered
Record;Data merging is carried out according to the operation note of the client inquired and the customer information inquired record;To institute
State operation system and send the customer information record that data merging is obtained.
7th aspect is there is provided a kind of customer information write device, and described device includes:
Receiving module, the object run for being operated to customer information for receiving operation system transmission is asked;
Enquiry module, for asking entrained operation stream water gauge to be known according to the object run, in each bar behaviour of movable table
In noting down, inquire about the operation stream water and identify whether uniquely;Wherein, the operation note is used to indicate operation system to client
Historical operation performed by information;
Update module, for when the operation stream water gauge knows unique, being asked according to the object run, to the instrument
Manipulative indexing field in table is updated;Wherein, the instrument table is used to enter the customer information that the underlying table is recorded
Line index;
Logging modle, for being recorded in the movable table to object run request.
Eighth aspect includes there is provided a kind of customer information read apparatus, described device:
Acquisition module, for obtaining the target query inquired about customer information request from operation system;
Whether enquiry module, be related to the client in the target query request in the operation note for inquiring about movable table;
Index module, for when inquiring the operation note of the client in the movable table, passing through instrument table pair
The involved inquiry field of the target query request is indexed, in the underlying table, to inquire correspondence customer information
Record;
Update module, records for the operation note according to the client inquired and the customer information inquired and carries out
Data merge;
Sending module, merges obtained customer information record for sending data to the operation system.
Client provided in an embodiment of the present invention, information processing method and reading/writing method and device, by receiving business
After the object run for being operated to customer information that system is sent is asked, entrained behaviour is asked according to object run
Make flowing water mark, in each bar operation note of movable table, inquiry operation flowing water is identified whether uniquely, when operation stream water gauge is known uniquely
When, in instrument table, asked according to object run, the manipulative indexing field for indexing underlying table is updated, and in work
Object run request is recorded in dynamic table.Carried out as a result of activity token record operation system for customer information
All operationss, and operation each time is respectively provided with the operation stream water gauge of uniqueness and knows, it is to avoid repeat and customer data
Confusion, solves the Data Consistency under many complications, meanwhile, improve the performance and capacity of system.
Brief description of the drawings
Fig. 1 is the schematic diagram of client in the prior art;
Fig. 2 is the schematic diagram of tables of data;
Fig. 3 is a kind of schematic flow sheet for customer information write method that the embodiment of the present invention one is provided;
Fig. 4 is the schematic flow sheet for another customer information write method that the embodiment of the present invention two is provided;
Fig. 5 is the schematic flow sheet that a kind of customer information that the embodiment of the present invention three is provided reads method;
Fig. 6 is one of interaction schematic diagram of each node in the client that the embodiment of the present invention four is provided;
Fig. 7 is the two of the interaction schematic diagram of each node in the client that the embodiment of the present invention four is provided;
The schematic diagram of table based on Fig. 8;
Fig. 9 is the interaction schematic diagram of each node in the client that the embodiment of the present invention five is provided;
Figure 10 is one of schematic diagram of client;
Figure 11 is the two of the schematic diagram of client;
Figure 12 is a kind of structural representation for customer information write device that the embodiment of the present invention seven is provided;
Figure 13 is a kind of structural representation for customer information read apparatus that the embodiment of the present invention eight is provided.
Embodiment
It is described in detail below in conjunction with the accompanying drawings to provided in an embodiment of the present invention.
Embodiment one
For the method that clear explanation the present embodiment is provided, the tables of data involved by the present embodiment is carried out first brief
Introduce, Fig. 2 is the schematic diagram of tables of data, as shown in Fig. 2 involved tables of data includes:
Movable table, for being recorded to object run request.
Underlying table, for being recorded to customer information.
Instrument table, for being indexed to table of customer's information.
Customer information write method will be described in detail below, Fig. 3 is a kind of client that the embodiment of the present invention one is provided
The schematic flow sheet of information write method, as shown in figure 3, method includes:
Step 101, the object run for being operated to customer information for receiving operation system transmission is asked.
Specifically, when operation system needs to need to perform addition, modification or the operation deleted to customer information, business system
System can send operation requests, specifically, in operation requests, including operation stream water gauge is known, and this operation stream water is designated behaviour
The unique identification of work, that is to say, that operation is known with different operation stream water gauges each time.In addition, also being wrapped in operation requests
The type of concrete operations is included, operation object operates targeted field.When concrete operations type is addition, changed, operation
It can also include in request, operation content, i.e., the field value of addition or modification needed for the field.
In general, customer information substantial amounts, in order to carry out quick indexing, behaviour needed for being carried in operation requests
The customer ID (ID) of the customer information of work, because customer ID has uniqueness, so as to be easy to record customer information
Inquired about.
Step 102, entrained operation stream water gauge is asked to be known according to object run, in each bar operation note of movable table,
Inquiry operation flowing water is identified whether uniquely.
Wherein, operation note is used to indicate operation system to the historical operation performed by customer information.Specifically, power is utilized
Etc. property function, entrained operation stream water gauge is asked to be known object run, the operation flowing water with each bar operation note in movable table
Identification field is compared, and the operation stream water gauge weight sensing with each bar operation note in movable table is identified whether with inquiry operation flowing water
It is multiple, to avoid reprocessing same object run request.
Record has each bar operation note in movable table, and operation note is used to record information entrained in operation requests,
And send operation system and transmission time of operation requests etc..
Step 103, when the knowledge of operation stream water gauge is unique, asked according to object run, to the manipulative indexing word in instrument table
Section is updated.
Wherein, the customer information that instrument table is used to record underlying table is indexed.Specifically, instrument table can be
One simple index table, or include the unique index table of some constraintss, is mainly used in accelerating table of customer's information
Inquiry velocity, and ensure that data meet constraints.For example:Cell-phone number or registration mailbox uniqueness.Instrument table is to index
Field is indexed, and the index field that specific instrument table is included is determined according to business rule.
Specifically, when the knowledge of operation stream water gauge is unique, it may be determined that do not duplicate the situation of operation, and then according to mesh
Operation requests are marked, the manipulative indexing field in instrument table is updated.
If instrument table is simple index table, it can be checked before the manipulative indexing field in instrument table is updated
Whether operation meets constraints, the manipulative indexing field in instrument table is updated if meeting, otherwise to operation system
The message returned operation failure.
If instrument table is unique index table, it can be examined during the manipulative indexing field in instrument table is updated
Look into whether operation meets unique constraints condition, instrument table is updated successfully if meeting, and otherwise instrument table updates failure, to business
The message that system is returned operation failure.
Further, if operation stream water gauge know it is not unique, explanation activity table exist to should object run request
Operation note, and the request is handled, therefore, this processing there is a situation where to repeat, and terminate to this processing
Process.
Step 104, object run request is recorded in movable table.
Specifically, the relevant information by the object run request received by this recorded in movable table, generation correspondence
Operation note, subsequently to be inquired about.
For example:Operation stream water gauge knowledge entrained in operation requests, action type, operation object can be included in movable table
And operation content, and send operation system and transmission time of operation requests etc..
It can be seen that, in the information recorded by movable table, including operation stream water gauge is known, and therefore, is easy to control to grasp each time
Work will not be repeated processing, that is, idempotence, while ensure that the trackability of operation.
In the present embodiment, the object run for being operated to customer information sent by receiving operation system is asked
Afterwards, entrained operation stream water gauge is asked to be known according to object run, in each bar operation note of movable table, inquiry operation flowing water
Identify whether uniquely, when the knowledge of operation stream water gauge is unique, in instrument table, to be asked according to object run, to for indexing basis
The manipulative indexing field of table is updated, and object run request is recorded in movable table.As a result of movable table
Record traffic system is directed to all operationss that customer information is carried out, and operation is respectively provided with the operation flowing water of uniqueness each time
Mark, it is to avoid repeat and customer data is chaotic, solve the Data Consistency under many complications, meanwhile,
Improve the performance and capacity of system.
Embodiment two
For an embodiment in clear explanation, the present embodiment additionally provides another customer information write method, real upper one
Apply on the basis of example, further, after step 104, movable table and table of customer's information can also be merged, it is specific next
Say, Fig. 4 is the schematic flow sheet for another customer information write method that the embodiment of the present invention two is provided, as shown in figure 4, method bag
Include:
Step 201, when meeting preset trigger condition, operation note to be combined in acquisition activity table.
Specifically, preset trigger condition includes:Meet prefixed time interval;And/or, meet to be combined in the movable table
Operation note bar number be more than predetermined threshold value.
In the method that Fig. 3 is provided, it can be seen that when operation system request is operated to customer information, not
Have and the underlying table for recording customer information is operated accordingly, but by the operation note into movable table.In movable table
The operation note bar number of accumulation is enough, so that when being more than predetermined threshold value, or, every prefixed time interval, it is necessary to activity
Operation note in table is merged.Here operation note to be combined can be whole operation notes in movable table, also may be used
To be this not to be limited in the operation note of part, the present embodiment.
Step 202, data are carried out according to the customer information record of current version in operation note to be combined and underlying table
Merge, recorded with the customer information for obtaining next version.
Specifically, from movable table, in units of client, obtain respectively each client operation note to be combined it
Afterwards, for each client, using each field value in the operation note to be combined of the client, current version in underlying table is updated
The corresponding field value of the client in this customer information record, will be resulting next to complete the merging to operation note
The customer information record storage of version is in underlying table.
Step 203, operation note to be combined is moved to historical data base from movable table.
Specifically, after the operation note to be combined to this completes to merge, by operation note to be combined from movable table
It is moved to historical data base.When customer data has chaotic, to carry out follow-up inquiry of tracing to the source.
In the present embodiment, the object run for being operated to customer information sent by receiving operation system is asked
Afterwards, entrained operation stream water gauge is asked to be known according to object run, in each bar operation note of movable table, inquiry operation flowing water
Identify whether uniquely, when the knowledge of operation stream water gauge is unique, in instrument table, to be asked according to object run, to for indexing basis
The manipulative indexing field of table is updated, and object run request is recorded in movable table.As a result of movable table
Record traffic system is directed to all operationss that customer information is carried out, and operation is respectively provided with the operation flowing water of uniqueness each time
Mark, it is to avoid repeat and customer data is chaotic, solve the Data Consistency under many complications, meanwhile,
Compared to the performance and capacity that lock mechanism improves system.
Embodiment three
Fig. 5 is the schematic flow sheet that a kind of customer information that the embodiment of the present invention three is provided reads method, and the present embodiment is carried
The customer information of confession reads method, is that the customer information write method provided with previous embodiment is corresponding, as shown in figure 5, side
Method includes:
Step 301, the target query request inquired about customer information is obtained from operation system.
Step 302, the client in the target query request whether is related in the operation note of inquiry activity table.
Specifically,, can when the index field that target query is asked is customer ID as a kind of possible way of realization
Directly to be inquired about in the operation note of movable table according to customer ID, if in the presence of the operation note of the customer ID,
The customer information for determining the client recorded in underlying table is not current newest customer information, it is necessary to according to the behaviour inquired
Note down and be updated.
Further, as alternatively possible way of realization, when the index field that target query is asked is not customer ID
When, the corresponding customer ID of index field of target query request can be inquired about in instrument table.And then in the operation of movable table
Inquired about in record according to the customer ID, if in the presence of the operation note of the customer ID, it is determined that recorded in underlying table
The customer information of the client be not current newest customer information, it is necessary to be updated according to the operation note inquired.
Step 303, when inquiring the operation note of the client in movable table, target query is asked by instrument table
Involved inquiry field is indexed, in underlying table, to inquire correspondence customer information record.
Specifically, by instrument table, involved inquiry field is asked to be indexed the target query, with underlying table
In, inquire the value that field is inquired about described in the customer information record of current version.
Step 304, data are carried out according to the operation note of the client inquired and the customer information inquired record
Merge.
Specifically, the customer ID in being asked according to the target query, is inquired in the movable table with described
During the operation note of customer ID, in the underlying table, the field value in inquired operation note is utilized, updates and works as
The corresponding field value of customer ID described in the customer information record of preceding version.
Step 305, the customer information record that data merging is obtained is sent to operation system.
Further, when not inquiring the operation note of the client in movable table, current version in inquiry underlying table
Customer information record, and then the customer information sent a query to operation system records.
It should be noted that because the present embodiment is to be read with the corresponding customer information of embodiment one in method, the present embodiment
The content not elaborated, refer to the associated description in embodiment one.
Due to entering to customer information during row write, by receive operation system send be used for customer information carry out
After the object run request of operation, entrained operation stream water gauge is asked to be known according to object run, in each bar operation of movable table
In record, inquiry operation flowing water is identified whether uniquely, when the knowledge of operation stream water gauge is unique, in instrument table, according to object run
Request, is updated to the manipulative indexing field for indexing underlying table, and object run request is remembered in movable table
Record.The all operationss that customer information is carried out are directed to as a result of activity token record operation system, and are operated each time equal
Operation stream water gauge with uniqueness is known, it is to avoid repeat and customer data is chaotic, solve under many complications
Data Consistency, meanwhile, compared to the performance and capacity that lock mechanism improves system.
It is corresponding, in read procedure, the target query request inquired about customer information is obtained from operation system,
And then whether it is related to the client in the target query request in the operation note of inquiry activity table, looked into when in the movable table
When asking the operation note of the client, involved inquiry field is asked to carry out rope the target query by instrument table
Draw, in the underlying table, to inquire correspondence customer information record, and the operation note according to the client inquired and institute
The customer information record inquired carries out data merging, and the customer information note that data merging is obtained is sent to the operation system
Record.
Example IV
For the customer information write method that clear explanation previous embodiment is provided, present embodiments provide in client
Under this application scenarios, the information process for realizing customer information write method.Fig. 6 is what the embodiment of the present invention four was provided
One of interaction schematic diagram of each node in client, as shown in fig. 6, client includes active node, base node and work
Has node.
Wherein, active node is interacted with operation system, and the active node is used to safeguard movable table, and base node is used to safeguard
Underlying table, instrument node is used for maintenance tool table.
As shown in fig. 6, information processing method, including:
Step 401, active node obtains the object run request operated to customer information from operation system.
Step 402, active node asks entrained operation stream water gauge to be known according to the object run, in the movable table
In each bar operation note, inquire about the operation stream water and identify whether uniquely.
Wherein, operation note is used to indicate operation system to the historical operation performed by customer information.
Specifically, active node obtains the entrained operation stream water gauge of object run request and known, using idempotence function, will
Operation stream water gauge is known, and is compared with the operation stream water identification field of each bar operation note in movable table, with inquiry operation flowing water
Identify whether that the operation stream water gauge weight sensing with each bar operation note in movable table is answered.
Step 403, when active node determines that operation stream water gauge knows unique, instrument node please according to the object run
Ask, the manipulative indexing field in the instrument table is updated, and the message being updated successfully is returned to the active node.
Wherein, instrument table is used to be indexed the customer information that the underlying table is recorded.
Step 404, after active node receives the message being updated successfully, object run is asked in movable table to carry out
Record, and return to operating result to operation system.
As can be seen that when operation system request is operated to customer information, not to the base of record customer information
Plinth table is operated accordingly, but by the operation note into movable table.The operation note bar number foot accumulated in movable table
It is more than enough, so that when being more than predetermined threshold value, or, every prefixed time interval, it is necessary to be closed to the operation note in movable table
And.Here operation note to be combined can be whole operation notes or partial operation note in movable table, this
This is not limited in embodiment.
Specifically, Fig. 7 is the two of the interaction schematic diagram of each node in the client that the embodiment of the present invention four is provided, such as
Shown in Fig. 7:
Step 501, when meeting preset trigger condition, base node is to be combined from active node, acquisition activity table
Operation note.
Specifically, base node is from the movable table, in units of client, and the to be combined of each client is obtained respectively
Operation note.
Step 502, base node is recorded according to the customer information of current version in operation note to be combined and underlying table
Data merging is carried out, is recorded with the customer information for obtaining next version, and then the successful message of merging is returned to active node.
Specifically, for each client, the base node is using each in the operation note to be combined of the client
Field value, updates corresponding field value in the customer information record of the client of current version in the underlying table.
As a kind of possible implementation, there is the schematic diagram of table based on multiple fields, Fig. 8 in underlying table, such as
Shown in Fig. 8, underlying table data content is numerous and jumbled, and underlying table is indexed accordingly, it would be desirable to rely on instrument table.
Step 503, operation note to be combined is moved to and gone through according to successful message is merged by active node from movable table
History database.
Further, client can also include metadata node.
Based on this, involved index field in the business rule that instrument node obtains configuration from metadata node, and will
Involved index field, increases in instrument table in business rule.
It is specific next by have recorded the inquiry dimension followed when operation system carries out customer information inquiry in business rule
Say, including each index field and the required inquiry field inquired, therefore, instrument node can will be involved in business rule
And index field, increase in instrument table, quickly to inquire about underlying table, improve search efficiency.
Embodiment five
In order to which the customer information that clear explanation previous embodiment is provided reads method, present embodiments provide in client
Under this application scenarios, for realizing that customer information reads the information process of method.Fig. 9 is what the embodiment of the present invention five was provided
The interaction schematic diagram of each node in client, as shown in figure 9, client includes active node, base node and instrument section
Point.
Wherein, active node is interacted with operation system, and the active node is used to safeguard movable table, and base node is used to safeguard
Underlying table, instrument node is used for maintenance tool table.
As shown in figure 9, information processing method, including:
Step 601, active node obtains the target query request inquired about customer information from operation system.
Step 602, active node is inquired about in the operation note of the movable table, if be related to the visitor in target query request
Family, when inquiring the operation note of the client in movable table, the behaviour of inquired client is sent to the base node
Note down.
Further, when the index field that the target query is asked not is customer ID, active node is in inquiry activity
Before table, the corresponding customer ID of index field of target query request is inquired about in instrument table by instrument node.
Step 603, base node asks involved look into by the instrument table in the instrument node according to target query
Ask field to be indexed, in the underlying table, to inquire correspondence customer information record.
Specifically, base node asks the target query involved inquiry by the instrument table in instrument node
Field is indexed, in the underlying table, to inquire taking for inquiry field described in the customer information record of current version
Value.
Step 604, base node is recorded according to the operation note of the client inquired with the customer information inquired
Data merging is carried out, and the customer information record that data merging is obtained is sent to operation system.
Specifically, active node asks corresponding customer ID according to the target query, is inquired about in the movable table
To during operation note with customer ID, inquired operation note is sent to the base node, so that in underlying table
In, base node updates client in the customer information record of current version using the field value in the operation note inquired
Identify corresponding field value.
Further, when not inquiring the operation note of the client in movable table, the base node inquiry is described
The customer information record of current version in underlying table;The customer information that base node is sent a query to the operation system is remembered
Record.
Embodiment six
A kind of client is present embodiments provided, Figure 10 is one of schematic diagram of client, as shown in Figure 10, client
System includes active node, base node and instrument node.
Wherein, the number of active node can be one or more, and each active node is handed over corresponding operation system
Mutually.Here corresponding relation can be that active node is corresponded with operation system or multi-activity node is corresponding one
Operation system, or the multiple operation systems of active node correspondence.
For clear explanation client, present embodiments provide under two kinds of possible application scenarios, corresponding client
Two kinds of possible implementations of system.
As a kind of possible implementation, under the application scenarios that operation system is operated to customer information, activity
Node is used for after the object run that operation system acquisition is operated to customer information is asked, please according to the object run
Ask entrained operation stream water gauge to know, in each bar operation note of movable table, inquire about the operation stream water and identify whether uniquely.
Wherein, operation note is used to indicate operation system to the historical operation performed by customer information.
Instrument node, for when the active node determines that the operation stream water gauge knows unique, being grasped according to the target
Ask, the manipulative indexing field in instrument table is updated, and the message being updated successfully is returned to the active node.
Wherein, instrument table is used to be indexed the customer information that the underlying table is recorded.
Movable table, is additionally operable to receive after the message being updated successfully, object run request is remembered in movable table
Record.
Base node, for according to movable table, customer information to be recorded in underlying table.
Further, base node, specifically for when meeting preset trigger condition, from the active node, obtains described
Operation note to be combined in movable table;According to the client of current version in the operation note to be combined and the underlying table
Information record carries out data merging, is recorded with the customer information for obtaining next version;Return and merge successfully to the active node
Message.
The active node, is additionally operable to merge successful message according to described, by the operation note to be combined from institute
State movable table and be moved to historical data base.
Further, Figure 11 is the two of the schematic diagram of client, and as shown in figure 11, client also includes:Metadata section
Point.
Metadata node, for configuration service rule.
Based on this, instrument node is additionally operable to involved rope from the business rule of metadata node acquisition configuration
Draw field;Increase to index field involved in the business rule in the instrument table.
It is living under the application scenarios that operation system is inquired about customer information as alternatively possible implementation
Dynamic node, for obtaining the target query inquired about customer information request from operation system;Inquire about the behaviour of the movable table
In noting down, if be related to the client in the target query request;As the behaviour that the client is inquired in the movable table
When noting down, the operation note of inquired client is sent to the base node.
The instrument node, for asking involved inquiry field according to the target query, using instrument table, to base
Plinth table is indexed.
The base node, for according to the instrument table, the corresponding customer information indexed in the underlying table to be remembered
Record;Data merging is carried out according to the operation note of the client inquired and the customer information inquired record;To institute
State operation system and send the customer information record that data merging is obtained.
It can be seen that, after the object run for being operated to customer information sent by receiving operation system is asked,
Entrained operation stream water gauge is asked to be known according to object run, in each bar operation note of movable table, inquiry operation flowing water mark
It is whether unique, when the knowledge of operation stream water gauge is unique, in instrument table, asked according to object run, to for indexing underlying table
Manipulative indexing field is updated, and object run request is recorded in movable table.As a result of activity token record
Operation system is directed to all operationss that customer information is carried out, and operation is respectively provided with the operation stream water gauge of uniqueness each time
Know, it is to avoid repeat and customer data is chaotic, solve the Data Consistency under many complications, meanwhile, carry
The performance and capacity of system are risen.
Embodiment seven
Figure 12 is a kind of structural representation for customer information write device that the embodiment of the present invention seven is provided, as shown in figure 12,
Including:Receiving module 71, enquiry module 72, update module 73 and logging modle 74.
Receiving module 71, the object run for being operated to customer information for receiving operation system transmission please
Ask.
Enquiry module 72, for asking entrained operation stream water gauge to be known according to the object run, in each bar of movable table
In operation note, inquire about the operation stream water and identify whether uniquely.
Wherein, the operation note is used to indicate operation system to the historical operation performed by customer information.
Update module 73, for when the operation stream water gauge knows unique, being asked according to the object run, to the work
Manipulative indexing field in tool table is updated.
Wherein, the instrument table is used to be indexed the customer information that the underlying table is recorded.
Logging modle 74, for being recorded in the movable table to object run request.
In the present embodiment, the object run for being operated to customer information sent by receiving operation system is asked
Afterwards, entrained operation stream water gauge is asked to be known according to object run, in each bar operation note of movable table, inquiry operation flowing water
Identify whether uniquely, when the knowledge of operation stream water gauge is unique, in instrument table, to be asked according to object run, to for indexing basis
The manipulative indexing field of table is updated, and object run request is recorded in movable table.As a result of movable table
Record traffic system is directed to all operationss that customer information is carried out, and operation is respectively provided with the operation flowing water of uniqueness each time
Mark, it is to avoid repeat and customer data is chaotic, solve the Data Consistency under many complications, meanwhile,
Improve the performance and capacity of system.
Embodiment eight
Figure 13 is a kind of structural representation for customer information read apparatus that the embodiment of the present invention eight is provided, as shown in figure 13,
The device includes:Acquisition module 81, enquiry module 82, index module 83, update module 84 and sending module 85.
Acquisition module 81, for obtaining the target query inquired about customer information request from operation system.
Whether enquiry module 82, be related to the visitor in the target query request in the operation note for inquiring about movable table
Family.
Index module 83, for when inquiring the operation note of the client in the movable table, passing through instrument table
Involved inquiry field is asked to be indexed the target query, in the underlying table, to inquire correspondence client's letter
Breath record.
Update module 84, for the operation note according to the client inquired and the customer information that is inquired record into
Row data merge.
Sending module 85, merges obtained customer information record for sending data to the operation system.
Due to entering to customer information during row write, by receive operation system send be used for customer information carry out
After the object run request of operation, entrained operation stream water gauge is asked to be known according to object run, in each bar operation of movable table
In record, inquiry operation flowing water is identified whether uniquely, when the knowledge of operation stream water gauge is unique, in instrument table, according to object run
Request, is updated to the manipulative indexing field for indexing underlying table, and object run request is remembered in movable table
Record.The all operationss that customer information is carried out are directed to as a result of activity token record operation system, and are operated each time equal
Operation stream water gauge with uniqueness is known, it is to avoid repeat and customer data is chaotic, solve under many complications
Data Consistency, meanwhile, improve the performance and capacity of system.
It is corresponding, in read procedure, the target query request inquired about customer information is obtained from operation system,
And then whether it is related to the client in the target query request in the operation note of inquiry activity table, looked into when in the movable table
When asking the operation note of the client, involved inquiry field is asked to carry out rope the target query by instrument table
Draw, in the underlying table, to inquire correspondence customer information record, and the operation note according to the client inquired and institute
The customer information record inquired carries out data merging, and the customer information note that data merging is obtained is sent to the operation system
Record.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to
The related hardware of programmed instruction is crossed to complete.Foregoing program can be stored in a computer read/write memory medium.The journey
Sequence upon execution, performs the step of including above-mentioned each method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or
Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent
The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to
The technical scheme described in foregoing embodiments can so be modified, or which part or all technical characteristic are entered
Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology
The scope of scheme.