Disclosure of Invention
In view of the foregoing analysis, the present invention is directed to provide a routing method, a routing system, and a service gateway in an intelligent home system, so as to solve the problem that the routing manner of the intelligent home system is not defined and implemented in the industry.
The purpose of the invention is mainly realized by the following technical scheme:
the invention provides a routing method in an intelligent home system, which comprises the following steps:
when a message needs to be forwarded, the local service gateway acquires a destination terminal or a destination industry application of the forwarding from the message;
and the local service gateway forwards the message to the target terminal or the target industry application which is hung on the local service gateway, or forwards the message to the target terminal or the target industry application which is hung on the remote service gateway through a remote service gateway.
Further, before forwarding the packet, the method further includes: and determining the strategy of the message forwarding, and inserting the message into a preset forwarding queue with corresponding priority according to the strategy.
Further, when a plurality of pieces of information among the terminal subscription relationship information, the service information, the terminal information, and the industry application information are preset in the local service gateway, the policy for determining the current forwarding packet includes: and determining a strategy for forwarding the message according to the service information and the terminal information corresponding to the message, or the service information and the industry application information, and the predetermined priority strategy.
Further, the method further comprises:
the local service gateway looks up the next hop of the current route according to a preset remote terminal routing table or a remote industry application routing table, wherein the next hop refers to a remote service gateway which is hooked by the remote terminal or the remote industry application.
Further, the service information includes at least one of a service type and a service priority; the industry application information comprises at least one of industry application priority and industry application processing capacity; the terminal information includes at least one of a terminal priority and a terminal processing capability.
The priority policy includes:
the message forwarding priority is service type > service priority > industry application processing capacity; or, the message forwarding priority is service type > service priority > terminal processing capacity.
The invention also provides a routing system in the intelligent home system, which comprises: a local service gateway and a foreign service gateway, wherein,
the local service gateway is used for acquiring a target terminal or a target industry application of the forwarding from a message when the message needs to be forwarded; the message is forwarded to the target terminal or the target industry application which is hung on the message, or the message is forwarded to the target terminal or the target industry application which is hung on the remote service gateway through the remote service gateway;
the allopatric service gateway is used for forwarding the received message to the destination terminal or the destination industry application which is hung on the allopatric service gateway.
The invention also provides a service gateway in the intelligent home system, which comprises:
the device comprises an acquisition unit, a forwarding unit and a processing unit, wherein the acquisition unit is used for acquiring a target terminal or a target industry application of the forwarding from a message when the message needs to be forwarded;
and the forwarding unit is used for forwarding the message to the target terminal or the target industry application which is connected to the service gateway, or forwarding the message to the target terminal or the target industry application which is connected to the remote service gateway through the remote service gateway.
Further, the service gateway further includes: and the decision unit is used for determining the strategy of the message forwarding before forwarding the message and inserting the message into the preset forwarding queue with the corresponding priority according to the strategy.
Further, when the local service gateway further includes: when the information configuration unit is used for presetting a plurality of information in terminal subscription relationship information, service information, terminal information and industry application information, the decision unit is specifically used for acquiring the service information and the terminal information corresponding to the message or the service information and the industry application information according to the terminal subscription relationship information preset in the information configuration unit, determining a strategy for forwarding the message according to the service information and the terminal information corresponding to the message or the service information and the industry application information and a preset priority strategy, and inserting the message into a preset forwarding queue corresponding to a priority according to the strategy.
Further, when the service gateway further includes a routing configuration unit for presetting a remote terminal routing table and/or a remote industry application routing table, the forwarding unit is further configured to look up a next hop of the current routing according to a preset remote terminal routing or a remote industry application routing table, where the next hop refers to a remote service gateway to which the remote terminal or the remote industry application is hooked.
The invention has the following beneficial effects:
the invention provides a routing method, a system and a service gateway suitable for an intelligent system, and solves the problem that the routing mode of an intelligent home system is not defined and realized in the industry.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Detailed Description
The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form a part hereof, and which together with the embodiments of the invention serve to explain the principles of the invention. For the purpose of clarity and simplicity, a detailed description of known functions and configurations in the devices described herein will be omitted when it may obscure the subject matter of the present invention.
First, a routing method in the smart home system will be described in detail with reference to fig. 2 and 3.
As shown in fig. 2, fig. 2 is a schematic diagram of a main flow of a routing method in an intelligent home system, and mainly includes:
step 201: when a message needs to be forwarded, the local service gateway acquires a destination terminal or a destination industry application of the forwarding from the message;
step 201: the local service gateway determines the strategy of the message to be forwarded, and inserts the message into a predetermined forwarding queue with corresponding priority according to the strategy; the strategy for determining the local forwarding message comprises the following steps: the local service gateway can preset a plurality of information in terminal subscription relationship information, service information, terminal information and industry application information, and the local service gateway acquires the service information and the terminal information corresponding to the message according to the preset terminal subscription relationship information, or the service information and the industry application information, and determines a strategy for forwarding the message according to the service information and the terminal information corresponding to the message, or the service information and the industry application information, and a preset priority strategy;
step 203: the local service gateway forwards the message to the destination terminal or the destination industry application which is connected with the local service gateway, or forwards the message to the destination terminal or the destination industry application which is connected with the remote service gateway through the remote service gateway.
The terminal subscription relationship information, the service information, the terminal information and the industry application information are specifically explained as follows:
(1) the terminal signing relationship is as follows: identifying the incidence relation between the terminal and specific services and industry applications; for example, the intelligent home terminal a signs a home security service through a business hall and is associated with an industry application B of the home security service, and the intelligent home terminal a can communicate with the industry application B of the home security service through accessing a service gateway;
(2) service information, including: a traffic type and a traffic priority, wherein,
the traffic type may be defined as:
high real-time performance: control, security alarm, video monitoring, etc.;
medium real-time performance: environmental monitoring, metering, monitoring;
low real-time performance: entertainment, life, communication;
service priorities (1-9), the higher the value is, the higher the priority is;
(3) industry application information, including: industry application priority and industry application processing power, wherein,
industry application priority (1-9), with higher values and higher priority;
industry application processing capacity (high, medium, low);
(4) terminal information, including: terminal identification, terminal priority, terminal processing capability, wherein,
and (3) terminal identification: the unique ID of the whole network distributed according to the intelligent home terminal identification strategy is similar to the IMEI of the handheld terminal;
terminal priorities (1-9), the higher the value is, the higher the priority is;
terminal processing capability (high, medium, low).
In addition, the predetermined priority policy may include, according to the different message purposes:
when the message is destined for a terminal, the preset priority strategy is that the service type is larger than the service priority, the industry application priority is larger than the industry application processing capacity; that is, the service gateway checks the type of the smart home service for each forwarding packet, and if the type of the smart home service is a service type with high real-time performance, the forwarding processing is preferentially performed; forwarding the forwarding messages of the services with the same service type and different priorities according to the service priority; in the forwarding process, industry application priority and industry application processing capacity multi-dimensional strategy judgment need to be added at the same time;
when the message is applied in industry, the preset priority strategy is that the service type is larger than the service priority, the terminal priority is larger than the terminal processing capacity; that is, the service gateway checks the type of the smart home service for each forwarding packet, and if the type of the smart home service is a service type with high real-time performance, the forwarding processing is preferentially performed; forwarding the forwarding messages with the same service type and different service priorities according to the service priorities; in the forwarding process, multi-dimensional strategy judgment of terminal priority and terminal processing capacity is required to be added at the same time.
To facilitate understanding of the present invention, the following examples are further illustrated.
The target terminal related to the embodiment of the invention can be a local terminal or a remote terminal, and the target industry application can be a local industry application or a remote industry application, wherein the local terminal or the local industry application is hung on a local service gateway, and the remote terminal or the remote industry application is hung on a remote service gateway; therefore, the embodiment of the present invention mainly includes three forwarding modes: forwarding among local terminal industrial applications, forwarding among different-place industrial applications, and forwarding among local terminal industrial applications; and when the forwarding mode is forwarding between the local terminal and the remote industry application or forwarding between the local terminal and the remote terminal, the service gateway further sets predetermined routing configuration information, including: a remote terminal routing table and/or a remote industry application routing table.
As shown in fig. 3, fig. 3 is a schematic diagram of different forwarding modes involved in the present invention, and as a specific embodiment of the present invention, a forwarding process between local terminals < - > local industry applications may specifically include:
(1) the terminal initiates a flow: setting a source of the forwarding as a terminal A and a target as an industry application A, wherein the terminal A and the industry application A are both hung on a service gateway A;
after receiving a message which needs to be forwarded to an industry application A by a terminal A, a service gateway A extracts a terminal identifier and a target industry application identifier (a unique identifier of the whole network of the industry application) from the message, acquires service information and industry application information corresponding to the message through a terminal signing relationship when the terminal A is determined to be a local terminal according to the terminal identifier and the target industry application A is determined to be a local industry application according to the target industry application identifier, inserts the message into a predetermined forwarding queue (a forwarding queue preset according to priority in the service gateway) corresponding to priority according to the service information and the industry application information corresponding to the message and a predetermined priority strategy, and controls predetermined forwarding to forward the message to the target industry application A.
(2) The industry application initiates a flow: setting a source of the forwarding as an industry application A, and setting a target as a terminal A, wherein the terminal A and the industry application A are both hung on a service gateway A;
the method comprises the steps that a service gateway A receives a message which needs to be forwarded to a terminal A by an industry application A, acquires an industry application ID and a target terminal ID from the message, acquires terminal information and service information corresponding to the message according to a terminal signing relationship when the target industry application A is determined to be a local industry application according to a target industry application identifier and the terminal A is determined to be a local terminal according to the terminal identifier, inserts the message into a preset forwarding queue with corresponding priority according to the terminal information and service information corresponding to the message and a preset priority strategy, and controls preset forwarding to forward the message to the target terminal A; the forwarding at this time is different from the above flow: and the message is forwarded to the target terminal A by adopting the terminal information and the service information as strategy dimensions without adding industrial application information for judgment.
As another specific embodiment of the present invention, the forwarding process between local terminals < - - > remote industrial applications may specifically include:
the local terminal is accessed to the allopatric industry application, the industry application corresponding to the terminal subscription relationship is not accessed to the local service gateway, and the local service gateway is required to be routed to the allopatric service gateway (the service gateway which is hooked by the industry application corresponding to the terminal subscription relationship);
(1) the terminal initiates a flow: setting a source of the forwarding as a terminal B and a target as an industry application B, wherein the terminal B is connected to a service gateway A in a hanging manner, and the industry application B is connected to the service gateway B in a hanging manner;
after receiving a message which needs to be forwarded to an industry application B by a terminal B, a service gateway A extracts a terminal identifier and a target industry application identifier from the message, checks whether the target industry application exists in a local service gateway or not after confirming that the terminal belongs to a local terminal and has the authority to send the message to the target industry application, if not, can determine that the target industry application is a allopatric industry application, and obtains a next hop of the forwarding by inquiring an allopatric application routing table through an industry application ID, wherein the next hop of the forwarding is the service gateway B; the service gateway A further acquires the service information and the industry application information corresponding to the message through a terminal subscription relationship, inserts the message into the scheduled forwarding of the corresponding priority in the service gateway A according to the service information and the industry application information corresponding to the message and a scheduled priority strategy, and controls the scheduled forwarding to forward the message to the service gateway B; the service gateway B also needs to insert the packet into a predetermined forwarding queue of a corresponding priority according to service information and industry application information corresponding to the packet and a predetermined priority policy, and control the predetermined forwarding queue to forward the packet to the industry application B.
(2) Initiating a process by the application of the remote industry: setting a source of the forwarding as an industry application B, setting a target terminal as a terminal B, and hanging the industry application B on a service gateway B and the terminal B on a service gateway A;
when an industry application B needs to forward a message to a terminal B, the industry application B firstly sends the message to a service gateway B which is butted with the industry application B, the service gateway B extracts a target terminal identification from the message, the next hop of the forwarding is inquired through a remote terminal routing table according to the target terminal identification, and the next hop of the forwarding is a service gateway A; then, acquiring terminal information and service information corresponding to the message according to a terminal signing relationship, inserting the message into a predetermined forwarding queue corresponding to a priority according to the terminal information and the service information corresponding to the message and a predetermined priority strategy, and controlling the predetermined forwarding queue to forward the message to a service gateway A; the service gateway A checks whether the terminal B is in an online state, if so, the terminal information and the service information corresponding to the message are obtained according to the terminal signing relationship, the message is inserted into a predetermined forwarding queue with corresponding priority according to the terminal information and the service information corresponding to the message and a predetermined priority strategy, and the predetermined forwarding is controlled to forward the message to the terminal B.
As another embodiment of the present invention, the forwarding process between the local terminal < - - > and the remote terminal may specifically include:
the message forwarding from the local terminal to the remote terminal requires the local terminal to be routed to a remote service gateway (a service gateway hooked by the remote terminal) through the local service gateway, and then forwarded to the corresponding remote terminal.
The terminal initiates a flow: setting a source of the forwarding as a terminal B (or a terminal C) and a target as a terminal C (or a terminal B), wherein the terminal B is connected to a service gateway A in a hanging manner, and the terminal C is connected to the service gateway B in a hanging manner;
if the forwarding is that the terminal B forwards the message to the terminal C, the service gateway A receives the message which needs to be forwarded to the terminal C by the terminal B, extracts a source terminal identifier and a target terminal identifier from the message, and obtains the information of the next hop of the forwarding, namely the information of the service gateway B according to the routing query of a remote terminal when the target terminal is confirmed to be accessed in a remote place according to the terminal identifier; further acquiring terminal information and service information corresponding to the message according to the terminal subscription relationship, inserting the message into a predetermined forwarding queue corresponding to a priority according to the terminal information and the service information corresponding to the message and a predetermined priority policy, and controlling predetermined forwarding to forward the message to a service gateway B; and the service gateway B checks whether the terminal C is in an online state, if so, acquires the terminal information and the service information corresponding to the message according to the terminal signing relationship, inserts the message into a predetermined forwarding queue with corresponding priority according to the terminal information and the service information corresponding to the message and a predetermined priority strategy, and controls predetermined forwarding to forward the message to the terminal C.
Similarly, when the forwarding is from terminal C to terminal B, the source terminal is terminal C, the destination terminal is terminal B, and the forwarding process is that terminal C forwards the packet to terminal B through service gateway B and service gateway a in sequence, which is similar to the specific forwarding process and is not described herein again.
Next, a detailed description is given of a routing system in the smart home system.
The routing system in the smart home system may specifically include: a local service gateway and a foreign service gateway, wherein,
the local service gateway acquires a target terminal or a target industry application of the forwarding from the message when the message needs to be forwarded; the message is forwarded to a target terminal or a target industry application which is connected with the message in a hanging mode, or the message is forwarded to the target terminal or the target industry application which is connected with a remote service gateway through the remote service gateway;
the remote service gateway forwards the received message to a destination terminal or a destination industry application which is connected with the remote service gateway.
Finally, a service gateway in the smart home system is described in detail with reference to fig. 4.
As shown in fig. 4, fig. 4 is a schematic structural diagram of a service gateway in an intelligent home system, which may specifically include: an obtaining unit, a decision unit, a forwarding unit, an information configuration unit and a route configuration unit, wherein,
the device comprises an acquisition unit, a forwarding unit and a forwarding unit, wherein when a message needs to be forwarded, the acquisition unit acquires a destination terminal or a destination industry application which is forwarded at this time from the message;
a decision unit for determining the strategy of the message before forwarding the message and inserting the message into a predetermined forwarding queue with corresponding priority; the method specifically includes acquiring service information and terminal information or service information and industry application information corresponding to the message according to terminal subscription relationship information preset in an information configuration unit, and determining a policy for forwarding the message according to the service information and the terminal information or the service information and the industry application information corresponding to the message and a predetermined priority policy;
the forwarding unit forwards the message to a target terminal or a target industry application which is connected with the forwarding unit in a hanging mode, or forwards the message to the target terminal or the target industry application which is connected with the remote service gateway in a hanging mode through the remote service gateway; when the forwarding mode is forwarding between the local terminal and the remote industry application or forwarding between the local terminal and the remote terminal, the forwarding unit is further configured to look up a next hop of the current route according to a remote terminal route or a remote industry application routing table preset in the route configuration unit, where the next hop of the current route refers to a remote service gateway to which the remote terminal or the remote industry application is hooked when the target terminal is a remote terminal or the target industry application is a remote industry application.
The information configuration unit is preset with a plurality of information configuration units in terminal signing relationship information, service information, terminal information and industry application information;
and the routing configuration unit is preset with a remote terminal routing table and/or a remote industry application routing table.
It should be noted that, for specific implementation of the routing system and the service gateway in the intelligent home system, details are not repeated herein since the routing method in the intelligent home system has already been described in detail.
In summary, the present invention provides a routing method, a routing system and a service gateway in an intelligent home system, which solve the problem that the routing manner of the intelligent home system is not defined and implemented in the industry; and based on the functions and service characteristics required to be completed by the service gateway of the intelligent home, forwarding of the message is controlled through multi-dimensionality such as service information, industry application information and terminal information, so that the support capability of the service gateway on personalized services is improved, platform cost operation resources are saved, and the rapid development of the intelligent home industry is promoted.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.