Embodiment
In view of the problem that prior art exists, the embodiment of the invention proposes a kind of data manipulation method and data manipulation equipment, can improve the concurrent quantity of user's operation requests and the response speed of user's operation requests.
Fig. 1 is the flow chart of data manipulation method in the embodiment of the invention, and data manipulation method comprises in the embodiment of the invention;
Step 101, the corresponding relation of the data type of predetermined registration operation object and the device type of memory device;
Herein, the data type of operand can be determined according to practical situations, for example the data type of operand can be divided into the numerous types of data such as product data, subscription data, user data and service provider (Service Provider, SP) data.The device type of memory device can be divided into local cache equipment, distributed caching memory device and database memory device etc.During implementation, can be according to the corresponding relation of the device type of the change frequency of the data type of operand and data type that real-time is set up operand and memory device, business datum in order to operand that a certain data type is described is stored in the memory device of which kind of device type, for example the database memory device is generally preserved whole product data, subscription data, user data and SP data, distributed caching memory device general cache change frequency is high, the data that requirement of real-time is higher, such as subscription data, local cache equipment general cache change frequency is low, the data that requirement of real-time is lower, such as product data, user data and SP data, therefore can be according to the corresponding relation of the device type of the data type of above-mentioned situation predetermined registration operation object and memory device, an example of the corresponding relation of the data type of operand and the device type of memory device is as shown in table 1:
Table 1
Need to prove, the corresponding relation of the memory device device type of various types of business datums and this business datum of storage has been described in the table 1, when setting up corresponding relation, a kind of data type can be corresponding with a kind of device type, also can corresponding with two or more device types (as shown in table 1), when a kind of data type is corresponding with two or more device types, according to sequentially being divided into from top to bottom preferred unit type and optional equipment type, for example for product data, local cache equipment is the preferred unit type, and the database memory device is the optional equipment type.
Step 101 is not the steps necessary of embodiment of the invention data manipulation method, and behind the corresponding relation of the device type of the data type of predetermined registration operation object and memory device, embodiment of the invention data manipulation method can be begun to carry out by step 102.
Step 102 detects the running status of described memory device, upgrades the corresponding relation of the device type of the data type of described operand and memory device according to described running status;
Herein, corresponding relation for the device type of the data type of the operand shown in the table 1 and memory device, can be by detecting the running status of described memory device, dynamically update according to described running status, for example current detection is to local cache equipment operation exception, the then device type information of the local cache equipment that user data, product data and SP data are corresponding deletion in table 1, behind local cache equipment normal operation, local cache equipment is added in device type information corresponding to user data, product data and SP data again.
Need to prove, step 102 is periodically carried out, and step 102 is not to be not the steps necessary of embodiment of the invention data manipulation method, and between the execution interval of step 102, embodiment of the invention data manipulation method can directly be begun to carry out by step 103.
Step 103 receives the data operation request that service layer issues, and described data operation request comprises operand and operation information;
Herein, receive and use the data operation request that issues in the service layer, described data operation request comprises operand and operation information, according to giving an example in the step 101, operand can be divided into product object, order object, user object and SP object, and each operand can represent with object ID during implementation, and for example operand is products A, then can represent with the product IDs of products A, such as PD0001 etc.; And for example operand is for ordering operation, and the order ID that then orders operation represents BU0001 etc.Operation information is used for indicating the data manipulation that need to carry out operand, and this data manipulation comprises query manipulation and upgrades operation, wherein upgrades operation and comprise the operations such as increase, deletion and modification.
Step 104 is identified the data type of described operand, obtains the device type information of memory device of the business datum of the described operand of storage according to described data type;
, according to giving an example in the step 102, can go out according to the front two character recognition of object ID the data type of operand during implementation herein, an example of the corresponding relation of the data type of object ID and operand sees Table 2:
Object ID |
Data type |
PD**** |
Product data |
US**** |
User data |
SP**** |
The SP data |
BU**** |
Subscription data |
Table 2
According to table 2, the object ID of the operand that for example receives is PD0001, the data type that then can identify operand according to the front two letter is user data, the object ID of the operand that and for example receives is BD0001, and the data type that then can identify operand according to the front two letter is subscription data.After identifying the data type of operand, obtain the device type information of memory device of the business datum of the described operand of storage according to data type, can obtain the device type information of memory device of the business datum of storage operation object B D0001; And for example the object ID of operand is PD0001, the data type that can draw this operand through identification is product data, according to the data type question blank 1 of these product data, can obtain the device type information of the memory device of the business datum of storing this operand PD0001.
Step 105 according to the memory device of described device type information access respective type, and indicates described memory device according to the business datum executing data operation of described operation information to described operand;
Herein, when device type information is the device type information of database memory device, transmit described data operation request to described database memory device, this data operation request can indicate described database memory device according to the business datum executing data operation of described operation information to described operand, and concrete data manipulation is finished by the database memory device.If this database memory device is the local data base memory device, then directly to this local data base memory device forwarding data operation requests, if this database memory device is the network data base memory device, then inquire about first internet protocol (the Internet Protocol of this network data base memory device, IP) address routes to the network data base memory device according to this IP address with this data operation request.
When device type information is the device type information of local cache equipment, access described local cache equipment, in described local cache equipment, operate according to the business datum executing data of described operation information to described operand, herein, be local internal memory during local cache equipment implementation, therefore can be according to the business datum executing data operation to described operand in local internal memory of the operation information in the data operation request.
When device type information is the device type information of distributed caching memory device, inquire about and obtain the address information of the distributed caching memory device of the business datum of storing described operand, transmit described data operation request according to described address information to the distributed caching memory device, this indicates described distributed caching memory device according to the business datum executing data operation of described operation information to described operand.During implementation, can the predetermined registration operation object and the corresponding relation of distributed caching memory device and IP address thereof, for example according to giving an example in the step 101, the data that distributed caching memory device general cache change frequency is high, requirement of real-time is higher, such as subscription data, an example of this corresponding relation is as shown in table 3:
Operand |
The distributed caching memory device |
The IP address |
BU0001-BU4000 |
Distributed caching memory device 1 |
192.168.34.6 |
BU4001-BU8000 |
Distributed caching memory device 2 |
192.168.34.7 |
BU8001-BU9999 |
Distributed caching memory device 3 |
192.168.34.8 |
Table 3
Need to prove, for example the operand in the data operation request is BU0001, according to this operand question blank 3, both can obtain operand BU0001 is stored in the distributed caching memory device 1, the IP address of this distributed caching memory device 1 is 192.168.34.6, transmit described data operation request according to described address information to distributed caching memory device 1, this indicates described distributed caching memory device 1 according to the business datum executing data operation of described operation information to described operand, and concrete data manipulation is finished by distributed caching memory device 1.
Step 106, the data manipulation object information to the business datum of described operand that receives that described memory device returns, and submit described data manipulation object information to described service layer.
Herein, after transmitting described data operation request to described database memory device, the data manipulation object information to the business datum of described operand that receives that described database memory device returns, and submit described data manipulation object information to described service layer.After transmitting described data operation request to the distributed caching memory device, the data manipulation object information to the business datum of described operand that receives that described distributed caching memory device returns, and submit described data manipulation object information to described service layer.Behind the described local cache equipment of access, the data manipulation object information to the business datum of described operand that receives that described local cache equipment returns, and submit described data manipulation object information to described service layer.
For the business datum in the local cache, can the business datum of described local cache equipment be upgraded according to default local cache control configuration information, for example from the database memory device, load data, flush buffers data etc. are supported the expired cache policy such as arrange of least recently used, full dose buffer memory and buffer memory.
Fig. 2 is the query manipulation flow chart of data manipulation method in the embodiment of the invention, the operation information of data operation request is query manipulation in embodiment shown in Figure 1, this moment, this data operation request was the data query request, the data manipulation object information is the data query object information, and the query manipulation of data manipulation method shown in Figure 1 may further comprise the steps:
Step 201 receives the data operation request that service layer issues, and described data operation request comprises operand and operation information;
Herein, receive and use the data operation request that issues in the service layer, described data operation request comprises operand and operation information, and this operation information is query manipulation.According to giving an example in the step 101, operand can be divided into product object, order object, user object and SP object, and each operand can represent with object ID during implementation, and for example operand is products A, then can represent with the product IDs of products A, such as PD0001 etc.; And for example operand is product subscription, and the order ID that then orders operation represents BU0001 etc.
Step 202 is identified the data type of described operand, obtains the preferred unit type information of memory device of the business datum of the described operand of storage according to described data type;
, according to giving an example in the step 102, can go out according to the front two character recognition of object ID the data type of operand during implementation herein, an example of the corresponding relation of the data type of object ID and operand sees Table 2.After identifying the data type of operand, inquire about and obtain device type information in the corresponding relation of the data type of the operand that can in step 101, preset and the device type of memory device, during implementation, can be in the table 1 that step 101 is set up the query facility type information, when a kind of data type in the table 1 can be corresponding with two kinds or above device type, obtain the preferred unit type when inquiring about first, for example the object ID of operand is PD0001, the data type that can draw this operand through identification is product data, data type question blank 1 according to these product data, the preferred unit type information that can obtain the memory device of the business datum of storing this operand is local cache equipment, the first-selected memory device of namely inquiring about the business datum of this operand is local cache equipment, for example the object ID of operand is BU0001 again, the data type that can draw this operand through identification is subscription data, data type question blank 1 according to this subscription data, the preferred unit type information of memory device that can store the business datum of this operand is the distributed caching memory device, and the first-selected memory device of namely searching the business datum of this operand is the distributed caching memory device.In addition, when receiving the again device type information of the memory device of the business datum of this operand of inquiry storage, just obtain the optional equipment type.
Step 203 according to the memory device of described device type information access respective type, and indicates described memory device that the business datum of described operand is carried out query manipulation;
Herein, when device type information is the device type information of database memory device, transmit described data operation request to described database memory device, this data operation request can indicate described database memory device that the business datum of described operand is carried out query manipulation, and concrete query manipulation is finished by the database memory device.If this database memory device is the local data base memory device, then directly to this local data base memory device forwarding data operation requests, if this database memory device is the network data base memory device, then inquire about first internet protocol (the Internet Protocol of this network data base memory device, IP) address routes to the network data base memory device according to this IP address with this data query request.
When device type information is the device type information of local cache equipment, access described local cache equipment, business datum to described operand in described local cache equipment is carried out query manipulation, herein, be local internal memory during local cache equipment implementation, therefore can be directly in local internal memory to the business datum execution query manipulation of described operand.
When device type information is the device type information of distributed caching memory device, inquire about and obtain the address information of the distributed caching memory device of the business datum of storing described operand, transmit described data operation request according to described address information to the distributed caching memory device, this data operation request indicates described distributed caching memory device that the business datum of described operand is carried out query manipulation.During implementation, can preset the corresponding relation of setting operation object and distributed caching memory device and IP address thereof, for example according to giving an example in the step 102, distributed caching memory device general cache change frequency is high, the data that requirement of real-time is higher, such as subscription data, an example of this corresponding relation is as shown in table 3, need to prove, in table 3, for example the operand in the data operation request is BU0001, according to this operand question blank 3, both can obtain operand BU0001 is stored in the distributed caching memory device 1, the IP address of this distributed caching memory device 1 is 192.168.34.6, according to described address information to distributed caching memory device 1 forwarding data operation requests, this indicates the business datum actual figure query manipulation of 1 couple of BU0001 of described distributed caching memory device, and concrete data query operation is finished by distributed caching memory device 1.
Step 204, the data manipulation object information to the business datum of described operand that receives that described memory device returns;
Herein, when after described database memory device forwarding data operation requests, the data manipulation object information to the business datum of described operand that receives that described database memory device returns.After transmitting described data operation request to the distributed caching memory device, the data manipulation object information to the business datum of described operand that receives that described distributed caching memory device returns.Behind the described local cache equipment of access, the data manipulation object information to the business datum of described operand that receives that described local cache equipment returns.
Step 205, whether the content that detects described data manipulation object information is query failure message;
Herein, when the memory device of preferred unit type is not preserved the business datum of operand, the data manipulation object information that then returns is query failure message, according to giving an example in the step 101, during implementation, generally be that local cache equipment and distributed caching equipment return query failure message because of the business datum that does not inquire operand in database separately, when the content of described data manipulation object information is query failure message, return step 202, send again the indication of query facility type information, can obtain the optional equipment type information of the memory device of the business datum of storing this operand this moment in the step 202, this optional equipment type is generally the database memory device of the whole business datums of storage, can guarantee the secondary query manipulation success of business datum of operand.When the content of described data manipulation object information is not query failure message, the business datum that this moment, this data manipulation object information was described operand, execution in step 206;
Step 206 is submitted described data manipulation object information to described service layer.
Herein, for example operand is BU0001 in the data query request, memory device returns the business datum of order corresponding to this operand BU0001 operation, and be submitted to the business datum of this operand BU0001 in the middle of the application that service layer sends this data operation request this moment.
Fig. 3 is the renewal operational flowchart of data manipulation method in the embodiment of the invention, the operation information of data operation request is for upgrading operation in embodiment shown in Figure 1, this moment, this data operation request was the Data Update request, the data manipulation object information is the Data Update object information, and the renewal operation of data manipulation method shown in Figure 1 may further comprise the steps:
Step 301 receives the data operation request that service layer issues, and described data operation request comprises operand and operation information;
Herein, receive and use the data operation request that issues in the service layer, described data operation request comprises operand and operation information, and this operation information upgrades operation and can be the operations such as increase, deletion or modification for upgrading operation.According to giving an example in the step 101, operand can be divided into product object, order object, user object and SP object, and each operand can represent with object ID during implementation, and for example operand is products A, then can represent with the product IDs of products A, such as PD0001 etc.; And for example operand is product subscription, and the order ID that then orders operation represents BU0001 etc.
Step 302 is identified the data type of described operand, obtains all devices type information of memory device of the business datum of the described operand of storage according to described data type;
, according to giving an example in the step 102, can go out according to the front two character recognition of object ID the data type of operand during implementation herein, an example of the corresponding relation of the data type of object ID and operand sees Table 2.After identifying the data type of operand, inquire about and obtain device type information in the corresponding relation of the data type of the operand that can in step 101, preset and the device type of memory device, during implementation, can be in the table 1 that step 101 is set up the query facility type information, when a kind of data type in the table 1 can be corresponding with two kinds or above device type, obtain all devices type information of the memory device of the business datum of storing described operand during inquiry according to described data type, for example the object ID of operand is PD0001, the data type that can draw this operand through identification is product data, data type question blank 1 according to these product data, the all devices type information of the memory device of the business datum of storing this operand be can obtain, local cache equipment and database memory device specifically comprised; For example the object ID of operand is BU0001 again, the data type that can draw this operand through identification is subscription data, data type question blank 1 according to this subscription data, the all devices type information of memory device of the business datum of this operand be can store, distributed caching memory device and database memory device specifically comprised.
Step 303 according to the memory device of described device type information access respective type, and is indicated described memory device that the business datum of described operand is carried out and is upgraded operation;
Herein, according to all devices type information of the memory device of the business datum of the described operand of storage that inquires in the step 302, to the memory device forwarding data operation requests of respective type.For example, in step 302, the object ID of operand is PD0001, the memory device of storing the business datum of this operand PD0001 has local cache equipment and database memory device, then transmit described data operation request to described database memory device, this data operation request can be indicated described database memory device that the business datum of described operand is carried out to upgrade and be operated, concrete renewal operation is finished by the database memory device, access simultaneously described local cache equipment, in described local cache equipment, the business datum of described operand is carried out the renewal operation, herein, be local internal memory during local cache equipment implementation, therefore can directly in local internal memory, carry out the renewal operation to the business datum of described operand.Again for example, the object ID of operand is BU0001, the memory device of storing the business datum of this operand BU0001 has distributed caching memory device and database memory device, transmit described data operation request to described database memory device, this data operation request can be indicated described database memory device that the business datum of described operand is carried out to upgrade and be operated, concrete renewal operation is finished by the database memory device, inquire about simultaneously and obtain the address information of the distributed caching memory device of the business datum of storing described operand, transmit described data operation request according to described address information to the distributed caching memory device, this data operation request is indicated described distributed caching memory device that the business datum of described operand is carried out to upgrade and is operated.During implementation, can preset the corresponding relation of setting operation object and distributed caching memory device and IP address thereof, for example according to giving an example in the step 102, distributed caching memory device general cache change frequency is high, the data that requirement of real-time is higher, such as subscription data, an example of this corresponding relation is as shown in table 3, need to prove, in table 3, for example the operand in the data operation request is BU0001, according to this operand question blank 3, both can obtain operand BU0001 is stored in the distributed caching memory device 1, the IP address of this distributed caching memory device 1 is 192.168.34.6, according to described address information to distributed caching memory device 1 forwarding data operation requests, this data operation request indicates the business datum actual figure of 1 couple of BU0001 of described distributed caching memory device to upgrade operation, and concrete Data Update operation is finished by distributed caching memory device 1.
Step 304, the data manipulation object information to the business datum of described operand that receives that described memory device returns is submitted described data manipulation object information to described service layer.
Herein, during implementation, owing to preserving all business datums in the database memory device, the database memory device can be finished and upgrade operation generally speaking, and return data upgrades the operation successful information; In addition, owing to may not necessarily preserve the business datum that service layer need to upgrade in local cache or the distributed caching memory device, this moment, local cache or distributed caching memory device can upgrade operation failure information by return data, can be left intact for this Data Update operation failure information, directly submit Data Update operation failure information to service layer, service layer can be according to not preserving the business datum of upgrading the operation appointment in this Data Update operation failure information indicating subscriber's local buffer memory or the distributed caching memory device.Therefore for upgrading operation, content detection step that can the omitted data operation result information in step 304.
Fig. 4 is the schematic diagram of data manipulation equipment in the embodiment of the invention, data manipulation equipment comprises receiver module 41, data routing module 42, data manipulation proxy module 43, distributed caching control module 44 and data configuration module 45 in the embodiment of the invention, wherein:
Data configuration module 45 is used for the corresponding relation of the device type of the data type of the default operand of storage and memory device;
Herein, the data type of operand can be determined according to practical situations, for example the data type of operand can be divided into the numerous types of data such as product data, subscription data, user data and service provider (Service Provider, SP) data.The device type of memory device can be divided into local cache equipment (being labeled as 48 among Fig. 4), distributed caching memory device 49 (being labeled as 49 among Fig. 4) and database memory device (being labeled as 50 among Fig. 4) etc.During implementation, can be according to the corresponding relation of the device type of the change frequency of the data type of operand and data type that real-time is set up operand and memory device, business datum in order to operand that a certain data type is described is stored in the memory device of which kind of device type, for example database memory device 50 is generally preserved whole product data, subscription data, user data and SP data, distributed caching memory device 49 general cache change frequencies are high, the data that requirement of real-time is higher, such as subscription data, local cache equipment 48 general cache change frequencies are low, the data that requirement of real-time is lower, such as product data, user data and SP data, therefore can be according to the corresponding relation of the device type of the data type of above-mentioned situation predetermined registration operation object and memory device, an example of the corresponding relation of the data type of operand and the device type of memory device is as shown in table 1, need to prove, the corresponding relation of the memory device device type of various types of business datums and this business datum of storage has been described in the table 1, setting up the corresponding relation formula, a kind of data type can be corresponding with a kind of device type, also can corresponding with two or more device types (as shown in table 1), when a kind of data type is corresponding with two or more device types, according to sequentially being divided into from top to bottom preferred unit type and optional equipment type, for example for product data, local cache equipment 48 is the preferred unit type, and database memory device 50 is the optional equipment type.
Receiver module 41 is used for receiving the data operation request that service layer issues, and described data operation request comprises operand and operation information;
Herein, receive and use the data operation request that issues in the service layer, described data operation request comprises operand and operation information, giving an example in the data-driven configuration module 45, operand can be divided into product object, order object, user object and SP object, and each operand can represent with object ID during implementation, and for example operand is products A, then can represent with the product IDs of products A, such as PD0001 etc.; And for example operand is for ordering operation, and the order ID that then orders operation represents BU0001 etc.Operation information is used for indicating the data manipulation that need to carry out operand, and this data manipulation comprises query manipulation and upgrades operation, wherein upgrades operation and comprise the operations such as increase, deletion and modification.
Data routing module 42 is used for identifying the data type of described operand after described receiver module 41 receive data operation requests, obtains the device type information of the memory device of the business datum of storing described operand according to described data type;
Herein, according to giving an example in the receiver module 41, can go out according to the front two character recognition of object ID the data type of operand during implementation, an example of the corresponding relation of the data type of object ID and operand sees Table 2, according to table 2, the object ID of the operand that for example receives is PD0001, the data type that then can identify operand according to the front two letter is user data, the object ID of the operand that and for example receives is BD0001, and the data type that then can identify operand according to the front two letter is subscription data.After identifying the data type of operand, obtain the device type information of memory device of the business datum of the described operand of storage according to data type, can obtain the device type information of memory device of the business datum of storage operation object B D0001; And for example the object ID of operand is PD0001, the data type that can draw this operand through identification is product data, according to the data type question blank 1 of these product data, can obtain the device type information of the memory device of the business datum of storing this operand PD0001.
Need to prove, when described data routing module operates for upgrading at described operation information, identify the data type of described operand, according to the corresponding relation of the device type of the data type of the storage in described data type and the data configuration module 45 and memory device, obtain all devices type information of memory device of the business datum of the described operand of storage.Described data routing module is identified the data type of described operand when described operation information is query manipulation, obtain the preferred unit type information of the memory device of the business datum of storing described operand according to described data type.
Data manipulation proxy module 43, the device type information that is used for obtaining according to described data routing module 42 is accessed the memory device of respective type, and indicates described memory device according to the business datum executing data operation of described operation information to described operand; The data manipulation object information to the business datum of described operand that receives that described memory device returns, and submit described data manipulation object information to described service layer.Data manipulation proxy module 43 comprises database access agent unit 431, local cache agent unit 432 and distributed caching agent unit 433, wherein:
Database access agent unit 431 is used for transmitting described data operation request to described database memory device 50, indicate described database memory device 50 according to the business datum executing data operation of described operation information to described operand, and the data manipulation object information to the business datum of described operand that receives that described database memory device 50 returns, and submit described data manipulation object information to described service layer;
Herein, when device type information is the device type information of database memory device 50, transmit described data operation request to described database memory device 50, this data operation request can indicate described database memory device 50 according to the business datum executing data operation of described operation information to described operand, and concrete data manipulation is finished by database memory device 50.If this database memory device 50 is local data base memory device 50, then directly to these local data base memory device 50 forwarding data operation requests, if this database memory device 50 is network data base memory device 50, then inquire about first internet protocol (the Internet Protocol of this network data base memory device 50, IP) address routes to network data base memory device 50 according to this IP address with this data operation request.
Local cache agent unit 432 is used for accessing described local cache equipment 48, in described local cache equipment 48, operate according to the business datum executing data of described operation information to described operand, and the data manipulation object information to the business datum of described operand that receives that described local cache equipment 48 returns, and submit described data manipulation object information to described service layer;
When device type information is the device type information of local cache equipment 48, access described local cache equipment 48, in described local cache equipment 48, operate according to the business datum executing data of described operation information to described operand, herein, be local internal memory during local cache equipment 48 implementation, therefore can be according to the business datum executing data operation to described operand in local internal memory of the operation information in the data operation request.
Distributed caching agent unit 433 is used for transmitting described data operation request to distributed caching memory device 49, and the data manipulation object information to the business datum of described operand that receives that described distributed caching memory device 49 returns, submit described data manipulation object information to described service layer.
Data manipulation proxy module 43 also comprises:
Detecting unit 434 is used for when described operation information is query manipulation, and whether detect described data manipulation object information is query failure message;
Herein, during implementation, owing to preserving all business datums in the database memory device, the database memory device can be finished and upgrade operation generally speaking, and return data upgrades the operation successful information; In addition, owing to may not necessarily preserve the business datum that service layer need to upgrade in local cache or the distributed caching memory device, this moment, local cache or distributed caching memory device can upgrade operation failure information by return data, can be left intact for this Data Update operation failure information, directly submit Data Update operation failure information to service layer, service layer can be according to not preserving the business datum of upgrading the operation appointment in this Data Update operation failure information indicating subscriber's local buffer memory or the distributed caching memory device.Therefore for upgrading operation, content detection step that can the omitted data operation result information in detecting unit 434.
Route indicating member 435, be used for when the described data query object information of detecting unit 434 detections is query failure message, indicating described data routing module 42 to obtain the optional equipment type information of the memory device of the business datum of storing described operand according to described data type;
Commit unit 436 is used for submitting described data manipulation object information to described service layer when the described data query object information of detecting unit 434 detections is not query failure message.
Data manipulation equipment also comprises distributed caching control module 44 in the embodiment of the invention, wherein:
Distributed caching control module 44 receives the data operation request that described distributed caching agent unit 433 is transmitted, inquire about and obtain the address information of the distributed caching memory device 49 of the business datum of storing described operand, according to the data operation request that described address information is transmitted to distributed caching memory device 49, indicate described distributed caching memory device 49 according to the business datum executing data operation of described operation information to described operand; The data manipulation object information to the business datum of described operand that receives that described distributed caching memory device 49 returns, and return described data manipulation object information to distributed caching agent unit 433.Distributed caching control module 44 comprises:
Buffer memory registering unit 441 is used for preserving the configuration information of each distributed caching equipment business datum;
When device type information is the device type information of distributed caching memory device 49, inquire about and obtain the address information of the distributed caching memory device 49 of the business datum of storing described operand, transmit described data operation request according to described address information to distributed caching memory device 49, this indicates described distributed caching memory device 49 according to the business datum executing data operation of described operation information to described operand.During implementation, can preset the corresponding relation of setting operation object and distributed caching memory device 49 and IP address thereof, for example according to giving an example in the data configuration module 45, distributed caching memory device 49 data that the general cache change frequency is high, requirement of real-time is higher, such as subscription data, an example of this corresponding relation is as shown in table 3.
Access routing unit 442, after being used for the receive data operation requests, in buffer memory registering unit 441, inquire about and obtain the address information of the distributed caching memory device 49 of the business datum of storing described operand, according to the data operation request that described address information is transmitted to distributed caching memory device 49, indicate described distributed caching memory device 49 according to the business datum executing data operation of described operation information to described operand;
Herein, for example the operand in the data operation request is BU0001, according to this operand question blank 3, both can obtain operand BU0001 is stored in the distributed caching memory device 1, the IP address of this distributed caching memory device 1 is 192.168.34.6, transmit described data operation request according to described address information to distributed caching memory device 1, this indicates described distributed caching memory device 1 according to the business datum executing data operation of described operation information to described operand, and concrete data manipulation is finished by distributed caching memory device 1.
Cached configuration unit 443 is used for the configuration information of described buffer memory registering unit 441 business datums is configured;
Cache flush unit 443 is used for the configuration information of described buffer memory registering unit 441 business datums is refreshed.
Data manipulation equipment also comprises data monitoring module 46 and local cache control module 47 in the embodiment of the invention, wherein:
Data monitoring module 46 for detection of the running status of described memory device, is upgraded the corresponding relation of the device type of the data type of the operand in the data configuration module 45 and memory device according to described running status.
Herein, corresponding relation for the device type of the data type of the operand shown in the table 1 and memory device, can be by detecting the running status of described memory device, dynamically update according to described running status, for example current detection is to local cache equipment 48 operation exceptions, then in table 1 with user data, the device type information deletion of the local cache equipment 48 that product data and SP data are corresponding, behind local cache equipment 48 normal operations, add local cache equipment 48 to user data again, in device type information corresponding to product data and SP data.
Local cache control module 47 is used for according to default local cache control configuration information the business datum of described local cache equipment 48 being upgraded.
Herein, local cache control configuration information that should be default can be preset and be stored in the data configuration module 45, for the business datum in the local cache, can the business datum of described local cache equipment 48 be upgraded according to default local cache control configuration information, for example from database memory device 50, load data, flush buffers data etc. are supported the expired cache policy such as arrange of least recently used, full dose buffer memory and buffer memory.
Fig. 5 is that data manipulation equipment shown in Figure 4 carries out the query manipulation flow chart, when receiver module 51 receives to such an extent that the operation information of data operation requests is query manipulation, this moment, this data operation request was the data query request, the data manipulation object information is the data query object information, the present embodiment is to order operation in order to describe with the operand example, and data manipulation equipment shown in Figure 4 carries out query manipulation flow process following steps:
Step 501, the receiver module 41 of data manipulation equipment receives the data query request that service layer issues;
Herein, operation information is query manipulation, and the operand of data query request for example can be to order operation, orders can representing with ordering ID of operation during implementation, such as BU0001 etc.
Step 502, the data routing module 42 of data manipulation equipment is identified the data type of described operand, obtains the preferred unit type information of the memory device of the business datum of storing described operand according to described data type;
, can go out according to the front two character recognition of object ID the data type of operand during implementation herein, an example of the corresponding relation of the data type of object ID and operand sees Table 2.After identifying the data type of operand, inquire about and obtain device type information in the corresponding relation of the data type of the operand that can preset and the device type of memory device, during implementation, query facility type information in can table 1, when a kind of data type in the table 1 can be corresponding with two kinds or above device type, obtain the preferred unit type when inquiring about first, for example the object ID of aforesaid operations object is BU0001, the data type that can draw this operand through identification is subscription data, data type question blank 1 according to this subscription data, the preferred unit type information of memory device that can store the business datum of this operand is distributed caching memory device 49, and the first-selected memory device of namely searching the business datum of this operand is distributed caching memory device 49.In addition, data routing module 42 obtains alternative device type when receiving the again device type information of the memory device of the business datum of this operand of inquiry storage.
Step 503, the distributed caching agent unit 433 of data manipulation proxy module 43 is to distributed caching control module 44 forwarding data query requests;
Step 504, the address information of the distributed caching memory device 49 of the business datum of storing described operand is inquired about and obtained to distributed caching control module 44, according to the data query request that described address information is transmitted to distributed caching memory device 49, indicate the business datum of 49 pairs of described operands of described distributed caching memory device to carry out query manipulation;
Herein, during implementation, can preset the corresponding relation of setting operation object and distributed caching memory device 49 and IP address thereof, for example according to giving an example in the step 102, distributed caching memory device 49 general cache change frequencies are high, the data that requirement of real-time is higher, such as subscription data, an example of this corresponding relation is as shown in table 3, need to prove, in table 3, for example the operand in the data operation request is BU0001, according to this operand question blank 3, both can obtain operand BU0001 is stored in the distributed caching memory device 1, the IP address of this distributed caching memory device 1 is 192.168.34.6, to distributed caching memory device 1 forwarding data query requests, this indicates the business datum actual figure query manipulation of 1 couple of BU0001 of described distributed caching memory device according to described address information, and concrete data manipulation is finished by distributed caching memory device 1.
The data query object information to the business datum of described operand that step 505, distributed caching control module 44 receive that distributed caching memory devices 49 return, and return this data query object information to distributed caching agent unit 433;
Step 506, data manipulation proxy module 43 detecting units 434 detect whether described data query object information is query failure message;
Step 507, when the content of described detecting unit 434 detection data query object informations was not query failure message, commit unit 436 was submitted described business datum to described service layer;
Step 508, when the described data query object information of detecting unit 434 detections was query failure message, the described data routing module 42 of route indicating member 435 indications obtained the optional equipment type information of the memory device of the business datum of storing described operand again;
Herein, when the distributed caching memory device 49 of preferred unit type is not preserved the business datum of operand, the data query object information that then returns is query failure message, at this moment, send detecting unit 434 and send again the indication of query facility type information to data routing module 42, data routing module 42 can obtain the optional equipment type information of the memory device of the business datum of storing this operand at this moment, this optional equipment type is generally the database memory device 50 of the whole business datums of storage, can guarantee the business datum query manipulation success of operand.
Step 509, the database access agent unit 431 of data manipulation proxy module 43 is to database memory device 50 forwarding data query requests;
Herein, when device type information is the device type information of database memory device 50, transmit described data query request to described database memory device 50, this data query request can indicate the business datum of 50 pairs of described operands of described database memory device to carry out query manipulation, and concrete query manipulation is finished by database memory device 50.If this database memory device 50 is local data base memory device 50, then directly to these local data base memory device 50 forwarding data query requests, if this database memory device 50 is network data base memory device 50, then inquire about first internet protocol (the Internet Protocol of this network data base memory device 50, IP) address routes to network data base memory device 50 according to this IP address with this data query request.
Step 510, the business datum of the described operand that the database access agent unit 431 receive data library storage equipment 50 of data manipulation proxy module 43 return is submitted described business datum to described service layer.
Herein, for example operand is BU0001 in the data query request, memory device returns the business datum of order corresponding to this operand BU0001 operation, and be submitted to the business datum of this operand BU0001 in the middle of the application that service layer sends this data query request this moment.
Fig. 6 is that data manipulation equipment shown in Figure 4 upgrades operational flowchart, when receiver module 51 receive the operation information of data operation requests for upgrading operation, this moment, this data operation request was the Data Update request, the data manipulation object information is the Data Update object information, operand take data operation request in the present embodiment describes as order is operating as example, and data manipulation equipment shown in Figure 4 upgrades the operating process following steps:
Step 601, the receiver module 41 of data manipulation equipment receives the Data Update request that service layer issues;
Herein, operation information is for upgrading operation, and the operand of Data Update request for example can be to order operation, orders can representing with ordering ID of operation during implementation, such as BU0001 etc.
Step 602, the data routing module 42 of data manipulation equipment is identified the data type of described operand, obtains all devices type information of the memory device of the business datum of storing described operand according to described data type;
, according to giving an example in the step 102, can go out according to the front two character recognition of object ID the data type of operand during implementation herein, an example of the corresponding relation of the data type of object ID and operand sees Table 2.After identifying the data type of operand, inquire about and obtain device type information in the corresponding relation of the data type of the operand that can in step 101, preset and the device type of memory device, during implementation, can be in the table 1 that step 101 is set up the query facility type information, when a kind of data type in the table 1 can be corresponding with two kinds or above device type, obtain all devices type information of the memory device of the business datum of storing described operand during inquiry according to described data type, for example the object ID of operand is BU0001, the data type that can draw this operand through identification is subscription data, data type question blank 1 according to this subscription data, the all devices type information of memory device of the business datum of this operand be can store, distributed caching memory device 49 and database memory device 50 specifically comprised.
Step 603, the database access agent unit 431 of data manipulation proxy module 43 is to database memory device 50 forwarding data update requests;
Herein, when device type information is the device type information of database memory device 50, transmit described Data Update request to described database memory device 50, this data query request can be indicated the business datum of 50 pairs of described operands of described database memory device to carry out to upgrade and be operated, and concrete renewal operation is finished by database memory device 50.If this database memory device 50 is local data base memory device 50, then directly to these local data base memory device 50 forwarding data update requests, if this database memory device 50 is network data base memory device 50, then inquire about first internet protocol (the Internet Protocol of this network data base memory device 50, IP) address routes to network data base memory device 50 according to this IP address with this data query request.
Step 604, the distributed caching agent unit 433 of data manipulation proxy module 43 is to distributed caching control module 44 forwarding data update requests;
Step 605, the address information of the distributed caching memory device 49 of the business datum of storing described operand is inquired about and obtained to distributed caching control module 44, according to the Data Update request that described address information is transmitted to distributed caching memory device 49, indicate the business datum of 49 pairs of described operands of described distributed caching memory device to carry out query manipulation;
Herein, the address information of the distributed caching memory device 49 of the business datum of storing described operand is inquired about and obtained to distributed caching control module 44, transmit described data query request according to described address information to distributed caching memory device 49, this indicates the business datum of 49 pairs of described operands of described distributed caching memory device to carry out query manipulation.During implementation, can preset the corresponding relation of setting operation object and distributed caching memory device 49 and IP address thereof, for example according to giving an example in the step 102, distributed caching memory device 49 general cache change frequencies are high, the data that requirement of real-time is higher, such as subscription data, an example of this corresponding relation is as shown in table 3, need to prove, in table 3, for example the operand in the data operation request is BU0001, according to this operand question blank 3, both can obtain operand BU0001 is stored in the distributed caching memory device 1, the IP address of this distributed caching memory device 1 is 192.168.34.6, according to described address information to distributed caching memory device 1 forwarding data query requests, this indicates the business datum actual figure query manipulation of 1 couple of BU0001 of described distributed caching memory device, and concrete data manipulation is finished by distributed caching memory device 1.
Step 606, the Data Update object information that the database access agent unit 431 receive data library storage equipment 50 of data manipulation proxy module 43 return is submitted described Data Update object information to described service layer;
Step 607, distributed caching control module 44 receives the Data Update object information that distributed caching memory device 49 returns, and returns described Data Update object information to distributed caching agent unit 433;
Step 608, distributed caching agent unit 433 returns described Data Update object information to described service layer.
In sum, implement the embodiment of the invention, the data operation request that issues by receiving service layer, described data operation request comprises operand and operation information, identify the data type of described operand, obtain the device type information of the memory device of the business datum of storing described operand according to described data type, memory device according to described device type information access respective type, and indicate described memory device according to the business datum executing data operation of described operation information to described operand, can be for the data type of its operand different data operation request, adopt dissimilar memory device to process, effectively various data operation request are assigned to dissimilar memory device, avoid single storage device processes total data operation requests, thereby alleviated the processing load of various memory devices, improved the concurrent quantity of user's operation requests and the response speed of user's operation requests.
Above disclosed is preferred embodiment of the present invention only, certainly can not limit with this interest field of the present invention, and the equivalent variations of therefore doing according to claim of the present invention still belongs to the scope that the present invention is contained.