CN103077174A - Concurrent resource updating method and equipment - Google Patents

Concurrent resource updating method and equipment Download PDF

Info

Publication number
CN103077174A
CN103077174A CN201110329944XA CN201110329944A CN103077174A CN 103077174 A CN103077174 A CN 103077174A CN 201110329944X A CN201110329944X A CN 201110329944XA CN 201110329944 A CN201110329944 A CN 201110329944A CN 103077174 A CN103077174 A CN 103077174A
Authority
CN
China
Prior art keywords
resource
requests
updates
resource updates
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201110329944XA
Other languages
Chinese (zh)
Other versions
CN103077174B (en
Inventor
王耀
叶青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201110329944.XA priority Critical patent/CN103077174B/en
Publication of CN103077174A publication Critical patent/CN103077174A/en
Application granted granted Critical
Publication of CN103077174B publication Critical patent/CN103077174B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention aims to provide a concurrent resource updating method and equipment. The method comprises the following steps that firstly, a plurality of resource updating requests are obtained and respectively used for requesting to update all resources to be updated in a plurality of resources to be updated; then resource identifications corresponding to the resource updating requests are obtained in accordance with the resource updating requests; and then the resource updating requests are concurrently processed in accordance with the resource identifications, so as to update the resources to be updated. Compared with the prior art, on the premise that data consistency is guaranteed, all of the resource updating requests are concurrently processed by using the concurrent resource updating method and the equipment, so as to increase the processing efficiency of the resource updating requests, thereby increasing the response speed to the resource updating requests from users and improving the using experience of the users.

Description

A kind of concurrent resource regeneration method and equipment
Technical field
The present invention relates to field of computer technology, relate in particular to a kind of technology of resource updates.
Background technology
Along with the fast development of Internet technology, the data message amount of the required processing of the webserver is also increasing.Prior art is for example in myspace, for guaranteeing data's consistency, usually serial processing is carried out in each resource updates request, thereby the sequencing according to the submission time of this each resource updates request upgrades its corresponding resource successively, if this, the treatment effeciency of resource updates request is low, thereby impact reduces user's experience to the response speed from user's resource updates request.
Therefore, how effectively to realize resource updates, become one of present problem demanding prompt solution.
Summary of the invention
The method and apparatus that the purpose of this invention is to provide a kind of computer implemented resource updates.
According to an aspect of the present invention, provide a kind of method of computer implemented resource updates, wherein, the method may further comprise the steps:
A obtains a plurality of resource updates requests, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated;
B obtains the resource identification corresponding with these a plurality of resource updates requests according to described a plurality of resource updates requests;
C carries out concurrent processing according to described resource identification to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated.
According to another aspect of the present invention, also provide a kind of equipment of resource updates, wherein, this equipment comprises:
The acquisition request device is used for obtaining a plurality of resource updates requests, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated;
The sign deriving means is used for according to described a plurality of resource updates requests, obtains the resource identification corresponding with these a plurality of resource updates requests;
The concurrent processing device is used for according to described resource identification, concurrent processing is carried out in described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated.
Compared with prior art, the present invention realizes concurrent processing is carried out in each resource updates request under the prerequisite that guarantees data's consistency, to improve the treatment effeciency of resource updates request, and then improve the response speed from user's resource updates request, promote user's experience.
Description of drawings
By reading the detailed description that non-limiting example is done of doing with reference to the following drawings, it is more obvious that other features, objects and advantages of the present invention will become:
Fig. 1 illustrates the equipment synoptic diagram according to the resource updates of one aspect of the invention;
Fig. 2 illustrates the equipment synoptic diagram of resource updates in accordance with a preferred embodiment of the present invention;
Fig. 3 is the equipment synoptic diagram process flow diagram that according to the resource updates of another preferred embodiment of the present invention;
Fig. 4 illustrate according to of the present invention in resource tree the exemplary plot of Gains resources node;
Fig. 5 illustrates the method flow diagram of resource updates according to a further aspect of the present invention;
Fig. 6 illustrates the method flow diagram of resource updates in accordance with a preferred embodiment of the present invention;
Fig. 7 illustrates the method flow diagram according to the resource updates of another preferred embodiment of the present invention.
Same or analogous Reference numeral represents same or analogous parts in the accompanying drawing.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in further detail.
Fig. 1 illustrates the equipment synoptic diagram according to the resource updates of one aspect of the invention.Treatment facility 1 comprises acquisition request device 11, sign deriving means 12 and concurrent processing device 13.At this, treatment facility 1 is the network equipment, include but not limited to the cloud that computing machine, network host, single network server, a plurality of webserver collection or a plurality of server consist of, at this, cloud is made of a large amount of computing machines or the webserver based on cloud computing (Cloud Computing), wherein, cloud computing is a kind of of Distributed Calculation, a super virtual machine that is comprised of the loosely-coupled computing machine collection of a group.
As shown in Figure 1, at first, acquisition request device 11 obtains a plurality of resource updates requests, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated.
At this, the described mode of obtaining includes but not limited to following mode:
1) obtains from subscriber equipment; For example, obtain in real time a plurality of resource updates requests of submitting to by subscriber equipment from the user.At this, described subscriber equipment can be any can with the user by the electronic product that keyboard, mouse, telepilot, touch pad or voice-operated device carry out man-machine interaction, include but not limited to computing machine, smart mobile phone, PDA or IPTV etc.
2) obtain from third party device; For example according to the predetermined cycle, read a plurality of resource updates requests from third party device.
In an example, in myspace, treatment facility 1 is the webserver, at first, subscriber equipment 1 monitor user ' U1 adds a comment by man-machine interaction photo P1 to user U2 in its operation interface, to generate the resource updates request corresponding with this operation; Subscriber equipment 2 monitor user ' U2 delete photo P1 in its operation interface by man-machine interaction, and add one piece of blog articles A1, to generate respectively and these two two resource updates requests that operation is corresponding; Subsequently, subscriber equipment 1 and subscriber equipment 2 are sent to respectively this webserver with these three resource updates requests, for example, it can be encapsulated as three request messages, such as the http request message, and by corresponding communication protocol, such as http, https communication protocol, be sent to this webserver, this webserver receives and resolves this three request messages by the mode of Real Time Monitoring, to obtain these three the resource updates requests from subscriber equipment 1 and subscriber equipment 2.
In another example, the application programming interface that acquisition request device 11 provides via third party device (API), send and receive termly the message of a plurality of resource updates requests to this third party device, and receive this third party device and respond a plurality of resource updates requests that this message is returned.Third party device also can initiatively push a plurality of resource updates requests to treatment facility 1, and acquisition request device 11 receives these a plurality of resource updates requests.
Those skilled in the art will be understood that the mode of above-mentioned Gains resources update request is only for giving an example; the mode of other Gains resources update requests existing or that may occur from now on is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Then, sign deriving means 12 obtains the resource identification corresponding with these a plurality of resource updates requests according to a plurality of resource updates requests that acquisition request device 11 obtains.
At this, described resource identification means the identification information of the scope of the resource that the corresponding resource updates of predefined this resource updates request may have influence on.For example, comprise the resources such as blog, photograph album in the myspace space resources of user U1, have in the blog resource many photograph album photos are arranged in many pieces of blog articles, the photograph album resource, when the resource updates request is to add one piece of blog articles in the blog of user U1, then the corresponding resource identification of this resource updates request can be set as resource to be updated itself, be the blog of user U1, maybe can be set as a larger scope of resource, for example the myspace space of user U1.
At this, the mode of obtaining described resource identification includes but not limited to following form:
1) when comprising its corresponding resource identification in the resource updates request, sign deriving means 12 directly obtains from this resource updates request; For example one piece of blog articles is being added in the resource updates request of comment, its corresponding resource identification of Explicit designation is this blog articles;
2) when not comprising its corresponding resource identification in the resource updates request, sign deriving means 12 obtains rule according to predetermined sign, according to this resource updates request, obtains the resource identification corresponding with this resource updates request; For example, when the resource updates request is to add a photo in photograph album A, then identifying deriving means 12 can be with the upper level resource photograph album A of this photo as the corresponding resource identification of this resource updates request, maybe can be with the upper level resource myspace space S of photograph album A as the corresponding resource identification of this resource updates request.
In an example, in myspace, three resource updates requests are respectively R1, R2 and R3, wherein, R1 adds a comment to the photo P1 under the photograph album A of user U2, R2 deletes the photo P1 under the user U2 photograph album A, R3 adds one piece of article A1 in the blog B of user U2, and all comprised separately corresponding resource identification in these three resource updates requests, be respectively U2-A-P1 sign, U2-A sign, U2-B sign, sign deriving means 12 directly extracts this three resource identifications corresponding with it from these three resource updates requests.
In another example, in myspace, two resource updates requests are respectively R4 and R5, wherein, R4 is one piece of article A1 of interpolation in user U2 blog B, and does not comprise separately corresponding resource identification in these two resource updates requests comment of the interpolation of the photo P1 under the user U1 photograph album A, R5; When predetermined sign obtain rule for the upper level resource of resource to be updated as the corresponding resource identification of this resource updates request, then identify deriving means 12 and obtain rule according to predetermined sign, the upper level resource of the corresponding resource photo P1 to be updated of Gains resources update request R4 is the photograph album A of user U1, so with U1-A as the corresponding resource identification of resource updates request R4; In like manner, the corresponding resource identification of Gains resources update request R5 is U2-B.
Those skilled in the art will be understood that the mode of above-mentioned Gains resources sign is only for giving an example; the mode of other Gains resources existing or that may occur from now on signs is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Subsequently, concurrent processing device 13 carries out concurrent processing according to the resource identification that sign deriving means 12 obtains to a plurality of resource updates requests that acquisition request device 11 obtains, to upgrade the corresponding a plurality of resources to be updated of these a plurality of resource updates requests.
At this, the implementation of described concurrent processing comprises the corresponding resource identification of each resource updates request is compared, the different resource updates request of resource identification will be by parallel processing, and the identical resource updates request of resource identification will be according to the sequencing of the submission time of resource updates request by serial processing.Wherein, parallel processing refers to that two or more resource updates requests are processed at synchronization, and that concurrent processing refers to two or more resource updates requests is processed in the interval at one time, and concurrent processing comprises the situation of parallel processing.
In an example, in myspace, three resource updates requests are respectively R1, R2 and R3; Wherein, R1 is for adding the photo P1 comment on to the user U1 photograph album A, and its corresponding resource identification is U1-A-P1; R2 is the article 2 under the deletion user U1 blog B, and its corresponding resource identification is U1-B-article 2; R3 is for adding article to the blog B of user U2, and its corresponding resource identification is U2-B.Concurrent processing device 13 compares these three resource identifications respectively, different to obtain these three resource identifications, then R1, R2 and R3 are carried out parallel processing, namely carry out simultaneously the interpolation of new article of the blog B of the deletion of interpolation, the article 2 under the user U1 blog B of the new comment of the photo P1 under the user U1 photograph album A and user U2.
In another example, in myspace, three resource updates requests are respectively R1, R2 and R3; Wherein, R1 is for upgrading the photo P1 under the user U1 photograph album A, and its corresponding resource identification is U1-A; R2 is for upgrading the photograph album A of user U1, and its corresponding resource identification is U1-A; R3 is for upgrading the blog B of user U2, and its corresponding resource identification is U2-B.Concurrent processing device 13 compares these three resource identifications respectively, identical with the resource identification of R2 to obtain R1, and R3 is not identical with the resource identification of R1, R2, then R3 and R1, R2 are carried out parallel processing, and R1 and R2 are carried out serial processing, to upgrade the corresponding resource to be updated of these three resource updates, namely in parallel processing resource updates request R3, at first process submission time resource updates request R1 formerly, then, again the serial processing submission time after resource updates request R2.
Those skilled in the art will be understood that the mode of above-mentioned concurrent processing only for giving an example, and the mode of other parallel processings existing or that may occur from now on also should be included in the protection domain of the present invention as applicable to the present invention, and is contained in this with way of reference.
Preferably, be to work continuously between acquisition request device 11, sign deriving means 12 and the concurrent processing device 13.Particularly, acquisition request device 11 obtains a plurality of resource updates requests constantly, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated; Then, sign deriving means 12 obtains the resource identification corresponding with these a plurality of resource updates requests also constantly according to described a plurality of resource updates requests; Subsequently, concurrent processing device 13 carries out concurrent processing also constantly according to described resource identification to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated.At this, it will be understood by those skilled in the art that " continuing " refers to that each device constantly carries out the concurrent processing of obtaining of the obtaining of above-mentioned a plurality of resource updates requests, resource identification and a plurality of resource updates requests, until satisfy predetermined stoppage condition, for example acquisition request device 11 stops obtaining a plurality of resource updates requests in a long time.
Fig. 2 illustrates the equipment synoptic diagram of resource updates in accordance with a preferred embodiment of the present invention.Wherein, concurrent processing device 13 ' comprises that first concerns judging unit 131 ' and resource updates unit 132 '.First concerns judging unit 131 ' according to the resource identification that obtains of sign deriving means 12 ', judges between a plurality of resource updates requests that acquisition request device 11 ' obtains whether have incidence relation; Resource updates unit 132 ' is according to whether having incidence relation between described a plurality of resource updates requests, concurrent processing is carried out in described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated, wherein, in this concurrent processing process, exist the resource updates request of incidence relation will be according to the sequencing of resource updates request submission time by serial processing, and do not exist the resource updates request of incidence relation will be by parallel processing.Wherein, parallel processing refers to that two or more resource updates requests are processed at synchronization, and that concurrent processing refers to two or more resource updates requests is processed in the interval at one time, and concurrent processing comprises the situation of parallel processing.
At this, the device of acquisition request shown in Fig. 2 11 ' is identical with reference to the content of the described acquisition request device 11 of Fig. 1 and sign deriving means 12 with the front with sign deriving means 12 ', for simplicity's sake, is contained in this with way of reference, does not give unnecessary details and do not do.
At this, judge that whether existing incidence relation to comprise between the described resource updates request carries out matching inquiry with any two corresponding resource identifications of resource updates request in the resource identification storehouse, to judge between these two resource updates requests whether have incidence relation; At this, comprise in the described resource identification storehouse resource identification information and and other resource identification informations between whether have predetermined incidence relation.
In an example, in myspace, three resource updates requests are respectively R1, R2 and R3; Wherein, the corresponding resource identification of R1 is U1-A, and the corresponding resource identification of R2 is U1-A-P1, and the corresponding resource identification of R3 is U2-B.First concerns that judging unit 131 ' is with any two corresponding resource identifications of resource updates request, be U1-A and U1-A-P1, U1-A and U2-B, U1-A-P1 and U2-B, in the resource identification storehouse, carry out respectively matching inquiry, obtain to have incidence relation between resource identification U1-A and the U1-A-P1, do not have incidence relation between resource identification U2-B and U1-A, the U1-A-P1; Then, resource updates unit 132 ' is according to having incidence relation between resource identification U1-A and the U1-A-P1, R1 and R2 are carried out serial processing according to the sequencing of its submission time, to upgrade successively the corresponding resource to be updated of R1 and R2, and in to R1 and R2 serial processing, R3 is carried out parallel processing, to upgrade the corresponding resource to be updated of R3.
Those skilled in the art will be understood that the mode of above-mentioned judgement incidence relation and/or resource updates is only for giving an example; the mode of other judgement incidence relations existing or that may occur from now on and/or resource updates is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Fig. 3 is the equipment synoptic diagram that according to the resource updates of another preferred embodiment of the present invention.Wherein, first concerns judging unit 131 " also comprise node acquiring unit 1311 " and second concern judging unit 1312 ".Node acquiring unit 1311 " according to sign deriving means 12 " resource identification that obtains, in resource tree, carry out matching inquiry, to obtain the resource node corresponding with resource identification; Second concerns judging unit 1312 " according to node acquiring unit 1311 " resource node that obtains, according to the preset judgment rule, judge between a plurality of resource updates requests whether have incidence relation.
At this, the device of acquisition request shown in Fig. 3 11 ", sign deriving means 12 " and resource updates unit 132 " with the front with reference to the described request unit 11 ' of Fig. 2, identify deriving means 12 ' and resource updates unit 132 ' content identical; for simplicity's sake; be contained in this with way of reference, do not give unnecessary details and do not do.
At this, described resource tree means the topological structure of the incidence relation between the represented resource of the resource identification corresponding with the resource updates request, the resource data of not storage reality in this resource tree.At this, described resource tree is stored in following in each: relational database, memory storage, harddisk memory etc.
At this, according to whether existing incidence relation to include but not limited to following situation between a plurality of resource updates requests of described preset judgment rule judgment:
1) according to corresponding each resource identification of each resource updates request, in resource tree, travel through respectively, to obtain the resource node corresponding with this each resource identification, if the resource node that obtains is identical, then second concerns judging unit 1312 " judge between these resource updates requests and have incidence relation;
2) according to corresponding each resource identification of each resource updates request, in resource tree, travel through respectively, to obtain the resource node corresponding with this each resource identification, if have subordinate relation between the resource node that obtains, then second concerns judging unit 1312 " judge between these resource updates requests and have incidence relation.Wherein, described subordinate relation comprises set membership between the resource node, grandparent and grandchild's relation etc.In resource tree, root node all resource nodes and this resource node to the access path of certain resource node all have subordinate relation.As shown in Figure 4, for example, root node " myspace " to the access path of resource node " photo P1 " is " myspace->user U1->photograph album A->photo P1 ", and then resource node " photo P1 " all has subordinate relation with resource node " myspace ", " user U1 ", " photograph album A ".
Those skilled in the art will be understood that above-mentioned preset judgment rule only for giving an example, and other preset judgment rules existing or that may occur from now on also should be included in the protection domain of the present invention, and be contained in this with way of reference as applicable to the present invention.
In an example (with reference to Fig. 4), in myspace, three resource updates requests are respectively R1, R2 and R3.Wherein, R1 is for upgrading the photograph album A of user U1, and its corresponding resource identification is U1-A; R2 is the photo P2 among the photograph album A that upgrades user U1, and its corresponding resource identification is U1-A-P2; R3 is the article 1 among the blog B that upgrades user U2, and its corresponding resource identification is U2-B-article 1.Node acquiring unit 1311 " by this resource tree of traversal, these three resource identifications each resource node in resource tree is compared, take the acquisition resource node corresponding with R1, R2 and R3 as N1, N2 and N3; Then, second concerns judging unit 1312 " according to these three resource node N1, N2 and the position of N3 in this resource tree, determine that N3 and N1, N2 are independent mutually, and have subordinate relation between N1 and the N2; be not have incidence relation between N3 and N1, the N2, and have incidence relation between N1 and the N2.
Those skilled in the art will be understood that above-mentioned Gains resources node and/or judge that the mode of incidence relation only is for example; other Gains resources nodes existing or that may occur from now on and/or the mode of judging incidence relation are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
In another preferred embodiment (with reference to Fig. 1), treatment facility 1 also comprises the pick-up unit (not shown).Referring to Fig. 1 this another preferred embodiment is described in detail, wherein, acquisition request device 11 obtains a plurality of resource updates requests, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated; Sign deriving means 12 obtains the resource identification corresponding with these a plurality of resource updates requests according to described a plurality of resource updates requests; Concurrent processing device 13 carries out concurrent processing according to described resource identification to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated; Its detailed process for simplicity's sake, is contained in this with way of reference with aforementioned identical with reference to the performed process of acquisition request device 11 among the described embodiment of Fig. 1, sign deriving means 12 and concurrent processing device 13, does not give unnecessary details and do not do.
Particularly, when concurrent processing is carried out in a plurality of resource updates requests of obtaining when 13 pairs of acquisition request devices 11 of concurrent processing device, pick-up unit is realized the collision detection of this concurrent processing by the corresponding resource identification of these a plurality of resource updates requests represented resource node in resource tree is locked.Wherein, the collision detection that resource node is locked to carry out concurrent processing can prevent when a plurality of resource updates request of concurrent processing, identical resource is upgraded in different resource updates requests simultaneously, to guarantee the consistance of resource data, also be, only there is a resource operation request can obtain the lock of certain resource node at synchronization, and only have the resource operation request that obtains this lock just can be processed upgrading corresponding resource, and the resource operation request of failing to obtain this lock will be waited in line to have the resource operation request of this lock and discharge this lock.
At this, the mechanism of described lock can realize by semaphore, described semaphore is a kind of recordable data structure, it only can visit by the atomic operation of two standards, and these two operations are called as P, V operation, at this, resource of P control and display application, namely realize locking of resource, V operation represents to discharge a resource, namely realizes the release of resource.Wherein, described atomic operation (being called for short " primitive ") is the operation that can not interrupt on computer operation is carried out.
Wherein, the atomic operation of lock can not be guaranteed separately by software--must need the support of hardware.For example, on the x86 platform, CPU provides the means that the term of execution of instruction bus locked.A lead-in wire #HLOCK pin is arranged on the cpu chip, if add prefix " LOCK " an instruction front in the program of assembly language, through the later machine code of compilation CPU is dragged down the current potential of #HLOCK pin when carrying out this instruction, decontrol when lasting till this order fulfillment, thereby bus is pinned, other CPU just temporarily can not pass through the bus access internal memory on the same bus like this, has guaranteed the atomicity of this instruction in multi-processor environment.
In an example (with reference to Fig. 4), in myspace, two resource updates requests are respectively R1, R2, and R1, R2 corresponding resource node in resource tree is N1, N2, wherein, it is set membership between N1 and the N2, as 13 couples of R1 of concurrent processing device, when R2 carries out concurrent processing, pick-up unit is by the application programming interface (API) of this resource tree, for resource updates request R1 carries out the P operation to resource node N1, realizing resource node N1, and the subtree resource node N2 of this resource node, N4 locks, this moment, resource updates request R1 renewable resources node N1 and the corresponding resource of subtree resource node thereof.Because the corresponding resource node N2 of resource updates request R2 is locked, pick-up unit is that R1 carries out V operation so R2 need wait in line, to realize the release to resource node N1, N2, N4.When resource node N2 is unlocked, pick-up unit will be carried out the P operation to resource node N2 for resource updates request R2, with reality resource node N2 is locked, this moment, the corresponding resource of resource updates request R2 renewable resources node N2.
Those skilled in the art will be understood that the mode of above-mentioned collision detection is only for giving an example; the mode of other collision detection existing or that may occur from now on is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this at this with way of reference.
At this, by locking at the corresponding resource node of resource updates request, can prevent with corresponding other resource updates requests of the subtree resource node of this resource node or this resource node and this resource updates request by the while parallel processing, namely realize the collision detection of concurrent processing, thereby in the concurrent processing process, guarantee the consistance of resource data.
In another preferred embodiment (with reference to Fig. 1), treatment facility 1 also comprise resource tree updating device (not shown).The resource tree updating device is according to the renewal of the resource corresponding with described a plurality of resource updates requests, sets up or upgrades described resource tree.Referring to Fig. 1 this another preferred embodiment is described in detail, wherein, acquisition request device 11 obtains a plurality of resource updates requests, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated; Sign deriving means 12 obtains the resource identification corresponding with these a plurality of resource updates requests according to described a plurality of resource updates requests; Concurrent processing device 13 carries out concurrent processing according to described resource identification to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated; Its detailed process for simplicity's sake, is contained in this with way of reference with aforementioned identical with reference to the performed process of acquisition request device 11 among the described embodiment of Fig. 1, sign deriving means 12 and concurrent processing device 13, does not give unnecessary details and do not do.
Particularly, the resource tree updating device for example passes through the processing of 13 pairs of resource updates requests of Real-Time Monitoring concurrent processing device, the resource that increases or delete to obtain it, and the application programming interface (API) by calling resource tree accordingly, in resource tree, increase or delete the corresponding resource node of this resource.Do not set up if detect this resource tree, this resource tree of initialization in advance then, and then upgrade resource node in this resource tree.
In one example (with reference to Fig. 4), in myspace, a resource updates request is the photo P1 under the photograph album A of deletion user U1, concurrent processing device 13 is processed this resource updates request and photo P1 is deleted, this resource request of resource tree updating device Real-Time Monitoring is processed event, and the application programming interface (API) by calling resource tree, deletion resource node N4 in resource tree.
Those skilled in the art will be understood that the mode of above-mentioned foundation or renewal resource tree is only for giving an example; other foundation existing or that may occur from now on or the mode of upgrading resource tree are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
In a preferred embodiment again (with reference to Fig. 1), treatment facility 1 also comprises serial processing device (not shown).When sign deriving means 12 does not obtain the corresponding resource identification of a plurality of resource updates requests, the serial processing device is according to the sequencing of these a plurality of resource updates request submission times, serial processing is carried out in these a plurality of resource updates requests, to upgrade a plurality of resources to be updated.Referring to Fig. 1 to this again a preferred embodiment be described in detail, wherein, acquisition request device 11 obtains a plurality of resource updates requests, be respectively applied to the request each resource to be updated in a plurality of resources to be updated is upgraded; Sign deriving means 12 obtains the resource identification corresponding with these a plurality of resource updates requests according to described a plurality of resource updates requests; Concurrent processing device 13 carries out concurrent processing according to described resource identification to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated; Its detailed process for simplicity's sake, is contained in this with way of reference with aforementioned identical with reference to the performed process of acquisition request device 11 among the described embodiment of Fig. 1, sign deriving means 12 and concurrent processing device 13, does not give unnecessary details and do not do.
Particularly, when resource identification deriving means 12 does not get access to resource identification, the serial processing device carries out serial processing to these resource updates requests successively according to the sequencing of a plurality of resource updates request submission times, to upgrade the corresponding resource of these resource updates requests.
In an example, in myspace, three resource updates requests are respectively R1, R2 and R3.Wherein, R1 is for upgrading the photo P1 under the user U1 photograph album A, and R2 is for upgrading the photograph album A of user U1, and R3 is for upgrading the blog B of user U2, and these resource updates request submission times by first to after order be R2, R1, R3.When sign deriving means 12 does not get access to this three corresponding resource identifications of resource updates request, the serial processing device is according to the sequencing of the time of R1, R2, R3 submission, it is carried out serial processing, namely upgrade first the photograph album A of user U1, upgrade again the photo P1 under the user U1 photograph album A, the blog B of final updating user U2.
The mode that those skilled in the art will be understood that above-mentioned more new resources is only for for example, and the mode of other existing or more new resources that may occur from now on also should be included in the protection domain of the present invention, and be contained in this with way of reference as applicable to the present invention.
Fig. 5 illustrates the method flow diagram according to the resource updates of one aspect of the invention.Wherein, treatment facility 1 is the network equipment, include but not limited to the cloud that computing machine, network host, single network server, a plurality of webserver collection or a plurality of server consist of, at this, cloud is made of a large amount of computing machines or the webserver based on cloud computing (Cloud Computing), wherein, cloud computing is a kind of of Distributed Calculation, a super virtual machine that is comprised of the loosely-coupled computing machine collection of a group.
As shown in Figure 5, at first, in step S1, treatment facility 1 obtains a plurality of resource updates requests, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated.
At this, the described mode of obtaining includes but not limited to following mode:
1) obtains from subscriber equipment; For example, obtain in real time a plurality of resource updates requests of submitting to by subscriber equipment from the user.At this, described subscriber equipment can be any can with the user by the electronic product that keyboard, mouse, telepilot, touch pad or voice-operated device carry out man-machine interaction, include but not limited to computing machine, smart mobile phone, PDA or IPTV etc.
2) obtain from third party device; For example according to the predetermined cycle, read a plurality of resource updates requests from third party device.
In an example, in myspace, treatment facility 1 is the webserver, at first, subscriber equipment 1 monitor user ' U1 adds a comment by man-machine interaction photo P1 to user U2 in its operation interface, to generate the resource updates request corresponding with this operation; Subscriber equipment 2 monitor user ' U2 delete photo P1 in its operation interface by man-machine interaction, and add one piece of blog articles A1, to generate respectively and these two two resource updates requests that operation is corresponding; Subsequently, subscriber equipment 1 and subscriber equipment 2 are sent to respectively this webserver with these three resource updates requests, for example, it can be encapsulated as three request messages, such as the http request message, and by corresponding communication protocol, such as http, https communication protocol, be sent to this webserver, this webserver receives and resolves this three request messages by the mode of Real Time Monitoring, to obtain these three the resource updates requests from subscriber equipment 1 and subscriber equipment 2.
In another example, in step S1, the application programming interface that treatment facility 1 provides via third party device (API) sends and receives the message of a plurality of resource updates requests termly to this third party device, and receives this third party device and respond a plurality of resource updates requests that this message is returned.Third party device also can initiatively push a plurality of resource updates requests to treatment facility 1, and treatment facility 1 receives these a plurality of resource updates requests in step S1.
Those skilled in the art will be understood that the mode of above-mentioned Gains resources update request is only for giving an example; the mode of other Gains resources update requests existing or that may occur from now on is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Then, in step S2, treatment facility 1 obtains the resource identification corresponding with these a plurality of resource updates requests according to its a plurality of resource updates requests of obtaining in step S1.
At this, described resource identification means the identification information of the scope of the resource that the corresponding resource updates of predefined this resource updates request may have influence on.For example, comprise the resources such as blog, photograph album in the myspace space resources of user U1, have in the blog resource many photograph album photos are arranged in many pieces of blog articles, the photograph album resource, when the resource updates request is to add one piece of blog articles in the blog of user U1, then the corresponding resource identification of this resource updates request can be set as resource to be updated itself, be the blog of user U1, maybe can be set as a larger scope of resource, for example the myspace space of user U1.
At this, the mode of obtaining described resource identification includes but not limited to following form:
1) when comprising its corresponding resource identification in the resource updates request, in step S2, treatment facility 1 directly obtains from this resource updates request; For example one piece of blog articles is being added in the resource updates request of comment, its corresponding resource identification of Explicit designation is this blog articles;
2) when not comprising its corresponding resource identification in the resource updates request, in step S2, treatment facility 1 obtains rule according to predetermined sign, according to this resource updates request, obtains the resource identification corresponding with this resource updates request; For example, when the resource updates request is to add a photo in photograph album A, then treatment facility 1 can be with the upper level resource photograph album A of this photo as the corresponding resource identification of this resource updates request in step S2, maybe can be with the upper level resource myspace space S of photograph album A as the corresponding resource identification of this resource updates request.
In an example, in myspace, three resource updates requests are respectively R1, R2 and R3, wherein, R1 adds a comment to the photo P1 under the photograph album A of user U2, R2 deletes the photo P1 under the user U2 photograph album A, R3 adds one piece of article A1 in the blog B of user U2, and all comprised separately corresponding resource identification in these three resource updates requests, be respectively the U2-A-P1 sign, the U2-A sign, the U2-B sign, in step S2, treatment facility 1 directly extracts this three resource identifications corresponding with it from these three resource updates requests.
In another example, in myspace, two resource updates requests are respectively R4 and R5, wherein, R4 is one piece of article A1 of interpolation in user U2 blog B, and does not comprise separately corresponding resource identification in these two resource updates requests comment of the interpolation of the photo P1 under the user U1 photograph album A, R5; When predetermined sign obtain rule for the upper level resource of resource to be updated as the corresponding resource identification of this resource updates request, then in step S2, treatment facility 1 obtains rule according to predetermined sign, the upper level resource of the corresponding resource photo P1 to be updated of Gains resources update request R4 is the photograph album A of user U1, so with U1-A as the corresponding resource identification of resource updates request R4; In like manner, the corresponding resource identification of Gains resources update request R5 is U2-B.
Those skilled in the art will be understood that the mode of above-mentioned Gains resources sign is only for giving an example; the mode of other Gains resources existing or that may occur from now on signs is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Subsequently, in step S3, treatment facility 1 carries out concurrent processing according to its resource identification that obtains to a plurality of resource updates requests that treatment facility 1 obtains in step S1 in step S2, to upgrade the corresponding a plurality of resources to be updated of these a plurality of resource updates requests.
At this, the implementation of described concurrent processing comprises the corresponding resource identification of each resource updates request is compared, the different resource updates request of resource identification will be by parallel processing, and the identical resource updates request of resource identification will be according to the sequencing of the submission time of resource updates request by serial processing.Wherein, parallel processing refers to that two or more resource updates requests are processed at synchronization, and that concurrent processing refers to two or more resource updates requests is processed in the interval at one time, and concurrent processing comprises the situation of parallel processing.
In an example, in myspace, three resource updates requests are respectively R1, R2 and R3; Wherein, R1 is for adding the photo P1 comment on to the user U1 photograph album A, and its corresponding resource identification is U1-A-P1; R2 is the article 2 under the deletion user U1 blog B, and its corresponding resource identification is U1-B-article 2; R3 is for adding article to the blog B of user U2, and its corresponding resource identification is U2-B.In step S3, treatment facility 1 compares these three resource identifications respectively, different to obtain these three resource identifications, then R1, R2 and R3 are carried out parallel processing, namely carry out simultaneously the interpolation of new article of the blog B of the deletion of interpolation, the article 2 under the user U1 blog B of the new comment of the photo P1 under the user U1 photograph album A and user U2.
In another example, in myspace, three resource updates requests are respectively R1, R2 and R3; Wherein, R1 is for upgrading the photo P1 under the user U1 photograph album A, and its corresponding resource identification is U1-A; R2 is for upgrading the photograph album A of user U1, and its corresponding resource identification is U1-A; R3 is for upgrading the blog B of user U2, and its corresponding resource identification is U2-B.In step S3, treatment facility 1 compares these three resource identifications respectively, identical with the resource identification of R2 to obtain R1, and R3 is not identical with the resource identification of R1, R2, then R3 and R1, R2 are carried out parallel processing, and R1 and R2 are carried out serial processing, to upgrade the corresponding resource to be updated of these three resource updates, namely in parallel processing resource updates request R3, at first process submission time resource updates request R1 formerly, then, again the serial processing submission time after resource updates request R2.
Those skilled in the art will be understood that the mode of above-mentioned concurrent processing only for giving an example, and the mode of other parallel processings existing or that may occur from now on also should be included in the protection domain of the present invention as applicable to the present invention, and is contained in this with way of reference.
Preferably, treatment facility 1 is to work continuously in step S1, step S2 and step S3.Particularly, in step S1, treatment facility 1 obtains a plurality of resource updates requests constantly, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated; Then, in step S2, treatment facility 1 also constantly according to described a plurality of resource updates requests, obtains the resource identification corresponding with these a plurality of resource updates requests; Subsequently, in step S3, treatment facility 1 carries out concurrent processing also constantly according to described resource identification to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated.At this, it will be understood by those skilled in the art that " continuing " refers to that treatment facility 1 constantly carries out the concurrent processing of obtaining of the obtaining of above-mentioned a plurality of resource updates requests, resource identification and a plurality of resource updates requests in each step, until satisfy predetermined stoppage condition, for example treatment facility 1 stops obtaining a plurality of resource updates requests in a long time.
Fig. 6 illustrates the equipment synoptic diagram of resource updates in accordance with a preferred embodiment of the present invention.In step S31 ', treatment facility 1 judges between its a plurality of resource updates requests of obtaining whether have incidence relation according to its resource identification that obtains in step S1 ' in step S2 '; In step S32 ', treatment facility 1 is according to whether having incidence relation between described a plurality of resource updates requests, concurrent processing is carried out in described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated, wherein, in this concurrent processing process, exist the resource updates request of incidence relation will be according to the sequencing of resource updates request submission time by serial processing, and do not exist the resource updates request of incidence relation will be by parallel processing.Wherein, parallel processing refers to that two or more resource updates requests are processed at synchronization, and that concurrent processing refers to two or more resource updates requests is processed in the interval at one time, and concurrent processing comprises the situation of parallel processing.
At this, treatment facility shown in Fig. 61 with described treatment facility 1 is identical with the content in step S2 at step S1 with reference to Fig. 1 with the front in step S2 ', for simplicity's sake, is contained in this with way of reference at step S1 ', does not give unnecessary details and do not do.
At this, judge that whether existing incidence relation to comprise between the described resource updates request carries out matching inquiry with any two corresponding resource identifications of resource updates request in the resource identification storehouse, to judge between these two resource updates requests whether have incidence relation; At this, comprise in the described resource identification storehouse resource identification information and and other resource identification informations between whether have predetermined incidence relation.
In an example, in myspace, three resource updates requests are respectively R1, R2 and R3; Wherein, the corresponding resource identification of R1 is U1-A, and the corresponding resource identification of R2 is U1-A-P1, and the corresponding resource identification of R3 is U2-B.In step S31 ', treatment facility 1 is with any two corresponding resource identifications of resource updates request, be U1-A and U1-A-P1, U1-A and U2-B, U1-A-P1 and U2-B, in the resource identification storehouse, carry out respectively matching inquiry, obtain to have incidence relation between resource identification U1-A and the U1-A-P1, do not have incidence relation between resource identification U2-B and U1-A, the U1-A-P1; Then, in step S32 ', treatment facility 1 is according to having incidence relation between resource identification U1-A and the U1-A-P1, R1 and R2 are carried out serial processing according to the sequencing of its submission time, to upgrade successively the corresponding resource to be updated of R1 and R2, and in to R1 and R2 serial processing, R3 is carried out parallel processing, to upgrade the corresponding resource to be updated of R3.
Those skilled in the art will be understood that the mode of above-mentioned judgement incidence relation and/or resource updates is only for giving an example; the mode of other judgement incidence relations existing or that may occur from now on and/or resource updates is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Fig. 7 is the method flow diagram that according to the resource updates of another preferred embodiment of the present invention.At step S311 " in, treatment facility 1 according to it at step S2 " in the resource identification that obtains, in resource tree, carry out matching inquiry, to obtain the resource node corresponding with resource identification; At step S312 " in, treatment facility 1 according to it at step S311 " in the resource node that obtains, according to the preset judgment rule, judge between a plurality of resource updates requests whether have incidence relation.
At this, treatment facility shown in Fig. 71 is at step S1 ", step S2 " with step S32 " in identical with reference to the content of the described treatment facility 1 of Fig. 6 in step S1 ', step S2 ' and step S32 ' with the front; for simplicity's sake, be contained in this with way of reference, do not give unnecessary details and do not do.
At this, described resource tree means the topological structure of the incidence relation between the represented resource of the resource identification corresponding with the resource updates request, the resource data of not storage reality in this resource tree.At this, described resource tree is stored in following in each: relational database, memory storage, harddisk memory etc.
At this, according to whether existing incidence relation to include but not limited to following situation between a plurality of resource updates requests of described preset judgment rule judgment:
1) according to corresponding each resource identification of each resource updates request, in resource tree, travel through respectively, to obtain the resource node corresponding with this each resource identification, if the resource node that obtains is identical, then at step S312 " in, there is incidence relation between treatment facility 1 these resource updates requests of judgement;
2) according to corresponding each resource identification of each resource updates request, in resource tree, travel through respectively, to obtain the resource node corresponding with this each resource identification, if have subordinate relation between the resource node that obtains, then at step S312 " in, there is incidence relation between treatment facility 1 these resource updates requests of judgement.Wherein, described subordinate relation comprises set membership between the resource node, grandparent and grandchild's relation etc.In resource tree, root node all resource nodes and this resource node to the access path of certain resource node all have subordinate relation.As shown in Figure 4, for example, root node " myspace " to the access path of resource node " photo P1 " is " myspace->user U1->photograph album A->photo P1 ", and then resource node " photo P1 " all has subordinate relation with resource node " myspace ", " user U1 ", " photograph album A ".
Those skilled in the art will be understood that above-mentioned preset judgment rule only for giving an example, and other preset judgment rules existing or that may occur from now on also should be included in the protection domain of the present invention, and be contained in this with way of reference as applicable to the present invention.
In an example (with reference to Fig. 4), in myspace, three resource updates requests are respectively R1, R2 and R3.Wherein, R1 is for upgrading the photograph album A of user U1, and its corresponding resource identification is U1-A; R2 is the photo P2 among the photograph album A that upgrades user U1, and its corresponding resource identification is U1-A-P2; R3 is the article 1 among the blog B that upgrades user U2, and its corresponding resource identification is U2-B-article 1.At step S311 " in, treatment facility 1 compares these three resource identifications each resource node in resource tree by this resource tree of traversal, take the acquisition resource node corresponding with R1, R2 and R3 as N1, N2 and N3; Then, at step S312 " in, treatment facility 1 is according to these three resource node N1, N2 and the position of N3 in this resource tree; determine that N3 and N1, N2 are independent mutually; and have subordinate relation between N1 and the N2, and namely there is not incidence relation between N3 and N1, the N2, and has incidence relation between N1 and the N2.
Those skilled in the art will be understood that above-mentioned Gains resources node and/or judge that the mode of incidence relation only is for example; other Gains resources nodes existing or that may occur from now on and/or the mode of judging incidence relation are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
In another preferred embodiment (with reference to Fig. 5), this process also comprises step S4.Referring to Fig. 5 this another preferred embodiment is described in detail, wherein, in step S1, treatment facility 1 obtains a plurality of resource updates requests, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated; In step S2, treatment facility 1 obtains the resource identification corresponding with these a plurality of resource updates requests according to described a plurality of resource updates requests; In step S3, treatment facility 1 carries out concurrent processing according to described resource identification to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated; Its detailed process for simplicity's sake, is contained in this with way of reference with aforementioned identical with reference to the performed process in step S1, step S2 and step S3 for the treatment of facility 1 among the described embodiment of Fig. 5, does not give unnecessary details and do not do.
Particularly, when treatment facility 1 carries out concurrent processing to its a plurality of resource updates requests of obtaining in step S1 in step S3, in step S4, treatment facility 1 is realized the collision detection of this concurrent processing by the corresponding resource identification of these a plurality of resource updates requests represented resource node in resource tree is locked.Wherein, the collision detection that resource node is locked to carry out concurrent processing can prevent when a plurality of resource updates request of concurrent processing, identical resource is upgraded in different resource updates requests simultaneously, to guarantee the consistance of resource data, also be, only there is a resource operation request can obtain the lock of certain resource node at synchronization, and only have the resource operation request that obtains this lock just can be processed upgrading corresponding resource, and the resource operation request of failing to obtain this lock will be waited in line to have the resource operation request of this lock and discharge this lock.
At this, the mechanism of described lock can realize by semaphore, described semaphore is a kind of recordable data structure, it only can visit by the atomic operation of two standards, and these two operations are called as P, V operation, at this, resource of P control and display application, namely realize locking of resource, V operation represents to discharge a resource, namely realizes the release of resource.Wherein, described atomic operation (being called for short " primitive ") is the operation that can not interrupt on computer operation is carried out.
Wherein, the atomic operation of lock can not be guaranteed separately by software--must need the support of hardware.For example, on the x86 platform, CPU provides the means that the term of execution of instruction bus locked.A lead-in wire #HLOCK pin is arranged on the cpu chip, if add prefix " LOCK " an instruction front in the program of assembly language, through the later machine code of compilation CPU is dragged down the current potential of #HLOCK pin when carrying out this instruction, decontrol when lasting till this order fulfillment, thereby bus is pinned, other CPU just temporarily can not pass through the bus access internal memory on the same bus like this, has guaranteed the atomicity of this instruction in multi-processor environment.
In an example (with reference to Fig. 4), in myspace, two resource updates requests are respectively R1, R2, and R1, R2 corresponding resource node in resource tree is N1, N2, wherein, it is set membership between N1 and the N2, when treatment facility 1 in step S3 to R1, when R2 carries out concurrent processing, in step S4, treatment facility 1 is by the application programming interface (API) of this resource tree, for resource updates request R1 carries out the P operation to resource node N1, to realize resource node N1, and the subtree resource node N2 of this resource node, N4 locks, this moment, and resource updates request R1 renewable resources node N1 and the corresponding resource of subtree resource node thereof.Because the corresponding resource node N2 of resource updates request R2 is locked, treatment facility 1 is carried out V operation for R1 in step S4 so R2 need wait in line, to realize the release to resource node N1, N2, N4.When resource node N2 was unlocked, treatment facility 1 will lock to resource node N2 with reality for resource updates request R2 carries out the P operation to resource node N2 in step S4, this moment, and the corresponding resource of resource updates request R2 renewable resources node N2.
Those skilled in the art will be understood that the mode of above-mentioned collision detection is only for giving an example; the mode of other collision detection existing or that may occur from now on is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this at this with way of reference.
At this, by locking at the corresponding resource node of resource updates request, can prevent with corresponding other resource updates requests of the subtree resource node of this resource node or this resource node and this resource updates request by the while parallel processing, namely realize the collision detection of concurrent processing, thereby in the concurrent processing process, guarantee the consistance of resource data.
In another preferred embodiment (with reference to Fig. 5), this process also comprises step S5.In step S5, treatment facility 1 is according to the renewal of the resource corresponding with described a plurality of resource updates requests, sets up or upgrades described resource tree.Referring to Fig. 5 this another preferred embodiment is described in detail, wherein, in step S1, treatment facility 1 obtains a plurality of resource updates requests, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated; In step S2, treatment facility 1 obtains the resource identification corresponding with these a plurality of resource updates requests according to described a plurality of resource updates requests; In step S3, treatment facility 1 carries out concurrent processing according to described resource identification to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated; Its detailed process for simplicity's sake, is contained in this with way of reference with aforementioned identical with reference to the performed process in step S1, step S2 and step S3 for the treatment of facility 1 among the described embodiment of Fig. 5, does not give unnecessary details and do not do.
Particularly, in step S5, treatment facility 1 for example by Real-Time Monitoring its in step S3 to the processing of resource updates request, the resource that increases or delete to obtain it, and the application programming interface (API) by calling resource tree accordingly, in resource tree, increase or delete the corresponding resource node of this resource.Do not set up if detect this resource tree, this resource tree of initialization in advance then, and then upgrade resource node in this resource tree.
In one example (with reference to Fig. 4), in myspace, a resource updates request is the photo P1 under the photograph album A of deletion user U1, treatment facility 1 is processed this resource updates request so that photo P1 is deleted in step S3, in step S5, this resource request for the treatment of facility 1 Real-Time Monitoring is processed event, and the application programming interface (API) by calling resource tree, deletion resource node N4 in resource tree.
Those skilled in the art will be understood that the mode of above-mentioned foundation or renewal resource tree is only for giving an example; other foundation existing or that may occur from now on or the mode of upgrading resource tree are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
In a preferred embodiment again (with reference to Fig. 5), this process also comprises step S6.When treatment facility 1 does not obtain the corresponding resource identification of a plurality of resource updates requests in step S2, in step S6, treatment facility 1 carries out serial processing according to the sequencing of these a plurality of resource updates request submission times to these a plurality of resource updates requests, to upgrade a plurality of resources to be updated.Referring to Fig. 5 to this again a preferred embodiment be described in detail, wherein, in step S1, treatment facility 1 obtains a plurality of resource updates requests, be respectively applied to the request each resource to be updated in a plurality of resources to be updated is upgraded; In step S2, treatment facility 1 obtains the resource identification corresponding with these a plurality of resource updates requests according to described a plurality of resource updates requests; In step S3, treatment facility 1 carries out concurrent processing according to described resource identification to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated; Its detailed process for simplicity's sake, is contained in this with way of reference with aforementioned identical with reference to the performed process in step S1, step S2 and step S3 for the treatment of facility 1 among the described embodiment of Fig. 5, does not give unnecessary details and do not do.
Particularly, when treatment facility 1 did not get access to resource identification in step S2, in step S6, treatment facility 1 was according to the sequencing of a plurality of resource updates request submission times, successively serial processing is carried out in these resource updates requests, to upgrade the corresponding resource of these resource updates requests.
In an example, in myspace, three resource updates requests are respectively R1, R2 and R3.Wherein, R1 is for upgrading the photo P1 under the user U1 photograph album A, and R2 is for upgrading the photograph album A of user U1, and R3 is for upgrading the blog B of user U2, and these resource updates request submission times by first to after order be R2, R1, R3.When treatment facility 1 does not get access to this three corresponding resource identifications of resource updates request in step S2, in step S6, treatment facility 1 is according to the sequencing of the time of R1, R2, R3 submission, it is carried out serial processing, namely upgrade first the photograph album A of user U1, upgrade again the photo P1 under the user U1 photograph album A, the blog B of final updating user U2.
The mode that those skilled in the art will be understood that above-mentioned more new resources is only for for example, and the mode of other existing or more new resources that may occur from now on also should be included in the protection domain of the present invention, and be contained in this with way of reference as applicable to the present invention.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned example embodiment, and in the situation that does not deviate from spirit of the present invention or essential characteristic, can realize the present invention with other concrete form.Therefore, no matter from which point, all should regard embodiment as exemplary, and be nonrestrictive, scope of the present invention is limited by claims rather than above-mentioned explanation, therefore is intended to include in the present invention dropping on the implication that is equal to important document of claim and all changes in the scope.Any Reference numeral in the claim should be considered as limit related claim.In addition, obviously other unit or step do not got rid of in " comprising " word, and odd number is not got rid of plural number.A plurality of unit of stating in system's claim or device also can be realized by software or hardware by a unit or device.The first, the second word such as grade is used for representing title, and does not represent any specific order.

