CN105117213A - Preprocessing method and apparatus based on release-subscription mode - Google Patents

Preprocessing method and apparatus based on release-subscription mode Download PDF

Info

Publication number
CN105117213A
CN105117213A CN201510458839.4A CN201510458839A CN105117213A CN 105117213 A CN105117213 A CN 105117213A CN 201510458839 A CN201510458839 A CN 201510458839A CN 105117213 A CN105117213 A CN 105117213A
Authority
CN
China
Prior art keywords
user
access
objects
rule
accesses
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
CN201510458839.4A
Other languages
Chinese (zh)
Other versions
CN105117213B (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.)
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Original Assignee
Qingdao Haier Intelligent Home Appliance 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 Qingdao Haier Intelligent Home Appliance Technology Co Ltd filed Critical Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Priority to CN201510458839.4A priority Critical patent/CN105117213B/en
Publication of CN105117213A publication Critical patent/CN105117213A/en
Application granted granted Critical
Publication of CN105117213B publication Critical patent/CN105117213B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a preprocessing method and apparatus based on a release-subscription mode, so as to solve the problem of relatively low response efficiency of an application system. The preprocessing method based on the release-subscription mode comprises: when learning that a user accesses another object, obtaining a user access behavior rule; determining, according to the obtained user access behavior rule, whether the user will access the object after accessing the another object; and when it is determined that the user will use the object after accessing the another object, performing preprocessing for subsequent access of the user, and caching a preprocessing result obtained through the preprocessing. The scheme improves the response efficiency of an application system.

Description

