CN110310170A - Order processing method, apparatus, electronic equipment and storage medium - Google Patents
Order processing method, apparatus, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN110310170A CN110310170A CN201910442270.0A CN201910442270A CN110310170A CN 110310170 A CN110310170 A CN 110310170A CN 201910442270 A CN201910442270 A CN 201910442270A CN 110310170 A CN110310170 A CN 110310170A
- Authority
- CN
- China
- Prior art keywords
- order
- state
- action event
- machine model
- database
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 16
- 230000009471 action Effects 0.000 claims abstract description 88
- 230000009466 transformation Effects 0.000 claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 23
- 238000000034 method Methods 0.000 claims description 26
- 230000002159 abnormal effect Effects 0.000 claims description 17
- 238000012544 monitoring process Methods 0.000 claims description 5
- 238000001514 detection method Methods 0.000 claims description 4
- 235000013399 edible fruits Nutrition 0.000 claims description 2
- 238000000151 deposition Methods 0.000 claims 1
- 230000008859 change Effects 0.000 abstract description 13
- 230000006870 function Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000012937 correction Methods 0.000 description 2
- 230000002045 lasting effect Effects 0.000 description 2
- 238000013178 mathematical model Methods 0.000 description 2
- 238000004321 preservation Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0633—Lists, e.g. purchase orders, compilation or processing
- G06Q30/0635—Processing of requisition or of purchase orders
Abstract
The present invention provides a kind of order processing method, comprising: detects whether the action event for having to order;If it exists to the action event of the order, the current state of the order is obtained from order database;By the current state of the order and the information input of the action event to finite state machine model corresponding with the order type, the order status transformation result that the finite state machine model returns is obtained;According to the order status transformation result, state of the order in the order database is updated or maintained.The invention also discloses a kind of order processing device, electronic equipment and computer readable storage mediums.The present invention can fast and accurately carry out the change of order status by data processing.
Description
Technical field
The present invention relates to data processing field more particularly to a kind of order processing method, apparatus, electronic equipment and computer
Readable storage medium storing program for executing.
Background technique
On online transaction platform, user will do it the purchase transactions such as commodity or service and can generate in process of exchange
Order carries out the label of different conditions to order when order is in different bargain links.In the prior art, the shape of order
State variation changes in service code, since service code itself judges that control statement is more, thus in service code
The change of order status is carried out so that the logic of service code is increasingly complex, maintenance and management is not only not easy to, is also easy to occur
The confusion of order status.
Summary of the invention
In view of the foregoing, it is necessary to which a kind of order processing method, apparatus, electronic equipment and computer-readable storage are provided
Medium can fast and accurately carry out the change of order status.
The present invention provides a kind of order processing method, which comprises
Detect whether the action event for having to order;
If it exists to the action event of the order, the current state of the order is obtained from order database;
The current state of the order and the information input of the action event is extremely corresponding with the order type
Finite state machine model obtains the order status transformation result that the finite state machine model returns;
According to the order status transformation result, state of the order in the order database is updated or maintained.
It is described if it exists to the action event of the order in alternative embodiment of the present invention, it is obtained from order database
After the current state of the order, the method also includes:
Obtain the default corresponding relationship of action event and order status;
The expecting state of the order described after the action event is determined according to the default corresponding relationship;
It is described by the current state of the order and the information input of the action event to the order type pair
The finite state machine model answered obtains the order status transformation result that the finite state machine model returns, including;
By the information input of the current state of the order, the expecting state of the order and the action event to institute
Finite state machine model is stated, the order status transformation result that the finite state machine model returns is obtained, the order status turns
Change the message that result includes whether that the order is allowed to be converted to the expecting state from the current state.
In alternative embodiment of the present invention, the method also includes:
The state of order described in the order database is monitored with the presence or absence of abnormal;
When the state of the order deposit when abnormal, send order abnormity prompt.
In alternative embodiment of the present invention, the state of order described in the monitoring order database is with the presence or absence of different
Often include:
Whether the duration for judging that the order is in the current state is more than the corresponding state of the current state
Time limit;And/or
Judge whether the order is the order that failed, if the order is the order that failed, judges the order failure
Whether the state of the order is default failure state afterwards.
It is described to judge whether the order is that the order that failed includes: in alternative embodiment of the present invention
Judge whether the identity information of the creation side of the order is changed to default identity information, if so, ordering described in determining
Dan Weiyi failure order;Or
Judge whether the order reaches default term of validity, if so, determining that the order is the order that failed.
In alternative embodiment of the present invention, the method also includes:
Interval preset time exports the historic state transitional information of the order.
It is described that state of the order in the order database is updated it in alternative embodiment of the present invention
Afterwards, the method also includes:
The reminder message that the state for sending the order to the owning user of the order changes.
The present invention also provides a kind of order processing device, described device includes:
Detection module, for detecting whether in the presence of the action event to order;
First obtains module, for the action event if it exists to the order, obtains the order from order database
Current state;
Second obtains module, for by the current state of the order and the information input of the action event to institute
The corresponding finite state machine model of order type is stated, the order status transformation result that the finite state machine model returns is obtained;
State update module, for updating or the order being maintained to order described according to the order status transformation result
State in single database.
In alternative embodiment of the present invention, described device further include:
Third obtains module, for the action event if it exists to the order, obtains the order from order database
Current state after, obtain action event and order status default corresponding relationship;
Determining module, for determining the expection of the order described after the action event according to the default corresponding relationship
State;
Described second obtain module by the current state of the order and the information input of the action event to institute
Stating the corresponding finite state machine model of order type includes:
By the information input of the current state of the order, the expecting state of the order and the action event to institute
Finite state machine model is stated, the order status transformation result that the finite state machine model returns is obtained, the order status turns
Change the message that result includes whether that the order is allowed to be converted to the expecting state from the current state.
In alternative embodiment of the present invention, described device further includes reminding module, and the reminding module is used for:
The state of order described in the order database is monitored with the presence or absence of abnormal;
When the state of the order deposit when abnormal, send order abnormity prompt.
In alternative embodiment of the present invention, the state that the reminding module monitors order described in the order database is
It is no to include: in the presence of abnormal
First judgment module, whether the duration for judging that the order is in the current state is more than described work as
The preceding state corresponding state time limit;And/or
Second judgment module, for judging whether the order is the order that failed, if the order is the order that failed,
Whether the state for judging the order after the order fails is default failure state.
In alternative embodiment of the present invention, second judgment module judges whether the order is the order packet that failed
It includes:
Judge whether the identity information of the creation side of the order is changed to default identity information, if so, ordering described in determining
Dan Weiyi failure order;Or
Judge whether the order reaches default term of validity, if so, determining that the order is the order that failed.
In alternative embodiment of the present invention, described device further include:
Output module exports the historic state transitional information of the order for being spaced preset time.
In alternative embodiment of the present invention, described device further include:
Sending module, for after the state in the order database is updated, Xiang Suoshu to be ordered by the order
Single owning user sends the reminder message that the state of the order changes.
The present invention also provides a kind of electronic equipment, the electronic equipment includes memory and processor, and the memory is used
In storing at least one instruction, the processor is for executing at least one described instruction to realize described in any embodiment
Order processing method.
The present invention also provides a kind of computer readable storage medium, the computer-readable recording medium storage has at least one
A instruction, at least one described instruction realize order processing display methods described in any embodiment when being executed by processor.
Found out by above technical scheme, the present invention provides a kind of order processing method, apparatus, electronic equipment and computer can
Storage medium is read, detects whether the action event for having to order;If it exists to the action event of the order, from order data
Library obtains the current state of the order;By the current state of the order and the information input of the action event to institute
The corresponding finite state machine model of order type is stated, the order status transformation result that the finite state machine model returns is obtained;
According to the order status transformation result, state of the order in the order database is updated or maintained.Due to examining
After measuring the operating time to order, the state of order and action event are input to finite state machine model, by limited
The processing that state machine model carries out order status is improved without handling in original service code order status
The efficiency of order status processing, avoids the confusion of order status, improves the accuracy of order status change.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow chart of order processing method provided in an embodiment of the present invention;
Fig. 2 is the functional block diagram of order processing device provided in an embodiment of the present invention;
Fig. 3 is the structural schematic diagram of the electronic equipment for the preferred embodiment that the present invention realizes order processing method.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real
Applying mode, the present invention is described in further detail.
As shown in FIG. 1, FIG. 1 is a kind of flow charts of order processing method provided in an embodiment of the present invention.According to different
Demand, the sequence of step can change in the flow chart, and certain steps can be omitted.A kind of order processing method is applied to
In electronic equipment.
S11 detects whether the action event for having to order.
Order described in the present embodiment the transactional operations such as is bought, is leased on online transaction platform by user and formed
Order.
For example, providing various finance products in financing store, when user buys finance product A, forms a purchase and order
Single, user can check the details of the order, e.g., the time of purchase, the amount of money of purchase, the finance product bought phase
Limit, the money rate of finance product bought etc..
The action event is based on operation performed by order, for example, carrying out delivery operation, then action event to order
For payment events;Or delivery operation is carried out to order, then action event is branch shipping events.
In a kind of possible embodiment, when carrying out different operations to order, different operating results can be returned
Message, therefore the action event to order can be got according to the operating result message.
To the action event of the order, the current state of the order is obtained from order database if it exists by S12.
The order database is the database for saving the information of order.For example, order database is online transaction platform
Database, order database be used for included to orders various on transaction platform and order information store.
In the present embodiment, there are many different states for an order.For example, determining purchase when user has chosen certain commodity
Afterwards, order is generated, the state of order is state to be paid at this time;When detecting user when paying or in the time of payment
Interior, the state of order is in payment;When user's pay status, the state of order is to have paid success status.
In the present embodiment, can preset order in the different stages has different states, in the order database
The current state of order indicates which kind of state the order is currently at, i.e., when detecting the action event to order from order numbers
According to the real-time status for the order that library is got.After detecting to the action event of order, the real-time shape of the order got
State is the state also converted not according to state of the action event to order.
S13, by the current state of the order and the information input of the action event to the order type pair
The finite state machine model answered obtains the order status transformation result that the finite state machine model returns.
In the present embodiment, finite state machine (finite state machine, FSM) model is referred to as state machine model,
FSM model is the mathematical model for indicating the behaviors such as limited state and transfer between these states and movement, FSM model
Can with description object in its life cycle status switch experienced, and how to respond from extraneous various events.
In the present embodiment, in finite state machine can predefined order different conditions and different condition/things
Part places an order by being presently in which kind of dbjective state state overturning is.Then it by the current state information of order and detects
The action event of order is input in finite state machine model, so that shape of the finite state machine model according to the order received
State and operating time judge which kind of state order will overturn as, then in the present embodiment, the result of order status overturning is
Dbjective state of the order after action event.
In the present embodiment, order can be determined according to the information of order (such as order bought merchandise news)
Type, and finite state machine corresponding with each type is preset according to the different types of order that transaction platform can be generated.
For example, determining the type of order for life when it is articles for daily use (such as clothes, shoes) that order, which is bought,
Class order;When the commodity that order is bought are financial product (such as fund), determine the type of order for financing class order.Then when
When the type of order is life kind order, life kind state machine model is obtained;When the type of order is financing class order, obtain
Financing class state machine model.
In alternatively possible embodiment, the type of order can be obtained from order database, that is, is generating order
When, it determines that the type of order, then can directly acquire the type of the order of preservation when the state of order is converted, thus
Finite state machine model corresponding with the type of order can quickly be obtained.
In embodiments of the present invention, it when transaction system can provide a plurality of types of orders, is ordered according to different types of
It is single to obtain different finite state machine model progress information inputs, so that only to a type of order in each finite state machine
Life cycle judged, when a kind of variation of the overturning rule of order status, also only to being related to the finite state machine of the order
It is safeguarded, improves the efficiency of finite state machine model maintenance.
Further, in an alternative embodiment of the invention, described if it exists to the action event of the order, from order numbers
After the current state for obtaining the order according to library, the method also includes:
Obtain the default corresponding relationship of action event and order status;
The expecting state of the order described after the action event is determined according to the default corresponding relationship;
It is described by the current state of the order and the information input of the action event to the order type pair
The finite state machine model answered obtains the order status transformation result that the finite state machine model returns, comprising:
By the information input of the current state of the order, the expecting state of the order and the action event to institute
Finite state machine model is stated, the order status transformation result that the finite state machine model returns is obtained, the order status turns
Change the message that result includes whether that the order is allowed to be converted to the expecting state from the current state.
In the present embodiment, after detecting to the action event of order, according to the pre- of action event and order status
If corresponding relationship determines the expecting state of order.
For example, if the state of order is state to be paid, and action event is payment success events, then obtains order and propping up
Pay success events after order expecting state.Expecting state at this time can be certain operation determined by a certain judgement sentence
The state of order after event.
Then, the current state of order, expecting state and action event are input to finite state machine model, by having
Limit state machine model verifies expecting state.Specifically, passing through current state and operation thing in finite state machine model
Part obtains dbjective state, then verifies whether dbjective state is expecting state, if so, the message for allowing order status to overturn is returned,
If it is not, returning to the message for not allowing order status to overturn.
S14 updates or maintains shape of the order in the order database according to the order status transformation result
State.
In the present embodiment, if state transformation result is dbjective state, by the state of order in the order database
Dbjective state is updated to from current state.
Alternatively, if maintaining the current state of order in order database to protect when state transformation result remains as current state
It holds constant.
For example, if the information of action event is payment failure, maintaining the shape of order when order current state is in payment
State is state in payment, and when the information of action event is to pay successfully, by the state of order, state is updated to prop up from payment
Pay success status.
In the present embodiment, when the result of state overturning is the message for allowing order to overturn, then by the order database
The state of middle order is updated to expecting state from current state;When the result of state overturning is not the message for allowing to overturn, hair
Send prompting message.
Further, in an alternative embodiment of the invention, the state by the order in the order database
After being updated, the method also includes:
The reminder message that the state for sending the order to the owning user of the order changes.
For example, the state of the m order in order database pair carries out more after party A-subscriber executes delivery operation to m order
After new, reminder message that the state for sending order to party A-subscriber changes.
Through this embodiment, can make the owning user of order quickly recognize the state of order whether change with
And which kind of conversion has occurred.
Further, in an alternative embodiment of the invention, the method also includes:
The state of order described in the order database is monitored with the presence or absence of abnormal;
When the state of the order deposit when abnormal, send order abnormity prompt.
In the present embodiment, the state of order is reminded with the presence or absence of abnormal.For example, monitoring order state whether
For error condition.
In the present embodiment, it is monitored by the state to order, is conducive to find ordering there are order exception in time
It is single, and then handled so that if it exists order exception when, be capable of the exception of timely correction order, improve in order database
The accuracy of order information.
Optionally, in an alternative embodiment of the invention, the state of order described in the monitoring order database is
It is no to include: in the presence of abnormal
Whether the duration in the current state for judging the order is more than the corresponding shape of the current state
The state time limit;And/or
Judge whether the order is the order that failed, if the order is the order that failed, judges the order failure
Whether the state of the order is default failure state afterwards.
In the present embodiment, the order state time limit lasting in different conditions is preset.
When order is to have failed order, user can not carry out the operation in addition to checking to the order again, correspondingly, working as
When order is under default failure state, user can not carry out the operation in addition to checking to the order, i.e. online transaction does not connect
Operation other than being checked by user to the order, when order status is default failure state, the state of order will not be again
It is changed.
In the present embodiment, the default failure state can be in off state.Judge whether order is that failure state can
To include: to judge whether order is more than not to be paid for the default time of payment, if so, determining that the order is the order that failed.
For example, certain order is more than two hours, state is still state in payment, it is determined that there are different for the state of the order
Often;Alternatively, determining that the order is the order that failed, if order fails when certain order half an hour is more than not pay yet half an hour
Afterwards, order status does not convert the state of being not turned off, it is determined that the state of the order exists abnormal.
Optionally, in an alternative embodiment of the invention, described to judge whether the order is that the order that failed includes:
Judge whether the identity information of the creation side of the order is changed to default identity information, if so, ordering described in determining
Dan Weiyi failure order;Or
Judge whether the order reaches default term of validity, if so, determining that the order is the order that failed.
In the present embodiment, the creation side of order is a side of transaction.For example, the creation side of order is purchaser.The wound
The identity information for the side of building can be obtained from the database for saving the creation side information, or from other systems acquisition (such as certain
Credit rating system).The default identity information, which can according to need, to be preset.For example, when order is debt-credit order, if wound
The identity information for the side of building is that A grades of credits are changed to D grades of credits (wherein A grades of credits are higher than D grades of credits), it is determined that the order is
Fail order, sends order failure and reminds.
In the present embodiment, the default term of validity determines according to the actual conditions of order.For example, if order is purchase
Finance product, then preset term of validity be finance product time limit, when reaching in the time limit of finance product, financing fund turn
Out, which is the order that failed.
Further, in an alternative embodiment of the invention, the method also includes:
Interval preset time exports the historic state transitional information of the order.
The preset time can be preset.The historic state transitional information of the order include order end to
Which state is current time live through.It can be converted with the state of auxiliary examination order by the historic state transitional information of order
It whether there is mistake in journey.
In the present embodiment, when exporting the historic state transitional information of order, order number can also be exported, order status, ordered
The information relevant to order such as lower single time of product, order that single amount of money, order are bought.
Department's order processing method described in the present embodiment detects whether the action event for having to order;If it exists to described
The action event of order obtains the current state of the order from order database;By the current state of the order and institute
The information input of action event is stated to finite state machine model corresponding with the order type, obtains the finite state machine mould
The order status transformation result that type returns;According to the order status transformation result, updates or the order is maintained to order described
State in single database.Since after detecting to the operating time of order, the state of order and action event being inputted
To finite state machine model, the processing of order status is carried out by finite state machine model, without in original service code
Order status is handled, the efficiency of order status processing is improved, avoids the confusion of order status, improve order shape
The accuracy of state change.
As shown in Fig. 2, Fig. 2 provides a kind of functional block diagram of order processing device for the embodiment of the present invention.Order processing
Device includes that detection module 210, first obtains the acquisition module 230 of module 220, second and state update module 240.Institute of the present invention
The module of title, which refers to, a kind of performed by the processor by electronic equipment and can complete the series of computation of fixed function
Machine program segment, is stored in the memory of electronic equipment.It in the present embodiment, will be in subsequent reality about the function of each module
It applies in example and is described in detail.
Detection module 210, for detecting whether in the presence of the action event to order.
Order described in the present embodiment the transactional operations such as is bought, is leased on online transaction platform by user and formed
Order.
For example, providing various finance products in financing store, when user buys finance product A, forms a purchase and order
Single, user can check the details of the order, e.g., the time of purchase, the amount of money of purchase, the finance product bought phase
Limit, the money rate of finance product bought etc..
The action event is based on operation performed by order, for example, carrying out delivery operation, then action event to order
For payment events;Or delivery operation is carried out to order, then action event is branch shipping events.
In a kind of possible embodiment, when carrying out different operations to order, different operating results can be returned
Message, therefore the action event to order can be got according to the operating result message.
First obtains module 220, for the action event if it exists to the order, from order database obtain described in order
Single current state.
The order database is the database for saving the information of order.For example, order database is online transaction platform
Database, order database be used for included to orders various on transaction platform and order information store.
In the present embodiment, there are many different states for an order.For example, determining purchase when user has chosen certain commodity
Afterwards, order is generated, the state of order is state to be paid at this time;When detecting user when paying or in the time of payment
Interior, the state of order is in payment;When user's pay status, the state of order is to have paid success status.
In the present embodiment, can preset order in the different stages has different states, in the order database
The current state of order indicates which kind of state the order is currently at, i.e., when detecting the action event to order from order numbers
According to the real-time status for the order that library is got.After detecting to the action event of order, the real-time shape of the order got
State is the state also converted not according to state of the action event to order.
Second obtains module 230, for by the current state of the order and the information input of the action event extremely
Finite state machine model corresponding with the order type obtains the order status Change-over knot that the finite state machine model returns
Fruit.
In the present embodiment, finite state machine (finite state machine, FSM) model is referred to as state machine model,
FSM model is the mathematical model for indicating the behaviors such as limited state and transfer between these states and movement, FSM model
Can with description object in its life cycle status switch experienced, and how to respond from extraneous various events.
In the present embodiment, in finite state machine can predefined order different conditions and different condition/things
Part places an order by being presently in which kind of dbjective state state overturning is.Then it by the current state information of order and detects
The action event of order is input in finite state machine model, so that shape of the finite state machine model according to the order received
State and operating time judge which kind of state order will overturn as, then in the present embodiment, the result of order status overturning is
Dbjective state of the order after action event.
In the present embodiment, order can be determined according to the information of order (such as order bought merchandise news)
Type, and finite state machine corresponding with each type is preset according to the different types of order that transaction platform can be generated.
For example, determining the type of order for life when it is articles for daily use (such as clothes, shoes) that order, which is bought,
Class order;When the commodity that order is bought are financial product (such as fund), determine the type of order for financing class order.Then when
When the type of order is life kind order, life kind state machine model is obtained;When the type of order is financing class order, obtain
Financing class state machine model.
In alternatively possible embodiment, the type of order can be obtained from order database, that is, is generating order
When, it determines that the type of order, then can directly acquire the type of the order of preservation when the state of order is converted, thus
Finite state machine model corresponding with the type of order can quickly be obtained.
In embodiments of the present invention, it when transaction system can provide a plurality of types of orders, is ordered according to different types of
It is single to obtain different finite state machine model progress information inputs, so that only to a type of order in each finite state machine
Life cycle judged, when a kind of variation of the overturning rule of order status, also only to being related to the finite state machine of the order
It is safeguarded, improves the efficiency of finite state machine model maintenance.
Further, in an alternative embodiment of the invention, described device further include:
Third obtains module, for the action event if it exists to the order, obtains the order from order database
Current state after, obtain action event and order status default corresponding relationship;
Determining module, for determining the expection of the order described after the action event according to the default corresponding relationship
State;
Then described second obtain module by the current state of the order and the information input of the action event to
The corresponding finite state machine model of the order type includes:
By the information input of the current state of the order, the expecting state of the order and the action event to institute
Finite state machine model is stated, the order status transformation result that the finite state machine model returns is obtained, the order status turns
Change the message that result includes whether that the order is allowed to be converted to the expecting state from the current state.
In the present embodiment, after detecting to the action event of order, according to the pre- of action event and order status
If corresponding relationship determines the expecting state of order.
For example, if the state of order is state to be paid, and action event is payment success events, then obtains order and propping up
Pay success events after order expecting state.Expecting state at this time can be certain operation determined by a certain judgement sentence
The state of order after event.
Then, the current state of order, expecting state and action event are input to finite state machine model, by having
Limit state machine model verifies expecting state.Specifically, passing through current state and operation thing in finite state machine model
Part obtains dbjective state, then verifies whether dbjective state is expecting state, if so, the message for allowing order status to overturn is returned,
If it is not, returning to the message for not allowing order status to overturn.
State update module 240, for updating or maintaining the order described according to the order status transformation result
State in order database.
In the present embodiment, if state transformation result is dbjective state, by the state of order in the order database
Dbjective state is updated to from current state.For example, the state of order is updated to payment success status to be paid.
Alternatively, if maintaining the current state of order in order database to protect when state transformation result remains as current state
It holds constant.
For example, if the information of action event is payment failure, maintaining the shape of order when order current state is in payment
State is state in payment, and when the information of action event is to pay successfully, by the state of order, state is updated to prop up from payment
Pay success status.
In the present embodiment, when the result of state overturning is the message for allowing order to overturn, then by the order database
The state of middle order is updated to expecting state from current state;When the result of state overturning is not the message for allowing to overturn, hair
Send prompting message.
Further, in an alternative embodiment of the invention, described device further include:
Sending module, for after the state in the order database is updated, Xiang Suoshu to be ordered by the order
Single owning user sends the reminder message that the state of the order changes.
For example, the state of the m order in order database pair carries out more after party A-subscriber executes delivery operation to m order
After new, reminder message that the state for sending order to party A-subscriber changes.
Through this embodiment, can make the owning user of order quickly recognize the state of order whether change with
And which kind of conversion has occurred.
Further, in an alternative embodiment of the invention, described device further includes reminding module, and the reminding module is used for:
The state of order described in the order database is monitored with the presence or absence of abnormal;
When the state of the order deposit when abnormal, send order abnormity prompt.
In the present embodiment, the state of order is reminded with the presence or absence of abnormal.For example, monitoring order state whether
For error condition.
In the present embodiment, it is monitored by the state to order, is conducive to find ordering there are order exception in time
It is single, and then handled so that if it exists order exception when, be capable of the exception of timely correction order, improve in order database
The accuracy of order information.
Optionally, in an alternative embodiment of the invention, reminding module monitors the shape of order described in the order database
State whether there is exception
First judgment module, for judging whether the duration in the current state of the order is more than described
The current state corresponding state time limit;And/or
Second judgment module, for judging whether the order is the order that failed, if the order is the order that failed,
Whether the state for judging the order after the order fails is default failure state.
In the present embodiment, the order state time limit lasting in different conditions is preset.
When order is to have failed order, user can not carry out the operation in addition to checking to the order again, correspondingly, working as
When order is under default failure state, user can not carry out the operation in addition to checking to the order, i.e. online transaction does not connect
Operation other than being checked by user to the order, when order status is default failure state, the state of order will not be again
It is changed.
In the present embodiment, the default failure state can be in off state.Judge whether order is that failure state can
To include: to judge whether order is more than not to be paid for the default time of payment, if so, determining that the order is the order that failed.
For example, certain order is more than two hours, state is still state in payment, it is determined that there are different for the state of the order
Often;Alternatively, determine that the order is failure order when certain order half an hour is more than not pay yet half an hour, if after order failure,
Order status does not convert the state of being not turned off, it is determined that the state of the order exists abnormal.
Optionally, in an alternative embodiment of the invention, second judgment module judges whether the order is to have failed
Order includes:
Judge whether the identity information of the creation side of the order is changed to default identity information, if so, ordering described in determining
Dan Weiyi failure order;Or
Judge whether the order reaches default term of validity, if so, determining that the order is the order that failed.
In the present embodiment, the creation side of order is a side of transaction.For example, the creation side of order is purchaser.The wound
The identity information for the side of building can be obtained from the database for saving the creation side information, or from other systems acquisition (such as certain
Credit rating system).The default identity information, which can according to need, to be preset.For example, when order is debt-credit order, if wound
The identity information for the side of building is that A grades of credits are changed to D grades of credits (wherein A grades of credits are higher than D grades of credits), it is determined that the order is
Fail order, sends order failure and reminds.
In the present embodiment, the default term of validity determines according to the actual conditions of order.For example, if order is purchase
Finance product, then preset term of validity be finance product time limit, when reaching in the time limit of finance product, financing fund turn
Out, which is the order that failed.
Further, in an alternative embodiment of the invention, described device further include:
Output module exports the historic state transitional information of the order for being spaced preset time.
The preset time can be preset.The historic state transitional information of the order include order end to
Which state is current time live through.It can be converted with the state of auxiliary examination order by the historic state transitional information of order
It whether there is mistake in journey.
In the present embodiment, when exporting the historic state transitional information of order, order number can also be exported, order status, ordered
The information relevant to order such as lower single time of product, order that single amount of money, order are bought.
The order processing device provided by the invention detects whether the action event for having to order;If it exists to institute
The action event for stating order obtains the current state of the order from order database;By the current state of the order and
The information input of the action event obtains the finite state machine to finite state machine model corresponding with the order type
The order status transformation result that model returns;According to the order status transformation result, updates or maintain the order described
State in order database.It is due to after detecting to the operating time of order, the state of order and action event is defeated
Enter to finite state machine model, the processing of order status is carried out by finite state machine model, without in original service code
In order status is handled, improve order status processing efficiency, avoid the confusion of order status, improve order
The accuracy of Status Change.
The above-mentioned integrated unit realized in the form of software function module, can store in a computer-readable meter
In calculation machine readable storage medium storing program for executing.Above-mentioned software function module is stored in a computer readable storage medium, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) or processor
(processor) part steps of each embodiment the method for the present invention are executed.
As shown in figure 3, being that the present invention realizes that the structure of electronic equipment 3 of the preferred embodiment of order processing display methods is shown
It is intended to.In the present embodiment, electronic equipment 3 includes at least one sending device 31, at least one processor 32, at least one
Manage device 33, at least one reception device 34 and at least one communication bus.Wherein, the communication bus is for realizing these groups
Connection communication between part.
The electronic equipment 3 be it is a kind of can according to the instruction for being previously set or store, automatic progress numerical value calculating and/or
The equipment of information processing, hardware include but is not limited to microprocessor, specific integrated circuit (Application Specific
Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), number
Word processing device (Digital Signal Processor, DSP), embedded device etc..The electronic equipment 3 may also include network
Equipment and/or user equipment.Wherein, the network equipment includes but is not limited to single network server, multiple network servers
The server group of composition or the cloud being made of a large amount of hosts or network server for being based on cloud computing (Cloud Computing),
Wherein, cloud computing is one kind of distributed computing, a super virtual computing consisting of a loosely coupled set of computers
Machine.
The electronic equipment 3, which may be, but not limited to, any one, to pass through keyboard, touch tablet or voice-operated device with user
Etc. modes carry out the electronic product of human-computer interaction, for example, the terminals such as tablet computer, smart phone, monitoring device.
Network locating for the electronic equipment 3 includes, but are not limited to internet, wide area network, Metropolitan Area Network (MAN), local area network, virtual
Dedicated network (Virtual Private Network, VPN) etc..
Wherein, the reception device 34 and the sending device 31 can be wired sending port, or wirelessly set
It is standby, for example including antenna assembly, for carrying out data communication with other equipment.
The memory 32 is for storing program code.The memory 32, which can be, does not have physical form in integrated circuit
The circuit with store function, such as RAM (Random-Access Memory, random access memory), FIFO (First In
First Out, push-up storage) etc..Alternatively, the memory 32 is also possible to the memory with physical form, such as
Memory bar, TF card (Trans-flash Card), smart media card (smart media card), safe digital card (secure
Digital card), storage facilities such as flash memory cards (flash card) etc..
The processor 33 may include one or more microprocessor, digital processing unit.The processor 33 is adjustable
With the program code stored in memory 32 to execute relevant function.For example, modules described in Fig. 2 are stored in institute
The program code in memory 32 is stated, and as performed by the processor 33, to realize a kind of order processing display methods.It is described
Processor 33 is also known as central processing unit (CPU, Central Processing Unit), is one piece of ultra-large integrated circuit,
It is arithmetic core (Core) and control core (Control Unit).
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the module
It divides, only a kind of logical function partition, there may be another division manner in actual implementation.
The module as illustrated by the separation member may or may not be physically separated, aobvious as module
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.Some or all of the modules therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie
In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power
Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims
Variation is included in the present invention.Any attached associated diagram label in claim should not be considered as right involved in limitation to want
It asks.Furthermore, it is to be understood that one word of " comprising " does not exclude other units or steps, odd number is not excluded for plural number.It is stated in system claims
Multiple units or device can also be implemented through software or hardware by a unit or device.Second equal words are used to table
Show title, and does not indicate any particular order.
Finally it should be noted that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although reference
Preferred embodiment describes the invention in detail, those skilled in the art should understand that, it can be to of the invention
Technical solution is modified or equivalent replacement, without departing from the spirit and scope of the technical solution of the present invention.
Claims (10)
1. a kind of order processing method, which is characterized in that the described method includes:
Detect whether the action event for having to order;
If it exists to the action event of the order, the current state of the order is obtained from order database;
The current state of the order and the information input of the action event is extremely corresponding with the order type limited
State machine model obtains the order status transformation result that the finite state machine model returns;
According to the order status transformation result, state of the order in the order database is updated or maintained.
2. the method as described in claim 1, which is characterized in that it is described if it exists to the action event of the order, from order
After database obtains the current state of the order, the method also includes:
Obtain the default corresponding relationship of action event and order status;
The expecting state of the order described after the action event is determined according to the default corresponding relationship;
It is described that the current state of the order and the information input of the action event is extremely corresponding with the order type
Finite state machine model obtains the order status transformation result that the finite state machine model returns, comprising:
The information input of the current state of the order, the expecting state of the order and the action event is had to described
State machine model is limited, the order status transformation result that the finite state machine model returns, the order status Change-over knot are obtained
Fruit includes whether the message for allowing the order to be converted to the expecting state from the current state.
3. method according to claim 1 or 2, which is characterized in that the method also includes:
The state of order described in the order database is monitored with the presence or absence of abnormal;
When the state of the order deposit when abnormal, send order abnormity prompt.
4. method as claimed in claim 3, which is characterized in that the state of order described in the monitoring order database
Include: with the presence or absence of abnormal
Whether the duration for judging that the order is in the current state is more than the current state corresponding state time limit;
And/or
Judge whether the order is the order that failed, if the order is the order that failed, judges institute after the order failure
Whether the state for stating order is default failure state.
5. method as claimed in claim 4, which is characterized in that described to judge whether the order is that the order that failed includes:
Judge whether the identity information of the creation side of the order is changed to default identity information, if so, determining that the order is
Failed order;Or
Judge whether the order reaches default term of validity, if so, determining that the order is the order that failed.
6. method according to claim 1 or 2, which is characterized in that the method also includes:
Interval preset time exports the historic state transitional information of the order.
7. method according to claim 1 or 2, which is characterized in that it is described by the order in the order database
After state is updated, the method also includes:
The reminder message that the state for sending the order to the owning user of the order changes.
8. a kind of order processing device, which is characterized in that described device includes:
Detection module, for detecting whether in the presence of the action event to order;
First acquisition module obtains working as the order from order database for the action event if it exists to the order
Preceding state;
Second obtains module, for extremely ordering the current state of the order and the information input of the action event with described
The corresponding finite state machine model of single type obtains the order status transformation result that the finite state machine model returns;
State update module, for updating or maintaining the order in the order numbers according to the order status transformation result
According to the state in library.
9. a kind of electronic equipment, which is characterized in that the electronic equipment includes memory and processor, and the memory is for depositing
At least one instruction is stored up, the processor is for executing at least one described instruction to realize such as any one of claims 1 to 7
The order processing method.
10. a kind of computer readable storage medium, is stored thereon with computer instruction, it is characterised in that: the computer instruction
The order processing method as described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910442270.0A CN110310170A (en) | 2019-05-24 | 2019-05-24 | Order processing method, apparatus, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910442270.0A CN110310170A (en) | 2019-05-24 | 2019-05-24 | Order processing method, apparatus, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110310170A true CN110310170A (en) | 2019-10-08 |
Family
ID=68075472
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910442270.0A Pending CN110310170A (en) | 2019-05-24 | 2019-05-24 | Order processing method, apparatus, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110310170A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110992180A (en) * | 2019-11-28 | 2020-04-10 | 支付宝(杭州)信息技术有限公司 | Abnormal transaction detection method and device |
CN111144982A (en) * | 2019-12-20 | 2020-05-12 | 网联清算有限公司 | Order state transition method and device, electronic equipment and storage medium |
CN111582999A (en) * | 2020-05-28 | 2020-08-25 | 广州蓝深科技有限公司 | Order management system for cloud electronic commerce |
CN111967628A (en) * | 2020-07-23 | 2020-11-20 | 北京白龙马云行科技有限公司 | Order service method and system |
CN112184387A (en) * | 2020-10-12 | 2021-01-05 | 广州宸祺出行科技有限公司 | Method and system for ensuring consistency of driver state and order state change |
CN112330298A (en) * | 2020-11-17 | 2021-02-05 | 中国平安财产保险股份有限公司 | Consumption order flow management method and device, computer equipment and storage medium |
CN112950302A (en) * | 2019-12-10 | 2021-06-11 | 国网电子商务有限公司 | Order processing method and device |
CN113034165A (en) * | 2019-12-09 | 2021-06-25 | 腾讯科技(深圳)有限公司 | Data processing method and device, storage medium and electronic device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070027801A1 (en) * | 2005-07-26 | 2007-02-01 | International Business Machines Corporation | Multi-level transaction flow monitoring |
CN101957751A (en) * | 2010-06-04 | 2011-01-26 | 福建星网锐捷网络有限公司 | Method and device for realizing state machine |
CN107450919A (en) * | 2017-07-25 | 2017-12-08 | 上海壹账通金融科技有限公司 | BPM method, equipment and computer-readable recording medium |
CN108694633A (en) * | 2017-04-06 | 2018-10-23 | 北京京东尚科信息技术有限公司 | Order abnormality detection and facture, device, electronic equipment and readable storage medium storing program for executing |
CN109697658A (en) * | 2018-12-29 | 2019-04-30 | 拉扎斯网络科技(上海)有限公司 | Order management method, device, electronic equipment and computer readable storage medium |
-
2019
- 2019-05-24 CN CN201910442270.0A patent/CN110310170A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070027801A1 (en) * | 2005-07-26 | 2007-02-01 | International Business Machines Corporation | Multi-level transaction flow monitoring |
CN101957751A (en) * | 2010-06-04 | 2011-01-26 | 福建星网锐捷网络有限公司 | Method and device for realizing state machine |
CN108694633A (en) * | 2017-04-06 | 2018-10-23 | 北京京东尚科信息技术有限公司 | Order abnormality detection and facture, device, electronic equipment and readable storage medium storing program for executing |
CN107450919A (en) * | 2017-07-25 | 2017-12-08 | 上海壹账通金融科技有限公司 | BPM method, equipment and computer-readable recording medium |
CN109697658A (en) * | 2018-12-29 | 2019-04-30 | 拉扎斯网络科技(上海)有限公司 | Order management method, device, electronic equipment and computer readable storage medium |
Non-Patent Citations (1)
Title |
---|
贾燕, 王润孝, 朱焕亮, 张吉楠: "基于有限状态机的供应链订单处理流程研究", 工业工程与管理, no. 01, pages 66 - 69 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110992180A (en) * | 2019-11-28 | 2020-04-10 | 支付宝(杭州)信息技术有限公司 | Abnormal transaction detection method and device |
CN113034165A (en) * | 2019-12-09 | 2021-06-25 | 腾讯科技(深圳)有限公司 | Data processing method and device, storage medium and electronic device |
CN113034165B (en) * | 2019-12-09 | 2023-10-31 | 腾讯科技(深圳)有限公司 | Data processing method and device, storage medium and electronic device |
CN112950302A (en) * | 2019-12-10 | 2021-06-11 | 国网电子商务有限公司 | Order processing method and device |
CN111144982A (en) * | 2019-12-20 | 2020-05-12 | 网联清算有限公司 | Order state transition method and device, electronic equipment and storage medium |
CN111144982B (en) * | 2019-12-20 | 2022-02-11 | 网联清算有限公司 | Order state transition method and device, electronic equipment and storage medium |
CN111582999A (en) * | 2020-05-28 | 2020-08-25 | 广州蓝深科技有限公司 | Order management system for cloud electronic commerce |
CN111967628A (en) * | 2020-07-23 | 2020-11-20 | 北京白龙马云行科技有限公司 | Order service method and system |
CN112184387A (en) * | 2020-10-12 | 2021-01-05 | 广州宸祺出行科技有限公司 | Method and system for ensuring consistency of driver state and order state change |
CN112330298A (en) * | 2020-11-17 | 2021-02-05 | 中国平安财产保险股份有限公司 | Consumption order flow management method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110310170A (en) | Order processing method, apparatus, electronic equipment and storage medium | |
US20230385841A1 (en) | Systems and methods for detecting out-of-pattern transactions | |
US10896424B2 (en) | Systems and methods for detecting out-of-pattern transactions | |
US20180308089A1 (en) | Settlement system, server device, terminal device, method and program | |
CN109829717A (en) | O&M method, apparatus, computer installation and the storage medium of payment channel | |
WO2019014821A1 (en) | Fault early warning method for financial terminal, terminal device and storage medium | |
CN110223153A (en) | Account checking method, device, electronic equipment and storage medium | |
CN112559300B (en) | Fault cause determining system, method and device | |
CN111292085B (en) | Method, device, equipment and computer readable storage medium for evaluating transaction risk | |
CN110084690A (en) | Data processing method, device, computer installation and storage medium | |
CN111353841B (en) | Document data processing method, device and system | |
CN109345249B (en) | Payment failure processing method and device | |
CN110766392A (en) | Transaction processing method and device | |
CN110097369A (en) | Transaction data processing method, device, electronic equipment and storage medium | |
CN109146128A (en) | Business data processing method, device and server | |
US20150310437A1 (en) | Avoiding transaction rollback | |
CN111666191A (en) | Data quality monitoring method and device, electronic equipment and storage medium | |
JP5901094B1 (en) | Investment simulation apparatus and method | |
KR20160025796A (en) | Apparatus for exchanging money piece by piece and method thereof | |
CN108288183A (en) | Ideal money returning method, device and readable storage medium storing program for executing | |
CN110175924A (en) | A kind of risk network establishing method and device | |
CN114066648B (en) | Cross-service multi-service type data processing method and related equipment | |
CN112116169B (en) | User behavior determining method and device and electronic equipment | |
CN113222590B (en) | Method, apparatus and computer readable storage medium for preventing double-flower attack | |
AU2021104362A4 (en) | System & method for intelligent virtual stock trading and management using machine learning approach |
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 |