CN109582330A - Data model upgrade method, device, equipment and readable storage medium storing program for executing - Google Patents

Data model upgrade method, device, equipment and readable storage medium storing program for executing Download PDF

Info

Publication number
CN109582330A
CN109582330A CN201811152496.9A CN201811152496A CN109582330A CN 109582330 A CN109582330 A CN 109582330A CN 201811152496 A CN201811152496 A CN 201811152496A CN 109582330 A CN109582330 A CN 109582330A
Authority
CN
China
Prior art keywords
data model
account
state
server
process status
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811152496.9A
Other languages
Chinese (zh)
Other versions
CN109582330B (en
Inventor
马聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811152496.9A priority Critical patent/CN109582330B/en
Publication of CN109582330A publication Critical patent/CN109582330A/en
Application granted granted Critical
Publication of CN109582330B publication Critical patent/CN109582330B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The embodiment of the present disclosure provides data model upgrade method, device, equipment and readable storage medium storing program for executing.Data model upgrade method includes: while executing business operation, the current data model state of detection service device, the current data model state are one of the old data model state not upgraded, the process status in escalation process and the new data model state for completing escalation process;When detecting the first preset condition, the server push that current data model state is in old data model state is sent to process status;According to the current data model state of the server, data processing is carried out for the business operation using data model corresponding with the current data model state, wherein, when the current data model state of the server is process status, one of new data model and old data model are applied respectively by business operation of the account dimension to account, upgrading complexity can be reduced, data model upgrading is carried out with account dimension.

Description

Data model upgrade method, device, equipment and readable storage medium storing program for executing
Technical field
The embodiment of the present disclosure is related to field of computer technology more particularly to data model upgrade method, device, equipment and can Read storage medium.
Background technique
In the related technology, for the distributed computer application system of complete set, especially similar to financial security, family account The high-availability systems based on state type data such as management, changing to bottom data model is all one there are high risks Problem.By taking billing and accounting system as an example, the account balance of user, state real-time change, for DB level, data model change One layer of relation mapping table is only related to, is changed very simple.But for requiring high Distributed Application for high availability, such as The upgrading that accounting data model is where carried out under the premise of user's unaware, service nondestructive, then full of risk and challenge.If answered The cause that understands differently with server to new data model causes the previous pen of user to operate with old data model, latter pen operation Using new data model, then the catastrophe failures such as account loss are very likely to cause.
In face of problems, most common solution is to split dimension according to the horizontal of application underlying database, in batches It is secondary to user carry out prohibit write.For example, forbid the every operation of 1% user during one section according to using routing, it is laggard The upgrading of row data model.But prohibit write during customer service in batch is damaged, and low peak period is needed to operate, manpower at This investment is big.Moreover, after the completion of upgrading, needs to apply or sql verification guarantees the integrality and correctness of data model upgrading, This causes taboo to be write, and the time is longer, and further increasing business is lost.Latter step incision new data model, risk are write complete in addition, prohibiting It is higher.
Therefore, need it is a kind of a kind of lossless, unattended solution is provided, under the premise of user's unaware, Data model is upgraded.
Summary of the invention
In view of this, disclosure first aspect provides a kind of data model upgrade method, comprising:
While executing business operation, the current data model state of detection service device, the current data model shape State is the old data model state not upgraded, the process status in escalation process and the new data mould for completing escalation process One of type state;
When detecting the first preset condition, current data model state is in the server push of old data model state It is sent to process status;
According to the current data model state of the server, data corresponding with the current data model state are utilized Model carries out data processing for the business operation, wherein when the current data model state of the server is process shape When state, one of new data model and old data model are applied respectively by business operation of the account dimension to account.
Disclosure second aspect provides a kind of data model update device, comprising:
Detection module is configured as while executing business operation, the current data model state of detection service device, institute Current data model state is stated to be the old data model state not upgraded, the process status in escalation process and complete to rise One of the new data model state of grade process;
First pushing module is configured as when detecting the first preset condition, and current data model state is in old The server push of data model state is sent to process status;
Data processing module is configured as the current data model state according to the server, using with it is described current The corresponding data model of data model state carries out data processing for the business operation, wherein when working as the server When preceding data model state is process status, new data model and old number are applied respectively by business operation of the account dimension to account According to one of model.
The disclosure third aspect provides a kind of electronic equipment, including memory and processor;Wherein, the memory is used In storing one or more computer instruction, wherein one or more computer instruction is executed by the processor with reality Now method as described in relation to the first aspect.
Disclosure fourth aspect provides a kind of readable storage medium storing program for executing, is stored thereon with computer instruction, which refers to Enable the method realized when being executed by processor as described in relation to the first aspect.
In disclosure embodiment, by while executing business operation, the current data model of detection service device State, the current data model state are old data model state, the process status in escalation process not upgraded With one of the new data model state for completing escalation process;When detecting the first preset condition, by current data model state Server push in old data model state is sent to process status;According to the current data model state of the server, benefit Data processing is carried out for the business operation with data model corresponding with the current data model state, wherein works as institute When the current data model state for stating server is process status, application newly counts the business operation by account dimension to account respectively According to one of model and old data model, upgrading complexity can be reduced, data model upgrading is carried out with account dimension.Moreover, right Incremental data directly uses new data model, guarantees to can reach data model in process status consistent.Moreover, according to the disclosure The data model upgrading scheme of embodiment may be implemented it is lossless, unattended, be not required to prohibit write, the data mould of user's unaware Type upgrades, and manpower intervention is not needed in escalation process, upgrading risk is very low and saves manpower.
These aspects or other aspects of the disclosure can more straightforwards in the following description.
Detailed description of the invention
Technical solution in order to illustrate more clearly of the embodiment of the present disclosure or in the related technology, below will be to exemplary implementation Attached drawing needed in example or description of Related Art is briefly described, it should be apparent that, the accompanying drawings in the following description It is some exemplary embodiments of the disclosure, for those of ordinary skill in the art, before not making the creative labor It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 shows the flow chart of the data model upgrade method according to one embodiment of the disclosure;
Fig. 2 shows the exemplary processes of the step S103 in the data model upgrade method according to one embodiment of the disclosure Figure;
Fig. 3 shows the flow chart of the data model upgrade method according to another embodiment of the disclosure;
Fig. 4 shows the flow chart of the data model upgrade method according to another embodiment of the disclosure;
Fig. 5 shows the flow chart of the data model upgrade method according to another embodiment of the disclosure;
Fig. 6 shows the structural block diagram of the data model update device according to one embodiment of the disclosure;
Fig. 7 shows showing for the data processing module 603 in the data model update device according to one embodiment of the disclosure The structural block diagram of example;
Fig. 8 shows the structural block diagram of the data model update device according to another embodiment of the disclosure;
Fig. 9 shows the structural block diagram of the data model update device according to another embodiment of the disclosure;
Figure 10 shows the structural block diagram of the data model update device according to another embodiment of the disclosure;
Figure 11 shows the schematic diagram of the implementation principle of the data model upgrading scheme according to one embodiment of the disclosure;
Figure 12 shows the schematic diagram of the application scenarios of the data model upgrading scheme according to one embodiment of the disclosure;
Figure 13 shows the structural block diagram of the equipment according to one embodiment of the disclosure;
Figure 14 is adapted for the computer system for realizing the data model upgrade method according to one embodiment of the disclosure Structural schematic diagram.
Specific embodiment
In order to make those skilled in the art more fully understand disclosure scheme, below in conjunction with the exemplary implementation of the disclosure Attached drawing in example, is clearly and completely described the technical solution in disclosure exemplary embodiment.
In some processes of the description in the specification and claims of the disclosure and above-mentioned attached drawing, contain according to Multiple operations that particular order occurs, but it should be clearly understood that these operations can not be what appears in this article suitable according to its Sequence is executed or is executed parallel, and serial number of operation such as 101,102 etc. is only used for distinguishing each different operation, serial number It itself does not represent and any executes sequence.In addition, these processes may include more or fewer operations, and these operations can To execute or execute parallel in order.It should be noted that the description such as " first " herein, " second ", is for distinguishing not Same message, equipment, module etc., does not represent sequencing, does not also limit " first " and " second " and be different type.
Below in conjunction with the attached drawing in disclosure exemplary embodiment, to the technical solution in disclosure exemplary embodiment It being clearly and completely described, it is clear that described exemplary embodiment is only disclosure a part of the embodiment, rather than Whole embodiments.Based on the embodiment in the disclosure, those skilled in the art institute without creative efforts The every other embodiment obtained belongs to the range of disclosure protection..
Fig. 1 shows the flow chart of the data model upgrade method according to one embodiment of the disclosure.This method may include Step S101, S102 and S103.
In step s101, while executing business operation, the current data model state of detection service device, current number It is the old data model state not upgraded, the process status in escalation process and completion escalation process according to model state One of new data model state.
In step s 102, when detecting the first preset condition, current data model state is in old data model The server push of state is sent to process status.
In step s 103, according to the current data model state of server, using corresponding with current data model state Data model for business operation carry out data processing, wherein when server current data model state be process status When, one of new data model and old data model are applied respectively by business operation of the account dimension to account.
In embodiment of the disclosure, a kind of " old data model state (initial state)-process status (process is proposed State)-new data model state (final state) " data model upgrading scheme, breach distributed system business limited scalability In the bottleneck of data model.That is, it is considered that being based on " initial according to the data model upgrading scheme of embodiment of the present disclosure The upgrading scheme of the state machine of state-process state-final state ".
In embodiment of the present disclosure, the data processing model of server is upgraded although only referring to, this Field technical staff, which is appreciated that, is equally applicable to server set according to the data model upgrading scheme of embodiment of the present disclosure Group, the server cluster or distributed server cluster either concentrated.Therefore, in embodiment of the present disclosure, service Device may refer to server cluster.
It is write according to the data model upgrading scheme of embodiment of the present disclosure without prohibiting, it therefore, can be in the business of execution behaviour While work, the current data model state of detection service device is to carry out corresponding operation.
According in embodiment of the present disclosure, the first preset condition can be the server in old data model state In preset time point, the server in old data model state is in preset upgrading batch, and server receives upgrading Instruction etc..
According in embodiment of the present disclosure, the current data model state of server can be current data model shape State is the old data model state not upgraded, the process status in escalation process and the new data mould for completing escalation process One of type state.
In disclosure embodiment, by while executing business operation, the current data model of detection service device State, the current data model state are old data model state, the process status in escalation process not upgraded With one of the new data model state for completing escalation process;When detecting the first preset condition, by current data model state Server push in old data model state is sent to process status;According to the current data model state of the server, benefit Data processing is carried out for the business operation with data model corresponding with the current data model state, wherein works as institute When the current data model state for stating server is process status, application newly counts the business operation by account dimension to account respectively According to one of model and old data model, upgrading complexity can be reduced, data model upgrading is carried out with account dimension.Moreover, right Incremental data directly uses new data model, guarantees to can reach data model in process status consistent.Moreover, according to the disclosure The data model upgrading scheme of embodiment may be implemented it is lossless, unattended, be not required to prohibit write, the data mould of user's unaware Type upgrades, and manpower intervention is not needed in escalation process, upgrading risk is very low and saves manpower.
According in embodiment of the present disclosure, when the current data model state of server is old data model state When, corresponding operating is carried out only with old data model, and when detecting the first preset condition, by current data model state Server push in old data model state is sent to process status.Therefore, the state that the data model of server is upgraded It is exactly process status.When the current data model state of server is process status, grasped by business of the account dimension to account Make to apply one of new data model and old data model respectively.That is, when the current data model state of server is process status When, do not take a step to be switched to the operation of new data model the account not upgraded, but it is directed to different business operations, it answers With one of new data model and old data model.It avoids to be switched to new data model from old one step of data model in this way and lead Obvious perception of the risk and user of cause to upgrading.When the current data model state of server is new data model state When, corresponding operating is carried out only with new data model.
In one embodiment of the present disclosure, step S103 includes: the process status according to server, for account whether Completed upgrading, in the action type for the business operation of data type and account that the business operation of account is related at least One of, one of new data model and old data model are applied respectively to the business operation of the account.
Figure 11 shows the schematic diagram of the implementation principle of the data model upgrading scheme according to one embodiment of the disclosure.
As shown in figure 11, when handling in the server a business operation, and the current data mould of server It is unified to be operated according to data of the old data model to this business when type state is old data model state (I state).When A business operation is handled in the server, and the current data model state of server is new data model state It is unified to be operated according to data of the new data model to this business when (S state).When in the server to a business behaviour It is handled, and when the current data model state of server is process status (P-state), it is whether complete for account At least one of the action type of business operation of data type and account being related at the business operation of upgrading, account, One of new data model and old data model are applied respectively to the business operation of the account.
Specifically, server current data model state be process status (P-state) present case under, work as industry When the data of business operation are state type data, for increasing the operation of state type data newly, data are inserted into according to new data model;It is right In modification state type data operation, judge whether the targeted account of the operation is completed to upgrade, if complete upgrading if according to New data model modification data, and according to old data model more new data if not completing upgrading;For inquiring state type The operation of data inquires data according to old data model.In embodiment of the disclosure, state type data are stateful, more Stateful data are depended between business, and to guarantee the accuracy of the data, such as account balance, do remaining sum payment When have to know original remaining sum, could pay successfully.
Specifically, server current data model state be process status (P-state) present case under, work as industry When the data of business operation are flowing water type data, for increasing the operation of flowing water type data newly, data are inserted into according to new data model;It is right In the operation of inquiry flowing water type data, data are inquired according to old data model.In embodiment of the disclosure, flowing water type data are It is stateless, it is not associated between more business, new document, such as transaction flow can be all generated when each business comes Water, payment flowing water, can finishing service as long as it can be inserted into new document.The characteristics of flowing water type data is before subsequent data do not depend on The data in face, temporally flowing water enters database to all data.
Fig. 2 shows the exemplary processes of the step S103 in the data model upgrade method according to one embodiment of the disclosure Figure.Step S103 as shown in Figure 2 includes step S201 and step S202.
In step s 201, it according to the process status of server, is obtained according to preset period of time and is in old data model Account.
In step S202, the account in old data model is locked one by one, successively makes the account in old data model Number enter process status to be upgraded to new data model.
In one embodiment according to the disclosure, a certain distributed server can be pushed by management platform To after process status (P-state), using the account for being in old data model is obtained by timed task, account is locked simultaneously one by one Complete upgrading.After the completion of the upgrading of some account, it is retained in process status, but can carry out logic behaviour according to new data model Make.
In disclosure embodiment, by the process status according to server, it is according to preset period of time acquisition The account of old data model;Locked one by one in the account of old data model, successively make the account in old data model into Enter process status to be upgraded to new data model, may be implemented it is lossless, unattended, be not required to prohibit write, the number of user's unaware Upgrade according to model, manpower intervention is not needed in escalation process, upgrading risk is very low and saves manpower.
Fig. 3 shows the flow chart of the data model upgrade method according to another embodiment of the disclosure.Implementation shown in Fig. 3 The difference of mode and embodiment shown in FIG. 1 is that Fig. 3 further includes step other than including step S101, S102 and S103 Rapid S301.
In step S301, when whole accounts in the server in process status are the account in new data model Number when, new data model state will be sent in the server push of process status.
In one embodiment of the present disclosure, after the completion of the account of a default batch all upgrades and checks, by needle The server of upgrading task is executed to the account of this batch or server cluster is pushed to new data model state (in Figure 11 S state).
In embodiment of the present disclosure, by obtaining when whole accounts in the server in process status are to be in When the account of new data model, new data model state will be sent in the server push of process status, may be implemented it is lossless, It is unattended, be not required to prohibit write, the upgrading of the data model of user's unaware, manpower intervention is not needed in escalation process, upgrades risk Very low and saving manpower.
Fig. 4 shows the flow chart of the data model upgrade method according to another embodiment of the disclosure.Implementation shown in Fig. 4 The difference of mode and embodiment shown in Fig. 3 is that Fig. 4 is other than including step S101, S102, S103 and S301, also Including step S401.
In step S401, the account table that record has account is established, wherein account table includes the upgrade status for distinguishing account Upgrade flag field, wherein upgrade flag field by the upgrade status of each account be labeled as old data model state, process One of state and new data model state.
In embodiment of the present disclosure, account model upgrading shape is distinguished using upgrade flag field on account table State can consider the scenes such as disaster tolerance, gray scale simultaneously, facilitate in maximum level to keep service logic compatibility.
Fig. 5 shows the flow chart of the data model upgrade method according to another embodiment of the disclosure.Implementation shown in fig. 5 The difference of mode and embodiment shown in Fig. 4 is, Fig. 5 in addition to include step S101, S102, S103, S301 and S401 it It outside, further include step S501.
In step S501, before the server push for being in process status is sent to new data model state, work as detection When to the second preset condition, service logic rollback is carried out to the server in process status according to upgrade flag field.
In one embodiment of the present disclosure, model upgrading task needs to keep service logic compatible in maximum level Property, therefore, need to guarantee that service logic can rollback before server push is sent to new data model state.Process will be in The server push of state is sent to before new data model state, can be according to upgrade flag word in the case that discovery needs rollback Section carries out service logic rollback to the server in process status.Detect that the second preset condition is to find to need rollback Situation, for example, a certain proportion of account is upgraded to the failure of new data model, the server in process status from old data model There is abnormal, upgrading time-out etc..
In embodiment of the present disclosure, by the way that the server push for being in process status is being sent to new data model state Before, when detecting the second preset condition, business is carried out to the server in process status according to upgrade flag field and is patrolled Volume rollback, may be implemented it is lossless, unattended, be not required to prohibit and write, user's unaware and can upgrade with the data model of rollback, liter Manpower intervention is not needed during grade, upgrading risk is very low and saves manpower.
Figure 12 shows the schematic diagram of the application scenarios of the data model upgrading scheme according to one embodiment of the disclosure.
As shown in figure 12, divider-three layers of loader-actuator frame can be used to be torn open step by step to race batch task Point, and uniform load is carried out using rpc (remote procedure call) service application server.Divider is according to migration (upgrading) State is that the horizontal point epitope that splits of process status splits race batch task.Point epitope is that blocking computer room (may be simply referred to as LDC flag bit), it can be understood as database level split back zone branch by flag bit.If run in batch task, there are white List, then white list follows a point epitope individually to split.Loader is according to white list or point epitope from the task that divider is sent The record that upgrade status is new data model state is obtained, is split according to preset number of concurrent.If there is dividing at epitope In disaster tolerance state, then do not split.The task that loader is sent is migrated (upgrading) according to account one by one by actuator.When to one When a account is upgraded, check whether the account is in disaster tolerance state, the end operation if in disaster tolerance state, if not It is in disaster tolerance state, then is upgraded using new data model.In addition, for the account of the new account by class interface input of opening an account Number, it directly checks whether in disaster tolerance state, the end operation if in disaster tolerance state, if not being in disaster tolerance state, Upgraded using new data model.
In the application scenarios of data model upgrading scheme shown in Figure 12, account is upgraded one by one, every wheel upgrading Quantity can be adjusted by parameter, provide High Availabitity guarantee.Running batch task, (it is exactly " old for cutting stream mode according to stream mode is cut Each state of data model state (initial state)-process status (process state)-new data model state (final state) ") it obtains and divides epitope It is split, only fishes for point epitope under process status.Batch task is run only for storage account, newly-increased account is being switched to process After state, new logic is used to carry out account-opening.If epitope is divided to be in disaster tolerance state, task fractionation, table are not done Show and does not do upgrading task.(upgrading) is not migrated during disaster tolerance, is otherwise appeared in disaster tolerance library and is completed what migration was not moved back but Situation brings the problem that data model is inconsistent.Class of opening an account interface belongs to state type data insertion operation, this generic operation is uniformly pressed It is handled according to new model, guarantees that incremental data all uses new model, it is consistent to may achieve world model under process status. After pushing process status and adjusting parameter, can unattended progress account model upgrading, business will not generate loss, and Other manual operations are not needed in escalation process.
Fig. 6 shows the structural block diagram of the data model update device according to one embodiment of the disclosure.The device can wrap Include detection module 601, the first pushing module 602 and data processing module 603.
Detection module 601 is configured as while executing business operation, the current data model state of detection service device, Current data model state is the old data model state not upgraded, the process status in escalation process and completes to upgrade One of new data model state of process.
First pushing module 602 is configured as when detecting the first preset condition, and current data model state is in The server push of old data model state is sent to process status.
Data processing module 603 is configured as the current data model state according to server, using with current data mould The corresponding data model of type state carries out data processing for business operation, wherein when the current data model state of server When for process status, one of new data model and old data model are applied respectively by business operation of the account dimension to account.
In embodiment of the disclosure, a kind of " old data model state (initial state)-process status (process is proposed State)-new data model state (final state) " data model upgrading scheme, breach distributed system business limited scalability In the bottleneck of data model.That is, it is considered that being based on " initial according to the data model upgrading scheme of embodiment of the present disclosure The upgrading scheme of the state machine of state-process state-final state ".
In embodiment of the present disclosure, the data processing model of server is upgraded although only referring to, this Field technical staff, which is appreciated that, is equally applicable to server set according to the data model upgrading scheme of embodiment of the present disclosure Group, the server cluster or distributed server cluster either concentrated.Therefore, in embodiment of the present disclosure, service Device may refer to server cluster.
It is write according to the data model upgrading scheme of embodiment of the present disclosure without prohibiting, it therefore, can be in the business of execution behaviour While work, the current data model state of detection service device is to carry out corresponding operation.
According in embodiment of the present disclosure, the first preset condition can be the server in old data model state In preset time point, the server in old data model state is in preset upgrading batch, and server receives upgrading Instruction etc..
According in embodiment of the present disclosure, the current data model state of server can be current data model shape State is the old data model state not upgraded, the process status in escalation process and the new data mould for completing escalation process One of type state.
In disclosure embodiment, by data processing model while executing business operation, detection service device Current data model state, the current data model state be the old data model state not upgraded, in upgrading The process status of process and one of the new data model state for completing escalation process;First pushing module is configured as when detection When to the first preset condition, the server push that current data model state is in old data model state is sent to process status; First pushing module is configured as the current data model state according to the server, using with the current data model The corresponding data model of state carries out data processing for the business operation, wherein when the current data mould of the server When type state is process status, by business operation of the account dimension to account apply respectively new data model and old data model it One, upgrading complexity can be reduced, data model upgrading is carried out with account dimension.Moreover, to incremental data directly using new number According to model, guarantee to can reach data model in process status consistent.Moreover, according to the data model liter of disclosure embodiment Grade scheme may be implemented it is lossless, unattended, be not required to prohibit write, the upgrading of the data model of user's unaware, in escalation process not Manpower intervention is needed, upgrading risk is very low and saves manpower.
According in embodiment of the present disclosure, when the current data model state of server is old data model state When, corresponding operating is carried out only with old data model, and when detecting the first preset condition, by current data model state Server push in old data model state is sent to process status.Therefore, the state that the data model of server is upgraded It is exactly process status.When the current data model state of server is process status, grasped by business of the account dimension to account Make to apply one of new data model and old data model respectively.That is, when the current data model state of server is process status When, do not take a step to be switched to the operation of new data model the account not upgraded, but it is directed to different business operations, it answers With one of new data model and old data model.It avoids to be switched to new data model from old one step of data model in this way and lead Obvious perception of the risk and user of cause to upgrading.When the current data model state of server is new data model state When, corresponding operating is carried out only with new data model.
In one embodiment of the present disclosure, data processing module 603 is also configured to the process shape according to server State, for the business operation of data type and account that whether account has completed upgrading, the business operation of account is related to At least one of action type applies one of new data model and old data model to the business operation of the account respectively.
Figure 11 shows the schematic diagram of the implementation principle of the data model upgrading scheme according to one embodiment of the disclosure.
As shown in figure 11, when handling in the server a business operation, and the current data mould of server It is unified to be operated according to data of the old data model to this business when type state is old data model state (I state).When A business operation is handled in the server, and the current data model state of server is new data model state It is unified to be operated according to data of the new data model to this business when (S state).When in the server to a business behaviour It is handled, and when the current data model state of server is process status (P-state), it is whether complete for account At least one of the action type of business operation of data type and account being related at the business operation of upgrading, account, One of new data model and old data model are applied respectively to the business operation of the account.
Specifically, server current data model state be process status (P-state) present case under, work as industry When the data of business operation are state type data, for increasing the operation of state type data newly, data are inserted into according to new data model;It is right In modification state type data operation, judge whether the targeted account of the operation is completed to upgrade, if complete upgrading if according to New data model modification data, and according to old data model more new data if not completing upgrading;For inquiring state type The operation of data inquires data according to old data model.In embodiment of the disclosure, state type data are stateful, more Stateful data are depended between business, and to guarantee the accuracy of the data, such as account balance, do remaining sum payment When have to know original remaining sum, could pay successfully.
Specifically, server current data model state be process status (P-state) present case under, work as industry When the data of business operation are flowing water type data, for increasing the operation of flowing water type data newly, data are inserted into according to new data model;It is right In the operation of inquiry flowing water type data, data are inquired according to old data model.In embodiment of the disclosure, flowing water type data are It is stateless, it is not associated between more business, new document, such as transaction flow can be all generated when each business comes Water, payment flowing water, can finishing service as long as it can be inserted into new document.The characteristics of flowing water type data is before subsequent data do not depend on The data in face, temporally flowing water enters database to all data.
Fig. 7 shows showing for the data processing module 603 in the data model update device according to one embodiment of the disclosure The structural block diagram of example.Data processing module 603 as shown in Figure 7 includes acquisition submodule 701 and upgrading submodule 702.
Acquisition submodule 701 is configured as the process status according to server, obtains according to preset period of time in old The account of data model.
Upgrading submodule 702 is configured as locking the account in old data model one by one, successively makes in old data The account of model enters process status to be upgraded to new data model.
In one embodiment according to the disclosure, a certain distributed server can be pushed by management platform To after process status (P-state), using the account for being in old data model is obtained by timed task, account is locked simultaneously one by one Complete upgrading.After the completion of the upgrading of some account, it is retained in process status, but can carry out logic behaviour according to new data model Make.
In disclosure embodiment, by acquisition submodule, it is configured as the process status according to server, according to pre- If the time cycle obtains the account for being in old data model;Upgrade submodule, is configured as to the account for being in old data model It locks one by one, so that the account in old data model is entered process status to be upgraded to new data model, nothing may be implemented It is damage, unattended, be not required to prohibit write, the upgrading of the data model of user's unaware, do not need manpower intervention in escalation process, upgrade Risk is very low and saves manpower.
Fig. 8 shows the structural block diagram of the data model update device according to another embodiment of the disclosure.Reality shown in Fig. 8 The difference for applying mode and embodiment shown in fig. 6 is that Fig. 8 is in addition to including detection module 601,602 and of the first pushing module It further include the second pushing module 801 except data processing module 603.
Second pushing module 801 is configured as when whole accounts in the server in process status being in new number According to model account when, new data model state will be sent in the server push of process status.
In one embodiment of the present disclosure, after the completion of the account of a default batch all upgrades and checks, by needle The server of upgrading task is executed to the account of this batch or server cluster is pushed to new data model state (in Figure 11 S state).
In embodiment of the present disclosure, by the second pushing module, it is configured as obtaining when the service in process status When whole accounts in device are the account in new data model, the server push in process status is sent to new data mould Type state, may be implemented it is lossless, unattended, be not required to prohibit write, the upgrading of the data model of user's unaware, in escalation process not Manpower intervention is needed, upgrading risk is very low and saves manpower.
Fig. 9 shows the structural block diagram of the data model update device according to another embodiment of the disclosure.Reality shown in Fig. 9 The difference for applying mode and embodiment shown in Fig. 8 is that Fig. 9 is in addition to including detection module 601, the first pushing module 602, number It further include that account table establishes module 901 except processing module 603 and the second pushing module 801.
Account table establishes module 901 and is configured as establishing the account table that record has account, wherein account table includes distinguishing account Number upgrade status upgrade flag field, wherein upgrade flag field by the upgrade status of each account be labeled as old data One of model state, process status and new data model state.
In embodiment of the present disclosure, account model upgrading shape is distinguished using upgrade flag field on account table State can consider the scenes such as disaster tolerance, gray scale simultaneously, facilitate in maximum level to keep service logic compatibility.
Figure 10 shows the structural block diagram of the data model update device according to another embodiment of the disclosure.It is shown in Fig. 10 The difference of embodiment and embodiment shown in Fig. 9 is that Figure 10 is in addition to including detection module 601, the first pushing module 602, data processing module 603, the second pushing module 801 and account table are established except module 901, further include roll-back module 1001。
Roll-back module 1001 is configured as before the server push for being in process status is sent to new data model state, When detecting the second preset condition, service logic is carried out to the server in process status according to upgrade flag field and is returned Rolling.
In one embodiment of the present disclosure, model upgrading task needs to keep service logic compatible in maximum level Property, therefore, need to guarantee that service logic can rollback before server push is sent to new data model state.Process will be in The server push of state is sent to before new data model state, can be according to upgrade flag word in the case that discovery needs rollback Section carries out service logic rollback to the server in process status.Detect that the second preset condition is to find to need rollback Situation, for example, a certain proportion of account is upgraded to the failure of new data model, the server in process status from old data model There is abnormal, upgrading time-out etc..
In embodiment of the present disclosure, by roll-back module, it is configured as in the server push that will be in process status It is sent to before new data model state, when detecting the second preset condition, according to upgrade flag field in process status Server carry out service logic rollback, may be implemented it is lossless, unattended, be not required to prohibit and write, user's unaware and can return The data model of rolling upgrades, and manpower intervention is not needed in escalation process, upgrading risk is very low and saves manpower.
The foregoing describe the built-in function of data model update device and structures, in a possible design, the data The structure of model update device can realize that for data model updating apparatus, as shown in Figure 13, which be can wrap Include processor 1301 and memory 1302.
The memory 1302 supports data model update device to execute data mould in any of the above-described embodiment for storing The program of type upgrade method, the processor 1301 are configurable for executing the program stored in the memory 1302.
The memory 1302 is for storing one or more computer instruction, wherein one or more computer Instruction is executed by the processor 1301.
The processor 1301 is used to execute all or part of the steps in aforementioned approaches method step.
Wherein, it can also include communication interface in the structure of the data model updating apparatus, upgrade for data model Equipment and other equipment or communication.
Disclosure exemplary embodiment additionally provides a kind of computer storage medium, for storing the data model upgrading Computer software instructions used in device, it includes for executing in any of the above-described embodiment involved by data model upgrade method Program.
Figure 14 is adapted for the computer system for realizing the data model upgrade method according to one embodiment of the disclosure Structural schematic diagram.
As shown in figure 14, computer system 1400 include central processing unit (CPU) 1401, can according to be stored in only It reads the program in memory (ROM) 1402 or is loaded into random access storage device (RAM) 1403 from storage section 1408 Program and execute the various processing in above-mentioned embodiment shown in FIG. 1.In RAM1403, it is also stored with the operation of system 1400 Required various programs and data.CPU1401, ROM1402 and RAM1403 are connected with each other by bus 1404.Input/output (I/O) interface 1405 is also connected to bus 1404.
I/O interface 1405 is connected to lower component: the importation 1406 including keyboard, mouse etc.;Including such as cathode The output par, c 1407 of ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section including hard disk etc. 1408;And the communications portion 1409 of the network interface card including LAN card, modem etc..Communications portion 1409 passes through Communication process is executed by the network of such as internet.Driver 1410 is also connected to I/O interface 1405 as needed.It is detachable to be situated between Matter 1411, such as disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 1410, so as to In being mounted into storage section 1408 as needed from the computer program read thereon.
Particularly, according to embodiment of the present disclosure, it is soft to may be implemented as computer above with reference to Fig. 1 method described Part program.For example, embodiment of the present disclosure includes a kind of computer program product comprising be tangibly embodied in and its readable Computer program on medium, the computer program include the program code for executing the data processing method of Fig. 1.At this In the embodiment of sample, which can be downloaded and installed from network by communications portion 1409, and/or from can Medium 1411 is dismantled to be mounted.
Flow chart and block diagram in attached drawing illustrate system, method and computer according to the various embodiments of the disclosure The architecture, function and operation in the cards of program product.In this regard, each box in course diagram or block diagram can be with A part of a module, section or code is represented, a part of the module, section or code includes one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer The combination of order is realized.
Being described in unit or module involved in disclosure embodiment can be realized by way of software, can also It is realized in a manner of through hardware.Described unit or module also can be set in the processor, these units or module Title do not constitute the restriction to the unit or module itself under certain conditions.
As on the other hand, the disclosure additionally provides a kind of computer readable storage medium, the computer-readable storage medium Matter can be computer readable storage medium included in device described in above embodiment;It is also possible to individualism, Without the computer readable storage medium in supplying equipment.Computer-readable recording medium storage has one or more than one journey Sequence, described program is used to execute by one or more than one processor is described in disclosed method.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (14)

1. a kind of data model upgrade method characterized by comprising
While executing business operation, the current data model state of detection service device, the current data model state is Old data model state, the process status in escalation process and the new data model shape for completing escalation process not upgraded One of state;
When detecting the first preset condition, the server push that current data model state is in old data model state is sent to Process status;
According to the current data model state of the server, data model corresponding with the current data model state is utilized Data processing is carried out for the business operation, wherein when the current data model state of the server is process status, One of new data model and old data model are applied respectively by business operation of the account dimension to account.
2. the method according to claim 1, wherein the current data model shape according to the server State carries out data processing for the business operation using data model corresponding with the current data model state, wherein When the current data model state of the server is process status, applied respectively by business operation of the account dimension to account One of new data model and old data model, comprising:
According to the process status of the server, upgrading whether has been completed for account, the business operation of account is related to Data type and at least one of the action type of business operation of account, the business operation of the account is answered respectively With one of the new data model and the old data model.
3. method according to claim 1 or 2, which is characterized in that the current data model according to the server State carries out data processing for the business operation using data model corresponding with the current data model state, In, when the current data model state of the server is process status, distinguish by business operation of the account dimension to account Using one of new data model and old data model, further includes:
According to the process status of the server, the account for being in the old data model is obtained according to preset period of time Number;
The account in old data model is locked one by one, is successively made described in the account entrance in the old data model Process status is to be upgraded to the new data model.
4. the method according to claim 1, wherein further include:
When whole accounts in the server in the process status are the account in new data model, institute will be in The server push for stating process status is sent to new data model state.
5. according to the method described in claim 4, it is characterized by further comprising:
Establish the account table that record has account, wherein the account table includes the upgrade flag word for distinguishing the upgrade status of account Section, wherein the upgrade status of each account is labeled as old data model state, process status and new data by upgrade flag field One of model state.
6. according to the method described in claim 5, it is characterized by further comprising:
Before the server push for being in the process status is sent to new data model state, when detecting the second preset condition When, service logic rollback is carried out to the server in the process status according to upgrade flag field.
7. a kind of data model update device characterized by comprising
Detection module, is configured as while executing business operation, and the current data model state of detection service device is described to work as Preceding data model state is that old data model state, the process status in escalation process and the completion not upgraded upgraded One of new data model state of journey;
First pushing module is configured as when detecting the first preset condition, and current data model state is in old data The server push of model state is sent to process status;
Data processing module is configured as the current data model state according to the server, using with the current data The corresponding data model of model state carries out data processing for the business operation, wherein when the current number of the server According to model state be process status when, apply new data model and old data mould respectively by business operation of the account dimension to account One of type.
8. device according to claim 7, which is characterized in that the data processing module is also configured to
According to the process status of the server, upgrading whether has been completed for account, the business operation of account is related to Data type and at least one of the action type of business operation of account, the business operation of the account is answered respectively With one of the new data model and the old data model.
9. device according to claim 7 or 8, it is characterised in that the data processing module includes:
Acquisition submodule is configured as the process status according to the server, is according to preset period of time acquisition The account of the old data model;
Upgrade submodule, be configured as locking one by one to described in the account of old data model, successively makes in the old number Enter the process status according to the account of model to be upgraded to the new data model.
10. device according to claim 7, which is characterized in that further include:
Second pushing module is configured as when whole accounts in the server in the process status being in new data When the account of model, the server push in the process status is sent to new data model state.
11. device according to claim 10, which is characterized in that further include:
Account table establishes module, is configured as establishing the account table that record has account, wherein the account table includes distinguishing account Upgrade status upgrade flag field, wherein upgrade flag field by the upgrade status of each account be labeled as old data mould One of type state, process status and new data model state.
12. device according to claim 11, which is characterized in that further include:
Roll-back module is configured as before the server push for being in the process status is sent to new data model state, when When detecting the second preset condition, service logic is carried out to the server in the process status according to upgrade flag field and is returned Rolling.
13. a kind of electronic equipment, which is characterized in that including memory and processor;Wherein, the memory is for storing one Or a plurality of computer instruction, wherein one or more computer instruction is executed by the processor to realize that right such as is wanted Seek the described in any item methods of 1-6.
14. a kind of readable storage medium storing program for executing, is stored thereon with computer instruction, which is characterized in that the computer instruction is by processor As the method according to claim 1 to 6 is realized when execution.
CN201811152496.9A 2018-09-29 2018-09-29 Data model upgrading method, device, equipment and readable storage medium Active CN109582330B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811152496.9A CN109582330B (en) 2018-09-29 2018-09-29 Data model upgrading method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811152496.9A CN109582330B (en) 2018-09-29 2018-09-29 Data model upgrading method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN109582330A true CN109582330A (en) 2019-04-05
CN109582330B CN109582330B (en) 2021-08-03

Family

ID=65920187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811152496.9A Active CN109582330B (en) 2018-09-29 2018-09-29 Data model upgrading method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN109582330B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488170A (en) * 2020-04-07 2020-08-04 支付宝(杭州)信息技术有限公司 Method, device and equipment for updating business processing model

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317607A (en) * 2014-09-27 2015-01-28 昆明钢铁集团有限责任公司 Enterprise In-house IOS APP automatic update system and method
CN104899257A (en) * 2015-05-18 2015-09-09 北京京东尚科信息技术有限公司 Data updating method and device in distributed data warehouse
CN104915237A (en) * 2015-06-24 2015-09-16 深圳市兰丁科技有限公司 Upgrading method and upgrading control method of Bluetooth device firmware program, and equipment
CN106302629A (en) * 2016-06-06 2017-01-04 北京奇虎科技有限公司 A kind of information-pushing method and device
CN107092701A (en) * 2017-05-02 2017-08-25 山东浪潮通软信息科技有限公司 The data processing method and device of a kind of Multidimensional Data Model
US20180300122A1 (en) * 2017-04-18 2018-10-18 Beijing Kingsoft Internet Security Software Co., L Td. Data processing method and system, and server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317607A (en) * 2014-09-27 2015-01-28 昆明钢铁集团有限责任公司 Enterprise In-house IOS APP automatic update system and method
CN104899257A (en) * 2015-05-18 2015-09-09 北京京东尚科信息技术有限公司 Data updating method and device in distributed data warehouse
CN104915237A (en) * 2015-06-24 2015-09-16 深圳市兰丁科技有限公司 Upgrading method and upgrading control method of Bluetooth device firmware program, and equipment
CN106302629A (en) * 2016-06-06 2017-01-04 北京奇虎科技有限公司 A kind of information-pushing method and device
US20180300122A1 (en) * 2017-04-18 2018-10-18 Beijing Kingsoft Internet Security Software Co., L Td. Data processing method and system, and server
CN107092701A (en) * 2017-05-02 2017-08-25 山东浪潮通软信息科技有限公司 The data processing method and device of a kind of Multidimensional Data Model

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488170A (en) * 2020-04-07 2020-08-04 支付宝(杭州)信息技术有限公司 Method, device and equipment for updating business processing model

Also Published As

Publication number Publication date
CN109582330B (en) 2021-08-03

Similar Documents

Publication Publication Date Title
US8688628B2 (en) Nested queued transaction manager
US10481884B2 (en) Systems and methods for dynamically replacing code objects for code pushdown
US7921330B2 (en) Data migration manager
US9135071B2 (en) Selecting processing techniques for a data flow task
US8630969B2 (en) Systems and methods for implementing business rules designed with cloud computing
EP2199904A1 (en) Flexible multi-tenant support of metadata extensions
US7937432B2 (en) State transition management according to a workflow management policy
US20130227542A1 (en) Version conflict checking to installable unit
US11573974B2 (en) System and method for automatic correction/rejection in an analysis applications environment
US8499298B2 (en) Multiprocessing transaction recovery manager
CN111858615A (en) Database table generation method, system, computer system and readable storage medium
CN104809025A (en) Method and device for enabling programs to be online
US11615108B2 (en) System and method for running warehouse loads for multiple tenants of a data warehouse
US10275234B2 (en) Selective bypass of code flows in software program
CN113039527A (en) System and method for customization in an analysis application environment
WO2020223407A1 (en) System and method for saas/paas resource usage and allocation in an analytic applications environment
US9971794B2 (en) Converting data objects from multi- to single-source database environment
CN111125106B (en) Batch running task execution method, device, server and storage medium
US11163601B2 (en) Dynamically determine the transaction coordinator in multitier hybrid transaction processing middleware systems
EP2662783A1 (en) Data archiving approach leveraging database layer functionality
CN109582330A (en) Data model upgrade method, device, equipment and readable storage medium storing program for executing
US20060015841A1 (en) Control on demand data center service configurations
US8296329B1 (en) Controller with heuristic bundle optimizer for data center migration or other type of transition
US20170024438A1 (en) Method and system for data integration
EP3195209B1 (en) Generating instruction sets implementing rules designed to update objects specified according to an application data model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant