CN107783849A - Event-handling method and client - Google Patents

Event-handling method and client Download PDF

Info

Publication number
CN107783849A
CN107783849A CN201710890729.4A CN201710890729A CN107783849A CN 107783849 A CN107783849 A CN 107783849A CN 201710890729 A CN201710890729 A CN 201710890729A CN 107783849 A CN107783849 A CN 107783849A
Authority
CN
China
Prior art keywords
event
component
service component
message
message distribution
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
CN201710890729.4A
Other languages
Chinese (zh)
Other versions
CN107783849B (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.)
Xiushan county xiaocan information technology Co.,Ltd.
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710890729.4A priority Critical patent/CN107783849B/en
Publication of CN107783849A publication Critical patent/CN107783849A/en
Application granted granted Critical
Publication of CN107783849B publication Critical patent/CN107783849B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a kind of event-handling method and client, method are applied to client, and client includes message distribution component and multiple Service Component.Method includes:Target service component is associated with message distribution component, the target service component is received the message of message distribution component transmission;The target service component is pass-through to message distribution component when listening to event, by the event;When message distribution component receives the event, notification message corresponding with the event is sent to associated each Service Component;Receive the notification message each Service Component judge in the notification message whether to include with each associated identification information, if including handling event corresponding to the notification message.In this way, realizing the decoupling of Service Component, development efficiency is improved.

Description

Event-handling method and client
Technical field
The present invention relates to technical field of software development, in particular to a kind of event-handling method and client.
Background technology
At present, in software development process, conventional development approach is that different business is developed for different business functions Module, then multiple different business modules are directly coupled together, form an application program (Application, APP).
However, with the superposition of business function and increasing for functional module, the coupling level between module can be caused more next It is deeper.In later development, if necessary to when some function is removed, will be unable to directly unload module corresponding to the function, When needing to be updated the function, only module corresponding to the function can not also be debugged, but needed to whole application Program is debugged, on the one hand, easily error, on the other hand, development efficiency is low.
The content of the invention
In view of this, it is an object of the invention to provide a kind of event-handling method and client, to improve above mentioned problem.
In order to achieve the above object, the embodiment of the present invention provides a kind of event-handling method, applied to including message distribution The client of component and multiple Service Component, methods described include:
Target service component is associated with the message distribution component, the target service component is received institute State the message of message distribution component transmission;
The target service component is pass-through to the message distribution component when listening to event, by the event;
The message distribution component is sent and the thing after the event is received to associated each Service Component Notification message corresponding to part, to notify corresponding Service Component to handle the event, the notification message includes and institute State the associated identification information of target service component;
Receive the notification message each Service Component judge in the notification message whether to include with it is each associated Identification information, if including handling event corresponding to the notification message.
Alternatively, in the above-mentioned methods, the message distribution component includes a default aggregate list;
By the target service component step associated with the message distribution component, including:
Target service component is loaded onto in the aggregate list;
The message distribution component sends the step of notification message corresponding with the event to associated each Service Component Suddenly, including:
Each Service Component of the message distribution component into the aggregate list sends notice corresponding with the event Message.
Alternatively, in the above-mentioned methods, methods described also includes:
Specified Service Component is removed from the aggregate list, to release the Service Component and the message distribution group The association of part, so that the Service Component can not receive the notification message that the message distribution component is sent.
Alternatively, in the above-mentioned methods, the target service component is when listening to event, the event transparent transmission that will be listened to The step of to the message distribution component, including:
The target service component calls broadcast event instruction that the event is pass-through into the message when listening to event Distributed components.
Alternatively, in the above-mentioned methods, the step of handling event corresponding to the notification message, including:
The identification information included based on the notification message, corresponding functional module is called to corresponding to the notification message Event is handled.
The embodiment of the present invention also provides a kind of client, and the client includes message distribution component, multiple Service Component And relating module;
The relating module, for target service component is associated with the message distribution component, make the target industry Business component can receive the message that the message distribution component is sent;
The target service component is used for when listening to event, and the event is pass-through into the message distribution component;
The message distribution component is used for after the event is received, to associated each Service Component transmission and institute Notification message corresponding to event is stated, to notify corresponding Service Component to handle the event, the notification message includes The identification information associated with the target service component;
Each Service Component for receiving the notification message is used to judge whether include and respective phase in the notification message The identification information of association, if including handling event corresponding to the notification message.
Alternatively, in above-mentioned client, the message distribution component includes a default aggregate list;
The target service component is loaded onto in the aggregate list by the relating module, by the target service group Part is associated with the message distribution component;
Each Service Component of the message distribution component into the aggregate list sends notice corresponding with the event Message, notification message corresponding with the event is sent so as to realize to associated each Service Component.
Alternatively, in above-mentioned client, the client also includes:
Association releases module, for specified Service Component to be removed from the aggregate list, to release the service groups Part associates with the message distribution component, so that the Service Component can not receive the logical of the message distribution component transmission Know message.
Alternatively, in above-mentioned client, the target service component is when listening to event, by calling broadcast event The event is pass-through to the message distribution component by instruction.
The embodiment of the present invention also provides a kind of computer-readable recording medium, is stored thereon with computer instruction, the meter The instruction of calculation machine realizes event-handling method provided in an embodiment of the present invention when being performed.
Event-handling method provided in an embodiment of the present invention and client, by target service component and message distribution component phase Association, target service component is set to receive the message of message distribution component transmission.The thing that target service component will listen to Part is pass-through to message distribution component, and message distribution component is sent when receiving the event to associated each Service Component Notification message corresponding with the event, to notify corresponding Service Component to handle the event.Receive notification message Each Service Component judge in the notification message whether to include with each associated identification information, if including disappearing to the notice Event is handled corresponding to breath.By above-mentioned design, the decoupling of Service Component is realized, improves development efficiency.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate Appended accompanying drawing elaborates.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by embodiment it is required use it is attached Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, therefore be not construed as pair The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to this A little accompanying drawings obtain other related accompanying drawings.
Fig. 1 is a kind of block diagram of electric terminal provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet of event-handling method provided in an embodiment of the present invention;
Fig. 3 is a kind of functional block diagram of client provided in an embodiment of the present invention;
Fig. 4 is the another functional block diagram of client provided in an embodiment of the present invention.
Icon:100- electric terminals;110- memories;120- processors;200- clients;210- message distribution components; 220- Service Component;230- relating modules;240- associations release module.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.The present invention implementation being generally described and illustrated herein in the accompanying drawings The component of example can be configured to arrange and design with a variety of.
Therefore, below the detailed description of the embodiments of the invention to providing in the accompanying drawings be not intended to limit it is claimed The scope of the present invention, but be merely representative of the present invention selected embodiment.It is common based on the embodiment in the present invention, this area The every other embodiment that technical staff is obtained under the premise of creative work is not made, belong to the model that the present invention protects Enclose.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi It is defined, then it further need not be defined and explained in subsequent accompanying drawing in individual accompanying drawing.
As shown in figure 1, Fig. 1 is a kind of block diagram of electric terminal 100 provided in an embodiment of the present invention.The electronics Terminal 100 includes client 200, memory 110 and processor 120.
Mutually directly or indirectly it is electrically connected between the memory 110, processor 120 and each element, to realize number According to transmission or interaction.Wherein, the client 200 includes at least one can be stored in the memory 110 or with solid The form of part (Firmware) is solidificated in soft in the operating system (Operating System, OS) of the electric terminal 100 Part functional module.
In the present embodiment, the electric terminal 100 may be, but not limited to, personal computer (Personal Computer, PC) smart mobile phone, tablet personal computer etc..The client 200 is can to install and operate in the electric terminal APP in 100, the electric terminal 100 can be the terminals based on android system.
The memory 110 may be, but not limited to, random access memory (Random Access Memory, RAM), read-only storage (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..
The processor 120 can be a kind of IC chip, and it has signal handling capacity.The processor 120 Can also be general processor, e.g., central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;Can also be digital signal processor (Central Processing Unit, CPU), Application specific integrated circuit (ASIC), field programmable gate array (FPGA) either other PLDs, discrete gate or crystalline substance Body pipe logical device, discrete hardware components;The processor 120 can also be microprocessor or any conventional processor.Institute Each method, step and logic diagram disclosed in the embodiment of the present invention can be realized or perform by stating processor 120.
It should be appreciated that Fig. 1 shown in be only electric terminal 100 signal, electric terminal 100 can have than shown in Fig. 1 more More or less component, it is possible to have with configuration entirely different shown in Fig. 1.Each component shown in Fig. 1 can be with software, hardware Or its combination is realized.
Study and find through inventor, existing software development, typically develop corresponding business for different business functions Component 220, then multiple different Service Component 220 are directly coupled together, to form an APP.When a Service Component 220 when including multiple functional modules, and the plurality of functional module is also to be directly coupled together.Wherein, the direct-coupling is Refer to, when listening to event, directly in the related service logic of the event inter-process, in this way, multiple Service Component 220 it Between, formed between the functional module included by each Service Component 220 is a network structure.
This coupled modes can cause code administration difficult, for example, in development late stage, if needing to some Service Component 220 are updated (or unloading), close due to being coupled between each Service Component 220, are very easy to bug occur, debug When be also required to debug whole APP, efficiency is very low.And for example, if needing to some function in a certain Service Component 220 Module is updated, it is also desirable to whole APP is carried out to change and debug accordingly, it is easy to change mistake, development efficiency occur It is low.
Enter according to a kind of uncoupled mode of each functional module by each Service Component 220 and Service Component 220 Row exploitation, then can improve development efficiency, also allow for the maintenance of code.
As shown in Fig. 2 it is a kind of event-handling method provided in an embodiment of the present invention, applied to the client shown in Fig. 1 200, the client 200 includes message distribution component 210 and multiple Service Component 220.Below in conjunction with Fig. 2 to the thing Part processing method elaborates.
Step S110, target service component is associated with the message distribution component 210, make the target service component The message that the message distribution component 210 is sent can be received.
Wherein, the target service component refers in the multiple Service Component 220 with being currently needed for the business work(used Service Component 220 corresponding to energy.The message distribution component 210 can be based on event bus (EventBus) and realize that event is total Line is a kind of publish of optimization (publisher)/subscribe (subscriber) messaging bus, simplify in APP each component it Between, the communication between component and background thread.
During implementation, the Service Component 220 corresponding to the business function that is currently needed for using can be by the Service Component 220 is associated with the message distribution component 210., can be by the Service Component if no longer needing to use the Service Component 220 220 with the disassociation of message distribution component 210.
In the present embodiment, an aggregate list modelList, the collection can have been defined in the message distribution component 210 List modelList is closed to be used to safeguard the Service Component 220 for being currently needed for using.In detail, the step S110 can pass through Following sub-step is realized:
Target service component is loaded onto in the aggregate list.
Correspondingly, the event-handling method can also comprise the following steps:
Specified Service Component 220 is removed from the aggregate list, to release the Service Component 220 and the message The association of distributed components 210, so that the Service Component 220 can not receive the notice that the message distribution component 210 is sent Message.
In the present embodiment, the message distribution component 210 includes a stowage loadModel () and discharging method unloadModel().Wherein, stowage loadModel () is by calling the add in the aggregate list modelList () method, specified Service Component 220 (e.g., target service component) is added in the aggregate list modelList.Unload Support method unloadModel () is by calling remove () method in the aggregate list modelList, by specified industry Business component 220 (e.g., target service component) removes from the aggregate list modelList.
Step S120, the target service component are pass-through to the message distribution when listening to event, by the event Component 210.
By taking android system as an example, event type includes key-press event and screen touch event, can pass through action listener Device is monitored.
It should be noted that the event handling based on monitor, is usually directed to three class objects:First, event source (Event Source), for producing event, event source is typically the various assemblies (e.g., button, window etc.) on Service Component 220;The Two, event (Event), the specifying information of the particular event occurred on package interface component, if event sniffer needs The information that event occurs on interface assembly is obtained, is typically transmitted by event object;3rd, event sniffer (Event Listener), for monitoring the event of event source generation, and corresponding processing is done to different events.
In the present embodiment, when user clicks on corresponding event source in the target service component, (e.g., button, screen touch Point etc.) when, the event sniffer in the target service component can then listen to corresponding event, and the event is pass-through into institute State message distribution component 210.
Wherein, transparent transmission refers to only transmit event, event is not handled.In the present embodiment, the step S120 can be achieved by the steps of:
The target service component calls broadcast event instruction that the event is pass-through into the message when listening to event Distributed components 210.
That is, the target service component can be by calling broadcastEvent (ClickEvent) methods by present face Plate is pass-through to the message distribution component 210.
Step S130, the message distribution component 210 is when receiving the event, to associated each Service Component 220 send notification message corresponding with the event, to notify corresponding Service Component 220 to handle the event.
Wherein, the notification message includes the identification information associated with the target service component.In other words, it is based on The identification information in the notification message, event source is associated with the service logic for handling the event source.
Alternatively, in the present embodiment, the step S130 can be achieved by the steps of:
Each Service Component 220 of the message distribution component 210 into the aggregate list sends corresponding with the event Notification message.
In the present embodiment, because aggregate list modelList is used to carry out the Service Component 220 for being currently needed for using Safeguard, including be the Service Component 220 that is currently needed for using all the time.Thus, as long as will notice corresponding with the event Message is sent to each Service Component 220 in the aggregate list modelList, then the target service component can also connect The notification message is received, then event corresponding to the notification message is handled.
And when no longer needing to use target service component, as long as it is removed from aggregate list modelList, then without Method reuses function corresponding to the target service component.
Step S140, each Service Component 220 for receiving the notification message judge whether include in the notification message With each associated identification information, if including handling event corresponding to the notification message.
In the present embodiment, each Service Component 220 in the aggregate list modelList can receive described logical Know message, each Service Component 220 after the notification message is received, detect whether include in the notification message with Oneself associated identification information, if including, it is determined that the notification message should be handled by oneself, and carry out follow-up processing Action.It if not including, can determine that the notification message is not belonging to the process range of oneself, follow-up processing will not be carried out again Action.
Alternatively, in the present embodiment, in step S140, the step of processing event corresponding to the notification message It can be realized by following sub-step:
The identification information included based on the notification message, corresponding functional module is called to corresponding to the notification message Event is handled.
Wherein, corresponding functional module refers to and the function mould corresponding to the service logic of the identification information match Block.
It follows that by the distribution of message distribution component 210, each functional module in Service Component 220 is realized Between it is decoupling, if needing a certain functional module of renewal (or unloading), then need to only delete the function in Service Component 220 Module, without being adjusted to other module or components.
A kind of application scenarios of the event-handling method of the present embodiment offer are given below, it is assumed that the APP is live APP, the target service component are the present panels in the live APP.
When needing to use present function, present panel is loaded into modelList by loadModel functions, such as This, the notification message that present panel will can receive message distribution component 210 and send.When present function need not be used, Only unloadModel () method need to be called to remove present panel from modelList, in this way, present panel will be unable to receive The notification message sent to message distribution component 210, user also just can no longer use present function.
By taking the display of present panel and hidden function as an example, the present panel is provided with corresponding the Show Button and hidden Hide, for present Display panel described in user's control and hide.Based on event-handling method provided in an embodiment of the present invention, it is not necessary to The service logic that present panel is shown and hidden is realized in the monitoring event of present panel, but is entered in monitoring event A transparent transmission is gone.
That is, when present panel listens to user and clicks on the Show Button (or hiding button), by the click the Show Button The event of (or clicking on hiding button) is pass-through to the message distribution component 210, and the meeting of message distribution component 210 will be with the thing Notification message corresponding to part is sent to each Service Component 220 in modelList, because modelList includes present face This Service Component 220 of plate, thus, present panel can also receive the notification message.
When present panel receives the notification message, the notice can be determined based on the identification information in the notification message Event corresponding to message should by oneself handle, then according to the identification information determine handle the notification message corresponding to event work( Can module be present panels show module (or present panel hidden module), and call the present panels show module (or present Panel hidden module) event is handled.And other Service Component in the modelList in addition to present panel 220 will not be handled the notification message.
In this way, it can be achieved decoupling between each functional module in present panel.
In actual applications, some business function, which may need multiple Service Component 220 to cooperate, to realize, because And in the present embodiment, the target service component can be one or two or more.
When target service component is one, Service Component 220 can be realized using method provided in an embodiment of the present invention It is decoupling between interior each functional module;When target service component is two or more, use is provided in an embodiment of the present invention Method can realize it is decoupling between each Service Component 220, so as to improve development efficiency.
As shown in figure 3, the embodiment of the present invention also provides a kind of client 200, the client 200 includes message distribution group Part 210, multiple Service Component 220 (one is only shown in Fig. 3) and relating module 230.
The relating module 230 be used for by target service component it is associated with the message distribution component 210, make the mesh Mark Service Component can receive the message that the message distribution component 210 is sent.
In the present embodiment, the description as described in the relating module 230 is specifically referred to step S110 as shown in Fig. 2 It is described in detail, that is, the step S110 can be performed by the relating module 230.
Function on the message distribution component 210 and each Service Component 220 is specifically referred in the above to phase Close the detailed description of step.
Alternatively, as shown in figure 4, the client 200, which can also include association, releases module 240.
The association releases module 240 and is used to remove specified Service Component 220 from the aggregate list, to release The Service Component 220 associates with the message distribution component 210, so that the Service Component 220 can not receive described disappear Cease the notification message that distributed components 210 are sent.
In the present embodiment, the description as described in the association releases module 240 is specifically referred in the above to correlation The detailed description of step.
The embodiment of the present invention also provides a kind of computer-readable recording medium, is stored thereon with computer instruction, the meter The instruction of calculation machine realizes event-handling method provided in an embodiment of the present invention when being performed.
In summary, event-handling method provided in an embodiment of the present invention and client 200, by target service component with disappearing Ceasing distributed components 210 is associated, and target service component is received the message of the transmission of message distribution component 210.Target industry Business component the event listened to is pass-through to message distribution component 210, message distribution component 210 when receiving the event, to Associated each Service Component 220 sends notification message corresponding with the event, to notify corresponding Service Component 220 to this Event is handled.Each Service Component 220 for receiving notification message judges whether include and each auto-correlation in the notification message The identification information of connection, if including handling event corresponding to the notification message.By above-mentioned design, business is realized Component 220 it is decoupling, improve development efficiency.
In several embodiments provided herein, it should be understood that disclosed client and method, can also lead to Other modes are crossed to realize.Client embodiment described above is only schematical, for example, the flow chart in accompanying drawing and Block diagram shows the system frame in the cards of the device of multiple embodiments according to the present invention, method and computer program product Structure, function and operation.At this point, each square frame in flow chart or block diagram can represent a module, program segment or code A part, the part of the module, program segment or code include it is one or more be used to realizing as defined in logic function Executable instruction.It should also be noted that at some as in the implementation replaced, the function of being marked in square frame can also be with not The order for being same as being marked in accompanying drawing occurs.For example, two continuous square frames can essentially perform substantially in parallel, they have When can also perform in the opposite order, this is depending on involved function.It is also noted that in block diagram and/or flow chart Each square frame and block diagram and/or the square frame in flow chart combination, the special of function or action as defined in performing can be used Hardware based system realize, or can be realized with the combination of specialized hardware and computer instruction.
In addition, each functional module in each embodiment of the present invention can integrate to form an independent portion Point or modules individualism, can also two or more modules be integrated to form an independent part.
If the function is realized in the form of software function module and is used as independent production marketing or in use, can be with It is stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words The part to be contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, including some instructions are causing a computer equipment (can be People's computer, server, or network equipment etc.) perform all or part of step of each embodiment methods described of the present invention. And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation make a distinction with another entity or operation, and not necessarily require or imply and deposited between these entities or operation In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Nonexcludability includes, so that process, method, article or equipment including a series of elements not only will including those Element, but also the other element including being not expressly set out, or it is this process, method, article or equipment also to include Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Other identical element also be present in process, method, article or equipment including the key element.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (10)

1. a kind of event-handling method, it is characterised in that applied to the client including message distribution component and multiple Service Component End, methods described include:
Target service component is associated with the message distribution component, the target service component is received described disappear Cease the message that distributed components are sent;
The target service component is pass-through to the message distribution component when listening to event, by the event;
The message distribution component is sent and the event pair when receiving the event to associated each Service Component The notification message answered, to notify corresponding Service Component to handle the event, the notification message includes and the mesh Mark the associated identification information of Service Component;
Whether each Service Component for receiving the notification message judges in the notification message to include and each associated mark Information is known, if including handling event corresponding to the notification message.
2. according to the method for claim 1, it is characterised in that the message distribution component includes a default set row Table;
By the target service component step associated with the message distribution component, including:
Target service component is loaded onto in the aggregate list;
The step of message distribution component is to associated each Service Component transmission notification message corresponding with the event, bag Include:
Each Service Component of the message distribution component into the aggregate list sends notification message corresponding with the event.
3. according to the method for claim 2, it is characterised in that methods described also includes:
Specified Service Component is removed from the aggregate list, to release the Service Component and the message distribution component Association, so that the Service Component can not receive the notification message that the message distribution component is sent.
4. according to the method described in any one of claims 1 to 3, it is characterised in that the target service component is listening to thing During part, the step of event listened to is pass-through to the message distribution component, including:
The target service component calls broadcast event instruction that the event is pass-through into the message distribution when listening to event Component.
5. according to the method described in any one of claims 1 to 3, it is characterised in that event corresponding to the notification message is entered The step of row processing, including:
The identification information included based on the notification message, corresponding functional module is called to event corresponding to the notification message Handled.
6. a kind of client, it is characterised in that the client includes message distribution component, multiple Service Component and association mould Block;
The relating module, for target service component is associated with the message distribution component, make the target service group Part can receive the message that the message distribution component is sent;
The target service component is used for when listening to event, and the event is pass-through into the message distribution component;
The message distribution component is used for after the event is received, and is sent and the thing to associated each Service Component Notification message corresponding to part, to notify corresponding Service Component to handle the event, the notification message includes and institute State the associated identification information of target service component;
Receive the notification message each Service Component be used to judging in the notification message whether including with it is each associated Identification information, if including handling event corresponding to the notification message.
7. client according to claim 6, it is characterised in that the message distribution component includes a default set row Table;
The target service component is loaded onto in the aggregate list by the relating module, by the target service component with The message distribution component is associated;
Each Service Component of the message distribution component into the aggregate list sends notification message corresponding with the event, Notification message corresponding with the event is sent so as to realize to associated each Service Component.
8. client according to claim 7, it is characterised in that the client also includes:
Association release module, for specified Service Component to be removed from the aggregate list, with release the Service Component with The association of the message distribution component, so that the Service Component can not receive the notice that the message distribution component is sent and disappear Breath.
9. according to the client described in any one of claim 6~8, it is characterised in that the target service component is listening to During event, by calling broadcast event instruction that the event is pass-through into the message distribution component.
10. a kind of computer-readable recording medium, is stored thereon with computer instruction, it is characterised in that the computer instruction The method described in any one of Claims 1 to 5 is realized when being performed.
CN201710890729.4A 2017-09-27 2017-09-27 Event processing method and client Active CN107783849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710890729.4A CN107783849B (en) 2017-09-27 2017-09-27 Event processing method and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710890729.4A CN107783849B (en) 2017-09-27 2017-09-27 Event processing method and client

Publications (2)

Publication Number Publication Date
CN107783849A true CN107783849A (en) 2018-03-09
CN107783849B CN107783849B (en) 2021-01-01

Family

ID=61434099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710890729.4A Active CN107783849B (en) 2017-09-27 2017-09-27 Event processing method and client

Country Status (1)

Country Link
CN (1) CN107783849B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109361953A (en) * 2018-09-18 2019-02-19 武汉斗鱼网络科技有限公司 Dynamic distribution method, device, equipment and the storage medium of barrage message
CN109656536A (en) * 2018-12-25 2019-04-19 武汉斗鱼网络科技有限公司 A kind of method and client of pushing module modularization
CN109767342A (en) * 2018-12-13 2019-05-17 中国平安财产保险股份有限公司 A kind of data processing method, system, terminal and storage medium
CN109885334A (en) * 2018-12-30 2019-06-14 贝壳技术有限公司 Connection component, message sending, receiving method and edition compatibility system
CN110138574A (en) * 2019-03-26 2019-08-16 北京达佳互联信息技术有限公司 Group managing means, device, electronic equipment and readable storage medium storing program for executing
CN110769018A (en) * 2018-07-27 2020-02-07 北京国双科技有限公司 Message pushing method and device
CN111142982A (en) * 2018-11-02 2020-05-12 鸿合科技股份有限公司 Event execution method and device and electronic equipment
CN111427710A (en) * 2020-03-30 2020-07-17 南京领行科技股份有限公司 Communication method, device, equipment and storage medium of components in application program
CN111768572A (en) * 2020-01-14 2020-10-13 北京沃东天骏信息技术有限公司 Display control method and device for cash register equipment, medium and electronic equipment
CN112015523A (en) * 2020-08-03 2020-12-01 北京奇艺世纪科技有限公司 Event loss prevention method and device, electronic equipment and storage medium
CN112084044A (en) * 2020-08-27 2020-12-15 腾讯科技(深圳)有限公司 Event processing method in system and related device
CN114764292A (en) * 2022-04-19 2022-07-19 润芯微科技(江苏)有限公司 Method for realizing multi-screen control vehicle-mounted central control screen
CN115987673A (en) * 2022-12-30 2023-04-18 北京天融信网络安全技术有限公司 Vulnerability penetration testing system, method, device and equipment based on event driving

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1350165A2 (en) * 2000-07-19 2003-10-08 Opendesign Inc. Event bus architecture
US6785726B1 (en) * 2000-05-08 2004-08-31 Citrix Systems, Inc. Method and apparatus for delivering local and remote server events in a similar fashion
CN101201755A (en) * 2007-05-10 2008-06-18 深圳市同洲电子股份有限公司 Method, system and equipment for managing software module of digital receiving terminal
CN101789938A (en) * 2010-01-12 2010-07-28 清华大学 Agent-based component generation method in reconfigurable software
CN104662516A (en) * 2012-07-27 2015-05-27 谷歌公司 Messaging between web applications
CN106250246A (en) * 2016-07-25 2016-12-21 福建天泉教育科技有限公司 A kind of method and system of event transmission
CN107015851A (en) * 2016-01-28 2017-08-04 阿里巴巴集团控股有限公司 A kind of serviced component management method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6785726B1 (en) * 2000-05-08 2004-08-31 Citrix Systems, Inc. Method and apparatus for delivering local and remote server events in a similar fashion
EP1350165A2 (en) * 2000-07-19 2003-10-08 Opendesign Inc. Event bus architecture
CN101201755A (en) * 2007-05-10 2008-06-18 深圳市同洲电子股份有限公司 Method, system and equipment for managing software module of digital receiving terminal
CN101789938A (en) * 2010-01-12 2010-07-28 清华大学 Agent-based component generation method in reconfigurable software
CN104662516A (en) * 2012-07-27 2015-05-27 谷歌公司 Messaging between web applications
CN107015851A (en) * 2016-01-28 2017-08-04 阿里巴巴集团控股有限公司 A kind of serviced component management method and system
CN106250246A (en) * 2016-07-25 2016-12-21 福建天泉教育科技有限公司 A kind of method and system of event transmission

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769018A (en) * 2018-07-27 2020-02-07 北京国双科技有限公司 Message pushing method and device
CN109361953A (en) * 2018-09-18 2019-02-19 武汉斗鱼网络科技有限公司 Dynamic distribution method, device, equipment and the storage medium of barrage message
CN111142982A (en) * 2018-11-02 2020-05-12 鸿合科技股份有限公司 Event execution method and device and electronic equipment
CN109767342A (en) * 2018-12-13 2019-05-17 中国平安财产保险股份有限公司 A kind of data processing method, system, terminal and storage medium
CN109656536A (en) * 2018-12-25 2019-04-19 武汉斗鱼网络科技有限公司 A kind of method and client of pushing module modularization
CN109656536B (en) * 2018-12-25 2022-08-16 武汉斗鱼网络科技有限公司 Push module modularization method and client
CN109885334B (en) * 2018-12-30 2022-10-04 贝壳技术有限公司 Version compatible system and message sending and receiving method
CN109885334A (en) * 2018-12-30 2019-06-14 贝壳技术有限公司 Connection component, message sending, receiving method and edition compatibility system
CN110138574B (en) * 2019-03-26 2021-10-26 北京达佳互联信息技术有限公司 Group management method, device, electronic equipment and readable storage medium
CN110138574A (en) * 2019-03-26 2019-08-16 北京达佳互联信息技术有限公司 Group managing means, device, electronic equipment and readable storage medium storing program for executing
CN111768572A (en) * 2020-01-14 2020-10-13 北京沃东天骏信息技术有限公司 Display control method and device for cash register equipment, medium and electronic equipment
CN111427710B (en) * 2020-03-30 2022-06-28 南京领行科技股份有限公司 Communication method, device, equipment and storage medium of components in application program
CN111427710A (en) * 2020-03-30 2020-07-17 南京领行科技股份有限公司 Communication method, device, equipment and storage medium of components in application program
CN112015523B (en) * 2020-08-03 2023-09-01 北京奇艺世纪科技有限公司 Event loss prevention method and device, electronic equipment and storage medium
CN112015523A (en) * 2020-08-03 2020-12-01 北京奇艺世纪科技有限公司 Event loss prevention method and device, electronic equipment and storage medium
CN112084044A (en) * 2020-08-27 2020-12-15 腾讯科技(深圳)有限公司 Event processing method in system and related device
CN112084044B (en) * 2020-08-27 2024-02-02 腾讯科技(深圳)有限公司 Event processing method in system and related device
CN114764292A (en) * 2022-04-19 2022-07-19 润芯微科技(江苏)有限公司 Method for realizing multi-screen control vehicle-mounted central control screen
CN115987673B (en) * 2022-12-30 2023-12-08 北京天融信网络安全技术有限公司 Vulnerability penetration test system, method, device, medium and equipment based on event driving
CN115987673A (en) * 2022-12-30 2023-04-18 北京天融信网络安全技术有限公司 Vulnerability penetration testing system, method, device and equipment based on event driving

Also Published As

Publication number Publication date
CN107783849B (en) 2021-01-01

Similar Documents

Publication Publication Date Title
CN107783849A (en) Event-handling method and client
WO2021129367A1 (en) Method and apparatus for monitoring distributed storage system
CN106548402B (en) Resource transfer monitoring method and device
US11283743B1 (en) Techniques for scam detection and prevention
CN107294808A (en) The methods, devices and systems of interface testing
CN106973319B (en) Virtual gift display method and system
CN105306662A (en) Information integration method and system for communication terminal
CN106411659A (en) Business data monitoring method and apparatus
CN107193714B (en) Alarm display method and device
CN111343424A (en) Monitoring system and method for online bid evaluation
CN111240940B (en) Real-time service monitoring method and device, electronic equipment and storage medium
CN106790727A (en) Information push method and device
CN108446211A (en) Browser exception collection method, device, mobile terminal and storage medium
CN110515821A (en) Based on the event-handling method, electronic equipment and computer storage medium buried a little
US10599505B1 (en) Event handling system with escalation suppression
CN111130944B (en) System monitoring method and system
CN113794597A (en) Alarm information processing method, system, electronic device and storage medium
CN112799741A (en) Application program differentiation method and device, electronic equipment and storage medium
CN113495820A (en) Method and device for collecting and processing abnormal information and abnormal monitoring system
CN108200546A (en) data reporting method, device, mobile terminal and computer-readable medium
CN115951923B (en) Subscription event management method, display system, device and storage medium
CN111049679A (en) Server warning method and system
CN109634806A (en) Electronic device, server cluster monitoring method and storage medium
CN113965447B (en) Online cloud diagnosis method, device, system, equipment and storage medium
US11461413B1 (en) Social warning system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231017

Address after: No. 156 Dongfeng Road, Zhonghe Street, Xiushan Tujia and Miao Autonomous County, Chongqing 409900

Patentee after: Xiushan county xiaocan information technology Co.,Ltd.

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.