Claims (14)

1. computer implemented resource regeneration method, wherein, the method may further comprise the steps:
A obtains a plurality of resource updates requests, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated;
B obtains the resource identification corresponding with these a plurality of resource updates requests according to described a plurality of resource updates requests;
C carries out concurrent processing according to described resource identification to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated.
2. method according to claim 1, wherein, described step c also comprises:
C1 judges between described a plurality of resource updates request whether have incidence relation according to described resource identification;
C2 carries out concurrent processing according to whether having incidence relation between described a plurality of resource updates requests to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated.
3. method according to claim 2, wherein, described step C1 also comprises:
C11 carries out matching inquiry according to described resource identification in resource tree, to obtain the resource node corresponding with described resource identification;
C12 according to the preset judgment rule, judges between described a plurality of resource updates request whether have incidence relation according to described resource node.
4. method according to claim 3, wherein, described preset judgment rule comprise following at least each:
-described resource node is identical, then can judge between described a plurality of resource updates request to have incidence relation;
Have subordinate relation between the-described resource node, then can judge between described a plurality of resource updates request to have incidence relation.
5. according to claim 3 or 4 described methods, wherein, the method also comprises:
-when concurrent processing is carried out in described a plurality of resource updates requests, by the corresponding resource node of described a plurality of resource updates requests is locked, realize the collision detection of described concurrent processing.
6. each described method in 5 according to claim 3, wherein, the method also comprises:
-according to the renewal of described a plurality of resources to be updated, set up or upgrade described resource tree information.
7. each described method in 6 according to claim 1, wherein, the method comprises:
-when not obtaining described resource identification, the sequencing according to described a plurality of resource updates requests are submitted to carries out serial processing to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated.
8. resource updates equipment, wherein, this equipment comprises:
The acquisition request device is used for obtaining a plurality of resource updates requests, and the request of being respectively applied to is upgraded each resource to be updated in a plurality of resources to be updated;
The sign deriving means is used for according to described a plurality of resource updates requests, obtains the resource identification corresponding with these a plurality of resource updates requests;
The concurrent processing device is used for according to described resource identification, concurrent processing is carried out in described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated.
9. equipment according to claim 8, wherein, described concurrent processing device also comprises:
First concerns judging unit, is used for according to described resource identification, judges between described a plurality of resource updates request whether have incidence relation;
The resource updates unit is used for according to whether having incidence relation between described a plurality of resource updates requests, concurrent processing is carried out in described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated.
10. equipment according to claim 9, wherein, described first concerns that judging unit also comprises:
The node acquiring unit is used for according to described resource identification, carries out matching inquiry in resource tree, to obtain the resource node corresponding with described resource identification;
Second concerns judging unit, is used for according to described resource node, according to the preset judgment rule, judges between described a plurality of resource updates request whether have incidence relation.
11. equipment according to claim 10, wherein, described preset judgment rule comprise following at least each:
-described resource node is identical, then can judge between described a plurality of resource updates request to have incidence relation;
Have subordinate relation between the-described resource node, then can judge between described a plurality of resource updates request to have incidence relation.
12. according to claim 10 or 11 described equipment, wherein, this equipment also comprises:
Pick-up unit is used for by the corresponding resource node of described a plurality of resource updates requests is locked, realizing the collision detection of described concurrent processing when concurrent processing is carried out in described a plurality of resource updates requests.
13. each described equipment in 12 according to claim 10, wherein, this equipment also comprises:
The resource tree updating device is used for the renewal according to described a plurality of resources to be updated, sets up or upgrades described resource tree information.
14. each described equipment in 13 according to claim 8, wherein, this equipment comprises:
The serial processing device is used for not obtaining described resource identification, and the sequencing according to described a plurality of resource updates requests are submitted to carries out serial processing to described a plurality of resource updates requests, to upgrade described a plurality of resource to be updated.
CN201110329944.XA 2011-10-26 2011-10-26 A kind of concurrent resource regeneration method and equipment Active CN103077174B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110329944.XA CN103077174B (en) 2011-10-26 2011-10-26 A kind of concurrent resource regeneration method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110329944.XA CN103077174B (en) 2011-10-26 2011-10-26 A kind of concurrent resource regeneration method and equipment

