CN104536756B - AllJoyn network message sending and processing method and device - Google Patents

AllJoyn network message sending and processing method and device Download PDF

Info

Publication number
CN104536756B
CN104536756B CN201410840049.8A CN201410840049A CN104536756B CN 104536756 B CN104536756 B CN 104536756B CN 201410840049 A CN201410840049 A CN 201410840049A CN 104536756 B CN104536756 B CN 104536756B
Authority
CN
China
Prior art keywords
message
event
sending
type
signal
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.)
Active
Application number
CN201410840049.8A
Other languages
Chinese (zh)
Other versions
CN104536756A (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
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Haier Uplus Intelligent Technology Beijing 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, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Priority to CN201410840049.8A priority Critical patent/CN104536756B/en
Publication of CN104536756A publication Critical patent/CN104536756A/en
Application granted granted Critical
Publication of CN104536756B publication Critical patent/CN104536756B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for sending an AllJoyn network message, which comprises the following steps: a sending end generates a message; and the sending end sends the generated message to the receiving end. The invention also discloses an AllJoyn network message processing method, which comprises the following steps: a receiving end receives a message; acquiring a message type in a received message; when the type of the message is signal transmission, processing the message through a signal processing mechanism; and when the type of the message is event sending, processing the message through an event-action mechanism. The invention also discloses an AllJoyn network sending end and an AllJoyn network receiving end. The invention distinguishes the signal and the event by adding the event sending type in the message type of the AllJoyn network message, thereby avoiding the AllJoyn network service conflict caused by the same event triggering the signal processing mechanism and the event-action mechanism at the same time, improving the robustness of the AllJoyn and improving the user experience.

Description

AllJoyn network message sending and processing method and device
Technical Field
The invention relates to the field of AllJoyn networks, in particular to a method and a device for sending and processing AllJoyn network messages.
Background
AllJoyn is an open source software project that provides a common communication framework for different electronic devices; AllJoyn is a P2P (PeerPeer-to-Peer) communication framework, where the two parties of communication are the service provider and the service consumer, respectively. In the communication mechanism of AllJoyn, a service provider and a service consumer communicate by implementing the same interface specification. The AllJoyn interface comprises three members of a method, an attribute and a signal, wherein the method is a function call, receives one or more input parameters, carries out corresponding processing, and returns one or more output parameters; the attribute is variable comprising read-only, write-only and read-write modes; the signal is asynchronous notification information, and the signal receiving party performs corresponding operation through a signal processing mechanism.
In addition, the AllJoyn provides an event-action mechanism, where the event is an interface signal including human readable words, the action is an interface method including human readable words, a user can set a trigger relationship between the event and the action through a user interface, and the rule engine stores the trigger relationship between the event and the action set by the user, and the rule engine needs to operate on a device stably connected to an AP (Access Point) for a long time as an application program.
The intelligent home system is often required to be applied in scene linkage, and a signal processing mechanism and an event-action mechanism in AllJoyn can provide technical feasibility for scene linkage.
However, the inventor finds that the prior art has the following defects when the invention is realized:
the event in the AllJoyn is a signal in the message format, only human readable words are added, and the event and the signal cannot be distinguished from each other in the message type, so that a signal processing mechanism can be triggered, and the collision of the AllJoyn network service can be caused. The concrete description is as follows:
in the use scenario of AllJoyn, a device manufacturer or developer listens to a certain signal according to a service provided by the own party, and once the signal occurs, performs a corresponding operation. However, the user may set the trigger relationship between the same event and action through the event-action mechanism of AllJoyn due to the unknown service to the device vendor or developer, which may result in the repeated execution of AllJoyn business, causing unpredictable effects.
Taking scene linkage as an example, the situation of service conflict that may occur in the current AllJoyn network is shown in fig. 1.
When the intelligent door is opened or closed, door opening and closing events can be sent out, and when the intelligent door sends the events, a signal processor in intelligent lamplight can monitor the events and trigger the operation of turning on or turning off the lamp;
the user sets an event sent by the intelligent door and an action executed by the intelligent light in the rule engine through an event-action mechanism in AllJoyn to carry out pairing;
when the intelligent door sends the door opening event, the signal processor in the intelligent lamplight monitors the door opening event, so that the lamp opening operation is triggered. This may result in repeated execution of the lighting-on operation, causing an all joyn network traffic conflict, as shown in fig. 1. Wherein the solid lines with arrows represent signal processing mechanisms and the dashed lines with arrows represent event-action mechanisms.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a device for sending and processing an AllJoyn network message, which are used for solving the problem of service conflict of the AllJoyn network in the prior art.
In order to solve the above technical problem, the present invention provides an all joyn network message sending method, which comprises the following steps:
a sending end generates a message, wherein the message comprises a message type, and the message type comprises signal sending and event sending;
and the sending end sends the generated message to the receiving end.
The invention also provides an AllJoyn network message processing method, which comprises the following steps:
a receiving end receives a message;
acquiring a message type in a received message;
when the type of the message is signal transmission, processing the message through a signal processing mechanism; and when the type of the message is event sending, processing the message through an event-action mechanism.
Further, the processing the message through the signal processing mechanism specifically includes: the message is passed to a signal processor, which processes the message.
Further, the processing the message through the event-action mechanism specifically includes: and transmitting the message to a rule engine, and processing the message by the rule engine.
Further, the message types include signaling and event transmission.
The invention also provides an AllJoyn network sending end, which comprises:
the message generating unit is used for generating a message, wherein the message comprises a message type, and the message type comprises signal transmission and event transmission;
and the message sending unit is used for sending the generated message to the receiving end.
The invention also provides an AllJoyn network receiving end, comprising:
the message receiving unit is used for receiving the message sent by the sending end;
a message type acquiring unit, configured to acquire a message type in a received message;
the signal processing mechanism is used for processing the message when the type of the message is signal transmission;
and the event-action mechanism is used for processing the message when the type of the message is event sending.
Further, the signal processing mechanism is a signal processor.
Further, the event-action mechanism is a rules engine.
Further, the message types include signaling and event transmission.
The invention has the following beneficial effects:
according to the invention, the method of adding the event sending type in the message type of the AllJoyn network message is used for distinguishing the signal and the event, the signal only triggers the signal processing mechanism, and the event only triggers the event-action mechanism, so that the problem of repeated execution of the AllJoyn service caused by the fact that the signal processing mechanism and the event-action mechanism are simultaneously triggered by the same event is solved, the problem of service conflict of the AllJoyn network is solved, the robustness of the AllJoyn is improved, and the user experience is improved.
The invention distinguishes the signal and the event by modifying the message type definition of the AllJoyn message format, can solve the conflict from the source only by respectively defining the message type for the signal and the event, and has simple realization.
Drawings
FIG. 1 is a schematic diagram of scene linkage in an AllJoyn network according to the prior art;
fig. 2 is a flowchart of an all joyn network service processing method according to an embodiment of the present invention;
fig. 3 is a structural diagram of an all joyn network service processing system according to an embodiment of the present invention;
fig. 4a and 4b are schematic diagrams of implementing scene linkage in an AllJoyn network according to an embodiment of the present invention.
Detailed Description
In order to solve the problem of the service conflict of the all joyn network in the prior art, the invention provides a method and a device for sending and processing the all joyn network message, and the invention is further described in detail below with reference to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Example 1
The method for sending the AllJoyn network message comprises the following steps: a sending end generates a message, wherein the message comprises a message type, and the message type comprises signal sending and event sending; and the sending end sends the generated message to the receiving end.
Example 2
The method for processing the AllJoyn network message comprises the following steps: a receiving end receives a message; acquiring a message type in a received message, wherein the message type comprises signal sending and event sending; when the type of the message is signal transmission, processing the message through a signal processing mechanism; and when the type of the message is event sending, processing the message through an event-action mechanism. In this embodiment, the processing the message through the signal processing mechanism specifically includes: transmitting the message to a signal processor, the signal processor processing the message; the processing the message through the event-action mechanism specifically includes: and transmitting the message to a rule engine, and processing the message by the rule engine.
Example 3
Fig. 2 shows an AllJoyn network service processing method according to an embodiment of the present invention, which includes the following steps:
step s201, a sending end generates a message, wherein the message comprises a message type, and the message type comprises signal sending and event sending;
step s202, the sending end sends the generated message to the receiving end;
step s203, the receiving end receives the message;
step s204, obtaining the message type in the received message;
step s205, when the type of the message is signal transmission, processing the message through a signal processing mechanism; and when the type of the message is event sending, processing the message through an event-action mechanism.
Example 4
The sending end of the AllJoyn network of the embodiment of the invention comprises: the message generating unit is used for generating a message, wherein the message comprises a message type, and the message type comprises signal transmission and event transmission; and the message sending unit is used for sending the generated message to the receiving end.
Example 5
The receiving end of the AllJoyn network of the embodiment of the invention comprises: the message receiving unit is used for receiving the message sent by the sending end; the message type acquisition unit is used for acquiring the message type in the received message, wherein the message type comprises signal transmission and event transmission; a signal processing mechanism, configured to process the message when the type of the message is signal transmission, in this embodiment, the signal processing mechanism is a signal processor; and an event-action mechanism, configured to process the message when the type of the message is event sending, where in this embodiment, the event-action mechanism is a rule engine.
Example 6
Fig. 3 shows an all joyn network service processing system according to an embodiment of the present invention, where the system includes a sending end 31 and a receiving end 32, where the sending end 31 is connected to the receiving end 32.
The transmitting end 31 includes a message generating unit 311 and a message transmitting unit 312, wherein the message generating unit 311 and the message transmitting unit 312 are connected. The message generating unit 311 is configured to generate a message, where the message includes a message type, and the message type includes signaling and event sending; the message sending unit 312 is configured to send the generated message to the receiving end 32.
The receiving end 32 includes a message receiving unit 321, a message type obtaining unit 322, a signal processor 323 and a rule engine 324, wherein the message type obtaining unit 322 is connected to the message receiving unit 321, the signal processor 323 and the rule engine 324, respectively. The message receiving unit 321 is configured to receive a message sent by a sending end; the message type obtaining unit 322 is configured to obtain a message type in the received message; the signal processor 323 is configured to process the message when the type of the message is signaling; the rule engine 324 is configured to process the message when the type of the message is event sending.
Example 7
Fig. 4a and 4b illustrate a scenario linkage in an AllJoyn network according to an embodiment of the present invention, where fig. 4a is a schematic diagram of a signal processing mechanism, and fig. 4b is a schematic diagram of an event-action mechanism. The process is as follows:
when the intelligent door is opened or closed, door opening and closing events or signals can be sent out; when the intelligent door sends a signal, a signal processor in the intelligent lamplight can monitor the signal and trigger the lamp to be turned on or turned off; the same trigger logic is set in the rule engine by the user, and when the intelligent door sends an event, the operation of turning on or off the light is triggered through an event-action mechanism. Since the present invention modifies the type definitions of events and signals in the AllJoyn message format, the signal processor in the lights will only process the signals sent by the intelligent gate, and the rules engine will only process the events sent by the intelligent gate.
In this embodiment, the message format in the AllJoyn follows the message format in the D-Bus protocol, the AllJoyn message includes a message header and a message body, the message header defines a message type, and the message type in the AllJoyn includes five types: INVALID, METHOD _ CALL, METHOD _ RETURN, ERROR, and SIGNAL. Both events and SIGNALs are SIGNAL on the message type. The invention adds a new message type, namely EVENT, for the EVENT on the basis of the original message type, and distinguishes the EVENT from the signal on the basis of the message type, as shown in the table 1, thereby realizing that the signal processing mechanism of the AllJoyn only processes the signal, and the EVENT-action mechanism of the AllJoyn only processes the EVENT, and avoiding the service conflict of the AllJoyn network.
TABLE 1
Name (R) Value of Description of the invention
INVALID 0 Type of invalidation
METHOD_CALL 1 Method invocation
METHOD_RETURN 2 Method return
ERROR 3 Error return
SIGNAL 4 Signal transmission
EVENT 5 Event delivery
According to the invention, the method of adding the event sending type in the message type of the AllJoyn network message is used for distinguishing the signal and the event, the signal only triggers the signal processing mechanism, and the event only triggers the event-action mechanism, so that the problem of repeated execution of the AllJoyn service caused by the fact that the signal processing mechanism and the event-action mechanism are simultaneously triggered by the same event is solved, the problem of service conflict of the AllJoyn network is solved, the robustness of the AllJoyn is improved, and the user experience is improved.
The invention distinguishes the signal and the event by modifying the message type definition of the AllJoyn message format, can solve the conflict from the source only by respectively defining the message type for the signal and the event, and has simple realization.
Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above.

Claims (4)

1. An AllJoyn network message sending method, comprising the steps of:
a sending end generates a message with a message type of signal sending or a message with a message type of event sending;
the sending end sends the generated message to a receiving end, so that the receiving end processes the message through a signal processing mechanism when the type of the message is signal sending, and processes the message through an event-action mechanism when the type of the message is event sending;
the processing the message through the signal processing mechanism specifically includes: the receiving end transmits the message to a signal processor, and the signal processor processes the message;
the processing the message through the event-action mechanism specifically includes: and the receiving end transmits the message to a rule engine, and the rule engine processes the message.
2. An AllJoyn network message processing method, characterized by comprising the steps of:
a receiving end receives a message, wherein the message is a message generated by a sending end and is sent by a signal, or the message generated by the sending end and is sent by an event;
acquiring a message type in a received message;
when the type of the message is signal transmission, processing the message through a signal processing mechanism; when the type of the message is event sending, processing the message through an event-action mechanism;
the processing the message through the signal processing mechanism specifically includes: transmitting the message to a signal processor, the signal processor processing the message;
the processing the message through the event-action mechanism specifically includes: and transmitting the message to a rule engine, and processing the message by the rule engine.
3. A sending end of an AllJoyn network is characterized by comprising:
the message generating unit is used for generating a message with a message type of signal transmission or a message with a message type of event transmission;
a message sending unit, configured to send the generated message to a receiving end, so that the receiving end processes the message through a signal processing mechanism when the type of the message is signal sending, and processes the message through an event-action mechanism when the type of the message is event sending; the processing the message through the signal processing mechanism specifically includes: the receiving end transmits the message to a signal processor, and the signal processor processes the message; the processing the message through the event-action mechanism specifically includes: and the receiving end transmits the message to a rule engine, and the rule engine processes the message.
4. An AllJoyn network receiving end, comprising:
the message receiving unit is used for receiving a message sent by a sending end, wherein the message is a message which is generated by the sending end and is sent by a signal, or a message which is generated by the sending end and is sent by an event;
a message type acquiring unit, configured to acquire a message type in a received message;
the signal processing mechanism is used for processing the message when the type of the message is signal transmission, and the signal processing mechanism is a signal processor;
and the event-action mechanism is used for processing the message when the type of the message is event sending, and the event-action mechanism is a rule engine.
CN201410840049.8A 2014-12-30 2014-12-30 AllJoyn network message sending and processing method and device Active CN104536756B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410840049.8A CN104536756B (en) 2014-12-30 2014-12-30 AllJoyn network message sending and processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410840049.8A CN104536756B (en) 2014-12-30 2014-12-30 AllJoyn network message sending and processing method and device

Publications (2)

Publication Number Publication Date
CN104536756A CN104536756A (en) 2015-04-22
CN104536756B true CN104536756B (en) 2020-02-07

Family

ID=52852288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410840049.8A Active CN104536756B (en) 2014-12-30 2014-12-30 AllJoyn network message sending and processing method and device

Country Status (1)

Country Link
CN (1) CN104536756B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104967560B (en) * 2015-04-29 2020-09-01 海尔优家智能科技(北京)有限公司 Method and device for realizing linkage with gateway management equipment
CN105357259A (en) * 2015-09-29 2016-02-24 青岛海尔智能家电科技有限公司 Method and device for automatically setting equipment linkage rule and associated equipment
CN106411835B (en) * 2016-05-25 2019-09-06 海尔优家智能科技(北京)有限公司 A kind of transmission method and device based on AllJoyn Control Panel

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012060996A2 (en) * 2010-11-01 2012-05-10 Michael Luna Caching adapted for mobile application behavior and network conditions
CN103929732B (en) * 2013-01-11 2018-07-13 中兴通讯股份有限公司 A kind of method and M2M gateways of management terminal peripheral hardware

Also Published As

Publication number Publication date
CN104536756A (en) 2015-04-22

Similar Documents

Publication Publication Date Title
US10791195B2 (en) Common device interface framework for IoT/smart device application
US9331953B2 (en) Device management method, middleware, and machine-to-machine communications platform, device, and system
CN104967560B (en) Method and device for realizing linkage with gateway management equipment
US20160127514A1 (en) Intelligent gateway with a common data format
CN109840155B (en) Method and device for realizing remote procedure call
CN104536756B (en) AllJoyn network message sending and processing method and device
CN108111999A (en) Short-distance communication equipment shares request and control method and electronic equipment
CN104363169A (en) Data dynamic routing system and method based on RapidIO message mode
CN114048046A (en) Service calling method and device and load balancing equipment
US20190114183A1 (en) Terminal Configuration Method and Terminal Based on Provision Protocol for Transmission
CN111405635A (en) Method, device and equipment for realizing capability opening and computer readable storage medium
WO2020042973A1 (en) Data processing method for security authentication, server, client device, and medium
CN109388388B (en) Information interaction method, device, equipment and storage medium between function modules
CN105045110B (en) Method and device for forwarding household appliance service call request
CN104518890B (en) Network service processing method, information broadcast and control method and device
CN107231275B (en) Method for connection configuration of user equipment and household equipment
CN110661850B (en) Edge calculation method, system, computer equipment and storage medium
CN111740960A (en) Communication method of Internet of things equipment, Internet of things equipment and storage medium
US20160360386A1 (en) SMS Message Management
Tanganelli et al. A distributed architecture for discovery and access in the internet of things
Teklemariam et al. Simple RESTful sensor application development model using CoAP
WO2014036832A1 (en) Mixed language interaction processing system based on social network service and method thereof
US20160308787A1 (en) Method for processing event between controller and network device
US10003657B2 (en) Data transmission processing method and apparatus
KR101957697B1 (en) Control and supervision of connected objects

Legal Events

Date Code Title Description
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20170216

Address after: 100086 room 601-606, level, Pacific International Building, Zhichun Road, Beijing, 106, China

Applicant after: Haier smart technology (Beijing) Co., Ltd.

Applicant after: Qingdao Haier Intelligent Home Appliance Technology Co., Ltd.

Address before: 100086 Beijing, Zhichun Road, Zhongguancun, No. 106 crown office building, layer, layer 15

Applicant before: Beijing Haier Guangke Digital Techn Co., Ltd.

Applicant before: Qingdao Haier Intelligent Home Appliance Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210309

Address after: Room 601-606, 6 / F, Pacific International Building, 106 Zhichun Road, Haidian District, Beijing 100086

Patentee after: HAIER YOUJIA INTELLIGENT TECHNOLOGY (BEIJING) Co.,Ltd.

Patentee after: QINGDAO HAIER INTELLIGENT HOME APPLIANCE TECHNOLOGY Co.,Ltd.

Patentee after: Haier Zhijia Co.,Ltd.

Address before: Room 601-606, 6 / F, Pacific International Building, 106 Zhichun Road, Haidian District, Beijing 100086

Patentee before: HAIER YOUJIA INTELLIGENT TECHNOLOGY (BEIJING) Co.,Ltd.

Patentee before: QINGDAO HAIER INTELLIGENT HOME APPLIANCE TECHNOLOGY Co.,Ltd.