A kind of preprocess method based on Publish-subscribe pattern and device
Technical field
The present invention relates to communication technical field, particularly relate to a kind of preprocess method based on Publish-subscribe pattern and device.
Background technology
At present, in software architecture, Publish-subscribe (publish – subscribe) is a kind of pattern of message propagation, and message can not directly be sent to specific recipient (subscriber) by the sender (publisher) of message.But the message issued is pressed tagsort, without the need to having gained some understanding to subscriber's (if any), same, subscriber can express the interest to one or more classification, receive only interested message, without the need to having gained some understanding to publisher, in publish/subscribe model, subscriber receives only all subsets given out information usually.At present, main exist following two kinds of Publish-subscribe modes: access cache mechanism first, and user uses during this systemic-function and carries out buffer memory to result first time, and buffered results before utilizing when user reuses, improves response speed; Pretreatment mode during system idles, when system relative free, (being generally morning) carries out pre-service to systemic-function, and result is carried out buffer memory.Wherein, for access cache is machine-processed first, system responses can be slow when accessing first for user, can improve response speed when just again accessing.And pretreated mode during system idles, data cached be for each user time, then need to utilize the result of system idles all users of buffer memory in advance, so then can take larger spatial cache, the purpose of buffer memory is not strong.
Summary of the invention
The invention provides a kind of preprocess method based on Publish-subscribe pattern and device, for solving the lower problem of current application system response efficiency.
According to an aspect of the present invention, provide a kind of preprocess method based on Publish-subscribe pattern, comprising: after knowing that user accesses other objects, obtain the access rule of conduct of user; Determine whether user can access this object after other objects of access according to the user access activity rule got; Judging that user is after other objects of access, when can use this object, pre-service is carried out in the access follow-up for user, and the pre-processed results that buffer memory pre-service obtains.
Wherein, above-mentioned access rule of conduct comprises: user, after a certain object of access, accesses the probability value of other objects.
Further, said method also comprises: before obtaining the access rule of conduct of user, set up user access activity rule base, by user to the Visitor Logs of each object in user access activity rule base, and calculate user after access one appointed object, access the probability value of another appointed object.
Wherein, determine whether user can access this object after other objects of access according to the user access activity rule got, comprise: in user access activity rule, when the probability of accessing this object after user accesses other objects is greater than predetermined threshold value, determine that user can access this object after other objects of access, in user access activity rule, when the probability of accessing this object after user accesses other objects is not more than predetermined threshold value, determine that user is after other objects of access, can not access this object.
Further, said method also comprises: after user accesses this object, uses pre-processed results response user, and informs that other object users access the message of this object.
According to another aspect of the present invention, provide a kind of pretreatment unit based on Publish-subscribe pattern, comprising: acquisition module, for after knowing that user accesses other objects, obtain the access rule of conduct of user; Judge module, for determining according to the user access activity rule got whether user can access this object after other objects of access; Pretreatment module, for judging that user is after other objects of access, when can use this object, pre-service is being carried out in the access follow-up for user, and the pre-processed results that buffer memory pre-service obtains.
Wherein, above-mentioned access rule of conduct comprises: user, after a certain object of access, accesses the probability value of other objects.
Further, said apparatus also comprises: rule base sets up module, for obtain user access rule of conduct before, set up user access activity rule base, by user to the Visitor Logs of each object in user access activity rule base, and calculate user after access one appointed object, access the probability value of another appointed object.
Carry out a step, above-mentioned judge module specifically for: in user access activity rule, when the probability of accessing this object after user accesses other objects is greater than predetermined threshold value, determine that user can access this object after other objects of access, in user access activity rule, when the probability of accessing this object after user accesses other objects is not more than predetermined threshold value, determine that user is after other objects of access, can not access this object.
Further, said apparatus also comprises: after user accesses this object, uses pre-processed results response user, and informs that other object users access the message of this object.
The scheme of the embodiment of the present invention, determines the access trend of user according to the access rule of conduct of user, and accesses trend according to the user determined and carry out pre-service, improves the response efficiency of system, reduces the coupling between system.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of the preprocess method based on Publish-subscribe pattern that the embodiment of the present invention 1 provides;
Fig. 2 is the schematic diagram of the pretreating scheme of the embodiment of the present invention 2;
Fig. 3 is the structured flowchart of the pretreatment unit based on Publish-subscribe pattern that the embodiment of the present invention 3 provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under the prerequisite of not making creative work, all belongs to the scope of protection of the invention.
Embodiment 1
Present embodiments provide a kind of preprocess method based on Publish-subscribe pattern, the method specifically can be applied in the system of Publish-subscribe formula, Fig. 1 is the process flow diagram of the preprocess method based on Publish-subscribe pattern that the embodiment of the present invention 1 provides, as shown in Figure 1, the method comprises the steps:
Step 101: after knowing that user accesses other objects, obtains the access rule of conduct of user;
Wherein, this access rule of conduct comprises: user, after a certain object of access, accesses the probability value of other objects.Based on this, said method also comprises: execution step 101 before, set up user access activity rule base, by user to the Visitor Logs of each object in user access activity rule base, and calculate user after access one appointed object, access the probability value of another appointed object.
Wherein, object in the present embodiment, it can be specifically each function in application program, it can be such as the some concrete function in Publish-subscribe system, due to some functions in software systems, because its business complexity is higher, cause system response time longer, adopt pretreated mode can the reduction system response time in the present embodiment.
Step 102: determine whether user can access this object after other objects of access according to the user access activity rule got;
Wherein, determine whether user can access this object after other objects of access, comprising according to the user access activity rule got:
In user access activity rule, when the probability of accessing this object after user accesses other objects is greater than predetermined threshold value, determine that user can access this object after other objects of access, in user access activity rule, when the probability of accessing this object after user accesses other objects is not more than predetermined threshold value, determine that user is after other objects of access, can not access this object.
Step 103: judging that user is after other objects of access, when can use this object, pre-service is carried out in the access follow-up for user, and the pre-processed results that buffer memory pre-service obtains.
Further, after execution of step 103, said method can also comprise: after user accesses this object, uses pre-processed results response user, and informs that other object users access the message of this object.
Embodiment 2
The present embodiment is further elaborated scheme provided by the invention by open more ins and outs.
Fig. 2 is the schematic diagram of the pretreating scheme of the embodiment of the present invention 2, and as shown in Figure 2, the program comprises the steps:
User in time point 1 access function for the moment, be responsible for being sent to message system by the message of user's access function one by function one;
When function two and function three have subscribed user's access function one message in advance, function two, function three can receive the message of user's access function one;
Whether, after function two, function three receive message, calling party action rule warehouse, obtains the access rule of conduct of user, according to can using function two, function three after the access behavior rule judgment user of user;
Function three can use this function according to user after user behavior rule judgment, then carry out pre-service, and caching process result;
User is when time point 2 entered function three, and the pre-processed results response user before function three directly uses asks.
For the ease of the understanding of reader to said process, below with a concrete example, come to explain orally further:
If basis is before to the statistics of user's Access Events, user A is recorded after have accessed attendance management function in user access activity rule base, the probability of 80% can go access performance management function, the probability of 15% can go to access financial management function, 5% probability go to access other functions.
Active user accesses attendance management function, the message that user is just accessed attendance management function by attendance management function informs the performance management function that have subscribed this message in advance, performance management function is after receiving user and accessing the message of attendance management, by the user access activity rule got from user access activity rule base, compare with the threshold value pre-set, the threshold value such as pre-set, be 50%, determine according to 80%>50%, user can access performance management function, then performance management function carry out pre-service, and buffer memory pre-processed results.
Wherein, user behavior regular data stores and adopts Key-Value form: the form of Key adopts: UserId+ functional identity, the data type of Value is Hash table, such as, function one-80%, function one-15%, the probability of expression user access function one after having accessed an appointed function is 80%, the probability of access function two is 15%, and in addition, user behavior rule can upgrade with the access change of user.
Embodiment 3
Present embodiments provide a kind of pretreatment unit based on Publish-subscribe pattern, Fig. 3 is the structured flowchart of the pretreatment unit based on Publish-subscribe pattern that the embodiment of the present invention 3 provides, and as shown in Figure 3, this device 30 comprises following ingredient:
Acquisition module 31, for after knowing that user accesses other objects, obtains the access rule of conduct of user;
Judge module 32, for determining according to the user access activity rule got whether user can access this object after other objects of access;
Pretreatment module 33, for judging that user is after other objects of access, when can use this object, pre-service is being carried out in the access follow-up for user, and the pre-processed results that buffer memory pre-service obtains.
Wherein, above-mentioned access rule of conduct comprises: user, after a certain object of access, accesses the probability value of other objects.
Further, said apparatus also comprises: rule base sets up module, for after knowing that user accesses other objects, before obtaining the access rule of conduct of user, set up user access activity rule base, by user to the Visitor Logs of each object in user access activity rule base, and calculate user after access one appointed object, access the probability value of another appointed object.
Wherein, above-mentioned judge module specifically for: in user access activity rule, when the probability of accessing this object after user accesses other objects is greater than predetermined threshold value, determine that user can access this object after other objects of access, in user access activity rule, when the probability of accessing this object after user accesses other objects is not more than predetermined threshold value, determine that user is after other objects of access, can not access this object.
Further, said apparatus also comprises: after user accesses this object, uses pre-processed results response user, and informs that other object users access the message of this object.
The scheme of the embodiment of the present invention, the access trend of user is determined according to the access rule of conduct of user, and access trend according to prediction user out and carry out pre-service, improve the response efficiency of system, reduce the coupling between system, and, even if which lost efficacy, also can not the original function of influential system.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.