Publications (2)

Publication Number Publication Date
CN103077174A true CN103077174A (en) 2013-05-01
CN103077174B CN103077174B (en) 2018-02-23

Family

ID=48153705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110329944.XA Active CN103077174B (en) 2011-10-26 2011-10-26 A kind of concurrent resource regeneration method and equipment

Country Status (1)

Country Link
CN (1) CN103077174B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679881A (en) * 2015-03-13 2015-06-03 华为技术有限公司 Concurrency control method and concurrency control device
CN104750849A (en) * 2015-04-13 2015-07-01 北京京东尚科信息技术有限公司 Method and system for maintaining tree structure-based directory relationship
CN108683521A (en) * 2018-04-20 2018-10-19 厦门爱陆通通信科技有限公司 A kind of device configuration management method based on serial link
CN112035501A (en) * 2020-09-01 2020-12-04 中国银行股份有限公司 User identifier updating method, device and equipment
WO2023165374A1 (en) * 2022-03-04 2023-09-07 阿里云计算有限公司 Database operation method and apparatus, and device and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1393793A (en) * 2001-06-22 2003-01-29 北京国之源软件技术有限公司 Method for using and updating network education resources
CN1777317A (en) * 2005-12-16 2006-05-24 北京金山软件有限公司 Method for realizing programme update of wireless terminal
CN101150534A (en) * 2006-09-20 2008-03-26 腾讯科技(深圳)有限公司 Method and system for obtaining updated image resources of contacts
CN101178651A (en) * 2007-12-21 2008-05-14 深圳市迅雷网络技术有限公司 Method, system and device for prompting software version update
CN101425095A (en) * 2008-12-12 2009-05-06 北大方正集团有限公司 Method and apparatus for managing content resource
CN101631141A (en) * 2009-08-19 2010-01-20 腾讯科技(深圳)有限公司 P2P system and network resource management method in same
CN101674629A (en) * 2009-09-22 2010-03-17 中兴通讯股份有限公司 Switching method and device of circuit data service
CN101860446A (en) * 2009-04-10 2010-10-13 华为终端有限公司 Method, terminal and server for informing network content update
CN102170479A (en) * 2011-05-21 2011-08-31 成都市华为赛门铁克科技有限公司 Updating method of Web buffer and updating device of Web buffer

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1393793A (en) * 2001-06-22 2003-01-29 北京国之源软件技术有限公司 Method for using and updating network education resources
CN1777317A (en) * 2005-12-16 2006-05-24 北京金山软件有限公司 Method for realizing programme update of wireless terminal
CN101150534A (en) * 2006-09-20 2008-03-26 腾讯科技(深圳)有限公司 Method and system for obtaining updated image resources of contacts
CN101178651A (en) * 2007-12-21 2008-05-14 深圳市迅雷网络技术有限公司 Method, system and device for prompting software version update
CN101425095A (en) * 2008-12-12 2009-05-06 北大方正集团有限公司 Method and apparatus for managing content resource
CN101860446A (en) * 2009-04-10 2010-10-13 华为终端有限公司 Method, terminal and server for informing network content update
CN101631141A (en) * 2009-08-19 2010-01-20 腾讯科技(深圳)有限公司 P2P system and network resource management method in same
CN101674629A (en) * 2009-09-22 2010-03-17 中兴通讯股份有限公司 Switching method and device of circuit data service
CN102170479A (en) * 2011-05-21 2011-08-31 成都市华为赛门铁克科技有限公司 Updating method of Web buffer and updating device of Web buffer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐彩云等: "移动事务并发控制技术的研究", 《计算机工程与设计》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679881A (en) * 2015-03-13 2015-06-03 华为技术有限公司 Concurrency control method and concurrency control device
CN104750849A (en) * 2015-04-13 2015-07-01 北京京东尚科信息技术有限公司 Method and system for maintaining tree structure-based directory relationship
CN104750849B (en) * 2015-04-13 2018-06-01 北京京东尚科信息技术有限公司 For safeguarding the method and system of the catalogue relation based on tree structure
CN108683521A (en) * 2018-04-20 2018-10-19 厦门爱陆通通信科技有限公司 A kind of device configuration management method based on serial link
CN112035501A (en) * 2020-09-01 2020-12-04 中国银行股份有限公司 User identifier updating method, device and equipment
CN112035501B (en) * 2020-09-01 2023-09-19 中国银行股份有限公司 User identifier updating method, device and equipment
WO2023165374A1 (en) * 2022-03-04 2023-09-07 阿里云计算有限公司 Database operation method and apparatus, and device and storage medium

