Summary of the invention
Based on this, present description provides bring matching process, device and system together.
According to this specification embodiment in a first aspect, providing one kind brings matching process together, which comprises acquisition is taken
The first party in request with the first logical bit;The second logical bit to match with first logical bit is obtained, from carrying described the
The second party in request of target to match with first party in request is searched in each second party in request of two logical bits;By described
One party in request bring together matching with second party in request of target.
Further, the method also includes: if not looked into from each second party in request for carrying second logical bit
Second party in request of target is found, is searched and first party in request phase from without brining together in matched each second party in request
Matched the second party in request of target.
Further, the method also includes: if not found without brining together in matched each second party in request
The second party in request of target to match with first party in request, pause bring matching, Zhi Daosuo together to first party in request
The second party in request is stated to update.
Further, before obtaining the first party in request for carrying the first logical bit, the method also includes: it is receiving
After what each first party in request sent brings matching request together, respectively each first party in request generates the first logical bit;It will take
The first party in request with identical first logical bit stores to same logic bucket, to obtain the first demand from the logic bucket
Side.
Further, described after carrying out first party in request and second party in request of target to bring matching together
Method further include: calculate the difference between the first demand of first party in request and the second demand of second party in request
Volume;If the difference is not zero, according to first demand and the second demand to the party in request that there is demand more than needed into
Row updates, and stops to there is no the parties in request of demand more than needed to carry out brining matching together.
According to the second aspect of this specification embodiment, one kind is provided and brings coalignment together, described device includes: acquisition mould
Block, for obtaining the first party in request for carrying the first logical bit;Searching module matches for obtaining with first logical bit
The second logical bit, search from each second party in request for carrying second logical bit and match with first party in request
The second party in request of target;Module is brought together, for bring together first party in request and second party in request of target
Match.
According to the third aspect of this specification embodiment, one kind is provided and brings matching system together, the system comprises: it brings together certainly
Plan module, multiple first logic buckets and multiple second logic buckets;The first logic bucket is for storing brining together for the first party in request
Matching demand;Wherein, corresponding each first party in request of the same first logic bucket carries identical first logical bit;It is described
What the second logic bucket was used to store the second party in request brings matching demand together;Wherein, the same second logic bucket corresponding each
Two parties in request carry identical second logical bit;The decision-making module of brining together is carried for obtaining from the first logic bucket
First party in request of the first logical bit obtains the second logical bit to match with first logical bit, patrols according to described second
The second party in request of target that volume position is searched from corresponding second logic bucket and first party in request matches, and by described the
One party in request bring together matching with second party in request of target.
Further, the system also includes task scheduling modules, for fishing for from the first logic bucket described pinch
The first unmet demand side that decision-making module does not match completion is closed, and searching from each second logic bucket need to first residue
The second party in request of target that the side of asking matches.
Further, the decision-making module of brining together is also used to: obtaining the task scheduling modules do not match completion second
Unmet demand side, pause bring matching together to the second unmet demand side, until detecting that the second logic bucket occurs more
Newly.
Further, the decision-making module of brining together is also used to: calculate the first demand of first party in request with it is described
Difference between second demand of the second party in request;If the difference is not zero, according to first demand and the second need
The amount of asking is updated the corresponding logic bucket of party in request that there is demand more than needed, and stops to there is no the need of demand more than needed
The side of asking carries out brining matching together.
According to the fourth aspect of this specification embodiment, a kind of computer storage medium is provided, is deposited in the storage medium
Program is contained, the method in any of the above-described embodiment is realized when described program is executed by processor.
According to the 5th of this specification embodiment aspect, a kind of computer equipment is provided, including memory, processor and deposit
The computer program that can be run on a memory and on a processor is stored up, the processor realizes above-mentioned when executing described program
Method in one embodiment.
Using this specification example scheme, when carrying out brining matching together, only the first logical bit and the second logical bit
Corresponding first party in request just bring together matching by timing with the second party in request, rather than will be in the first party in request and system
The second all parties in request carries out brining matching together, since the first different parties in request has the first different logical bits, respectively
A first party in request can be matched to the second different parties in request, reduce between each first party in request to same second party in request
Competition, improve and bring matching performance together.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
This specification can be limited.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with this specification.On the contrary, they are only and such as institute
The example of the consistent device and method of some aspects be described in detail in attached claims, this specification.
It is only to be not intended to be limiting this explanation merely for for the purpose of describing particular embodiments in the term that this specification uses
Book.The "an" of used singular, " described " and "the" are also intended to packet in this specification and in the appended claims
Most forms are included, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein is
Refer to and includes that one or more associated any or all of project listed may combine.
It will be appreciated that though various information may be described using term first, second, third, etc. in this specification, but
These information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not taking off
In the case where this specification range, the first information can also be referred to as the second information, and similarly, the second information can also be claimed
For the first information.Depending on context, word as used in this " if " can be construed to " ... when " or
" when ... " or " in response to determination ".
In brining matching process together, Liang Ge party in request (the first party in request and the second party in request) is generally included, also can wrap
Include multiple parties in request, this specification is illustrated by taking Liang Ge party in request as an example to brining matching process together.Liang Ge party in request can be with
Brining Matching Platform publication demand together, the demand for brining Matching Platform both sides according to demand together bring together to the two parties in request
Match.A kind of common matching scene of brining together is in online P2P platform, and the demand of borrower and investor are brought together.It is single from it is a certain to
Bring together and see, such as the first party in request (party in request A) matches the second party in request (party in request B), this scene abbreviation A2B scene.
For B2A scene, symmetrical with A2B scene, details are not described herein again.
As shown in Figure 1, the matching process of brining together of this specification embodiment can comprise the following steps that
Step 102, the first party in request for carrying the first logical bit is obtained;
Step 104, the second logical bit to match with first logical bit is obtained, from carrying second logical bit
The second party in request of target to match with first party in request is searched in each second party in request;
Step 106, first party in request bring together matching with second party in request of target.
In the present embodiment, the first party in request and the second party in request refer to wait bring matched counterparty side together.First patrols
Collecting position is the logical bit generated for the first party in request.When the demand of party in request, which is submitted to, brings Matching Platform together, it is flat to bring matching together
Platform can generate logical bit automatically for party in request, and logical bit can be a string of character strings, for example, can be by number, letter, lower stroke
The combination producing of line, or generated according to other modes.The mode of generation can be randomly generated;It is also possible to side according to demand
Demand assignment, for example, distributing identical logical bit for the party in request with similar demands.For borrowing or lending money scene, it is assumed that deposit
In these three first parties in request of A1, A2 and A3, wherein the demand of A1 is 50 yuan of borrowing, and the demand of A2 and A3 are borrowing 500
Member then can distribute logical bit at random for A1, A2 and A3, or A1 distributes logical bit a1, and distributes logic for A2 and A3
Position a2.
For the ease of data processing, multiple logic buckets (abbreviation bucket) can be set, for the ease of distinguishing first demand that stores
The bucket for storing the first party in request can be known as A barrels, the bucket for storing the second party in request is known as B barrels by the bucket of side and the second party in request.
Each bucket is used to store the demand with a certain logical bit, that is to say, that logical bit is used to identify the bucket where party in request.Example
Such as, A bucket 01 is used to store the demand that the first logical bit is a1, and A bucket 02 is used to store the demand that the first logical bit is a2, with such
It pushes away.Similarly, the demand of the second party in request can also store respectively in a comparable manner in B barrels each.
When carrying out brining matching together, the second logical bit to match with the first demand position can be first obtained, that is, the second demand
The logical bit of side.System can obtain decision position according to certain policy calculation according to the first demand position, and decision position is for indicating
The second party in request to match with the first party in request corresponds to which B barrels.After determining that the second party in request is B barrels corresponding, only exist
The second party in request of target to match with the first party in request is searched in the B barrels, after finding, by first party in request with it is described
The second party in request of target carries out brining matching together.
In one embodiment, after matching request being brought together receive that each first party in request sends, respectively
The first logical bit is generated for each first party in request;The first party in request for carrying identical first logical bit is stored to same logic
Bucket (A barrels) stores the first party in request for carrying different first logical bits to different logic buckets, so as to from the logic bucket
Obtain the first party in request.It can also be that each second party in request generates the second logical bit, and will carry phase by similar mode
The second party in request with the second logical bit stores to same logic bucket (B barrels).
Above-described embodiment is when carrying out brining matching together, when only the first logical bit is matched with the second logical bit, will just correspond to
The first party in request bring together matching with the second party in request, rather than by the second demand all in the first party in request and system
Fang Jinhang brings matching together, since the first different parties in request has the first different logical bits, the meeting of each first party in request
It is matched to the second different parties in request, reduces the competition between each first party in request to same second party in request, improves
Bring matching performance together.
Matched range is brought together due to limiting, therefore, it is possible to which there are a kind of situations, that is, carry and the first logical bit
It can not be found in second party in request of matched second logical bit and matched the second party in request of target, the first party in request.Cause
This, in one embodiment, if not finding the target the from each second party in request for carrying second logical bit
Two parties in request, from without brining the target second searched in matched each second party in request and matched with first party in request together
Party in request.Here without brining matched each second party in request together, i.e., it is B barrels all in the second party in request, no matter it second is patrolled
Collecting position is what.The present embodiment brings mode together by two-stage, the second party in request of target is first searched in specific bucket, then in entirety
The second party in request of target is searched in second party in request, is on the one hand reduced competing between the first party in request with similar demands
Strive, on the other hand reduce and bring omission in matching process together for the first time, improve bring together it is matched comprehensive.
It is above-mentioned bring matching process together and can be described as two-stage bring process together, as shown in Figures 2 and 3, come from the visual angle of party in request A
It sees, that brings that platform can receive party in request A together brings request together, then executes A2B and brings together, to generate logical bit, while by demand
The demand of square A falls library to A barrels.It brings decision-making module together and can receive and demand B is brought together, then generate decision position, and by decision
Position is matched with B barrels of logical bit, B barrels corresponding to find, and then the demand of side A searches correspondence according to demand in B barrels
The second party in request of target.This brings together for the first order, does not bring successful demand together if existed in A barrels, executes the second level pinch
It closes, that is, task scheduling modules fish for several demands for not matching completion from A barrels, then distinguish each demand fished for
It is matched with all party in request B.
Decision-making module, can be according to pre-set strategy generating decision position, for example, can generate at random in decision
Decision position, or decision position is set as identical as A barrels of logical bit.By taking system shown in Fig. 3 as an example, it is for storage logical bit
The A bucket of 04 demand can generate a decision position at random for it, for example, decision position is 03, then match storage logical bit for it
For the B bucket of 03 demand;Or it generates decision identical with the first logical bit position, i.e. it then can be it that decision position, which is 04,
The B bucket for the demand that matching storage logical bit is 04.Certainly, in practical applications, the sum of A barrels and B barrels can be identical, can also be with
It is different.
In practical applications, for improve bring efficiency together, bring together platform can with independent parallel the demand in each A barrels into
Row processing brings platform together and can repeat two-stage and bring process together for the demand in each bucket, until the first need in A barrel
Ask or B barrels in the second demand bring together and finish.
In one embodiment, if not found and described first without brining together in matched each second party in request
The second party in request of target that party in request matches, pause brings matching together to first party in request, until second demand
Fang Fasheng updates.In the present embodiment, if do not found in matched each second party in request and described without brining together
The second party in request of target that one party in request matches, then it represents that presently, there are the second party in request in not with first party in request's phase
Therefore matched the second party in request of target even if continuing to bring matching together, can not also find and match with the first party in request
The second party in request of target.Therefore, in such a case, it is possible to first suspend the matching to corresponding first party in request, until second
Party in request, which exists, to be updated (for example, situations such as demand for generating new the second party in request or the second party in request changes), then
Again the first party in request of non-successful match is carried out brining matching together.
After carrying out first party in request and second party in request of target to bring matching together, it can also calculate described
Difference between first demand of the first party in request and the second demand of second party in request;If the difference is not
Zero, the party in request that there is demand more than needed is updated with the second demand according to first demand, and stops to not
It carries out brining matching together there are the party in request of demand more than needed.
By taking network loan system as an example, it is assumed that the demand of the first party in request is 500 yuan of borrowing, and the demand of the second party in request is
800 yuan of lending, that is, the first demand of the first party in request is 500, and the second demand of the second party in request is 800.At this point, the
Difference between one demand and the second demand is 800-500=300, since difference is not zero, the first party in request pinch
It closes and completes, but the second party in request has demand more than needed, does not bring completion together, can stop brining the first party in request together at this time
Matching, while updating the demand of the second party in request.
In practical applications, the first order bring together brought together with the second level can be respectively adopted Fig. 4 and mode shown in fig. 5 into
Row.As shown in figure 4, during the first order is brought together, when party in request A initiates demand, brings platform together and receives first and bring request together,
Then, WAIT_MATCH (that is, state to be brought together) is set by the current state of party in request A, and lands logical bit to party in request A
Database (that is, A barrels), the logical bit of party in request A can be generated at random, can also be according to sufficiently random field unalterable rules
It generates.Then, bucket decision-making module is divided to generate (or returning according to a point barrelage amount sequence) corresponding decision position party in request A at random, from
And make to bring the logical bit that platform obtains this matched party in request B together, after acquisition, bring database of the platform to party in request B together
(that is, B barrels) construct matching inquiry request, and fish for the demand in B barrels.Brining platform together to update initiator's state is MATCHING
(that is, brining state together), is updated successfully, and continues.Then, it starts the cycle over and brings together, until demand A digestion finishes or demand B
Queue digestion finishes.In cyclic process, brining platform calculating demand both sides together can matched resource, i.e. demand.Computing resource it
Before, necessary inspection can also be carried out, that is, judge whether demand both sides meet and bring the preset condition of platform together, for example, demand is double
Whether side is same user etc..It is matched to after target requirement side B, local matter can be opened, seize demand A's and demand B
Resource lands transaction journal, and broadcasts and bring matched result together.The ID number for brining flowing water together can be carried by brining together in matching result.
If not being matched to recipient, the state of demand initiator is updated to WAIT_NEW_MATCH, this portion requirements initiator
Corresponding recipient can not be found in short time, this portion requirements initiator is brought in pause together.If it is matched to recipient, but
It is not bring completion (for example, there are unmet demand amounts) together, then the state of demand initiator is renewed back to WAIT_MATCH.If
It is matched to recipient, and brings completion together, then the state of demand initiator is updated to MATCHED, indicates this portion requirements side
Matching is brought in completion together.
As shown in figure 5, during the second level is brought together, brings platform timing together and task scheduling system is integrated, it can be with
It fishes for not completing during the first order is brought together according to certain time interval and brings matched demand A together, then, construction demand B's
Matching inquiry request, fishes for receiving side data from the database of demand B, and the recipient fished for is that state is WAIT_NEW_
The party in request of MATCH.With the lasting progress for brining matching process together, can have a part of demand B can not carry out always with demand A
Matching, this just illustrates this portion requirements B, and there is no the demand A to match in brining platform together, and therefore, this portion requirements B is marked
It is denoted as WAIT_NEW_MATCH, so that pause brings matching together to this portion requirements B, until demand A updates.Fish for demand
After B, update initiator's state is MATCHING, is updated successfully, continues.Then, it starts the cycle over and brings together, until demand A digests
It finishes or the digestion of demand B queue finishes.In cyclic process, brining platform calculating demand both sides together can matched resource, i.e. demand
Amount.Before computing resource, necessary inspection can also be carried out, that is, judge whether demand both sides meet and bring the preset item of platform together
Part, for example, whether demand both sides are same user etc..It is matched to after target requirement side B, local matter can be opened, seized
The resource of demand A and demand B are labeled as MATCHED if demand B surplus resources are 0.Then, transaction journal is landed, and wide
It broadcasts and brings matched result together.The ID number for brining flowing water together can be carried by brining together in matching result.It, will if not being matched to recipient
The state of demand initiator is updated to WAIT_NEW_MATCH, this portion requirements can not find corresponding connect in initiator's short time
This portion requirements initiator is brought in debit, pause together.If being matched to recipient, but do not bring together completion (for example, in the presence of
Unmet demand amount), then the state of demand initiator is renewed back to WAIT_MATCH.If being matched to recipient, and bring completion together,
The state of demand initiator is then updated to MATCHED, indicates that this portion requirements side is completed and brings matching together.
For in treatment process, there is a situation where any abnormal interrupts, and the timed task that then needs to rely at this time is initiated same
Second wheel bring continuation process together.
The scheme of this specification embodiment, when receiving requirement request, system can be one logic of demand active identification
Then position is brought the decision position by dividing bucket decision-making module to return together in the first order, is matched in the database of demand B.?
Under concurrent scene, repeatedly different demand A can conflict by different decision bit allocations to reduce or even avoid.And it brings together certainly
Plan can be only randomly assigned, or in order-assigned.
Brining platform cluster together can be requested with distributed process demand, and will not be because of concurrently leading to the largely side of being matched
The problem of resource contention.Pass through the matched mode of two-stage simultaneously meet concurrently bring together it is efficient, while can to avoid omit this
It matched can bring together.Divide bucket two-stage to bring together and be suitable for matching both sides, be not limited in single direction brings matching together, while can
To support two-way bring together.
Various technical characteristics in above embodiments can be arbitrarily combined, as long as there is no punchings for the combination between feature
Prominent or contradiction, but as space is limited, is not described one by one, thus the various technical characteristics in above embodiment it is any into
Row combination also belongs to the range of this disclosure.
As shown in fig. 6, this specification embodiment, which also provides one kind, brings coalignment, described device together can include:
Module 602 is obtained, for obtaining the first party in request for carrying the first logical bit;
Searching module 604, for obtaining the second logical bit to match with first logical bit, from carrying described second
The second party in request of target to match with first party in request is searched in each second party in request of logical bit;
Module 606 is brought together, for bring together matching first party in request with second party in request of target.
The specific details of the realization process of the function of modules and effect, which are shown in, in above-mentioned apparatus corresponds to step in the above method
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The module of explanation may or may not be physically separated, and the component shown as module can be or can also be with
It is not physical module, it can it is in one place, or may be distributed on multiple network modules.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not
In the case where making the creative labor, it can understand and implement.
As shown in fig. 7, this specification embodiment, which also provides one kind, brings matching system, the system together can include:
Bring decision-making module, multiple first logic buckets and multiple second logic buckets together;
What the first logic bucket was used to store the first party in request brings matching demand together;Wherein, the same first logic bucket
Corresponding each first party in request carries identical first logical bit;
What the second logic bucket was used to store the second party in request brings matching demand together;Wherein, the same second logic bucket
Corresponding each second party in request carries identical second logical bit;
First party in request that decision-making module is brought together for the first logical bit of acquisition carrying from the first logic bucket,
The second logical bit to match with first logical bit is obtained, according to second logical bit from corresponding second logic bucket
The second party in request of target to match with first party in request is searched, and first party in request and the target second are needed
The side of asking carries out brining matching together.
Further, the system may also include that task scheduling modules, described for fishing for from the first logic bucket
It brings the first unmet demand side that decision-making module does not match completion together, and is searched and first residue from each second logic bucket
The second party in request of target that party in request matches.
Further, the decision-making module of brining together is also used to: obtaining the task scheduling modules do not match completion second
Unmet demand side, pause bring matching together to the second unmet demand side, until detecting that the second logic bucket occurs more
Newly.
Further, the decision-making module of brining together is also used to: calculate the first demand of first party in request with it is described
Difference between second demand of the second party in request;If the difference is not zero, according to first demand and the second need
The amount of asking is updated the corresponding logic bucket of party in request that there is demand more than needed, and stops to there is no the need of demand more than needed
The side of asking carries out brining matching together.
The embodiment of this specification device can be applied on a computing device, such as server or terminal device.Device
Embodiment can also be realized by software realization by way of hardware or software and hardware combining.Taking software implementation as an example,
As the device on a logical meaning, being will be corresponding in nonvolatile memory by the processor of file process where it
Computer program instructions are read into memory what operation was formed.For hardware view, as shown in figure 8, being this specification device
A kind of hardware structure diagram of place computer equipment, in addition to processor 802 shown in Fig. 8, memory 804, network interface 806, with
And except nonvolatile memory 808, server or electronic equipment in embodiment where device are set generally according to the computer
Standby actual functional capability can also include other hardware, repeat no more to this.
Correspondingly, this specification embodiment also provides a kind of computer storage medium, is stored with journey in the storage medium
Sequence realizes the method in any of the above-described embodiment when described program is executed by processor.
Correspondingly, this specification embodiment also provides a kind of computer equipment, including memory, processor and is stored in
On reservoir and the computer program that can run on a processor, the processor realize any of the above-described implementation when executing described program
Method in example.
It wherein includes storage medium (the including but not limited to disk of program code that the application, which can be used in one or more,
Memory, CD-ROM, optical memory etc.) on the form of computer program product implemented.Computer-usable storage medium packet
Permanent and non-permanent, removable and non-removable media is included, can be accomplished by any method or technique information storage.Letter
Breath can be computer readable instructions, data structure, the module of program or other data.The example packet of the storage medium of computer
Include but be not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM),
Other kinds of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory
(EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), digital versatile disc
(DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices or any other non-biography
Defeated medium, can be used for storage can be accessed by a computing device information.
Those skilled in the art will readily occur to the disclosure after considering specification and practicing specification disclosed herein
Other embodiments.The disclosure is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes
Or adaptive change follow the general principles of this disclosure and including the disclosure it is undocumented in the art known in often
Knowledge or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim point out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
The foregoing is merely the preferred embodiments of the disclosure, not to limit the disclosure, all essences in the disclosure
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of disclosure protection.