Claims (10)

1. based on a preprocess method for Publish-subscribe pattern, it is characterized in that, comprising:
After knowing that user accesses other objects, obtain the access rule of conduct of user;
Determine whether described user can access this object after access other objects described according to the user access activity rule got;
Judging that described user is after access other objects described, when can use this object, pre-service is carried out in the access follow-up for described user, and the pre-processed results that buffer memory pre-service obtains.
2. method according to claim 1, is characterized in that, described access rule of conduct comprises:
User, after a certain object of access, accesses the probability of other objects.
3. method according to claim 1, is characterized in that, described method also comprises:
Before obtaining the access rule of conduct of user, set up user access activity rule base, by user to the Visitor Logs of each object in described user access activity rule base, and calculate user after access one appointed object, access the probability of another appointed object.
4. according to the method in claim 2 or 3, it is characterized in that, determine whether user can access this object after access other objects described, comprising according to the user access activity rule got:
In described user access activity rule, when the probability of accessing this object after user accesses other objects described is greater than predetermined threshold value, determine that user can access this object after access other objects described, in described user access activity rule, when the probability of accessing this object after user accesses other objects described is not more than described predetermined threshold value, determine that user is after access other objects described, can not access this object.
5. the method according to claim 1-3 any one, is characterized in that, described method also comprises:
After user accesses this object, use described pre-processed results to respond described user, and inform that other object users access the message of this object.
6. based on a pretreatment unit for Publish-subscribe pattern, it is characterized in that, comprising:
Acquisition module, for after knowing that user accesses other objects, obtains the access rule of conduct of user;
Judge module, for determining according to the user access activity rule got whether described user can access this object after access other objects described;
Pretreatment module, for judging that described user is after access other objects described, when can use this object, pre-service is being carried out in the access follow-up for described user, and the pre-processed results that buffer memory pre-service obtains.
7. device according to claim 6, is characterized in that, described access rule of conduct comprises:
User, after a certain object of access, accesses the probability of other objects.
8. device according to claim 6, is characterized in that, described device also comprises:
Rule base sets up module, for obtain user access rule of conduct before, set up user access activity rule base, by user to the Visitor Logs of each object in described user access activity rule base, and calculate user after access one appointed object, access the probability of another appointed object.
9. the device according to claim 7 or 8, is characterized in that, described judge module specifically for:
In described user access activity rule, when the probability of accessing this object after user accesses other objects described is greater than predetermined threshold value, determine that user can access this object after access other objects described, in described user access activity rule, when the probability of accessing this object after user accesses other objects described is not more than described predetermined threshold value, determine that user is after access other objects described, can not access this object.
10. the device according to claim 6 to 8 any one, is characterized in that, described device also comprises:
After user accesses this object, use described pre-processed results to respond user, and inform that other object users access the message of this object.
CN201510458839.4A 2015-07-30 2015-07-30 Pre-processing method and device based on publish-subscribe mode Active CN105117213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510458839.4A CN105117213B (en) 2015-07-30 2015-07-30 Pre-processing method and device based on publish-subscribe mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510458839.4A CN105117213B (en) 2015-07-30 2015-07-30 Pre-processing method and device based on publish-subscribe mode

Publications (2)

Publication Number Publication Date
CN105117213A true CN105117213A (en) 2015-12-02
CN105117213B CN105117213B (en) 2021-10-19

Family

ID=54665215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510458839.4A Active CN105117213B (en) 2015-07-30 2015-07-30 Pre-processing method and device based on publish-subscribe mode

Country Status (1)

Country Link
CN (1) CN105117213B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552735A (en) * 2008-03-31 2009-10-07 上海宝信软件股份有限公司 Pluggable information bus device based on subscribing mode and realizing method thereof
CN102222098A (en) * 2011-06-20 2011-10-19 北京邮电大学 Method and system for pre-fetching webpage
CN102254004A (en) * 2011-07-14 2011-11-23 北京邮电大学 Method and system for modeling Web in weblog excavation
CN102446222A (en) * 2011-12-22 2012-05-09 华为技术有限公司 Method, device and system of webpage content preloading
US8639595B1 (en) * 2011-03-10 2014-01-28 Amazon Technologies, Inc. Statistically cost-following accounting model for dedicated resources
CN104809254A (en) * 2015-05-19 2015-07-29 郑州悉知信息技术有限公司 Data query method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552735A (en) * 2008-03-31 2009-10-07 上海宝信软件股份有限公司 Pluggable information bus device based on subscribing mode and realizing method thereof
US8639595B1 (en) * 2011-03-10 2014-01-28 Amazon Technologies, Inc. Statistically cost-following accounting model for dedicated resources
CN102222098A (en) * 2011-06-20 2011-10-19 北京邮电大学 Method and system for pre-fetching webpage
CN102254004A (en) * 2011-07-14 2011-11-23 北京邮电大学 Method and system for modeling Web in weblog excavation
CN102446222A (en) * 2011-12-22 2012-05-09 华为技术有限公司 Method, device and system of webpage content preloading
CN104809254A (en) * 2015-05-19 2015-07-29 郑州悉知信息技术有限公司 Data query method and device

Also Published As

Publication number Publication date
CN105117213B (en) 2021-10-19

Similar Documents

Publication Publication Date Title
CN104268055B (en) The monitoring method and device of a kind of program exception
CN113010818B (en) Access current limiting method, device, electronic equipment and storage medium
CN107480277B (en) Method and device for collecting website logs
CN107678844B (en) Breakpoint intelligent distribution method, electronic device and computer readable storage medium
CN107491320A (en) Loading method and device based on mixed mode Mobile solution
CN103297291A (en) Method and system for monitoring website real-time statuses
CN109981715B (en) Session management method and device
CN103605549A (en) Interface exit display method and device
CN114826749A (en) Interface access control method, device and medium
CN104753922A (en) Method for pre-loading, server side, client and system
CN103019813B (en) Method for obtaining interactive strength of SaaS-based interactive program
CN107241788A (en) The power consumption control method and device of wearable device
CN111767558A (en) Data access monitoring method, device and system
CN105117213A (en) Preprocessing method and apparatus based on release-subscription mode
CN105677033A (en) Information pushing method and system
CN112260933B (en) Communication method, communication device, electronic equipment and medium
CN113434423A (en) Interface test method and device
CN114285657A (en) Firewall security policy change verification method and device
CN104346228A (en) Application program sharing method and terminal
CN109547563B (en) Message push processing method and device, storage medium and server
CN109034768B (en) Financial reconciliation method, apparatus, computer device and storage medium
CN103905489B (en) Network information service processing method and system
CN102571620B (en) Method and device for carrying out webpage communication, and webpage server
CN111343172A (en) Network access authority dynamic processing method and device
CN111400060A (en) Equipment linkage method, device, server and medium

Legal Events

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