CN106933674A - The method and system of resource transfers - Google Patents
The method and system of resource transfers Download PDFInfo
- Publication number
- CN106933674A CN106933674A CN201511028699.3A CN201511028699A CN106933674A CN 106933674 A CN106933674 A CN 106933674A CN 201511028699 A CN201511028699 A CN 201511028699A CN 106933674 A CN106933674 A CN 106933674A
- Authority
- CN
- China
- Prior art keywords
- event
- database
- implementing result
- client
- resources
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/563—Data redirection of data network streams
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of method and system of resource transfers.Wherein, the method includes:The first system reads the first event implementing result from the first database, wherein, first event implementing result is used to indicate second system to complete the execution for performing the first event that client sends the first asked event of request, first event implementing result is deposited into the second database by second system, and from the second database synchronization to the first database;The first system obtains and needs to return to the first event-resources of client after the first event has been performed;First event-resources are returned to client by the first system.The present invention solves the relatively low technical problem of reliability of resource transfers.
Description
Technical field
The present invention relates to internet arena, a kind of method in particular to resource transfers and it is
System.
Background technology
At present, user participate in internet on various events when, particularly some events need
Client first carries out an event, then when obtaining the resource related to the event of the execution, it usually needs
One system first carries out the event and obtains event implementing result, and then another system is according to the thing
Part implementing result obtains the resource related to the event, the system by obtaining the resource related to the event
The resource of acquisition is sent to client.
As shown in figure 1, client trigger event participates in the trigger event page of system, resource database
The resource that record user obtains.System is participated in by event from resource database and sends participation to client
The successful information of event.Then user sends the first event request to second system, and second system is performed
After first event, implementing result is returned to client.Second system issues the first event to the first system
Implementing result, and by the first system obtain the first event-resources, and to client return the first event
Resource.In above process, because network reason may cause the communicating interrupt between two systems,
So that another system cannot receive event implementing result, also cannot just obtain related to event
Resource, it is final to cause that client obtain the related resource of event.In addition, generally two systems are led to
A database transmission event implementing result is crossed, two systems are dependent on this when respective business is performed
Database so that two systems are highly coupled so that the Reliability comparotive of resource transfers is low.
For above-mentioned problem, effective solution is not yet proposed at present.
The content of the invention
A kind of method and system of resource transfers is the embodiment of the invention provides, is turned with least solving resource
The relatively low technical problem of the reliability of shifting.
A kind of one side according to embodiments of the present invention, there is provided method of resource transfers, including:
The first system reads the first event implementing result from the first database, wherein, first event is held
The first event execution that row result sends for indicating second system to complete to client is asked
The execution of the first event asked, the first event implementing result is deposited into second by the second system
In database, and from second database synchronization to first database;The first system
Acquisition needs to return to the first event-resources of the client after first event has been performed;Institute
State the first system and first event-resources are returned into the client.
One side according to embodiments of the present invention, there is provided the method for another resource transfers, including:
The first event for asking to perform the first event that second system receives client transmission performs request;
The second system by the first event implementing result store in the second database, for the first system from
The first event implementing result is read in first database, and the first event is returned to the client
Resource, wherein, the first event implementing result is used to indicate the second system to complete to described
The execution of the first event, the first event implementing result is from second database synchronization to described
In one database, first event-resources are obtained by the first system.
Another aspect according to embodiments of the present invention, additionally provides a kind of system of resource transfers, including:
Reading unit, for reading the first event implementing result from the first database, wherein, described first
The first event execution that event implementing result sends for indicating second system to complete to client please
The execution of the first asked event is asked, the first event implementing result is stored in by the second system
To in the second database, and from second database synchronization to first database;Obtain single
Unit, obtained for uniting needs to return to the first thing of the client after first event has been performed
Part resource;Resource returning unit, for first event-resources to be returned into the client.
Another aspect according to embodiments of the present invention, additionally provides a kind of system of resource transfers, including:
Receiving unit, the first event for asking the first event of execution for receiving client transmission is performed
Request;Memory cell, for by the storage of the first event implementing result in the second database, for the
One system reads the first event implementing result from the first database, and is returned to the client
First event-resources, wherein, the first event implementing result is used to indicate the second system to complete
Execution to first event, the first event implementing result is from second database synchronization
To in first database, first event-resources are obtained by the first system.
In embodiments of the present invention, the first system reads the first event implementing result from the first database,
Wherein, the first event implementing result is used to indicate second system to complete the first thing for sending client
Part performs the execution of the first asked event of request, and the first event implementing result is stored in by second system
To in the second database, and from the second database synchronization to the first database;The first system is obtained
First event needs to return to the first event-resources of client after having performed;The first system is by the first thing
Part resource returns to client, and the first system and second system pay close attention to respective service logic and database,
And do not interfere with each other mutually, the coupling of two systems is reduced, the reliability of resource transfers process is improve,
So as to the relatively low technical problem of the reliability for solving resource transfers.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the one of the application
Part, schematic description and description of the invention is used to explain the present invention, does not constitute to this hair
Bright improper restriction.In the accompanying drawings:
Fig. 1 is a kind of interaction figure of the method for the resource transfers according to prior art;
Fig. 2 is the schematic diagram of hardware environment according to embodiments of the present invention;
Fig. 3 is the flow chart of the method for according to embodiments of the present invention 1 resource transfers;
Fig. 4 is the interaction figure of the method for resource transfers according to embodiments of the present invention;
Fig. 5 is the interaction figure of the method for the resource transfers according to alternative embodiment of the present invention;
Fig. 6 is the flow chart of the method for according to embodiments of the present invention 2 resource transfers;
Fig. 7 is the schematic diagram of the system of according to embodiments of the present invention 3 resource transfers;
Fig. 8 is the schematic diagram of the system of according to embodiments of the present invention 4 resource transfers;
Fig. 9 is the Organization Chart of server according to embodiments of the present invention.
Specific embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the present invention
Accompanying drawing in embodiment, is clearly and completely described to the technical scheme in the embodiment of the present invention,
Obviously, described embodiment is only the embodiment of a part of the invention, rather than whole implementation
Example.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative work
Under the premise of the every other embodiment that is obtained, should all belong to the scope of protection of the invention.
It should be noted that the term in description and claims of this specification and above-mentioned accompanying drawing
" first ", " second " etc. be for distinguishing similar object, without for describe specific order or
Precedence.It should be appreciated that the data for so using can be exchanged in the appropriate case, to retouch here
The embodiments of the invention stated can be with the order reality in addition to those for illustrating herein or describing
Apply.Additionally, term " comprising " and " having " and their any deformation, it is intended that covering is not arranged
His includes, for example, contain the process of series of steps or unit, method, system, product or
Equipment is not necessarily limited to those steps clearly listed or unit, but may include not list clearly
Or for these processes, method, product or other intrinsic steps of equipment or unit.
Embodiment 1
According to embodiments of the present invention, there is provided a kind of side that can be performed by the application system embodiment
Method embodiment, it is necessary to explanation, can be in such as one group meter the step of the flow of accompanying drawing is illustrated
Performed in the computer system of calculation machine executable instruction, and, although logic is shown in flow charts
Sequentially, but in some cases, can be shown or described to perform different from order herein
Step.
According to embodiments of the present invention, there is provided a kind of method of resource transfers.
Alternatively, in the present embodiment, the method for above-mentioned resource transfers can apply to as shown in Figure 2
Terminal 102 and the hardware environment that is constituted of server 104 in.As shown in Fig. 2 terminal 102 is logical
Cross network to be attached with server 104, above-mentioned network is included but is not limited to:Mobile communications network,
Wide area network, Metropolitan Area Network (MAN) or LAN, terminal 102 can be mobile phone terminal, or PC terminals,
Notebook terminal or panel computer terminal.Above-mentioned server 104 includes the first system, the first data
Storehouse, second system and the second database, above-mentioned server 104 can also include resource database.
The main operational principle of the hardware environment system shown in Fig. 2 is:Terminal 102 is from resource data
Event identifier is obtained in storehouse, then terminal 102 performs first event related to the event identifier, the
One event is carried out between second system in terminal 102 and server 104, and second system is held
The event of row first simultaneously obtains the first event implementing result, and second system stores the first event implementing result
To in the second database.First event implementing result from the second database synchronization to the first database,
The first system reads the first event implementing result from the first database, and is obtained from resource database
The resource related to the event identifier, then returns to terminal 102 by the resource of acquisition, so that terminal
102 obtain the resource corresponding to event identifier.
In said system, the first system, the first database, second system and the second database can be with
It is independently arranged in multiple servers 104, it is also possible to while in a server 104.At this
In each embodiment of application, used as standby database, the second database is used as master data for the first database
Storehouse.
Fig. 3 is the flow chart of the method for according to embodiments of the present invention 1 resource transfers, the resource transfers
Method can be performed by the first system.Below in conjunction with the resource that Fig. 3 is provided the embodiment of the present invention
The method of transfer does specific introduction, as shown in figure 3, the method for the resource transfers mainly includes following step
Suddenly:
Step S302, the first system reads the first event implementing result from the first database, wherein,
First event implementing result is held for indicating second system to complete to the first event that client sends
The execution of row asked the first event of request, the first event implementing result is deposited into the by second system
In two databases, and from the second database synchronization to the first database.
Step S304, the first system obtains and needs to return to client after the first event has been performed
First event-resources.
First event-resources are returned to client by step S306, the first system.
First, client sends the first event and performs request to second system.Second system performs first
Event, obtains the first event implementing result, and the first event implementing result is stored to the second database
In.
Secondly, the first event implementing result is from the second database synchronization to the first database.
Finally, the first system reads the first event implementing result from the first database, and obtains and the
The first associated event-resources of one event, so as to complete for the first event-resources to return to client.
It can be seen that, in above process, the first system reads the first event implementing result, obtains the first thing
Part resource and the first event-resources of return all do not rely on the second database, only need the ginseng of the first database
With.Equally, second system performs the first event and stores the first event implementing result and all do not rely on
First database, only needs the participation of the second database.That is the first system and second system concern is respective
Service logic and database, and do not interfere with each other mutually, the coupling of two systems is reduced, improve money
The reliability of source transfer process, so as to the relatively low technical problem of the reliability for solving resource transfers.
Specifically, sent caused by the first event implementing result to the first system with respect to the first database
Loss of data or bust this (network reason causes), by the first system actively from the first data
The mode that the first event implementing result is read in storehouse will not missing data.The first system is from the first database
It is middle to read the first event implementing result rather than the second database, even if the multiple database of poll first repeatedly,
Also the second database build-up of pressure will not be given and influences the logical sum that second system performs the first event to imitate
Rate.And second system is to storing the first event implementing result in the second database and also do not interfere with first
System reads the first event implementing result from the first database.Due to the second database and the first database
Synchronous action is only existed, two systems are separate in the process for performing respective logic, and each
System is all reliable, so as to the reliability of the resource transfers that the cooperation for enhancing two systems is realized.
Simultaneously as the second database and the first database keep the consistent of data by synchronous, it is ensured that
The first system can the storage of real-time processing second system to the event implementing result in the second database,
The real-time of resource transfers is improve, client has been reached and has been obtained first related to the first event in time
The technique effect of event-resources.
Fig. 4 is the interaction figure of the method for resource transfers according to embodiments of the present invention, with reference to the friendship of Fig. 4
Mutually figure is illustrated.
1st, client trigger event participates in the event participation page that system is provided, and such as user passes through hand
Machine clicks on certain loose-leaf (i.e. the event participation page) to obtain the movable active rule (i.e. event
Participate in rule), the active rule is to obtain B resources after performing A events.
2nd, event participates in system and sends event participation rule to resource database, so that resource database
Record the B resources that above-mentioned client is obtained.
3rd, after resource database is successfully recorded, participate in system to event and return to response message.
4th, event participate in system receive after resource database is successfully recorded return response message after,
Sent for indicating to participate in successful configured information to client, for example, " participated in successfully ", " congratulations are obtained
Obtain ×× " etc..
5th, client sends the request for performing A events to second system.
6th, second system performs A events.
7th, by the storage of A events implementing result in the second database.
8th, during A events implementing result is from the second database synchronization to the first database.
9th, i.e., S302, the first system reads A event implementing results from the first database.
10th, i.e., S304, the first system searches the B resource related to A events from resource database.
B resources are sent to client by the 11st, i.e. S306, the first system.
From above-mentioned 5 to 11, the first system obtains number from resource database and the first database
According to second system is to data storage in the second database so that the business of the first system and second system
Logic is separate, reduces the coupling of the first system and second system, improves two systems
Reliability, so as to ensure that the reliability of resource transfers so that client can in time obtain B resources.
In a specific example, A events can be single purchase behavior, and B resources can be right
The return of the amount of money that this buying behavior is paid, or the buying behavior to performing again are paid
The return of the amount of money for going out, the form of B resources can be coupons (as completely 10 coupons for subtracting 9,
10 yuan of coupons, red packets), virtual resource is (such as equipment in integration, game, game ratings and virtual
Currency etc.), virtual tickets (such as film ticket, ticket of calling a taxi) and material object get certificate etc..
Alternatively, the first system obtains and needs to return to the first of client after the first event has been performed
Event-resources include:The first system obtains the thing with the first event correlation from the first event implementing result
Part is identified;The first system obtains the first event-resources associated with event identifier from resource database.
If the first event is the A events in active rule (obtaining B resources after performing A events),
The event identifier of the first event correlation can be that the numbering that performs of first event that performs (buys row as described above
Be produced transaction journal number), or active rule coding etc.;If the first event is not A
Event, then the event identifier of the first event correlation can be the mark of the coding of active rule, active rule
Know symbol etc..Above-mentioned event identifier can also be the effective time of the active rule, the webpage of its issue
Network address etc., other form of identification that can be used for the identity of mark activity can be used in herein, no longer
Illustrate one by one.
The first system can search the resource of correlation according to event identifier from resource database, if resource
The active rule of multiple events is stored in database, each active rule has the event for indicating its identity
Mark, the first system is according to event identifier from the related corresponding money of active rule of resource data library lookup
Source.
Event participates in rule can the following two kinds form:
(1) active rule that event participates in showing in the corresponding loose-leaf of system is lived including many height
Dynamic rule, for example, the movable GREV shown in loose-leaf is to perform A events to obtain B moneys
Source, subactivity rule, such as performing may after A1 events obtain B1 resources, or execution A2 events
Obtain B2 resources or B3 resources (different from B2 resources).
After the GREV of client acquisition activity, A1 events or A2 events may be performed, if holding
Row A2 events can also potentially get two kinds of results of B2 resources or B3 resources.Client is performing A1
Its movable rule for participating in just is can determine that after event or A2 events, therefore, event identifier can be with
Carried in the first event implementing result when second system completes the execution to the first event, first is
Unite and the first thing is searched in resource database according to the event identifier carried in the first event implementing result
Part resource.
If active rule indicates to be likely to be obtained B2 resources or B3 resources after performing A2 events, when
When client obtains active rule, resource database has determined that the client obtains resource for B2
Resource, then when client sends and performs A2 event requests, just carry event identifier, i.e. event
Mark is carried in the first event performs request.The event identifier can indicate to return to B2 to client
Resource.So, when the first system searches the resource that need to return to client from resource database,
Just can determine that the resource that need to return to client is B2 resources according to event identifier, it is achieved thereby that returning
Return the corresponding resource B2 of A2 events.The situation of B3 resources is obtained after execution A2 events to be obtained with above-mentioned
Situation to B2 resources is similar to, and repeats no more.
(2) active rule is that the client of all execution A events can obtain B resources, then first
The implementing result that system is all obtained after the request for performing A events is received to execution A events is added
Event identifier, the event identifier indicates to return to B resources to client.I.e. event identifier can be second
System completes to be carried in the first event implementing result during the execution to the first event, so as to the first system
Corresponding first event-resources are returned to client.
By above-described embodiment, corresponding resource can be returned to the client for participating in various activities rule,
That is, the method that can be provided using the present embodiment for different active rules is come to visitor
Family end returns to resource, increased pardon of the present embodiment for various activities rule.
Alternatively, after the first event-resources are returned to client by the first system, method also includes:
The first system is that the first event implementing result adds status indicator, and status indicator is used to indicate the
The backward client that one event has been performed returns to the first event-resources;The first system will add status indicator
First event implementing result is sent to the second database, wherein, addition status indicator first event is performed
Result is from the second database synchronization to the first database.
The first system obtains the first event-resources from resource database and returns to the first event-resources
After client, the first system performs the following steps in Fig. 4:
12nd, status indicator is added to the first event implementing result, identifies first event corresponding first
Event-resources have transmitted to client.
13rd, addition status indicator the first event implementing result is sent to the second database.
14th, the second database is held to the first event that the first database synchronization is added with addition status indicator
Row result.
The first system reads usual by the way of poll during data, reading first from the first database
All of data in database, therefrom find the event implementing result for not returning to resource.Therefore, it is right
After first event implementing result addition status indicator, if after being polled to the first event implementing result again,
15 in Fig. 4 can be performed, judges whether the corresponding client hair of warp-wise the first event implementing result
The first event implementing result is sent, if identifying above-mentioned status indicator just not in the first event implementing result
The first event-resources can be obtained from resource database again, also avoid to repeat to be sent to client
First event-resources, improve the accuracy for sending the first event-resources, also improve not sending out for identification
The efficiency of the event implementing result of event-resources is sent, so as to improve the effect of the resource transmission of whole system
Rate.
Under normal circumstances, when the first system actively reads the first event implementing result from the first database
By the way of poll.However, increasing with the event implementing result stored in the first database,
Poll just has time delay, in order to ensure the first system extract the first database in the first event implementing result
Real-time, the first system read the event stored in the first database using multiple processes and performed simultaneously
As a result, i.e. the first system reads the first event implementing result from the first database and includes:The first system
Using one or more process polls from the multiple tables of data in the first database, wherein, each data
The multiple event implementing results of token record, the partial data table in each process poll multiple tables of data;The
One system reads the first event implementing result from multiple event implementing results.
First event implementing result is stored in the first database in the form of tables of data, each tables of data
In all store multiple event implementing results.Within the scope of multiple processes difference poll one of the first system
Tables of data, multiple processes are polled the effect that improve and read the first event implementing result simultaneously.Often
Individual process can read a range of tables of data.Dividing tables of data can perform according to the first event
Coding in result is carried out.
In a specific example, second system performs first event and all generates a stream every time
Water number, is sequentially stored in tables of data according to the order of serial number, and storage is not enough in a tables of data
In the case of the serial number of generation, newly-generated serial number is stored in new tables of data.So,
Each tables of data has the scope of serial number, and such as serial number 1~10 is stored in tables of data 1,
Serial number 11~20 is stored in tables of data 2, and serial number 21~30 is stored in tables of data 3, flowing water
Numbers 31~40 storages are in tables of data 4.The first system has the number in two databases of process poll first
According to table, then the multiple first event implementing results in first process polling data table 1 and 2, second
Multiple first event implementing results in individual process polling data table 3 and 4.Two processes are while poll
Reduce the time of poll.
Still optionally further, the first system reads the first event implementing result from the first database and includes:
The first system receives the configured information of message-oriented middleware forwarding, and configured information is sent to by second system and disappeared
Breath middleware, the first event implementing result is obtained for indicating second system to perform the first event;First
System reads the first event implementing result after configured information is received from the first database.
As shown in figure 5, message-oriented middleware is independently of the first database and the second database, it is when second
The first event of system execution is obtained after the first event implementing result, generates configured information, and will indicate to believe
Breath is sent to message-oriented middleware (16 in such as Fig. 5), the finger for being generated second system by message-oriented middleware
Show that information is transmitted to the first system (17 in such as Fig. 5), so that the first system can in time know second
System completes the execution of the first event, and the first event implementing result is obtained from the first database.
Because second system is actively pushed for indicating second system to perform to message-oriented middleware
First event simultaneously obtains the configured information of the first event implementing result, and message-oriented middleware forwards the instruction to believe
Cease to the first system, it is ensured that the first system can in time know that second system completes the first event
Perform, enhance the first system and know the ageing of the first event implementing result.Simultaneously as message
Middleware independently of the first database and the second database, in the first database or the second database failure
When, the first system can know second system complete the first event execution, in the message between part go out
During existing failure, the first system can obtain the first event implementing result by poll from the first database,
So as to improve the reliability and stability of system.
Alternatively, the reliability of the first event-resources is returned to be further ensured that, it is ensured that the first system
The state of the first event implementing result that can read the first database can be constantly in, can be used
Multiple the first system, i.e. the first systems are set in distributed server the is read from the first database
One event implementing result includes:Any one or more the first systems in multiple the first systems are from first
The first event implementing result is read in database.
Each the first system can read the first event implementing result from the first database, even if having
The first system breaks down, and other the first systems can also read the first event from the first database and hold
Row result, it is ensured that the first event-resources can be provided for client.It is preferred that the distributed clothes of zookeeper
Business device, improves the first system reliability in itself.
In the above-described embodiments, the reliability of resource transfers is enhanced using following several measures:
The first event implementing result in (1) second database is synchronized in the first database, and
Data in the second database just trigger synchronization when changing, and realize the real-time synchronization of database.
Even if the network quality between the second database and the first database is poor, also can be real after network recovery
Now from the second database to the synchronization of the first database, it is to avoid the first event implementing result is in synchronous mistake
Lost in journey, increased synchronous reliability;
(2) cluster of the first system is disposed on distributed server, each the first system can
The first event implementing result is read from the first database, the disaster tolerance of server is improve, even if certain
Individual the first system performance is low or damage can be substituted with other the first systems, improves the first system
Reliability;
(3) the first system reads the first event implementing result from the first database, and second system is held
The event of row first, and to second database purchase the first event implementing result, i.e. the first system and second
The logic of system is each independent, is independent of each other, it is to avoid the caused whole resource transfers of side collapse
It is unreliable.Simultaneously as the second database and the first database only carry out the synchronization of data, do not relate to
And the service logic of the first system and second system, improve including the first system and second system resource
The reliability of transfer process;
(4) complete second system according to same database and perform the first event and the first system
Poll, can reduce the performance of database, and the time delay for causing second system to perform the first event increases or consumes
When unstable problem, and second system and first are respectively using the second database and the first database
System service, solves the latency issue that second system performs the first event.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore by it all
A series of combination of actions is expressed as, but those skilled in the art should know, and the present invention is not received
The limitation of described sequence of movement, because according to the present invention, some steps can be using other sequentially
Or carry out simultaneously.Secondly, those skilled in the art should also know, reality described in this description
Apply example and belong to preferred embodiment, necessary to involved action and the module not necessarily present invention.
Through the above description of the embodiments, those skilled in the art can be understood that root
Method according to above-described embodiment can add the mode of required general hardware platform to realize by software, when
So can also be by hardware, but the former is more preferably implementation method in many cases.Based on such reason
Solution, the part that technical scheme substantially contributes to prior art in other words can be with soft
The form of part product is embodied, and the computer software product is stored in a storage medium (such as
ROM/RAM, magnetic disc, CD) in, including some instructions are used to so that a station terminal equipment (can
Being mobile phone, computer, server, or network equipment etc.) perform each embodiment institute of the invention
The method stated.
Embodiment 2
According to embodiments of the present invention, there is provided a kind of side that can be performed by the application system embodiment
Method embodiment, it is necessary to explanation, can be in such as one group meter the step of the flow of accompanying drawing is illustrated
Performed in the computer system of calculation machine executable instruction, and, although logic is shown in flow charts
Sequentially, but in some cases, can be shown or described to perform different from order herein
Step.
According to embodiments of the present invention, there is provided a kind of method of resource transfers.The method of the resource transfers
Can be performed by second system, turned below in conjunction with the resource that Fig. 6 is provided the embodiment of the present invention 2
The method of shifting does specific introduction, as shown in fig. 6, the method for the resource transfers mainly comprises the following steps:
Step S402, second system receive that client sends for asking to perform the of the first event
One event performs request (i.e. shown in Fig. 4 5).
Step S404, second system stores in the second database the first event implementing result, with
The first event implementing result is read from the first database for the first system, and first is returned to client
Event-resources, wherein, the first event implementing result is used to indicate second system to complete to the first event
Execution, the first event implementing result from the second database synchronization to the first database, the first event
Resource obtains (i.e. shown in Fig. 4 7) as the first system.Wherein, the first database is used as standby database,
Second database is used as MDL.
First, after second system receives the first event execution request that client sends, the first thing is performed
Part.
Secondly, second system just the first event implementing result is stored in the second database, second
Initiate synchronous when the content stored in database is changed, the first event implementing result is synchronized to first
In database, so that the first system reads the first event implementing result from the first database, and obtain
The first event-resources being associated with the first event, so as to complete for the first event-resources to return to client
End.
It can be seen that, in above process, the first system reads the first event implementing result, obtains the first thing
Part resource and the first event-resources of return all do not rely on the second database, only need the ginseng of the first database
With.Equally, second system performs the first event and stores the first event implementing result and all do not rely on
First database, only needs the participation of the second database.That is the first system and second system concern is respective
Service logic and database, and do not interfere with each other mutually, the coupling of two systems is reduced, improve money
The reliability of source transfer process, so as to the relatively low technical problem of the reliability for solving resource transfers.
Specifically, sent caused by the first event implementing result to the first system with respect to the first database
Loss of data or bust this (network reason causes), by the first system actively from the first data
The mode that the first event implementing result is read in storehouse will not missing data.The first system is from the first database
It is middle to read the first event implementing result rather than the second database, even if the multiple database of poll first repeatedly,
Also the second database build-up of pressure will not be given and influences the logical sum that second system performs the first event to imitate
Rate.And second system is to storing the first event implementing result in the second database and also do not interfere with first
System reads the first event implementing result from the first database.Due to the second database and the first database
Synchronous action is only existed, two systems are separate in the process for performing respective logic, and each
System is all reliable, so as to the reliability of the resource transfers that the cooperation for enhancing two systems is realized.
Simultaneously as the second database and the first database keep the consistent of data by synchronous, it is ensured that
The first system can the storage of real-time processing second system to the event implementing result in the second database,
The real-time of resource transfers is improve, client has been reached and has been obtained first related to the first event in time
The technique effect of event-resources.
Alternatively, in order to ensure to store the first event implementing result in the second database, with the second data
It is the mark for completing first event that performs that the first event implementing result is stored in storehouse, i.e., be second
After system stores in the second database the first event implementing result, method also includes:Second system
Judge whether to receive the storage receipt that the second database sends, wherein, storage receipt is used to indicate
Through completing the first event implementing result from the second database synchronization to the first database;Second system
After the storage receipt for judging to receive the transmission of the second database, returned for indicating the to client
Two system completes the information of the execution to the first event.
For indicating second system to complete the information of the execution to the first event, for example, " the first thing
Part success ", specifically when the first event is buying behavior, for indicating second system to complete to the
The information of the execution of one event is information such as " buying successfully ".If second system is not received by being stored back into
Hold, the first event can be performed with rollback, and information such as " purchase failures " is returned to client.
By above-described embodiment, independent the first system and the independence of second system, and the second data
Storehouse and the independence of the first database, reduce the coupling of two systems, improve the reliability of resource transfers
Property, the synchronization of the second database and the first database ensure that the real-time of resource transfers, so as to solve
The relatively low technical problem of the reliability of resource transfers, has reached the skill of the reliability for improving resource transfers
Art effect.
Embodiment 3
According to embodiments of the present invention, a kind of resource transfers for implementing above-described embodiment 1 are additionally provided
Method resource transfers system, the system of the resource transfers is mainly used in performing the embodiment of the present invention
The method of the resource transfers that the above is provided, the resource for being provided the embodiment of the present invention below turns
The system of shifting does specific introduction:
Fig. 7 is the schematic diagram of the system of according to embodiments of the present invention 3 resource transfers, as shown in fig. 7,
The system of the resource transfers mainly includes:Reading unit 40, acquiring unit 42 and resource returning unit
44。
Reading unit 40 is used to read the first event implementing result from the first database, wherein, the
One event implementing result is used to indicate second system to complete the first event execution for sending client
The execution of the first asked event of request, the first event implementing result is deposited into second by second system
In database, and from the second database synchronization to the first database.
Acquiring unit 42 is used to uniting to obtain needs to return to the of client after the first event has been performed
One event-resources.
Resource returning unit 44 is used to for the first event-resources to return to client.
First, client sends the first event and performs request to second system.Second system performs first
Event, obtains the first event implementing result, and the first event implementing result is stored to the second database
In.
Secondly, the first event implementing result is from the second database synchronization to the first database.
Finally, the first system reads the first event implementing result from the first database, and obtains and the
The first associated event-resources of one event, so as to complete for the first event-resources to return to client.
It can be seen that, in above process, the first system reads the first event implementing result, obtains the first thing
Part resource and the first event-resources of return all do not rely on the second database, only need the ginseng of the first database
With.Equally, second system performs the first event and stores the first event implementing result and all do not rely on
First database, only needs the participation of the second database.That is the first system and second system concern is respective
Service logic and database, and do not interfere with each other mutually, the coupling of two systems is reduced, improve money
The reliability of source transfer process, so as to the relatively low technical problem of the reliability for solving resource transfers.
Specifically, sent caused by the first event implementing result to the first system with respect to the first database
Loss of data or bust this (network reason causes), by the first system actively from the first data
The mode that the first event implementing result is read in storehouse will not missing data.The first system is from the first database
It is middle to read the first event implementing result rather than the second database, even if the multiple database of poll first repeatedly,
Also the second database build-up of pressure will not be given and influences the logical sum that second system performs the first event to imitate
Rate.And second system is to storing the first event implementing result in the second database and also do not interfere with first
System reads the first event implementing result from the first database.Due to the second database and the first database
Synchronous action is only existed, two systems are separate in the process for performing respective logic, and each
System is all reliable, so as to the reliability of the resource transfers that the cooperation for enhancing two systems is realized.
Simultaneously as the second database and the first database keep the consistent of data by synchronous, it is ensured that
The first system can the storage of real-time processing second system to the event implementing result in the second database,
The real-time of resource transfers is improve, client has been reached and has been obtained first related to the first event in time
The technique effect of event-resources.
Illustrated with reference to the interaction figure of Fig. 4.
1st, client trigger event participates in the event participation page (i.e. loose-leaf) that system is provided, example
Such as user, by mobile phone click loose-leaf, to obtain the movable active rule, (i.e. event participates in rule
Then), the active rule is to obtain B resources after performing A events.
2nd, event participates in system and sends event participation rule to resource database, so that resource database
Record the B resources that above-mentioned client is obtained.
3rd, after resource database is successfully recorded, participate in system to event and return to response message.
4th, event participate in system receive after resource database is successfully recorded return response message after,
Sent for indicating to participate in successful configured information to client, for example, " participated in successfully ", " congratulations are obtained
Obtain ×× " etc..
5th, client sends the request for performing A events to second system.
6th, second system performs A events.
7th, by the storage of A events implementing result in the second database.
8th, during A events implementing result is from the second database synchronization to the first database.
9th, the first system reads A event implementing results from the first database.
10th, the first system searches the B resource related to A events from resource database.
11st, B resources are sent to client by the first system.
From above-mentioned 5 to 11, the first system obtains number from resource database and the first database
According to second system is to data storage in the second database so that the business of the first system and second system
Logic is separate, reduces the coupling of the first system and second system, improves two systems
Reliability, so as to ensure that the reliability of resource transfers so that client can in time obtain B resources.
In a specific example, A events can be single purchase behavior, and B resources can be right
The return of the amount of money that this buying behavior is paid, or the buying behavior to performing again are paid
The return of the amount of money for going out, the form of B resources can be coupons (as completely 10 coupons for subtracting 9,
10 yuan of coupons, red packets etc.), virtual resource is (such as equipment, game ratings and void in integration, game
Intend currency etc.), virtual tickets (such as film ticket, ticket of calling a taxi) and material object get certificate etc..
Alternatively, acquiring unit includes:First acquisition module, for from the first event implementing result
Obtain the event identifier with the first event correlation;Second acquisition module, for being obtained from resource database
Take the first event-resources associated with event identifier.
If the first event is the A events in active rule (obtaining B resources after performing A events),
The event identifier of the first event correlation can be that the numbering that performs of first event that performs (buys row as described above
Be produced transaction journal number), or active rule coding etc.;If the first event is not A
Event, then the event identifier of the first event correlation can be the mark of the coding of active rule, active rule
Know symbol etc..Above-mentioned event identifier can also be the effective time of the active rule, the webpage of its issue
Network address etc., other form of identification that can be used for the identity of mark activity can be used in herein, no longer
Illustrate one by one.
The first system can search the resource of correlation according to event identifier from resource database, if resource
The active rule of multiple activities is stored in database, each active rule has the event for indicating its identity
Mark, the first system is according to event identifier from the related corresponding money of active rule of resource data library lookup
Source.
Event participates in rule can the following two kinds form:
(1) active rule that event participates in showing in the corresponding loose-leaf of system is lived including many height
Dynamic rule, for example, the movable GREV shown in loose-leaf is to perform A events to obtain B moneys
Source, subactivity rule, such as performing may after A1 events obtain B1 resources, or execution A2 events
Obtain B2 resources or B3 resources (different from B2 resources).
After the GREV of client acquisition activity, A1 events or A2 events may be performed, if holding
Row A2 events can also potentially get two kinds of results of B2 resources or B3 resources.Client is performing A1
Its movable rule for participating in just is can determine that after event or A2 events, therefore, event identifier can be with
Carried in the first event implementing result when second system completes the execution to the first event, first is
Unite and the first thing is searched in resource database according to the event identifier carried in the first event implementing result
Part resource.
If active rule indicates to be likely to be obtained B2 resources or B3 resources after performing A2 events, when
When client obtains active rule, resource database has determined that the client obtains resource for B2
Resource, then when client sends and performs A2 event requests, just carry event identifier, i.e. event
Mark is carried in the first event performs request.The event identifier can indicate to return to B2 to client
Resource.So, when the first system searches the resource that need to return to client from resource database,
Just can determine that the resource that need to return to client is B2 resources according to event identifier, it is achieved thereby that returning
Return the corresponding resource B2 of A2 events.The situation of B3 resources is obtained after execution A2 events to be obtained with above-mentioned
Situation to B2 resources is similar to, and repeats no more.
(2) active rule is that the client of all execution A events can obtain B resources, then first
The implementing result that system is all obtained after the request for performing A events is received to execution A events is added
Event identifier, the event identifier indicates to return to B resources to client.I.e. event identifier can be second
System completes to be carried in the first event implementing result during the execution to the first event, so as to the first system
Corresponding first event-resources are returned to client.
By above-described embodiment, corresponding resource can be returned to the client for participating in various activities rule,
That is, the system that can be provided using the present embodiment for different active rules is come to visitor
Family end returns to resource, increased pardon of the present embodiment for various activities rule.
Alternatively, system also includes:Adding device, for the first event-resources to be returned into client
It is the first event implementing result addition status indicator after end, status indicator is used to indicate the
The backward client that one event has been performed returns to the first event-resources;Transmitting element, for shape will to be added
State identifies the first event implementing result and is sent to the second database, wherein, add the thing of status indicator first
Part implementing result is from the second database synchronization to the first database.
The first system obtains the first event-resources from resource database and returns to the first event-resources
After client, the first system adds status indicator to the first event implementing result, identifies first thing
Corresponding first event-resources of part have transmitted to client.The first system reads from the first database
During data generally by the way of poll, all of data in the first database are read, therefrom found not
There is the event implementing result for returning to resource.Therefore, after to the first event implementing result addition status indicator,
If after being polled to the first event implementing result again, identifying that the status indicator would not again from resource
The first event-resources are obtained in database, also avoid to repeat to send the first event-resources to client,
The accuracy for sending the first event-resources is improve, the thing for not sending event-resources of identification is also improved
The efficiency of part implementing result, so as to improve the efficiency of the resource transmission of whole system.
Under normal circumstances, when the first system actively reads the first event implementing result from the first database
By the way of poll.However, increasing with the event implementing result stored in the first database,
Poll just has time delay, in order to ensure the first system extract the first database in the first event implementing result
Real-time, the first system read the event stored in the first database using multiple processes and performed simultaneously
As a result, i.e., reading unit includes:Poller module, for using one or more process polls from first
Multiple tables of data in database, wherein, the multiple event implementing results of each tables of data record, each
Partial data table in process poll multiple tables of data;First read module, for being held from multiple events
The first event implementing result is read in row result.
First event implementing result is stored in the first database in the form of tables of data, each tables of data
In all store multiple event implementing results.Within the scope of multiple processes difference poll one of the first system
Tables of data, multiple processes are polled the effect that improve and read the first event implementing result simultaneously.Often
Individual process can read a range of tables of data.Dividing tables of data can perform according to the first event
Coding in result is carried out.
In a specific example, second system performs first event and all generates a stream every time
Water number, is sequentially stored in tables of data according to the order of serial number, and storage is not enough in a tables of data
In the case of the serial number of generation, newly-generated serial number is stored in new tables of data.So,
Each tables of data has the scope of serial number, and such as serial number 1~10 is stored in tables of data 1,
Serial number 11~20 is stored in tables of data 2, and serial number 21~30 is stored in tables of data 3, flowing water
Numbers 31~40 storages are in tables of data 4.The first system has the number in two databases of process poll first
According to table, then the multiple first event implementing results in first process polling data table 1 and 2, second
Multiple first event implementing results in individual process polling data table 3 and 4.Two processes are while poll
Reduce the time of poll.
Still optionally further, the reading unit includes:Receiver module, for receiving message-oriented middleware
The configured information of forwarding, the configured information is sent to the message-oriented middleware by the second system,
The first event implementing result is obtained for indicating the second system to perform first event;The
Two read modules, for after the configured information is received, institute being read from first database
State the first event implementing result.
As shown in figure 5, message-oriented middleware is independently of the first database and the second database, it is when second
The first event of system execution is obtained after the first event implementing result, generates configured information, and will indicate to believe
Breath is sent to message-oriented middleware (in such as Fig. 5 16), is generated second system by message-oriented middleware
Configured information is transmitted to the first system (in such as Fig. 5 17), so that the first system can be known in time
Second system completes the execution of the first event, and the first event is obtained from the first database performs knot
Really.
Because second system is actively pushed for indicating second system to perform to message-oriented middleware
First event simultaneously obtains the configured information of the first event implementing result, and message-oriented middleware forwards the instruction to believe
Cease to the first system, it is ensured that the first system can in time know that second system completes the first event
Perform, enhance the first system and know the ageing of the first event implementing result.Simultaneously as message
Middleware independently of the first database and the second database, in the first database or the second database failure
When, the first system can know second system complete the first event execution, in the message between part go out
During existing failure, the first system can obtain the first event implementing result by poll from the first database,
So as to improve the reliability and stability of system.
Alternatively, the reliability of the first event-resources is returned to be further ensured that, it is ensured that the first system
The state of the first event implementing result that can read the first database can be constantly in, can be used
Multiple the first systems are set in distributed server, and each the first system can be from the first database
The first event implementing result of middle reading, even if there is the first system to break down, other the first systems also may be used
To read the first event implementing result from the first database, it is ensured that the first thing can be provided for client
Part resource.It is preferred that zookeeper distributed servers, improve the first system reliability in itself.
Embodiment 4
According to embodiments of the present invention, a kind of resource transfers for implementing above-described embodiment 2 are additionally provided
Method resource transfers system, the system of the resource transfers is mainly used in performing the embodiment of the present invention
The method of the resource transfers that the above is provided, the resource for being provided the embodiment of the present invention below turns
The system of shifting does specific introduction:
Fig. 8 is the schematic diagram of the system of according to embodiments of the present invention 4 resource transfers, as shown in figure 8,
The system of the resource transfers mainly includes:Receiving unit 50 and memory cell 52.
Receiving unit 50 is used to receive first thing for asking the first event of execution of client transmission
Part performs request.
Memory cell 52 is used for by the storage of the first event implementing result in the second database, for the
One system reads the first event implementing result from the first database, and returns to the first event to client
Resource, wherein, the first event implementing result is held for indicating second system to complete to the first event
OK, the first event implementing result is from the second database synchronization to the first database, the first event-resources
Obtained by the first system.
First, after second system receives the first event execution request that client sends, the first thing is performed
Part.
Secondly, second system just the first event implementing result is stored in the second database, second
Initiate synchronous when the content stored in database is changed, the first event implementing result is synchronized to first
In database, so that the first system reads the first event implementing result from the first database, and obtain
The first event-resources being associated with the first event, so as to complete for the first event-resources to return to client
End.
It can be seen that, in above process, the first system reads the first event implementing result, obtains the first thing
Part resource and the first event-resources of return all do not rely on the second database, only need the ginseng of the first database
With.Equally, second system performs the first event and stores the first event implementing result and all do not rely on
First database, only needs the participation of the second database.That is the first system and second system concern is respective
Service logic and database, and do not interfere with each other mutually, the coupling of two systems is reduced, improve money
The reliability of source transfer process, so as to the relatively low technical problem of the reliability for solving resource transfers.
Specifically, sent caused by the first event implementing result to the first system with respect to the first database
Loss of data or bust this (network reason causes), by the first system actively from the first data
The mode that the first event implementing result is read in storehouse will not missing data.The first system is from the first database
It is middle to read the first event implementing result rather than the second database, even if the multiple database of poll first repeatedly,
Also the second database build-up of pressure will not be given and influences the logical sum that second system performs the first event to imitate
Rate.And second system is to storing the first event implementing result in the second database and also do not interfere with first
System reads the first event implementing result from the first database.Due to the second database and the first database
Synchronous action is only existed, two systems are separate in the process for performing respective logic, and each
System is all reliable, so as to the reliability of the resource transfers that the cooperation for enhancing two systems is realized.
Simultaneously as the second database and the first database keep the consistent of data by synchronous, it is ensured that
The first system can the storage of real-time processing second system to the event implementing result in the second database,
The real-time of resource transfers is improve, client has been reached and has been obtained first related to the first event in time
The technique effect of event-resources.
Alternatively, in order to ensure to store the first event implementing result in the second database, with the second data
It is the mark for completing first event that performs that the first event implementing result is stored in storehouse, i.e. system is also wrapped
Include:Judging unit, for storing in the second database the first event implementing result in second system
Afterwards, judge whether to receive the storage receipt that the second database sends, wherein, storage receipt is used for
Instruction has been completed the first event implementing result from the second database synchronization to the first database;Letter
Breath returning unit, for after the storage receipt for judging to receive the transmission of the second database, to client
End is returned for indicating second system to complete the information of the execution to the first event.
For indicating second system to complete the information of the execution to the first event, for example, " the first thing
Part success ", specifically when the first event is buying behavior, for indicating second system to complete to the
The information of the execution of one event is information such as " buying successfully ".If second system is not received by being stored back into
Hold, the first event can be performed with rollback, and information such as " purchase failures " is returned to client.
By above-described embodiment, independent the first system and the independence of second system, and the second data
Storehouse and the independence of the first database, reduce the coupling of two systems, improve the reliability of resource transfers
Property, the synchronization of the second database and the first database ensure that the real-time of resource transfers, so as to solve
The relatively low technical problem of the reliability of resource transfers, has reached the skill of the reliability for improving resource transfers
Art effect.
Embodiment 5
According to embodiments of the present invention, a kind of clothes for implementing the method for above-mentioned resource transfers are additionally provided
Business device, as shown in figure 9, the server mainly includes processor 601, equipment interface 602, network
Interface 603, memory 604, wherein:
Equipment interface 602 is used to connect terminal or other network equipments;
Network interface 603 is used for connection server or terminal;
Memory 604 is used to store the program code for performing above-mentioned terminal test method, can also store
The service logic of the first system and second system, and the first event implementing result.
Processor 601 is mainly used in performing following operation:The first system reads from the first database
One event implementing result, wherein, the first event implementing result is used to indicate second system to complete
The execution of the first asked event of request, first thing are performed to the first event that client sends
Part implementing result is deposited into the second database by the second system, and same from second database
In walking first database;The first system is obtained and needed after first event has been performed
Return to the first event-resources of the client;The first system returns first event-resources
Back to the client.
Processor 601 is additionally operable to perform following operation:The first system is obtained in first event
The first event-resources for returning to the client are needed after having performed to be included:The first system is from institute
State the event identifier obtained in the first event implementing result with first event correlation;Described first is
System obtains first event-resources associated with the event identifier from resource database.
Processor 601 is additionally operable to perform following operation:The event identifier is carried in first event
Perform in asking, or, the event identifier is being completed to first thing by the second system
Carried in the first event implementing result during the execution of part.
Processor 601 is additionally operable to perform following operation:The first system is by first event-resources
Return to after the client, methods described also includes:The first system is first event
Implementing result adds status indicator, and the status indicator is used to indicate to be performed in first event
The complete backward client returns to first event-resources;The first system will add the shape
State identifies the first event implementing result and is sent to second database, wherein, add the state mark
Know the first event implementing result from second database synchronization to first database.
Processor 601 is additionally operable to perform following operation:The first system reads from the first database
First event implementing result includes:The first system is used described in one or more process polls from institute
The multiple tables of data in the first database are stated, wherein, each described multiple event of tables of data record is performed
As a result, the partial data table in each described the multiple tables of data of process poll;The first system
The first event implementing result is read from the multiple event implementing result.
Processor 601 is additionally operable to perform following operation:The first system reads first from the first database
Event implementing result includes:The first system receives the configured information of message-oriented middleware forwarding, configured information
Message-oriented middleware is sent to by second system, first is obtained for indicating second system to perform the first event
Event implementing result;The first system reads first after configured information is received from the first database
Event implementing result.
Processor 601 is additionally operable to perform following operation:Multiple described the are set in distributed server
One system, the first system reads the first event implementing result from the first database to be included:It is multiple
Any one or more described the first system in the first system is read from first database
Take the first event implementing result.
Alternatively, during the specific example in the present embodiment may be referred to above-described embodiment 1 and embodiment 2
Described example, the present embodiment will not be repeated here.
Embodiment 6
Embodiments of the invention additionally provide a kind of storage medium.Alternatively, in the present embodiment, on
Stating storage medium can be with least one of the multiple network equipments in the network network equipment.
Alternatively, in the present embodiment, storage medium is arranged to storage for performing following steps
Program code:
S1, the first system reads the first event implementing result from the first database, wherein, the first thing
Part implementing result performs request for indicating second system to complete to the first event that client sends
The execution of the first event asked, the first event implementing result is deposited into the second data by second system
In storehouse, and from the second database synchronization to the first database.
S2, the first system obtains and needs to return to the first event of client after the first event has been performed
Resource.
First event-resources are returned to client by S3, the first system.
Alternatively, storage medium is also configured to storage for performing the program code of following steps:
S1, the first event for asking to perform the first event that second system receives client transmission is held
Row request;
S2, second system stores in the second database the first event implementing result, is for first
System reads the first event implementing result from the first database, and returns to the first event-resources to client,
Wherein, the first event implementing result is used to indicate second system to complete the execution to the first event, the
From the second database synchronization to the first database, the first event-resources are by first for one event implementing result
System is obtained.
Alternatively, in the present embodiment, above-mentioned storage medium can be included but is not limited to:USB flash disk, only
Read memory (ROM, Read-Only Memory), random access memory (RAM, Random
Access Memory), mobile hard disk, magnetic disc or CD etc. are various can be with Jie of store program codes
Matter.
Alternatively, in the present embodiment, processor is held according to the program code stored in storage medium
Row the first system reads the first event implementing result from the first database, wherein, the first event is performed
The first event execution that result sends for indicating second system to complete to client is asked
The first event execution, the first event implementing result is deposited into the second database by second system,
And from the second database synchronization to the first database.The first system is obtained and has performed it in the first event
Need to return to the first event-resources of client afterwards.First event-resources are returned to client by the first system
End.
Alternatively, in the present embodiment, processor is held according to the program code stored in storage medium
OK:The the first event execution for asking the first event of execution that second system receives client transmission please
Ask;Second system by the first event implementing result store in the second database, for the first system from
The first event implementing result is read in first database, and the first event-resources are returned to client, its
In, the first event implementing result is used to indicate second system to complete the execution to the first event, first
From the second database synchronization to the first database, the first event-resources are event implementing result by first
System is obtained.
Alternatively, during the specific example in the present embodiment may be referred to above-described embodiment 1 and embodiment 2
Described example, the present embodiment will not be repeated here.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
If integrated unit in above-described embodiment using realize in the form of SFU software functional unit and as
Independent production marketing or when using, can store in the storage medium that above computer can read.
Based on such understanding, what technical scheme substantially contributed to prior art in other words
The all or part of part or the technical scheme can be embodied in the form of software product, the meter
Calculation machine software product is stored in storage medium, including some instructions are used to so that one or more is calculated
Machine equipment (can be personal computer, server or network equipment etc.) performs each implementation of the present invention
The all or part of step of example methods described.
In the above embodiment of the present invention, the description to each embodiment all emphasizes particularly on different fields, certain reality
The part for not having to describe in detail in example is applied, the associated description of other embodiment is may refer to.
In several embodiments provided herein, it should be understood that disclosed client, can
Realize by another way.Wherein, system embodiment described above be only it is schematical,
The division of such as described unit, only a kind of division of logic function, can have in addition when actually realizing
Dividing mode, such as multiple units or component can combine or be desirably integrated into another system,
Or some features can be ignored, or do not perform.Another, shown or discussed coupling each other
Close or direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING of unit or module or
Communication connection, can be electrical or other forms.
It is described as separating component illustrate unit can be or may not be it is physically separate,
The part shown as unit can be or may not be physical location, you can with positioned at a ground
Side, or can also be distributed on multiple NEs.Can according to the actual needs select therein
Some or all of unit realizes the purpose of this embodiment scheme.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit
In, or unit be individually physically present, it is also possible to two or more units are integrated in
In one unit.Above-mentioned integrated unit can both be realized in the form of hardware, it would however also be possible to employ soft
The form of part functional unit is realized.
The above is only the preferred embodiment of the present invention, it is noted that for the art
For those of ordinary skill, under the premise without departing from the principles of the invention, some improvement can also be made
And retouching, these improvements and modifications also should be regarded as protection scope of the present invention.
Claims (17)
1. a kind of method of resource transfers, it is characterised in that including:
The first system reads the first event implementing result from the first database, wherein, described
One event implementing result is used to indicate second system to complete the first event for sending client
Perform the execution of asked the first event of request, the first event implementing result is by described the
Two system is deposited into the second database, and from second database synchronization to the described first number
According in storehouse;
The first system obtains and needs to return to the visitor after first event has been performed
First event-resources at family end;
First event-resources are returned to the client by the first system.
2. method according to claim 1, it is characterised in that the first system is obtained described
First event needs the first event-resources for returning to the client to include after having performed:
The first system is obtained and first event from the first event implementing result
The event identifier of association;
Described in the first system is obtained from resource database and associated with the event identifier
First event-resources.
3. method according to claim 2, it is characterised in that the event identifier is carried described
First event is performed in request, or, the event identifier is being completed by the second system
Carried in the first event implementing result during to the execution of first event.
4. method according to claim 1, it is characterised in that the first system is by described first
Event-resources are returned to after the client, and methods described also includes:
The first system is that the first event implementing result adds status indicator, the state
Identify for indicate first event has performed it is rear to the client return institute
State the first event-resources;
The first system is sent to institute by the first event of status indicator implementing result is added
The second database is stated, wherein, add status indicator the first event implementing result from described the
Two database synchronizations are in first database.
5. method according to claim 1, it is characterised in that the first system is from the first data
The first event implementing result is read in storehouse to be included:
The first system is using more in the first database described in one or more process polls
Individual tables of data, wherein, each multiple event implementing result of described tables of data record, described in each
Partial data table in the multiple tables of data of process poll;
The first system reads first event from the multiple event implementing result and holds
Row result.
6. method according to any one of claim 1 to 5, it is characterised in that described first is
System reads the first event implementing result from the first database to be included:
The first system receives the configured information of message-oriented middleware forwarding, the configured information by
The second system is sent to the message-oriented middleware, for indicating the second system to perform institute
State the first event and obtain the first event implementing result;
The first system is read after the configured information is received from first database
Take the first event implementing result.
7. method according to claim 1, it is characterised in that set many in distributed server
The individual the first system, the first system reads the first event from the first database and performs knot
Fruit includes:
Any one or more described the first system in multiple the first systems is from described the
The first event implementing result is read in one database.
8. a kind of method of resource transfers, it is characterised in that including:
Second system receives the first event for asking the first event of execution that client sends
Perform request;
The second system stores in the second database the first event implementing result, for the
One system reads the first event implementing result from the first database, and to the client
The first event-resources are returned, wherein, the first event implementing result is used to indicate described second
System completes the execution to first event, and the first event implementing result is from described
To in first database, first event-resources are two database synchronizations by described first
System is obtained.
9. method according to claim 8, it is characterised in that hold the first event in second system
After row result is stored in the second database, methods described also includes:
The second system judges whether to receive the storage receipt that second database sends,
Wherein, the storage receipt is used to indicate to have completed the first event implementing result from institute
The second database synchronization is stated in first database;
The second system is being judged to receive the storage that second database sends
After receipt, returned for indicating the second system to complete to described first to the client
The information of the execution of event.
10. a kind of system of resource transfers, it is characterised in that including:
Reading unit, for reading the first event implementing result from the first database, wherein,
The first event implementing result is used to indicate second system to complete send client the
One event performs the execution of asked the first event of request, the first event implementing result by
The second system is deposited into the second database, and from second database synchronization to described
In first database;
Acquiring unit, obtains described in needing to return to after first event has been performed for uniting
First event-resources of client;
Resource returning unit, for first event-resources to be returned into the client.
11. systems according to claim 10, it is characterised in that the acquiring unit includes:
First acquisition module, for being obtained and described first from the first event implementing result
The event identifier of event correlation;
Second acquisition module, for obtaining what is associated with the event identifier from resource database
First event-resources.
12. systems according to claim 11, it is characterised in that the event identifier is carried in institute
State the first event perform request in, or, the event identifier by the second system complete
Carried in the first event implementing result during to the execution of first event.
13. systems according to claim 10, it is characterised in that the system also includes:
Adding device, for after first event-resources are returned into the client,
For the first event implementing result adds status indicator, the status indicator is used to indicate
Rear first event-resources are returned to what first event had been performed to the client;
Transmitting element, institute is sent to for will add the first event of status indicator implementing result
The second database is stated, wherein, add status indicator the first event implementing result from described the
Two database synchronizations are in first database.
14. systems according to claim 10, it is characterised in that the reading unit includes:
Poller module, for using many in the first database described in one or more process polls
Individual tables of data, wherein, each multiple event implementing result of described tables of data record, described in each
Partial data table in the multiple tables of data of process poll;
First read module, for reading first thing from the multiple event implementing result
Part implementing result.
15. system according to any one of claim 10 to 14, it is characterised in that the reading
Unit includes:
Receiver module, the configured information for receiving message-oriented middleware forwarding, the configured information
The message-oriented middleware is sent to by the second system, for indicating the second system to perform
First event obtains the first event implementing result;
Second read module, for after the configured information is received, from first data
The first event implementing result is read in storehouse.
A kind of 16. systems of resource transfers, it is characterised in that including:
Receiving unit, for receiving client transmission for asking the first event of execution first
Event performs request;
Memory cell, for the first event implementing result to be stored in the second database, for
The first system reads the first event implementing result from the first database, and to the client
End returns to the first event-resources, wherein, the first event implementing result is used for instruction second and is
System completes execution to first event, and the first event implementing result is from described second
, in first database, first event-resources are by the first system for database synchronization
Obtain.
17. systems according to claim 16, it is characterised in that the system also includes:
Judging unit, for storing in the second data the first event implementing result in second system
After in storehouse, judge whether to receive the storage receipt that second database sends, wherein,
The storage receipt is used to indicate to have completed the first event implementing result from described the
Two database synchronizations are in first database;
Information returning unit, for judging to receive described in the second database transmission
After storage receipt, returned for indicating the second system to complete to described to the client
The information of the execution of the first event.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511028699.3A CN106933674A (en) | 2015-12-31 | 2015-12-31 | The method and system of resource transfers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511028699.3A CN106933674A (en) | 2015-12-31 | 2015-12-31 | The method and system of resource transfers |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106933674A true CN106933674A (en) | 2017-07-07 |
Family
ID=59442065
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511028699.3A Pending CN106933674A (en) | 2015-12-31 | 2015-12-31 | The method and system of resource transfers |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106933674A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1555538A (en) * | 2001-09-14 | 2004-12-15 | Data processing systems | |
US20080015958A1 (en) * | 2001-01-17 | 2008-01-17 | David Vanker | Method and system for transferring information between multiple buyers and multiple sellers |
CN101655948A (en) * | 2008-08-20 | 2010-02-24 | 阿里巴巴集团控股有限公司 | Online trading method and online trading system |
CN102158540A (en) * | 2011-02-18 | 2011-08-17 | 广州从兴电子开发有限公司 | System and method for realizing distributed database |
CN102236851A (en) * | 2010-04-21 | 2011-11-09 | 百度在线网络技术(北京)有限公司 | Real-time computation method and system of multi-dimensional credit system based on user empowerment |
CN104158912A (en) * | 2014-09-04 | 2014-11-19 | 上海天臣控股有限公司 | Commodity tracing and customer-manufacturer interaction system and method |
CN104346678A (en) * | 2013-08-07 | 2015-02-11 | 厦门易法法务信息管理有限公司 | High-efficiency legal service method capable of integrating service receiving with service management and high-efficiency legal service system |
-
2015
- 2015-12-31 CN CN201511028699.3A patent/CN106933674A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080015958A1 (en) * | 2001-01-17 | 2008-01-17 | David Vanker | Method and system for transferring information between multiple buyers and multiple sellers |
CN1555538A (en) * | 2001-09-14 | 2004-12-15 | Data processing systems | |
CN101655948A (en) * | 2008-08-20 | 2010-02-24 | 阿里巴巴集团控股有限公司 | Online trading method and online trading system |
CN102236851A (en) * | 2010-04-21 | 2011-11-09 | 百度在线网络技术(北京)有限公司 | Real-time computation method and system of multi-dimensional credit system based on user empowerment |
CN102158540A (en) * | 2011-02-18 | 2011-08-17 | 广州从兴电子开发有限公司 | System and method for realizing distributed database |
CN104346678A (en) * | 2013-08-07 | 2015-02-11 | 厦门易法法务信息管理有限公司 | High-efficiency legal service method capable of integrating service receiving with service management and high-efficiency legal service system |
CN104158912A (en) * | 2014-09-04 | 2014-11-19 | 上海天臣控股有限公司 | Commodity tracing and customer-manufacturer interaction system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110599263B (en) | User interaction data processing method and device, storage medium and computer equipment | |
CN110812835B (en) | Cloud game detection method and device, storage medium and electronic device | |
CN109118214A (en) | The method and apparatus for running intelligent contract | |
CN110719221B (en) | Instant messaging method, device, equipment and storage medium | |
CN108470298A (en) | The methods, devices and systems of resource numerical value transfer | |
CN105915650B (en) | Load-balancing method and device | |
CN110148014B (en) | Information processing method, information processing device, blockchain node equipment and storage medium | |
CN113645278B (en) | Cross-chain message transmission method, device and storage medium of block chain | |
CN113347164A (en) | Block chain-based distributed consensus system, method, device and storage medium | |
CN110188307A (en) | A kind of multi-tenant data partition method, server and system | |
CN108600399A (en) | Information-pushing method and Related product | |
CN109242582A (en) | The generation method and Related product of invoice | |
CN105808707B (en) | Data processing method, device and e-commerce platform | |
RU2011129701A (en) | METHOD, SERVER, CLIENT AND SYSTEM FOR INSTANT EXCHANGE OF MESSAGES | |
CN111290965B (en) | Test method, test device, computer equipment and storage medium | |
CN110620739B (en) | BFD message sending method and device | |
CN113542260B (en) | Voice transmission method for warehouse based on distribution mode | |
CN113058263B (en) | Offline chess and card game distributed operation management system and method | |
CN106201735A (en) | Method for message transmission and system | |
CN104363257B (en) | A kind of user interface data method for refreshing and equipment | |
CN111667255B (en) | Digital asset transfer system and method based on alliance chain | |
CN106933674A (en) | The method and system of resource transfers | |
CN113010337A (en) | Fault detection method, master control node, working node and distributed system | |
CN110599272A (en) | Method for issuing electronic invoice and related product | |
CN105429981A (en) | Game voice transmission method, terminal, voice service module and game system |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170707 |
|
RJ01 | Rejection of invention patent application after publication |