Also Published As

Publication number Publication date
CN103077174B (en) 2018-02-23

Similar Documents

Publication Publication Date Title
JP6629697B2 (en) Method and apparatus for extracting a virtual machine image file
KR102317535B1 (en) Methods and systems for implementing data tracking with software development kits
CN102291416B (en) A kind of method and system of client and server bi-directional synchronization
CN105786808B (en) A kind of method and apparatus for distributed execution relationship type computations
CN102164186B (en) Method and system for realizing cloud search service
CN108846753B (en) Method and apparatus for processing data
CN104104717A (en) Inputting channel data statistical method and device
US10614621B2 (en) Method and apparatus for presenting information
CN108614976A (en) Authority configuring method, device and storage medium
CN103077174A (en) Concurrent resource updating method and equipment
CN104423982A (en) Request processing method and device
CN110020272B (en) Caching method and device and computer storage medium
CN111815738A (en) Map construction method and device
US20240103928A1 (en) Information processing method and apparatus for animation resource, device, medium and product
CN112580315A (en) Webpage table display method and device, terminal equipment and medium
CN115599386A (en) Code generation method, device, equipment and storage medium
CN113900907B (en) Mapping construction method and system
US20150039558A1 (en) Database management method, database system and medium
CN104503983A (en) Method and device for providing website certification data for search engine
CN108845864A (en) A kind of JVM rubbish recovering method and device based on spring frame
CN112860662A (en) Data blood relationship establishing method and device, computer equipment and storage medium
CN110619204A (en) Invitation code generation method and device, terminal equipment and storage medium
US9430301B2 (en) Distributed system for downloading internet information and a method thereof
CN110147350A (en) File search method, device, electronic equipment and storage medium
CN102323939A (en) Method and device for determining background information of rearranged elements in page rearranging process

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant