Background
In a cellular Internet of Things (IoT) scenario, an application server needs to periodically obtain relevant information of a terminal and a network, so as to monitor the availability of the terminal and the network. The related information mainly comprises: identity information, network information, service information (battery level, events, alarms). The Identity information includes an International Mobile Subscriber Identity (IMSI), an International Mobile Equipment Identity (IMEI), an Integrated Circuit Card Identity (ICCID), a Mobile Subscriber Integrated Services Digital Network Number (MSISDN), and the like; the network type information includes Reference Signal Receiving Power (RSRP), Signal to Interference plus Noise Ratio (SINR), coverage level ECL, Tracking Area Identity (TAI), E-UTRAN Cell Global Identifier (ECGI), radio network congestion index, etc.; the service information includes battery power, events, alarms, etc. In the current mode, the application server cannot directly acquire the information from the network side, and the terminal needs to periodically and actively establish user plane connection, send the information to the IoT platform, and then transparently transmit the information to the application server by the IoT platform.
In the existing mode, the terminal needs to periodically and actively establish user interface connection to send information, so that the electric quantity loss of a battery is increased; the wireless access network needs to periodically establish and release user plane bearer, thereby increasing network overhead; the IoT platform is only responsible for transparent message transmission and cannot fully exert its value.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present invention provide an internet of things information query method, a subscription method, an apparatus, and an electronic device, which overcome the foregoing problems or at least partially solve the foregoing problems.
According to an aspect of an embodiment of the present invention, there is provided an internet of things information query method, including: receiving an information query request sent by an application program; carrying out access validity authentication on the application program; judging whether the information inquired by the information inquiry request exists in an information open database after the authentication is passed; when the information inquired by the information inquiry request does not exist in the information open database, initiating a data inquiry request; and receiving a query result and returning the query result to the application program.
In an optional manner, the initiating a data query request when the information queried by the information query request does not exist in the information open database includes: determining a main body for receiving data query according to preset conditions, wherein the main body comprises a Service Capability Exposure Function (SCEF) and a terminal; and sending a data query request to the determined main body for receiving the data query.
In an optional manner, the determining a subject of the received data query according to a preset condition includes: if the change frequency of the service data corresponding to the information queried by the information query request is lower than a preset threshold value and does not need to be updated in real time, determining that a main body for receiving the data query is SCEF; and if the change frequency of the service data corresponding to the information inquired by the information inquiry request is greater than or equal to a preset threshold and needs to be updated in real time, determining that a main body for receiving the data inquiry is a terminal.
In an optional manner, the determining, according to a preset condition, a main body for receiving a data query, and sending a data query request to the determined main body for receiving the data query includes: if the change frequency of the service data corresponding to the information queried by the information query request is lower than a preset threshold value and does not need to be updated in real time, determining that a main body for receiving the data query is SCEF; if the change frequency of the service data corresponding to the information queried by the information query request is greater than or equal to a preset threshold and needs to be updated in real time, requesting the SCEF to query whether the service data meeting the preset time limit exists in the information open database, so that the SCEF queries that the service data meeting the preset time limit exists in the information open database and returns a query result; and when the SCEF inquires that the service data meeting the preset time limit in the information open database does not exist, sending a data inquiry request to a terminal.
According to another aspect of the embodiments of the present invention, there is provided an internet of things information query method, including: receiving a data query request, wherein the data query request is initiated by an IoT platform, the IoT platform receives an information query request sent by an application program, performs access validity authentication on the application program, judges whether information queried by the information query request exists in an information open database after the authentication is passed, and initiates the data query request when the information queried by the information query request does not exist in the information open database; returning a query result to the IoT platform to cause the IoT platform to return the query result to the application.
According to another aspect of the embodiments of the present invention, there is provided an internet of things information subscription method, including: receiving an information subscription request sent by an application program; carrying out access validity authentication on the application program; generating and storing subscription rules after the authentication is passed; issuing a subscription rule to a service capability opening function (SCEF); receiving a subscription result returned by the SCEF and storing the application program and a subscription rule corresponding to the application program; and returning the subscription result to the application program.
In an optional manner, the method further comprises: receiving a notification message of service data change sent by the SCEF, wherein the notification message contains changed data; saving the changed data and returning a notification response message to the SCEF; and forwarding the notification message of the service data change to the application program according to a subscription rule.
According to another aspect of the embodiments of the present invention, there is provided an internet of things information subscription method, including: receiving a subscription rule, wherein the subscription rule is issued by an IoT platform, the IoT platform receives an information subscription request sent by an application program, performs access validity authentication on the application program, generates and stores the subscription rule after the authentication is passed, and issues the subscription rule; and returning a subscription result to the IoT platform so that the IoT platform returns the subscription result to the application program and stores the application program and the subscription rule corresponding to the application program.
In an optional manner, the method further comprises: receiving a notification message of service data change sent by a Mobility Management Entity (MME), wherein the notification message contains changed data; sending a notification message of the change of the service data to the IoT platform so that the IoT platform saves the changed data and returns a notification response message to the SCEF; and receiving the notification response message and forwarding the notification response message to the MME.
According to another aspect of the embodiments of the present invention, there is provided an internet of things information query apparatus, including: the query request receiving module is used for receiving an information query request sent by an application program; the authentication module is used for carrying out access validity authentication on the application program; the judging module is used for judging whether the information inquired by the information inquiry request exists in the information open database after the authentication is passed; the query request initiating module is used for initiating a data query request when the information queried by the information query request does not exist in the information open database; and the query result receiving module is used for receiving the query result and returning the query result to the application program.
According to another aspect of the embodiments of the present invention, there is provided an internet of things information query apparatus, including: the system comprises an inquiry request receiving module, an IoT platform and an information inquiry module, wherein the inquiry request receiving module is used for receiving a data inquiry request, the data inquiry request is initiated by the IoT platform, the IoT platform receives the information inquiry request sent by an application program, performs access validity authentication on the application program, judges whether information inquired by the information inquiry request exists in an information open database after the authentication is passed, and initiates the data inquiry request when the information inquired by the information inquiry request does not exist in the information open database; and the query result returning module is used for returning the query result to the IoT platform so that the IoT platform returns the query result to the application program.
According to another aspect of the embodiments of the present invention, there is provided an internet of things information subscription device, including: a subscription request receiving module, configured to receive an information subscription request sent by an application program; the authentication module is used for carrying out access validity authentication on the application program; the subscription rule generating module is used for generating and storing a subscription rule after the authentication is passed; the subscription rule issuing module is used for issuing a subscription rule to a service capability opening function (SCEF); a subscription result receiving module, configured to receive a subscription result returned by the SCEF and store the application program and a subscription rule corresponding to the application program; and the subscription result returning module is used for returning the subscription result to the application program.
According to another aspect of the embodiments of the present invention, there is provided an internet of things information subscription device, including: a subscription rule receiving module, configured to receive a subscription rule, where the subscription rule is issued by an IoT platform, and the IoT platform receives an information subscription request sent by an application program, authenticates the access validity of the application program, generates and stores a subscription rule after the authentication is passed, and issues the subscription rule; and the subscription result returning module is used for returning the subscription result to the IoT platform so that the IoT platform returns the subscription result to the application program and stores the application program and the subscription rule corresponding to the application program.
According to another aspect of the embodiments of the present invention, there is provided an electronic device including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation of the internet of things information query method or the internet of things information subscription method.
According to another aspect of the embodiments of the present invention, there is provided a computer storage medium having at least one executable instruction stored therein, where the executable instruction causes a processor to perform the operations of the internet of things information query method as described above, or the executable instruction causes the processor to perform the operations of the internet of things information subscription method as described above.
According to the embodiment of the invention, the IoT platform receives the information query request sent by the application program, whether the information queried by the information query request exists in the information open database is judged, when the information queried by the information query request does not exist in the information open database, the data query request is initiated, and finally the query result is returned to the application program, the application program uniformly acquires the terminal and the network information from the IoT platform, the end-to-end IoT information opening is realized, and the information opening process does not need to periodically establish user plane bearing, so that the terminal electricity consumption is reduced, and the network overhead is reduced.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
An embodiment of the present invention is applied to an IoT system, and fig. 1 shows an architecture diagram of the IoT system, and as shown in fig. 1, an IoT system 10 includes a Radio Access Network (RAN) 11, a Service Capability Exposure Function (SCEF)system 12, a Mobility Management Entity (MME) 13, and a terminal 14. The terminal performs periodic information interaction with a Mobility Management Entity (MME) through an ATTACH signaling (ATTACH) and a Tracking Area Update (TAU) signaling message of a signaling plane, and reports identity information, network information, and service information of the terminal side. The MME integrates the information reported by the terminal and the information of the MME, and then shares data with a Service Capability Exposure Function (SCEF). The MME provides an Application Programming Interface (API) query Interface and a subscription notification API Interface for the SCEF to call.
In the embodiment of the present invention, the SCEF includes an information opening module, and has the API capabilities shown in table 1:
TABLE 1
The SCEF supports identity information, network information and service information query capability, and when an IoT platform query request is received, a query result is returned to the IoT platform through a response message. The SCEF supports an information subscription capability, and supports subscription of identity class information, network class information and service class information of the terminal from the IoT platform. The SCEF supports calling an information reporting API to notify the IoT platform when receiving the MME subscription event notification.
The IoT Platform comprises an information storage open module, acquires data from the SCEF through a southbound interface and stores the data in an information open database, and then opens the data to a third party Application program for use through an AEP (Application Enablement Platform) interface. The information open database model is shown in table 2:
the third party application may obtain terminal and network information from the IoT platform through a query flow or a subscription notification flow. The following describes the detailed flow of information query and information subscription notification.
Fig. 2 shows a flowchart of an internet of things information query method provided by the embodiment of the invention. As shown in fig. 2, the method includes:
step 201: the application initiates an information query request to the IoT platform.
In this step, the application program is a third party application program.
Step 202: the IoT platform pre-answer application.
In this step, the IoT platform receives the information query request sent by the application program, and pre-responds to the application program, indicating that the request has been received and is being processed.
Step 203: and the IoT platform performs access validity authentication on the application program.
Step 204: and after the authentication is passed, the IoT platform determines whether the information queried by the application program already exists in the information open database, if so, step 208 is executed, otherwise, step 205 is executed.
In this step, the IoT platform performs logic processing on data acquisition, determines whether the data to be acquired is existing data or data that needs to initiate query, and determines a data query mode, which is SCEF query or terminal query, according to the terminal type and the application program requirement.
Step 205: the IoT platform initiates a data query request to the SCEF or terminal.
If no data exists in the information open database, the IoT platform needs to initiate a data query request to the SCEF or the terminal. In this step, the IoT platform may further determine, according to different terminal types and application requirements, whether to query the information by the SCEF or directly establish the user plane connection with the terminal to obtain the information. For example, for some terminals intermittently accessing the network:
if some service data change slowly (for example, less than a preset threshold value) and do not need to be updated in real time (for example, a table lookup terminal or the like), the IoT directly selects the SCEF to return the query result when the application queries;
if the service data of the terminal is changed quickly (for example, greater than or equal to the preset threshold) and needs to be updated in real time (for example, the location of the logistics terminal is changed), a connection with the terminal needs to be established to obtain corresponding data in order to avoid the non-latest SCEF data during the query of the application program. In this case, the IoT platform may also first query, by the SCEF, whether there is service data that satisfies the preset time limit (e.g., does not exceed X branches), and if so, return the query result, and if not, establish connection with the terminal to obtain information.
By the method, when the application program acquires the terminal and the network information from the IoT platform, the IoT platform can select to establish the user plane connection with the terminal or acquire data through the SCEF according to the type of the terminal and the application requirement, so that the IoT platform can reasonably utilize the SCEF data and can acquire accurate data through the terminal user plane connection in time according to various terminals and various application program requirements.
Step 206: the SCEF initiates a data query request to the MME.
Step 207: and the MME returns a data query result to the SCEF.
Step 208: the SCEF or terminal returns the data query result to the IoT platform.
When the IoT platform initiates a data query request to the SCEF, returning a data query result to the IoT platform by the SCEF; and when the IoT platform initiates a data query request to the terminal, returning a data query result to the IoT platform by the terminal.
At step 209, the IoT platform returns the data query result to the application.
According to the embodiment of the invention, the information opening system architecture suitable for the Internet of things is constructed, the information opening module is designed in the SCEF, the networking terminal and the network information are supported to be opened to the outside, the information storage opening module and the information opening database are constructed in the IoT platform, the application program uniformly acquires the terminal and the network information from the IoT platform, the end-to-end opening of the Internet of things information is realized, and the information opening process does not need to periodically establish user plane bearing, so that the power consumption of the terminal is reduced, and the network overhead is reduced.
The terminal does not need to periodically and actively establish user interface connection to send information, so that the power consumption of a terminal battery can be reduced; the wireless access network does not need to periodically establish and release user plane bearer, and can effectively reduce network overhead; the IoT platform deeply participates in the collection, integration and storage of the information of the Internet of things, and is opened to the outside for the application program, so that the value of the platform can be fully improved.
Fig. 3 shows a flowchart of an internet of things information subscription method provided by an embodiment of the present invention. As shown in fig. 3, the method includes:
step 301: the application initiates an information subscription request to the IoT platform.
Step 302: the IoT platform pre-answer application.
In this step, the IoT platform receives the information subscription request sent by the application program, and responds to the application program in advance, indicating that the request has been received and is being processed.
Step 303: and the IoT platform authenticates the access validity of the application program, and generates and stores subscription rules.
Step 304: the IoT platform issues subscription rules to the SCEF, and the SCEF is required to report data according to the rules.
Step 305: the SCEF issues a subscription rule to the MME and requests the SCEF to report data according to the rule.
Step 306: the MME returns the subscription result to the SCEF.
Step 307: the SCEF returns the subscription result to the IoT platform.
Step 308: the IoT platform stores an application and subscription rule information corresponding to the application.
Step 309: the IoT platform returns the subscription result to the application.
According to the embodiment of the invention, the information opening system architecture suitable for the Internet of things is constructed, the information opening module is designed in the SCEF, the networking terminal and the network information are supported to be opened to the outside, the information storage opening module and the information opening database are constructed in the IoT platform, the application program uniformly acquires the terminal and the network information from the IoT platform, the end-to-end opening of the Internet of things information is realized, and the information opening process does not need to periodically establish user plane bearing, so that the power consumption of the terminal is reduced, and the network overhead is reduced.
The terminal does not need to periodically and actively establish user interface connection to send information, so that the power consumption of a terminal battery can be reduced; the wireless access network does not need to periodically establish and release user plane bearer, and can effectively reduce network overhead; the IoT platform deeply participates in the collection, integration and storage of the information of the Internet of things, and is opened to the outside for the application program, so that the value of the platform can be fully improved.
Fig. 4 shows a flowchart of an information notification method of the internet of things according to an embodiment of the present invention, because the notification is initiated based on a subscription, the notification method may also be counted as a part of the subscription method according to the above embodiment. As shown in fig. 4, the method includes:
step 401: and the MME judges that the terminal and the network data are changed and sends a notification message to the SCEF.
Step 402: the SCEF forwards the notification message to the IoT platform.
Step 403: and the IoT platform detects the validity of the data and then stores the data.
Step 404: the IoT platform sends a notification response message to the SCEF.
Step 405: the SCEF forwards the notification response message to the MME.
Step 406: the IoT platform decides whether to send data to the application according to the subscription rules.
Step 407: if so, the IoT platform sends a notification message to the application.
Step 408: the application sends a notification response message to the IoT platform.
According to the embodiment of the invention, the information opening system architecture suitable for the Internet of things is constructed, the information opening module is designed in the SCEF, the networking terminal and the network information are supported to be opened to the outside, the information storage opening module and the information opening database are constructed in the IoT platform, the application program uniformly acquires the terminal and the network information from the IoT platform, the end-to-end opening of the Internet of things information is realized, and the information opening process does not need to periodically establish user plane bearing, so that the power consumption of the terminal is reduced, and the network overhead is reduced.
The terminal does not need to periodically and actively establish user interface connection to send information, so that the power consumption of a terminal battery can be reduced; the wireless access network does not need to periodically establish and release user plane bearer, and can effectively reduce network overhead; the IoT platform deeply participates in the collection, integration and storage of the information of the Internet of things, and is opened to the outside for the application program, so that the value of the platform can be fully improved.
The embodiments of the present invention are described in detail below from the IoT platform and the SCEF side, respectively.
Fig. 5 shows a flowchart of an internet of things information query method provided by an embodiment of the present invention, which is applied to an IoT platform side. As shown in fig. 5, the method includes:
step 501: receiving an information query request sent by an application program;
step 502: carrying out access validity authentication on the application program;
step 503: judging whether the information inquired by the information inquiry request exists in an information open database after the authentication is passed;
step 504: when the information inquired by the information inquiry request does not exist in the information open database, initiating a data inquiry request;
step 505: and receiving a query result and returning the query result to the application program.
In an alternative manner, thestep 504 includes:
step 5041: determining a main body for receiving data query according to preset conditions;
wherein the body comprises an open to service capability function, SCEF, and a terminal.
Step 5042: and sending a data query request to the determined main body for receiving the data query.
In an optional manner, the determining the subject of the received data query according to the preset condition in step 5041 includes:
step 5041 a: if the change frequency of the service data corresponding to the information queried by the information query request is lower than a preset threshold value and does not need to be updated in real time, determining that a main body for receiving the data query is SCEF;
step 5041 b: and if the change frequency of the service data corresponding to the information inquired by the information inquiry request is greater than or equal to a preset threshold and needs to be updated in real time, determining that a main body for receiving the data inquiry is a terminal.
In an alternative manner, thestep 504 includes:
step 5041': if the change frequency of the service data corresponding to the information queried by the information query request is lower than a preset threshold value and does not need to be updated in real time, determining that a main body for receiving the data query is SCEF;
step 5042': if the change frequency of the service data corresponding to the information queried by the information query request is greater than or equal to a preset threshold and needs to be updated in real time, requesting the SCEF to query whether the service data meeting the preset time limit exists in the information open database, so that the SCEF queries that the service data meeting the preset time limit exists in the information open database and returns a query result;
step 5043': and when the SCEF inquires that the service data meeting the preset time limit in the information open database does not exist, sending a data inquiry request to a terminal.
Fig. 6 shows a flowchart of an internet of things information query method provided by an embodiment of the present invention, where the method is applied to an SCEF side. As shown in fig. 6, the method includes:
step 601: receiving a data query request, wherein the data query request is initiated by an IoT platform, the IoT platform receives an information query request sent by an application program, performs access validity authentication on the application program, judges whether information queried by the information query request exists in an information open database after the authentication is passed, and initiates the data query request when the information queried by the information query request does not exist in the information open database;
step 602: returning a query result to the IoT platform to cause the IoT platform to return the query result to the application.
In an optional manner, before the IoT platform initiates the data query request, a main body for receiving the data query is determined according to a preset condition, where the main body includes a SCEF and a terminal, and then the data query request is sent to the determined main body for receiving the data query.
In an optional manner, the determining a subject of the received data query according to a preset condition includes:
if the change frequency of the service data corresponding to the information queried by the information query request is lower than a preset threshold value and does not need to be updated in real time, determining that a main body for receiving the data query is SCEF;
and if the change frequency of the service data corresponding to the information inquired by the information inquiry request is greater than or equal to a preset threshold and needs to be updated in real time, determining that a main body for receiving the data inquiry is a terminal.
In an optional manner, before the IoT platform initiates the data query request, it is determined whether a change frequency of service data corresponding to information queried by the information query request is lower than a preset threshold and does not need to be updated in real time; if the change frequency of the service data corresponding to the information queried by the information query request is lower than a preset threshold value and does not need to be updated in real time, determining that a main body for receiving the data query is SCEF; if the change frequency of the service data corresponding to the information queried by the information query request is greater than or equal to a preset threshold and needs to be updated in real time, requesting the SCEF to query whether the service data meeting the preset time limit exists in the information open database, so that the SCEF queries that the service data meeting the preset time limit exists in the information open database and returns a query result; and when the SCEF inquires that the service data meeting the preset time limit in the information open database does not exist, sending a data inquiry request to a terminal.
Fig. 7 shows a flowchart of an internet of things information subscription method provided by an embodiment of the present invention, which is applied to an IoT platform side. As shown in fig. 7, the method includes:
step 701: receiving an information subscription request sent by an application program;
step 702: carrying out access validity authentication on the application program;
step 703: generating and storing subscription rules after the authentication is passed;
step 704: issuing a subscription rule to a service capability opening function (SCEF);
step 705: receiving a subscription result returned by the SCEF and storing the application program and a subscription rule corresponding to the application program;
step 706: and returning the subscription result to the application program.
In some embodiments, referring to fig. 3 and 4, the SCEF needs to issue a subscription rule to the MME, and the MME returns a subscription result to the SCEF.
In an optional manner, the method further comprises:
step 707: receiving a notification message of service data change sent by the SCEF, wherein the notification message contains changed data;
step 708: saving the changed data and returning a notification response message to the SCEF;
step 709: and forwarding the notification message of the service data change to the application program according to a subscription rule.
In some embodiments, as may be seen with reference to fig. 3 and 4, when there is a change in data, the MME initiates a data change notification to the SCEF. And after receiving the notification response message returned by the IoT platform, the SCFF sends the notification response message to the MME.
Fig. 8 shows a flowchart of an internet of things information subscription method provided in an embodiment of the present invention, which is applied to the SCEF platform side. As shown in fig. 8, the method includes:
step 801: receiving a subscription rule, wherein the subscription rule is issued by an IoT platform, the IoT platform receives an information subscription request sent by an application program, performs access validity authentication on the application program, generates and stores the subscription rule after the authentication is passed, and issues the subscription rule;
step 802: and returning a subscription result to the IoT platform so that the IoT platform returns the subscription result to the application program and stores the application program and the subscription rule corresponding to the application program.
In some embodiments, referring to fig. 3 and 4, the SCEF needs to issue a subscription rule to the MME, and the MME returns a subscription result to the SCEF.
In an optional manner, the method further comprises:
step 803: receiving a notification message of service data change sent by a Mobility Management Entity (MME), wherein the notification message contains changed data;
step 804: sending a notification message of the change of the service data to the IoT platform so that the IoT platform saves the changed data and returns a notification response message to the SCEF;
step 805: and receiving the notification response message and forwarding the notification response message to the MME.
In some embodiments, as may be seen with reference to fig. 3 and 4, when there is a change in data, the MME initiates a data change notification to the SCEF. And after receiving the notification response message returned by the IoT platform, the SCFF sends the notification response message to the MME.
Fig. 9 is a schematic structural diagram of an internet of things information query device provided by an embodiment of the present invention. As shown in fig. 9, the apparatus 900 includes: a query request receiving module 901, an authentication module 902, a judgment module 903, a query request initiating module 904 and a query result receiving module 905.
The query request receiving module 901 is configured to receive an information query request sent by an application program; the authentication module 902 is configured to perform access validity authentication on the application program; the judging module 903 is configured to judge whether the information queried by the information query request exists in the information open database after the authentication is passed; the query request initiating module 904 is configured to initiate a data query request when the information queried by the information query request does not exist in the open information database; the query result receiving module 905 is configured to receive a query result and return the query result to the application program.
In an optional manner, the query request initiating module 904 is specifically configured to: determining a main body for receiving data query according to preset conditions, wherein the main body comprises a Service Capability Exposure Function (SCEF) and a terminal; and sending a data query request to the determined main body for receiving the data query.
In an optional manner, the determining a subject of the received data query according to a preset condition includes: if the change frequency of the service data corresponding to the information queried by the information query request is lower than a preset threshold value and does not need to be updated in real time, determining that a main body for receiving the data query is SCEF; and if the change frequency of the service data corresponding to the information inquired by the information inquiry request is greater than or equal to a preset threshold and needs to be updated in real time, determining that a main body for receiving the data inquiry is a terminal.
In an optional manner, the determining, according to a preset condition, a main body for receiving a data query, and sending a data query request to the determined main body for receiving the data query includes: if the change frequency of the service data corresponding to the information queried by the information query request is lower than a preset threshold value and does not need to be updated in real time, determining that a main body for receiving the data query is SCEF; if the change frequency of the service data corresponding to the information queried by the information query request is greater than or equal to a preset threshold and needs to be updated in real time, requesting the SCEF to query whether the service data meeting the preset time limit exists in the information open database, so that the SCEF queries that the service data meeting the preset time limit exists in the information open database and returns a query result; and when the SCEF inquires that the service data meeting the preset time limit in the information open database does not exist, sending a data inquiry request to a terminal.
Fig. 10 is a schematic structural diagram illustrating an internet of things information query device according to an embodiment of the present invention. As shown in fig. 10, the apparatus 1000 includes: a query request receiving module 1001 and a query result returning module 1002.
The query request receiving module 1001 is configured to receive a data query request, where the data query request is initiated by an IoT platform, the IoT platform receives an information query request sent by an application program, performs access legitimacy authentication on the application program, determines whether information queried by the information query request exists in an information open database after the authentication is passed, and initiates the data query request when the information queried by the information query request does not exist in the information open database; the query result returning module 1002 is configured to return a query result to the IoT platform, so that the IoT platform returns the query result to the application program.
Fig. 11 is a schematic structural diagram illustrating an internet of things information subscription device according to an embodiment of the present invention. As shown in fig. 11, the apparatus 1100 includes: the subscription request receiving module 1101, the authentication module 1102, the subscription rule generating module 1103, the subscription rule issuing module 1104, the subscription result receiving module 1105 and the subscription result returning module 1106.
The subscription request receiving module 1101 is configured to receive an information subscription request sent by an application program; the authentication module 1102 is configured to perform access validity authentication on the application program; the subscription rule generating module 1103 is configured to generate and store a subscription rule after the authentication is passed; the subscription rule issuing module 1104 is configured to issue a subscription rule to a service capability exposure function SCEF; the subscription result receiving module 1105 is configured to receive a subscription result returned by the SCEF and store the application program and a subscription rule corresponding to the application program; the subscription result returning module 1106 is configured to return the subscription result to the application program.
In an optional manner, the apparatus 1100 is further configured to receive a notification message of a service data change sent by the SCEF, where the notification message includes changed data; saving the changed data and returning a notification response message to the SCEF; and forwarding the notification message of the service data change to the application program according to a subscription rule.
Fig. 12 is a schematic structural diagram illustrating an internet of things information subscription device according to an embodiment of the present invention. As shown in fig. 12, the apparatus 1200 includes: a subscription rule receiving module 1201 and a subscription result returning module 1202.
The subscription rule receiving module 1201 is configured to receive a subscription rule, where the subscription rule is issued by an IoT platform, the IoT platform receives an information subscription request sent by an application program, performs access validity authentication on the application program, generates and stores a subscription rule after the authentication is passed, and issues the subscription rule; the subscription result returning module 1202 is configured to return a subscription result to the IoT platform, so that the IoT platform returns the subscription result to the application program and stores the application program and the subscription rule corresponding to the application program.
In an optional manner, the apparatus 1200 is further configured to: receiving a notification message of service data change sent by a Mobility Management Entity (MME), wherein the notification message contains changed data; sending a notification message of the change of the service data to the IoT platform so that the IoT platform saves the changed data and returns a notification response message to the SCEF; and receiving the notification response message and forwarding the notification response message to the MME.
An embodiment of the present invention provides a computer storage medium, where at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to execute the steps of the internet of things information query method or the steps of the internet of things information subscription method in any of the above method embodiments.
Embodiments of the present invention provide a computer program product, which includes a computer program stored on a computer storage medium, where the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the steps of the internet-of-things information query method or the steps of the internet-of-things information subscription method in any of the above-mentioned method embodiments.
Fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
As shown in fig. 13, the electronic device may include: a processor (processor)1202, a communication Interface 1204, a memory 1206, and a communication bus 1208.
Wherein: the processor 1202, communication interface 1204, and memory 1206 communicate with one another via a communication bus 1208. A communication interface 1204 for communicating with network elements of other devices, such as clients or other servers. The processor 1202 is configured to execute the program 1210, and may specifically execute the steps of any of the above-described method embodiments.
In particular, program 1210 may include program code comprising computer operating instructions.
The processor 1202 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the present invention. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
The memory 1206 is used for storing programs 1210. The memory 1206 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.