WO2024011634A1 - Subscription message processing method and apparatus, device, storage medium, and program product - Google Patents

Subscription message processing method and apparatus, device, storage medium, and program product Download PDF

Info

Publication number
WO2024011634A1
WO2024011634A1 PCT/CN2022/106111 CN2022106111W WO2024011634A1 WO 2024011634 A1 WO2024011634 A1 WO 2024011634A1 CN 2022106111 W CN2022106111 W CN 2022106111W WO 2024011634 A1 WO2024011634 A1 WO 2024011634A1
Authority
WO
WIPO (PCT)
Prior art keywords
subscription
parameter
request message
value
message
Prior art date
Application number
PCT/CN2022/106111
Other languages
French (fr)
Chinese (zh)
Inventor
吕小强
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/106111 priority Critical patent/WO2024011634A1/en
Publication of WO2024011634A1 publication Critical patent/WO2024011634A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data

Definitions

  • This application relates to the technical field of the Internet of Things, and in particular to a subscription message processing method, device, equipment, storage medium and program product.
  • IoT Internet of Things
  • a subscribing device in the Internet of Things system may request a subscription from a subscribed device.
  • the subscribing device can send a subscription request message to the subscribed device.
  • the subscribed device can report the status of the subscribed resource to the subscribing device regularly or non-regularly.
  • Embodiments of the present application provide a subscription message processing method, device, equipment, storage medium and program product.
  • the technical solutions are as follows:
  • embodiments of the present application provide a subscription message processing method, which is executed by a subscription device.
  • the method includes:
  • the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or the first
  • the parameter value of the specified parameter contained in the subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum interval for subscribing to data reports The maximum value; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resource subscribed by the subscription device;
  • embodiments of the present application provide a subscription message processing method, which is executed by a subscribed device.
  • the method includes:
  • the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, Alternatively, the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate The maximum value of the maximum interval of the subscription data report; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resource subscribed by the subscription device.
  • this embodiment of the present application provides a subscription message processing device, which includes:
  • a message generation module configured to generate a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or, The parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate subscription data The maximum value of the maximum interval of reports; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resources subscribed by the subscription device;
  • a sending module configured to send the first subscription request message to the subscribed device.
  • this embodiment of the present application provides a subscription message processing device, which includes:
  • embodiments of the present application provide a computer device, the computer device is implemented as an information reporting device, and the computer device includes a processor, a memory, and a transceiver;
  • a computer program is stored in the memory, and the processor executes the computer program, so that the computer device implements the above subscription message processing method.
  • embodiments of the present application provide a computer device, which includes a processor, a memory, and a transceiver.
  • the memory stores a computer program, and the computer program is configured to be executed by the processor. Implement the above subscription message processing method.
  • embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored, and the computer program is loaded and executed by a processor to implement the above subscription message processing method.
  • this application also provides a chip, which is used to run in a computer device, so that the computer device executes the above subscription message processing method.
  • the present application provides a computer program product including computer instructions stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above subscription message processing method.
  • the present application provides a computer program, which is executed by a processor of a computer device to implement the above subscription message processing method.
  • the subscribing device When the subscribing device unsubscribes from the subscribed device, it can generate a first subscription message that does not contain the specified parameters, or it can generate a first subscription message that contains the specified parameters and the parameter value is a specific value or a random value, providing a method for unsubscribing.
  • the clear setting method of the parameters in the subscription request message used to indicate the maximum value and/or the minimum value of the maximum interval for subscription data reporting unifies the behavior of canceling message subscriptions and expands the application scenarios of message subscriptions.
  • Figure 1 is a schematic diagram of the network architecture of the Internet of Things provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of a subscription process provided by an exemplary embodiment of the present application.
  • Figure 3 is a flow chart of a subscription message processing method provided by an embodiment of the present application.
  • Figure 4 is a flow chart of a subscription message processing method provided by an embodiment of the present application.
  • Figure 5 is a flow chart of a subscription message processing method provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of a subscription process involved in the embodiment shown in Figure 5;
  • Figure 7 is a block diagram of a subscription message processing device provided by an embodiment of the present application.
  • Figure 8 is a block diagram of a subscription message processing device provided by an embodiment of the present application.
  • Figure 9 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the network architecture of the Internet of Things may include: an Internet of Things device 110 (shown as an Internet of Things device 110a, an Internet of Things device 110b, an Internet of Things device 110c, and an Internet of Things device 110d in Figure 1) and a configuration device 120; optionally, the The network architecture may also include bridging devices 130;
  • the Internet of Things device 110 may refer to a device used to provide client functions or server functions corresponding to the Internet of Things protocol in the Internet of Things.
  • the IoT device 110 may be a smart home device, such as a smart switch, a smart lamp, a smart TV, a smart air conditioner, a smart refrigerator, a smart microwave oven, a smart rice cooker, a sweeping robot, etc.
  • a smart home device such as a smart switch, a smart lamp, a smart TV, a smart air conditioner, a smart refrigerator, a smart microwave oven, a smart rice cooker, a sweeping robot, etc.
  • the IoT device 110 may be an industrial production equipment, such as a lathe, an industrial robot, a solar panel, a wind turbine, etc.
  • the Internet of Things device 110 may be a commercial service device, such as an unmanned vending machine or the like.
  • the IoT device 110 may be a sensing device, such as a surveillance camera, an infrared sensor, a sound sensor, a temperature sensor, etc.
  • the configuration device 120 is a user-side terminal device.
  • the configuration device 120 can be a smart controller, a smart remote control, a smart phone, a tablet, a smart watch, a smart TV, a smart speaker, a smart switch, a gateway, etc.; or the configuration device 120 can also be a personal computer, such as a desktop. Computers, laptops, personal workstations and more.
  • the configuration device 120 refers to a client entity (which may be a virtual entity) running on a terminal device.
  • the configuration device 120 may run in a terminal device and is used to configure the Internet of Things device.
  • Application Application, APP
  • the bridge device 130 is used to implement interaction between two devices supporting different Internet of Things protocols.
  • the bridge device 130 provides information conversion and transfer services between IoT devices 110 that support different IoT protocols, or between IoT devices 110 that support different IoT protocols and the configuration device 120 .
  • the bridging device 130 may be a device dedicated for bridging, or the bridging device 130 may also be an intelligent device with a bridging function, such as a gateway or a router.
  • the above-mentioned Internet of Things device 110, configuration device 120, and bridge device 130 may be electronic devices that meet the same or different Internet of Things protocols.
  • they may be electronic devices that meet the requirements of the Connectivity Standards Alliance (CSA). Matter protocol for electronic devices.
  • CSA Connectivity Standards Alliance
  • a secure connection can be established between the IoT device 110a and the IoT device 110c, for example, a secure connection is established based on the Matter specification.
  • the IoT device 110b and the IoT device 110d support different protocol specifications, for example, the IoT device 110b is a Zigbee device and the IoT device 110d is a Matter device, the IoT device 110b and the IoT device 110d can connected via a bridge device 130.
  • FIG 2 shows a schematic diagram of a subscription process provided by an exemplary embodiment of the present application.
  • the subscription process may include the following steps:
  • the subscription device i.e., the subscription initiator
  • the subscription process and sends a subscribe request (subscribe request) message.
  • the message content of the subscribe request message can be shown in Table 1 below.
  • the meaning of the keepsubscriptions parameter is: when the publisher (publisher) receives a subscribe request whose value is FALSE, it needs to delete all initiators and publishers (publisher, also called the publisher in the embodiment of this application). Subscription relationship between subscribing devices). Maxintervalceiling specifies the maximum value of the maximum interval for notification messages. Minintervalfloor specifies the minimum value of the minimum interval for notification messages.
  • the publisher After receiving the above subscription request, the publisher checks whether the Initiator has the permission to subscribe to the subscription target (subscribed resource). Send the current status of the subscription target (such as properties (such as temperature values, light switches, etc.) or events) through report data request messages.
  • the current status of the subscription target such as properties (such as temperature values, light switches, etc.) or events
  • the Initiator After receiving the report data request message, the Initiator replies with a status response (status response message), which indicates that it has received the current status of the subscription target.
  • the message subscribe response may include content as shown in Table 2 below.
  • Subscribe ID Used to identify a subscription relationship between two devices
  • MinInterval the minimum interval for notification messages (i.e. data report messages);
  • MaxInterval The maximum interval for notification messages.
  • the settings of the MaxIntervalCeiling and MinIntervalfloor fields are not uniform, resulting in possible incompatible message subscriptions between devices from different manufacturers, resulting in limited application scenarios for message subscriptions.
  • Figure 3 shows a flow chart of a subscription message processing method provided by an embodiment of the present application.
  • This method can be executed by a subscription device.
  • the subscription device can be the Internet of Things in the network architecture shown in Figure 1 Device 110 or one of the configuration devices 120; the method may include the following steps:
  • Step 301 Generate a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or the first subscription request message contains
  • the parameter value of the specified parameter is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum value of the maximum interval for subscribing to data reports; the second parameter is used to Minimum value indicating the minimum interval for subscription data reports; subscription data reports are used to indicate the status of resources subscribed to by the subscribing device.
  • the above-mentioned first subscription request message may be a message generated by the subscribing device when canceling the subscription relationship with the subscribed device.
  • Step 302 Send a first subscription request message to the subscribed device.
  • the subscribing device when the subscribing device unsubscribes from the subscribed device, it can generate a first subscription message that does not contain specified parameters, or generate a first subscription message that contains specified parameters with a specific parameter value.
  • the first subscription message with a value or a random value provides a clear way to set the parameters in the subscription request message that indicate the maximum value and/or minimum value of the maximum interval for subscription data reporting in the unsubscription scenario. Unified the behavior of canceling message subscriptions and expanded the application scenarios of message subscriptions.
  • FIG 4 shows a flow chart of a subscription message processing method provided by an embodiment of the present application.
  • This method can be executed by a subscribed device.
  • the subscribed device can be in the network architecture shown in Figure 1
  • One of the Internet of Things devices 110; the method may include the following steps:
  • Step 401 Receive the first subscription request message sent by the subscribing device; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or the first subscription
  • the parameter value of the specified parameter contained in the request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum value of the maximum interval of the subscription data report; The second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resources subscribed by the subscribing device.
  • the subscribing device when the subscribing device unsubscribes from the subscribed device, it can generate a first subscription message that does not contain specified parameters, or generate a first subscription message that contains specified parameters with a specific parameter value.
  • the first subscription message with a value or a random value provides a clear way to set the parameters in the subscription request message that indicate the maximum value and/or minimum value of the maximum interval for subscription data reporting in the unsubscription scenario. Unified the behavior of canceling message subscriptions and expanded the application scenarios of message subscriptions.
  • FIG. 5 shows a flow chart of a subscription message processing method provided by an embodiment of the present application.
  • This method can be interactively executed by a subscribing device and a subscribed device.
  • the subscribing device can be in the network architecture shown in Figure 1
  • One of the Internet of Things devices 110 or the configuration device 120, the subscribed device may be one of the Internet of Things devices 110 in the network architecture shown in Figure 1; the method may include the following steps:
  • Step 501 The subscribing device generates a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or the first subscription request message
  • the parameter value of the specified parameter contained in is a specific value or a random value.
  • the parameter value of the keep subscription field in the first subscription request message is the first parameter value; the first parameter value is used to indicate deletion of the subscription relationship between the subscribing device and the subscribed device.
  • the above-mentioned keep subscription field may be the keepkeepsubscriptions field in the above-mentioned Table 1, and the first parameter value may be false. That is to say, the false parameter value in the keepkeepsubscriptions field is used to identify that the first subscription request message is a message to delete the subscription relationship.
  • the specified parameters include at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum value of the maximum interval for subscribing to data reports; the second parameter is used to indicate the minimum value of the minimum interval for subscribing to data reports; Subscription data reports are used to indicate the status of resources subscribed by subscribing devices.
  • the above-mentioned subscription data report may be the data report message in the embodiment shown in FIG. 2 .
  • the subscribing device may not set the MaxIntervalCeiling field and/or the MinIntervalFloor field in the first subscription request.
  • the parameter value of the specified parameter contained in the first subscription request message may satisfy one of the following situations:
  • the parameter value of the specified parameter is 0 value.
  • the subscribing device can set the parameter value of the MaxIntervalCeiling field in the first subscription message to 0.
  • the subscribing device can set the parameter value of the MinIntervalFloor field in the first subscription message to 0.
  • the subscribing device can set the parameter values of the MaxIntervalCeiling field and the MinIntervalFloor field in the first subscription message to 0.
  • the parameter value of the specified parameter is a specified non-0 value.
  • the subscribing device can set the parameter value of the MaxIntervalCeiling field in the first subscription message to 1.
  • the subscribing device can set the parameter value of the MinIntervalFloor field in the first subscription message to 2.
  • the subscribing device can set the MaxIntervalCeiling field in the first subscription message to 1 and set the parameter value of the MinIntervalFloor field to 2.
  • the parameter value of the specified parameter is NULL value.
  • the subscribing device can set the parameter value of the MaxIntervalCeiling field in the first subscription message to NULL.
  • the subscribing device can set the parameter value of the MinIntervalFloor field in the first subscription message to NULL.
  • the subscribing device can set the parameter values of the MaxIntervalCeiling field and the MinIntervalFloor field in the first subscription message to NULL.
  • the parameter value of the first parameter in the first subscription request message is equal to the parameter value of the second parameter in the first subscription request message.
  • the subscribing device can refer to the parameter value of the MinIntervalFloor field in the first subscription message and set the MaxIntervalCeiling field to the same value. For example, when the parameter value of the MinIntervalFloor field in the first subscription message is set to 3, the subscribing device also sets the parameter value of the MaxIntervalCeiling field to 3.
  • the subscribing device can refer to the parameter value of the MaxIntervalCeiling field in the first subscription message and set the MinIntervalFloor field to the same value.
  • the subscribing device can set the parameter values of the MaxIntervalCeiling field and the MinIntervalFloor field in the first subscription message to the same value, for example, both to 3, or both to 3. The same random value.
  • the subscribing device may also set the parameter values of the MaxIntervalCeiling field and/or the MinIntervalFloor field to random values in the first subscription request.
  • Step 502 The subscribing device sends a first subscription request message to the subscribed device; the subscribed device receives the first subscription request message.
  • the subscribing device After the subscribing device generates the above first subscription request message, it can send the first subscription request message to the subscribed device.
  • Step 503 The subscribed device deletes the subscription relationship between the subscribing device and the subscribed device.
  • the subscribed device After the subscribed device receives the first subscription request message and determines that the subscribing device wants to delete the subscription relationship in the subscribed device, the subscribed device can query the response subscription relationship based on the identification information of the subscribing device and delete the queried subscription relationship.
  • the subscribed device may not process the parameter value of the specified parameter.
  • the specified parameters in the message such as the MaxIntervalCeiling field and/or the MinIntervalFloor field
  • the above-mentioned not processing the specified parameters in the message may include not reading the parameter values in the specified parameters, or not setting the values of MaxInterval and/or MinInterval according to the parameter values in the specified parameters, etc.
  • the subscribed device may also perform the following: step:
  • the subscription relationship between the subscribing device and the subscribed device is deleted.
  • the first subscription request message does not contain the specified parameter, or the parameter value of the specified parameter included in the first subscription request message is a specific value.
  • the subscribed message receives the above-mentioned first subscription request message and determines that the subscribing device wants to delete the subscription relationship in the subscribed device, the validity of the first subscription request message can be verified based on the parameter value of the specified parameter. , and when the legality check passes, delete the subscription relationship between the subscribing device and the subscribed device.
  • the first subscription request message may have a transmission error, or the first subscription request message may be sent by a rogue device or hijacked by a virus.
  • the subscribed device It is not necessary to perform the step of deleting the subscription relationship between the subscribing device and the subscribed device.
  • the above-mentioned process of checking the validity of the message format of the first subscription request message may include:
  • the specified parameter is queried in the first subscription request message; if the specified parameter is not queried, it is determined that the message format of the first subscription request message passes the validity check.
  • the subscribed device receives the above-mentioned first subscription request message and determines that the subscribing device When you want to delete the subscription relationship in the subscribed device, you can query the specified parameters in the first subscription request message. If the specified parameters are not queried, it is determined that the message format of the first subscription request message passes the legality check; optionally, If the above specified parameters are queried, it can be determined that the message format of the first subscription request message fails the validity check.
  • the above-mentioned process of checking the validity of the message format of the first subscription request message may include:
  • the parameter value of the specified parameter included in the first subscription request message is a specific value
  • the subscribed device receives the above-mentioned first subscription request. message, and determine that when the subscribing device wants to delete the subscription relationship in the subscribed device, it can read the parameter value of the specified parameter in the first subscription request message. If the read parameter value is the specified value, determine the first subscription
  • the message format of the request message passes the legality check; optionally, if the read parameter value is not the specified value, it can be determined that the message format of the first subscription request message does not pass the legality check.
  • the subscribed device knows in advance that the parameter value of the specified parameter contained in the subscription message for deleting the subscription relationship is 0, if the parameter value of the specified parameter read by the subscribed device is 0, then determine The message format of the first subscription request message passes the validity check.
  • the subscribed device when the subscribed device already knows in advance that the parameter value of the specified parameter contained in the subscription message for deleting the subscription relationship is a specified non-zero value, if the parameter value of the specified parameter read by the subscribed device is the specified value, If the value is non-0, it is determined that the message format of the first subscription request message passes the validity check.
  • the subscribed device already knows in advance that the parameter value of the specified parameter contained in the subscription message for deleting the subscription relationship is a NULL value, if the parameter value of the specified parameter read by the subscribed device is a NULL value, Then it is determined that the message format of the first subscription request message passes the validity check.
  • the subscribed device already knows in advance that the parameter value of the first parameter and the parameter value of the second parameter in the subscription message for deleting the subscription relationship are equal values, if the MaxIntervalCeiling field read by the subscribed device parameter value and the parameter value of the MinIntervalFloor field are equal, it is determined that the message format of the first subscription request message passes the validity check.
  • the subscribed device may also perform the following steps:
  • the first subscription report message In response to the first subscription request message, send a first subscription report message to the subscribing device; the first subscription report message is used to indicate the status of the resource subscribed by the subscribed device in the subscribed device; receive the subscribed device's response to the first subscription report message The first status response message is sent; the first status response message is used to indicate that the first subscription report message is successfully received.
  • the subscribing device may also perform the following steps:
  • the subscribing device may report the status of the subscription target again, that is, send a subscription report message.
  • the subscription report message carries the status information of the subscription target (i.e., the current status of the subscription target). The status of resources subscribed to by the subscribing device in the subscribed device).
  • the subscribing device may return a subscription response message to the subscribed device.
  • the subscription response message may be used to inform the subscribing device that the first subscription report message has been successfully received.
  • the subscribed device can subsequently perform the following operations:
  • the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
  • the subscribed device can also perform the following operations in the future:
  • the subscribed device after the subscribed device deletes the subscription relationship corresponding to the subscribing device, the subscribed device can send a status response message to the subscribing device, and notify the corresponding subscription relationship that the corresponding subscription relationship has been deleted through the status response message. Give subscription equipment.
  • FIG. 6 shows a schematic diagram of a subscription process involved in an embodiment of the present application.
  • the subscription process may include the following steps:
  • the Initiator initiates a subscription request process and needs to generate a subscription request message: set the source, target, S Flag, Dsiz Flag, set keepsubscriptions to TRUE in the request message, and set the parameter values of the MaxIntervalCeiling and MinIntervalfloor fields. .
  • MaxIntervalCeiling and MinIntervalfloor are set to 0, other equal values, or other special values
  • MaxIntervalCeiling and MinIntervalfloor are set to NULL
  • Publisher After receiving the above subscription request message, Publisher will determine whether the Initiator has the authority to perform the above operation.
  • Publisher establishes a new subscription relationship.
  • Publisher sends a data report message to the Initiator, and the Initiator returns a status response message to the Publisher.
  • the above S69-S610 are optional steps; among them, even in the unsubscription scenario, the Initiator may send the data report message for the last time.
  • 200OK usually refers to a successful response message.
  • the subscribing device when the subscribing device unsubscribes from the subscribed device, it can generate a first subscription message that does not contain specified parameters, or generate a first subscription message that contains specified parameters with a specific parameter value.
  • the first subscription message with a value or a random value provides a clear way to set the parameters in the subscription request message that indicate the maximum value and/or minimum value of the maximum interval for subscription data reporting in the unsubscription scenario. Unified the behavior of canceling message subscriptions and expanded the application scenarios of message subscriptions.
  • FIG. 7 shows a block diagram of a subscription message processing device provided by an embodiment of the present application.
  • the subscription message processing device 700 has the function of being executed by the subscription device in implementing the method shown in FIG. 3 or FIG. 5 .
  • the device may include:
  • Message generation module 701 is used to generate a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or , the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate the subscription The maximum value of the maximum interval of data reports; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resources subscribed by the subscription device;
  • Sending module 702 configured to send the first subscription request message to the subscribed device.
  • the parameter value of the specified parameter is 0; or,
  • the parameter value of the specified parameter is a specified non-zero value
  • the parameter value of the specified parameter is a NULL value
  • the parameter value of the first parameter in the first subscription request message is the same value as the parameter value of the second parameter in the first subscription request message.
  • the device further includes:
  • a first receiving module configured to receive a first subscription report message sent by the subscribed device in response to the first subscription request message; the first subscription report message is used to indicate that the subscribed device The status of the resources to which the device is subscribed.
  • the sending module 702 is also configured to send a first status response message to the subscribed device; the first status response message is used to indicate that the first subscription report is successfully received. information.
  • the device further includes:
  • the second receiving module is configured to receive a second status response message sent by the subscribed device; the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
  • the parameter value of the maintain subscription field in the first subscription request message is a first parameter value; the first parameter value is used to indicate deletion of the connection between the subscribing device and the subscribed device. subscription relationship.
  • FIG. 8 shows a block diagram of a subscription message processing device provided by an embodiment of the present application.
  • the subscription message processing device 800 has the function of being executed by the subscribed device in implementing the method shown in FIG. 4 or FIG. 5 .
  • the device may include:
  • Receiving module 801 configured to receive a first subscription request message sent by a subscribing device; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message contains no Contains specified parameters, or the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameters include at least one of a first parameter and a second parameter; the first The parameter is used to indicate the maximum value of the maximum interval of the subscription data report; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the resources subscribed by the subscription device status.
  • the parameter value of the specified parameter is 0; or,
  • the parameter value of the specified parameter is a specified non-zero value
  • the parameter value of the specified parameter is a NULL value
  • the parameter value of the first parameter in the first subscription request message is the same value as the parameter value of the second parameter in the first subscription request message.
  • the device when the first subscription request message does not contain the specified parameter, or the parameter value of the specified parameter included in the first subscription request message is a specific value, the device also includes:
  • a legality checking module configured to check the legality of the message format of the first subscription request message
  • a deletion module configured to delete the subscription relationship between the subscribing device and the subscribed device when the message format of the first subscription request message passes the legality check.
  • the legality checking module is used to,
  • the legality checking module is used to,
  • the read parameter value of the specified parameter is a specific value, it is determined that the message format of the first subscription request message passes the legality check.
  • the device further includes:
  • a first sending module configured to send a first subscription report message to the subscribing device in response to the first subscription request message; the first subscription report message is used to indicate that the subscribed device among the subscribed devices The status of the subscribed resource.
  • the receiving module 801 is also configured to receive a first status response message sent by the subscribed device in response to the first subscription report message; the first status response message is used to Indicates successful reception of the first subscription report message.
  • the device further includes:
  • the second sending module is configured to send a second status response message to the subscribing device; the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
  • the device further includes:
  • a processing module configured to not process the parameter value of the specified parameter when the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value.
  • the parameter value of the maintain subscription field in the first subscription request message is a first parameter value; the first parameter value is used to indicate deletion of the connection between the subscribing device and the subscribed device. subscription relationship.
  • the device provided in the above embodiment implements its functions, only the division of the above functional modules is used as an example. In practical applications, the above functions can be allocated to different functional modules according to actual needs. That is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • FIG. 9 shows a schematic structural diagram of a computer device 900 provided by an embodiment of the present application.
  • the computer device 900 may include a processor 901, a receiver 902, a transmitter 903, a memory 904, and a bus 905.
  • the processor 901 includes one or more processing cores.
  • the processor 901 executes various functional applications and information processing by running software programs and modules.
  • the receiver 902 and the transmitter 903 can be implemented as a communication component, and the communication component can be a communication chip.
  • This communication chip can also be called a transceiver.
  • the memory 904 is connected to the processor 901 through a bus 905.
  • the memory 904 can be used to store a computer program, and the processor 901 is used to execute the computer program to implement various steps in the above method embodiments.
  • memory 904 may be implemented by any type of volatile or non-volatile storage device, or combination thereof, including but not limited to: magnetic or optical disks, electrically erasable programmable Read-only memory, erasable programmable read-only memory, static ready-access memory, read-only memory, magnetic memory, flash memory, programmable read-only memory.
  • the receiving processor is used to generate a first subscription request message; the first subscription request message is used to delete the subscribing device and the subscribed device.
  • the subscription data report is used to indicate the status of resources subscribed by the subscribing device; the transceiver is used to send the first subscription request message to the subscribed device.
  • the process performed by the processor 901 and/or the transceiver in the computer device 900 may refer to the various steps performed by the subscribing device in the method shown in either FIG. 3 or FIG. 5 .
  • the transceiver when the computer device 900 is implemented as a subscribed device, the transceiver is used to receive a first subscription request message sent by the subscribing device; the first subscription request message is used to delete the subscription The subscription relationship between the device and the subscribed device; the first subscription request message does not contain the specified parameter, or the parameter value of the specified parameter included in the first subscription request message is a specific value or a random value;
  • the specified parameters include at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum value of the maximum interval of the subscription data report; the second parameter is used to indicate the maximum interval of the subscription data report.
  • the minimum value of the minimum interval; the subscription data report is used to indicate the status of resources subscribed by the subscribing device.
  • the process performed by the processor 901 and/or the transceiver in the computer device 900 may refer to the various steps performed by the subscribed device in the method shown in either FIG. 4 or FIG. 5 .
  • Embodiments of the present application also provide a computer-readable storage medium.
  • a computer program is stored in the storage medium.
  • the computer program is loaded and executed by a processor to implement the method shown in Figure 3, Figure 4 or Figure 5. , all or part of the steps performed by the subscribing device or the subscribed device.
  • This application also provides a chip, which is used to run in a computer device, so that the computer device performs all or all of the methods performed by the subscribing device or the subscribed device in the above-mentioned method shown in Figure 3, Figure 4 or Figure 5. Some steps.
  • the application also provides a computer program product, which computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the method shown in FIG. 3, FIG. 4 or FIG. 5, by the subscribing device or the subscribed device. All or part of the steps to be performed.
  • This application also provides a computer program, which is executed by the processor of the computer device to implement all or part of the methods executed by the subscribing device or the subscribed device in the above-mentioned method shown in Figure 3, Figure 4 or Figure 5. step.
  • Computer-readable media includes computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
  • Storage media can be any available media that can be accessed by a general purpose or special purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

A subscription message processing method and apparatus, a device, a storage medium, and a program product, relating to the technical field of the Internet of Things. The method comprises: generating a first subscription request message, the first subscription request message being used to delete a subscription relationship between a subscribing device and a subscribed device, the first subscription request message not comprising a specified parameter, or the parameter value of the specified parameter comprised in the first subscription request message being a specific value or a random value, the specified parameter comprising at least one of a first parameter and a second parameter, the first parameter being used to indicate the maximum value of a maximum interval of a subscription data report, the second parameter being used to indicate the minimum value of a minimum interval of the subscription data report, and the subscription data report being used to indicate the state of a resource subscribed to by the subscribing device; and sending the first subscription request message to the subscribed device. The described solution unifies message unsubscription behavior, thereby expanding application scenarios of message subscription.

Description

订阅消息处理方法、装置、设备、存储介质及程序产品Subscription message processing methods, devices, equipment, storage media and program products 技术领域Technical field
本申请涉及物联网技术领域,特别涉及一种订阅消息处理方法、装置、设备、存储介质及程序产品。This application relates to the technical field of the Internet of Things, and in particular to a subscription message processing method, device, equipment, storage medium and program product.
背景技术Background technique
随着无线通信技术的不断发展,物联网(Internet of Things,IoT)在生产和生活中的应用也越来越广泛。With the continuous development of wireless communication technology, the Internet of Things (IoT) is increasingly used in production and life.
在相关技术中,物联网***中的订阅设备可以向被订阅设备请求订阅。具体的,订阅设备可以向被订阅设备发送订阅请求消息,在订阅成功后,被订阅设备可以将被订阅的资源的状态定期/非定期的报告给订阅设备。In related technology, a subscribing device in the Internet of Things system may request a subscription from a subscribed device. Specifically, the subscribing device can send a subscription request message to the subscribed device. After the subscription is successful, the subscribed device can report the status of the subscribed resource to the subscribing device regularly or non-regularly.
发明内容Contents of the invention
本申请实施例提供了一种订阅消息处理方法、装置、设备、存储介质及程序产品。所述技术方案如下:Embodiments of the present application provide a subscription message processing method, device, equipment, storage medium and program product. The technical solutions are as follows:
一方面,本申请实施例提供了一种订阅消息处理方法,所述方法由订阅设备执行,所述方法包括:On the one hand, embodiments of the present application provide a subscription message processing method, which is executed by a subscription device. The method includes:
生成第一订阅请求消息;所述第一订阅请求消息用于删除所述订阅设备与被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态;Generate a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or the first The parameter value of the specified parameter contained in the subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum interval for subscribing to data reports The maximum value; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resource subscribed by the subscription device;
向所述被订阅设备发送所述第一订阅请求消息。Send the first subscription request message to the subscribed device.
一方面,本申请实施例提供了一种订阅消息处理方法,所述方法由被订阅设备执行,所述方法包括:On the one hand, embodiments of the present application provide a subscription message processing method, which is executed by a subscribed device. The method includes:
接收订阅设备发送的第一订阅请求消息;所述第一订阅请求消息用于删除所述订阅设备与所述被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态。Receive a first subscription request message sent by a subscribing device; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, Alternatively, the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate The maximum value of the maximum interval of the subscription data report; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resource subscribed by the subscription device.
另一方面,本申请实施例提供了一种订阅消息处理装置,所述装置包括:On the other hand, this embodiment of the present application provides a subscription message processing device, which includes:
消息生成模块,用于生成第一订阅请求消息;所述第一订阅请求消息用于删除订阅设备与被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态;A message generation module, configured to generate a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or, The parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate subscription data The maximum value of the maximum interval of reports; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resources subscribed by the subscription device;
发送模块,用于向所述被订阅设备发送所述第一订阅请求消息。A sending module, configured to send the first subscription request message to the subscribed device.
另一方面,本申请实施例提供了一种订阅消息处理装置,所述装置包括:On the other hand, this embodiment of the present application provides a subscription message processing device, which includes:
接收订阅设备发送的第一订阅请求消息;所述第一订阅请求消息用于删除所述订阅设备 与被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态。Receive a first subscription request message sent by a subscribing device; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or, The parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate subscription data The maximum value of the maximum interval of reports; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of resources subscribed by the subscription device.
另一方面,本申请实施例提供了一种计算机设备,所述计算机设备实现为信息上报设备,所述计算机设备包括处理器、存储器和收发器;On the other hand, embodiments of the present application provide a computer device, the computer device is implemented as an information reporting device, and the computer device includes a processor, a memory, and a transceiver;
存储器中存储有计算机程序,处理器执行所述计算机程序,以使得计算机设备实现上述订阅消息处理方法。A computer program is stored in the memory, and the processor executes the computer program, so that the computer device implements the above subscription message processing method.
再一方面,本申请实施例提供了一种计算机设备,所述计算机设备包括处理器、存储器和收发器,所述存储器存储有计算机程序,所述计算机程序用于被所述处理器执行,以实现上述订阅消息处理方法。In another aspect, embodiments of the present application provide a computer device, which includes a processor, a memory, and a transceiver. The memory stores a computer program, and the computer program is configured to be executed by the processor. Implement the above subscription message processing method.
又一方面,本申请实施例还提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现上述订阅消息处理方法。On another aspect, embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored, and the computer program is loaded and executed by a processor to implement the above subscription message processing method.
又一方面,本申请还提供了一种芯片,所述芯片用于在计算机设备中运行,以使得所述计算机设备执行上述订阅消息处理方法。In another aspect, this application also provides a chip, which is used to run in a computer device, so that the computer device executes the above subscription message processing method.
又一方面,本申请提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述订阅消息处理方法。In yet another aspect, the present application provides a computer program product including computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above subscription message processing method.
又一方面,本申请提供了一种计算机程序,该计算机程序由计算机设备的处理器执行,以实现上述订阅消息处理方法。In another aspect, the present application provides a computer program, which is executed by a processor of a computer device to implement the above subscription message processing method.
本申请实施例提供的技术方案可以带来如下有益效果:The technical solutions provided by the embodiments of this application can bring the following beneficial effects:
订阅设备向被订阅设备取消订阅时,可以生成不包含指定参数的第一订阅消息,或者,生成包含的指定参数的参数值为特定值或随机值的第一订阅消息,提供了在取消订阅的场景下,对订阅请求消息中的用于指示订阅数据报告的最大间隔的最大值和/或最小值的参数的明确的设置方式,统一了取消消息订阅的行为,扩展了消息订阅的应用场景。When the subscribing device unsubscribes from the subscribed device, it can generate a first subscription message that does not contain the specified parameters, or it can generate a first subscription message that contains the specified parameters and the parameter value is a specific value or a random value, providing a method for unsubscribing. In this scenario, the clear setting method of the parameters in the subscription request message used to indicate the maximum value and/or the minimum value of the maximum interval for subscription data reporting unifies the behavior of canceling message subscriptions and expands the application scenarios of message subscriptions.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1是本申请一个实施例提供的物联网的网络架构的示意图;Figure 1 is a schematic diagram of the network architecture of the Internet of Things provided by an embodiment of the present application;
图2是本申请一示例性实施例提供的订阅流程的示意图;Figure 2 is a schematic diagram of a subscription process provided by an exemplary embodiment of the present application;
图3是本申请一个实施例提供的订阅消息处理方法的流程图;Figure 3 is a flow chart of a subscription message processing method provided by an embodiment of the present application;
图4是本申请一个实施例提供的订阅消息处理方法的流程图;Figure 4 is a flow chart of a subscription message processing method provided by an embodiment of the present application;
图5是本申请一个实施例提供的订阅消息处理方法的流程图;Figure 5 is a flow chart of a subscription message processing method provided by an embodiment of the present application;
图6是图5所示实施例涉及的一种订阅流程的示意图;Figure 6 is a schematic diagram of a subscription process involved in the embodiment shown in Figure 5;
图7是本申请一个实施例提供的订阅消息处理装置的框图;Figure 7 is a block diagram of a subscription message processing device provided by an embodiment of the present application;
图8是本申请一个实施例提供的订阅消息处理装置的框图;Figure 8 is a block diagram of a subscription message processing device provided by an embodiment of the present application;
图9是本申请一个实施例提供的计算机设备的结构示意图。Figure 9 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
本申请实施例描述的网络架构以及业务场景是为了更加清楚地说明本申请实施例的技术 方案,并不构成对本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The network architecture and business scenarios described in the embodiments of this application are to more clearly explain the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those of ordinary skill in the art will know that with the network architecture evolution and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
请参考图1,其示出了本申请一个实施例提供的物联网的网络架构的示意图。该物联网的网络架构可以包括:物联网设备110(图1中示出为物联网设备110a、物联网设备110b、物联网设备110c、物联网设备110d)和配置设备120;可选的,该网络架构还可以包括桥接设备130;Please refer to Figure 1, which shows a schematic diagram of the network architecture of the Internet of Things provided by an embodiment of the present application. The network architecture of the Internet of Things may include: an Internet of Things device 110 (shown as an Internet of Things device 110a, an Internet of Things device 110b, an Internet of Things device 110c, and an Internet of Things device 110d in Figure 1) and a configuration device 120; optionally, the The network architecture may also include bridging devices 130;
物联网设备110可以是指在物联网中,用于提供物联网协议对应的客户端功能或者服务端功能的设备。The Internet of Things device 110 may refer to a device used to provide client functions or server functions corresponding to the Internet of Things protocol in the Internet of Things.
比如,物联网设备110可以是智能家居设备,例如,智能开关、智能灯具、智能电视、智能空调、智能冰箱、智能微波炉、智能电饭煲、扫地机器人等等。For example, the IoT device 110 may be a smart home device, such as a smart switch, a smart lamp, a smart TV, a smart air conditioner, a smart refrigerator, a smart microwave oven, a smart rice cooker, a sweeping robot, etc.
或者,物联网设备110可以是工业生产设备,例如,车床、工业机器人、太阳能面板、风力发电机等等。Alternatively, the IoT device 110 may be an industrial production equipment, such as a lathe, an industrial robot, a solar panel, a wind turbine, etc.
或者,物联网设备110可以是商业服务设备,例如,无人售货机等等。Alternatively, the Internet of Things device 110 may be a commercial service device, such as an unmanned vending machine or the like.
或者,物联网设备110可以是传感设备,例如,监控摄像头、红外传感器、声音传感器、温度传感器等等。Alternatively, the IoT device 110 may be a sensing device, such as a surveillance camera, an infrared sensor, a sound sensor, a temperature sensor, etc.
在一种可能的实现方式中,配置设备120是用户侧的终端设备。比如,配置设备120可以是智能控制器、智能遥控器、智能手机、平板电脑、智能手表、智能电视、智能音箱、智能开关、网关等等;或者,配置设备120也可以是个人电脑,比如台式电脑、便携式计算机、个人工作站等等。In a possible implementation, the configuration device 120 is a user-side terminal device. For example, the configuration device 120 can be a smart controller, a smart remote control, a smart phone, a tablet, a smart watch, a smart TV, a smart speaker, a smart switch, a gateway, etc.; or the configuration device 120 can also be a personal computer, such as a desktop. Computers, laptops, personal workstations and more.
在另一种可能的实现方式中,配置设备120是指基于终端设备运行的客户端实体(可以是虚拟实体),例如,配置设备120可以是运行在终端设备中,用于对物联网设备进行访问、控制、以及管理等操作的应用程序(Application,APP)。In another possible implementation, the configuration device 120 refers to a client entity (which may be a virtual entity) running on a terminal device. For example, the configuration device 120 may run in a terminal device and is used to configure the Internet of Things device. Application (Application, APP) for access, control, and management operations.
桥接设备130用于实现支持不同物联网协议的两个设备之间的交互。桥接设备130在支持不同物联网协议的物联网设备110之间,或者,在支持不同物联网协议的物联网设备110和配置设备120之间,提供信息转换和传递的服务。The bridge device 130 is used to implement interaction between two devices supporting different Internet of Things protocols. The bridge device 130 provides information conversion and transfer services between IoT devices 110 that support different IoT protocols, or between IoT devices 110 that support different IoT protocols and the configuration device 120 .
桥接设备130可以是专用于进行桥接的设备,或者,桥接设备130也可以是具有桥接功能的智能设备,比如网关或者路由器等等。The bridging device 130 may be a device dedicated for bridging, or the bridging device 130 may also be an intelligent device with a bridging function, such as a gateway or a router.
在本申请实施例中,上述物联网设备110、配置设备120、桥接设备130可以是满足相同或者不同的物联网协议的电子设备,比如,可以是满足连接标准联盟(Connectivity Standards Alliance,CSA)下的Matter协议的电子设备。In the embodiment of the present application, the above-mentioned Internet of Things device 110, configuration device 120, and bridge device 130 may be electronic devices that meet the same or different Internet of Things protocols. For example, they may be electronic devices that meet the requirements of the Connectivity Standards Alliance (CSA). Matter protocol for electronic devices.
在图1中,当物联网设备110a和物联网设备110c之间支持相同的协议规范时,物联网设备110a和物联网设备110c之间可以建立安全连接,比如,基于Matter规范建立安全连接。In Figure 1, when the IoT device 110a and the IoT device 110c support the same protocol specification, a secure connection can be established between the IoT device 110a and the IoT device 110c, for example, a secure connection is established based on the Matter specification.
当物联网设备110b和物联网设备110d之间支持不同的协议规范,比如,物联网设备110b是Zigbee设备,而物联网设备110d是Matter设备时,物联网设备110b和物联网设备110d之间可以通过桥接设备130相连。When the IoT device 110b and the IoT device 110d support different protocol specifications, for example, the IoT device 110b is a Zigbee device and the IoT device 110d is a Matter device, the IoT device 110b and the IoT device 110d can connected via a bridge device 130.
请参考图2,其示出了本申请一示例性实施例提供的订阅流程的示意图。如图2所示,该订阅流程可以包括如下步骤:Please refer to Figure 2, which shows a schematic diagram of a subscription process provided by an exemplary embodiment of the present application. As shown in Figure 2, the subscription process may include the following steps:
S21,订阅设备(即订阅发起者Initiator)发起订阅流程,发送订阅请求(subscribe request)消息。S21, the subscription device (i.e., the subscription initiator) initiates the subscription process and sends a subscribe request (subscribe request) message.
subscribe request消息的消息内容可以如下述表1所示。The message content of the subscribe request message can be shown in Table 1 below.
表1Table 1
Figure PCTCN2022106111-appb-000001
Figure PCTCN2022106111-appb-000001
在该subscribe request消息中,keepsubscriptions参数的含义是:publisher(发布者)接收到其取值为FALSE的subscribe request时,需要删除所有initiator与publisher(发布者,在本申请实施例中也称为被订阅设备)间的订阅关系。Maxintervalceiling规定了通知消息的最大间隔的最大值。Minintervalfloor规定了通知消息的最小间隔的最小值。In the subscribe request message, the meaning of the keepsubscriptions parameter is: when the publisher (publisher) receives a subscribe request whose value is FALSE, it needs to delete all initiators and publishers (publisher, also called the publisher in the embodiment of this application). Subscription relationship between subscribing devices). Maxintervalceiling specifies the maximum value of the maximum interval for notification messages. Minintervalfloor specifies the minimum value of the minimum interval for notification messages.
S22,publisher收到上述订阅请求后,检查Initiator是否有权限订阅该订阅目标(被订阅的资源)。通过报告数据请求消息发送订阅目标的当前状态(比如属性(例如温度值、灯的开关等)或者事件)。S22. After receiving the above subscription request, the publisher checks whether the Initiator has the permission to subscribe to the subscription target (subscribed resource). Send the current status of the subscription target (such as properties (such as temperature values, light switches, etc.) or events) through report data request messages.
S23,Initiator收到报告数据请求消息后回复status response(状态响应消息),该消息指示其收到了订阅目标的当前状态。S23. After receiving the report data request message, the Initiator replies with a status response (status response message), which indicates that it has received the current status of the subscription target.
S24,Publisher收到S23中的status response之后,会生成并返回一个subscribe response(订阅响应)消息。S24, after Publisher receives the status response in S23, it will generate and return a subscribe response message.
该消息subscribe response可以包括如下述表2所示的内容。The message subscribe response may include content as shown in Table 2 below.
表2Table 2
Figure PCTCN2022106111-appb-000002
Figure PCTCN2022106111-appb-000002
在上述表2中,各个参数的含义如下:In the above Table 2, the meaning of each parameter is as follows:
Subscribe ID:订阅ID,用来标识两个设备间的一个订阅关系;Subscribe ID: Subscription ID, used to identify a subscription relationship between two devices;
MinInterval:通知消息(即数据报告data report消息)的最小间隔;MinInterval: the minimum interval for notification messages (i.e. data report messages);
MaxInterval:通知消息的最大间隔。MaxInterval: The maximum interval for notification messages.
S25-S26:当订阅目标发生变化时,Publisher会发送一个通知消息data report给Initiator,Initiator回复一个状态响应(status response)消息。S25-S26: When the subscription target changes, Publisher will send a notification message data report to the Initiator, and the Initiator will reply with a status response message.
在上述方案中,subscribe request消息中必须携带MaxIntervalCeiling和MinIntervalfloor这两个字段。但是在keepsubscriptions=false时,这两个字段并没有实际的意义,并且,目标对于在keepsubscriptions=false的情况下,订阅设备如何设置MaxIntervalCeiling和MinIntervalfloor,还没有明确的方案,导致目前的订阅请求消息中的MaxIntervalCeiling和MinIntervalfloor字段的设置不统一,导致不同厂家的设备之间的消息订阅可能存在不兼容的情况,导致消息订阅的应用场景受限。In the above solution, the subscribe request message must carry the two fields MaxIntervalCeiling and MinIntervalfloor. However, when keepsubscriptions=false, these two fields have no actual meaning. Moreover, the target has no clear solution for how to set MaxIntervalCeiling and MinIntervalfloor for the subscription device when keepsubscriptions=false, resulting in the current subscription request message. The settings of the MaxIntervalCeiling and MinIntervalfloor fields are not uniform, resulting in possible incompatible message subscriptions between devices from different manufacturers, resulting in limited application scenarios for message subscriptions.
请参考图3,其示出了本申请一个实施例提供的订阅消息处理方法的流程图,该方法可以由订阅设备执行,比如,该订阅设备可以是图1所示的网络架构中的物联网设备110或者配置设备120中的一个;该方法可以包括如下几个步骤:Please refer to Figure 3, which shows a flow chart of a subscription message processing method provided by an embodiment of the present application. This method can be executed by a subscription device. For example, the subscription device can be the Internet of Things in the network architecture shown in Figure 1 Device 110 or one of the configuration devices 120; the method may include the following steps:
步骤301,生成第一订阅请求消息;第一订阅请求消息用于删除订阅设备与被订阅设备之间的订阅关系;第一订阅请求消息中不包含指定参数,或者,第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;指定参数包括第一参数和第二参数中的至少一种;第一参数用于指示订阅数据报告的最大间隔的最大值;第二参数用于指示订阅数据报告的最小间隔的最小值;订阅数据报告用于指示被订阅设备订阅的资源的状态。Step 301: Generate a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or the first subscription request message contains The parameter value of the specified parameter is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum value of the maximum interval for subscribing to data reports; the second parameter is used to Minimum value indicating the minimum interval for subscription data reports; subscription data reports are used to indicate the status of resources subscribed to by the subscribing device.
其中,上述第一订阅请求消息可以是订阅设备在取消向被订阅设备进行订阅的订阅关系时生成的消息。The above-mentioned first subscription request message may be a message generated by the subscribing device when canceling the subscription relationship with the subscribed device.
步骤302,向被订阅设备发送第一订阅请求消息。Step 302: Send a first subscription request message to the subscribed device.
综上所述,在本申请实施例所示的方案中,订阅设备向被订阅设备取消订阅时,可以生成不包含指定参数的第一订阅消息,或者,生成包含的指定参数的参数值为特定值或随机值的第一订阅消息,提供了在取消订阅的场景下,对订阅请求消息中的用于指示订阅数据报告的最大间隔的最大值和/或最小值的参数的明确的设置方式,统一了取消消息订阅的行为,扩展了消息订阅的应用场景。To sum up, in the solution shown in the embodiment of this application, when the subscribing device unsubscribes from the subscribed device, it can generate a first subscription message that does not contain specified parameters, or generate a first subscription message that contains specified parameters with a specific parameter value. The first subscription message with a value or a random value provides a clear way to set the parameters in the subscription request message that indicate the maximum value and/or minimum value of the maximum interval for subscription data reporting in the unsubscription scenario. Unified the behavior of canceling message subscriptions and expanded the application scenarios of message subscriptions.
请参考图4,其示出了本申请一个实施例提供的订阅消息处理方法的流程图,该方法可以由被订阅设备执行,比如,该被订阅设备可以是图1所示的网络架构中的物联网设备110中的一个;该方法可以包括如下几个步骤:Please refer to Figure 4, which shows a flow chart of a subscription message processing method provided by an embodiment of the present application. This method can be executed by a subscribed device. For example, the subscribed device can be in the network architecture shown in Figure 1 One of the Internet of Things devices 110; the method may include the following steps:
步骤401,接收订阅设备发送的第一订阅请求消息;第一订阅请求消息用于删除订阅设备与被订阅设备之间的订阅关系;第一订阅请求消息中不包含指定参数,或者,第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;指定参数包括第一参数和第二参数中的至少一种;第一参数用于指示订阅数据报告的最大间隔的最大值;第二参数用于指示订阅数据报告的最小间隔的最小值;订阅数据报告用于指示被订阅设备订阅的资源的状态。Step 401: Receive the first subscription request message sent by the subscribing device; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or the first subscription The parameter value of the specified parameter contained in the request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum value of the maximum interval of the subscription data report; The second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resources subscribed by the subscribing device.
综上所述,在本申请实施例所示的方案中,订阅设备向被订阅设备取消订阅时,可以生成不包含指定参数的第一订阅消息,或者,生成包含的指定参数的参数值为特定值或随机值的第一订阅消息,提供了在取消订阅的场景下,对订阅请求消息中的用于指示订阅数据报告的最大间隔的最大值和/或最小值的参数的明确的设置方式,统一了取消消息订阅的行为,扩展了消息订阅的应用场景。To sum up, in the solution shown in the embodiment of this application, when the subscribing device unsubscribes from the subscribed device, it can generate a first subscription message that does not contain specified parameters, or generate a first subscription message that contains specified parameters with a specific parameter value. The first subscription message with a value or a random value provides a clear way to set the parameters in the subscription request message that indicate the maximum value and/or minimum value of the maximum interval for subscription data reporting in the unsubscription scenario. Unified the behavior of canceling message subscriptions and expanded the application scenarios of message subscriptions.
请参考图5,其示出了本申请一个实施例提供的订阅消息处理方法的流程图,该方法可以由订阅设备和被订阅设备交互执行,该订阅设备可以是图1所示的网络架构中的物联网设备110或者配置设备120中的一个,该被订阅设备可以是图1所示的网络架构中的物联网设备110中的一个;该方法可以包括如下几个步骤:Please refer to Figure 5, which shows a flow chart of a subscription message processing method provided by an embodiment of the present application. This method can be interactively executed by a subscribing device and a subscribed device. The subscribing device can be in the network architecture shown in Figure 1 One of the Internet of Things devices 110 or the configuration device 120, the subscribed device may be one of the Internet of Things devices 110 in the network architecture shown in Figure 1; the method may include the following steps:
步骤501,订阅设备生成第一订阅请求消息;第一订阅请求消息用于删除订阅设备与被订阅设备之间的订阅关系;第一订阅请求消息中不包含指定参数,或者,第一订阅请求消息 中包含的指定参数的参数值为特定值或随机值。Step 501: The subscribing device generates a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or the first subscription request message The parameter value of the specified parameter contained in is a specific value or a random value.
其中,该第一订阅请求消息中的保持订阅字段的参数值为第一参数值;该第一参数值用于指示删除订阅设备与被订阅设备之间的订阅关系。Wherein, the parameter value of the keep subscription field in the first subscription request message is the first parameter value; the first parameter value is used to indicate deletion of the subscription relationship between the subscribing device and the subscribed device.
比如,上述保持订阅字段可以是上述表1中的keepkeepsubscriptions字段,第一参数值可以为false。也就是说,keepkeepsubscriptions字段中的false参数值用于标识该第一订阅请求消息是一个删除订阅关系的消息。For example, the above-mentioned keep subscription field may be the keepkeepsubscriptions field in the above-mentioned Table 1, and the first parameter value may be false. That is to say, the false parameter value in the keepkeepsubscriptions field is used to identify that the first subscription request message is a message to delete the subscription relationship.
其中,指定参数包括第一参数和第二参数中的至少一种;第一参数用于指示订阅数据报告的最大间隔的最大值;第二参数用于指示订阅数据报告的最小间隔的最小值;订阅数据报告用于指示被订阅设备订阅的资源的状态。Wherein, the specified parameters include at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum value of the maximum interval for subscribing to data reports; the second parameter is used to indicate the minimum value of the minimum interval for subscribing to data reports; Subscription data reports are used to indicate the status of resources subscribed by subscribing devices.
在本申请实施例中,上述订阅数据报告可以是上述图2所示实施例中的data report消息。In this embodiment of the present application, the above-mentioned subscription data report may be the data report message in the embodiment shown in FIG. 2 .
上述第一参数可以是上述图2所示实施例中的MaxIntervalCeiling字段;上述第二参数可以是上述图2所示实施例中的MinIntervalFloor字段。The above-mentioned first parameter may be the MaxIntervalCeiling field in the above-mentioned embodiment shown in FIG. 2; the above-mentioned second parameter may be the MinIntervalFloor field in the above-mentioned embodiment shown in FIG. 2.
在一种可能的实现方式中,订阅设备可以在第一订阅请求中不设置MaxIntervalCeiling字段和/或MinIntervalFloor字段。In a possible implementation, the subscribing device may not set the MaxIntervalCeiling field and/or the MinIntervalFloor field in the first subscription request.
在另一种可能的实现方式中,在第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,指定参数的参数值可以满足以下情况中的一种:In another possible implementation, when the parameter value of the specified parameter contained in the first subscription request message is a specific value, the parameter value of the specified parameter may satisfy one of the following situations:
1)指定参数的参数值为0值。1) The parameter value of the specified parameter is 0 value.
比如,当指定参数为MaxIntervalCeiling字段时,订阅设备可以将第一订阅消息中的MaxIntervalCeiling字段的参数值设置为0。For example, when the specified parameter is the MaxIntervalCeiling field, the subscribing device can set the parameter value of the MaxIntervalCeiling field in the first subscription message to 0.
再比如,当指定参数为MinIntervalFloor字段时,订阅设备可以将第一订阅消息中的MinIntervalFloor字段的参数值设置为0。For another example, when the specified parameter is the MinIntervalFloor field, the subscribing device can set the parameter value of the MinIntervalFloor field in the first subscription message to 0.
再比如,当指定参数为MaxIntervalCeiling字段以及MinIntervalFloor字段时,订阅设备可以将第一订阅消息中的MaxIntervalCeiling字段以及MinIntervalFloor字段的参数值都设置为0。For another example, when the specified parameters are the MaxIntervalCeiling field and the MinIntervalFloor field, the subscribing device can set the parameter values of the MaxIntervalCeiling field and the MinIntervalFloor field in the first subscription message to 0.
2)指定参数的参数值为指定非0数值。2) The parameter value of the specified parameter is a specified non-0 value.
比如,当指定参数为MaxIntervalCeiling字段时,订阅设备可以将第一订阅消息中的MaxIntervalCeiling字段的参数值设置为1。For example, when the specified parameter is the MaxIntervalCeiling field, the subscribing device can set the parameter value of the MaxIntervalCeiling field in the first subscription message to 1.
再比如,当指定参数为MinIntervalFloor字段时,订阅设备可以将第一订阅消息中的MinIntervalFloor字段的参数值设置为2。For another example, when the specified parameter is the MinIntervalFloor field, the subscribing device can set the parameter value of the MinIntervalFloor field in the first subscription message to 2.
再比如,当指定参数为MaxIntervalCeiling字段以及MinIntervalFloor字段时,订阅设备可以将第一订阅消息中的MaxIntervalCeiling字段设置为1,并将MinIntervalFloor字段的参数值设置为2。For another example, when the specified parameters are the MaxIntervalCeiling field and the MinIntervalFloor field, the subscribing device can set the MaxIntervalCeiling field in the first subscription message to 1 and set the parameter value of the MinIntervalFloor field to 2.
3)指定参数的参数值为NULL值。3) The parameter value of the specified parameter is NULL value.
比如,当指定参数为MaxIntervalCeiling字段时,订阅设备可以将第一订阅消息中的MaxIntervalCeiling字段的参数值设置为NULL。For example, when the specified parameter is the MaxIntervalCeiling field, the subscribing device can set the parameter value of the MaxIntervalCeiling field in the first subscription message to NULL.
再比如,当指定参数为MinIntervalFloor字段时,订阅设备可以将第一订阅消息中的MinIntervalFloor字段的参数值设置为NULL。For another example, when the specified parameter is the MinIntervalFloor field, the subscribing device can set the parameter value of the MinIntervalFloor field in the first subscription message to NULL.
再比如,当指定参数为MaxIntervalCeiling字段以及MinIntervalFloor字段时,订阅设备可以将第一订阅消息中的MaxIntervalCeiling字段以及MinIntervalFloor字段的参数值都设置为NULL。For another example, when the specified parameters are the MaxIntervalCeiling field and the MinIntervalFloor field, the subscribing device can set the parameter values of the MaxIntervalCeiling field and the MinIntervalFloor field in the first subscription message to NULL.
4)第一订阅请求消息中的第一参数的参数值,与第一订阅请求消息中的第二参数的参数值为相等的数值。4) The parameter value of the first parameter in the first subscription request message is equal to the parameter value of the second parameter in the first subscription request message.
比如,当指定参数为MaxIntervalCeiling字段时,订阅设备可以参考第一订阅消息中的MinIntervalFloor字段的参数值,将MaxIntervalCeiling字段设置为相同的值。比如,当第一订阅消息中的MinIntervalFloor字段的参数值设置为3时,订阅设备同样的将MaxIntervalCeiling 字段的参数值也设置为3。For example, when the specified parameter is the MaxIntervalCeiling field, the subscribing device can refer to the parameter value of the MinIntervalFloor field in the first subscription message and set the MaxIntervalCeiling field to the same value. For example, when the parameter value of the MinIntervalFloor field in the first subscription message is set to 3, the subscribing device also sets the parameter value of the MaxIntervalCeiling field to 3.
再比如,当指定参数为MinIntervalFloor字段时,订阅设备可以参考第一订阅消息中的MaxIntervalCeiling字段的参数值,将MinIntervalFloor字段设置为相同的值。For another example, when the specified parameter is the MinIntervalFloor field, the subscribing device can refer to the parameter value of the MaxIntervalCeiling field in the first subscription message and set the MinIntervalFloor field to the same value.
再比如,当指定参数为MaxIntervalCeiling字段以及MinIntervalFloor字段时,订阅设备可以将第一订阅消息中的MaxIntervalCeiling字段以及MinIntervalFloor字段的参数值都设置为相同的数值,比如,都设置为3,或者都设置为相同的一个随机数值。For another example, when the specified parameters are the MaxIntervalCeiling field and the MinIntervalFloor field, the subscribing device can set the parameter values of the MaxIntervalCeiling field and the MinIntervalFloor field in the first subscription message to the same value, for example, both to 3, or both to 3. The same random value.
在另一种可能的实现方式中,订阅设备也可以在第一订阅请求中,将MaxIntervalCeiling字段和/或MinIntervalFloor字段的参数值设置为随机值。In another possible implementation, the subscribing device may also set the parameter values of the MaxIntervalCeiling field and/or the MinIntervalFloor field to random values in the first subscription request.
步骤502,订阅设备向被订阅设备发送第一订阅请求消息;被订阅设备接收该第一订阅请求消息。Step 502: The subscribing device sends a first subscription request message to the subscribed device; the subscribed device receives the first subscription request message.
订阅设备生成上述第一订阅请求消息之后,即可以将第一订阅请求消息发送给被订阅设备。After the subscribing device generates the above first subscription request message, it can send the first subscription request message to the subscribed device.
步骤503,被订阅设备删除订阅设备与被订阅设备之间的订阅关系。Step 503: The subscribed device deletes the subscription relationship between the subscribing device and the subscribed device.
被订阅设备接收到上述第一订阅请求消息后,确定订阅设备要删除在被订阅设备中的订阅关系,则可以根据订阅设备的标识信息查询响应的订阅关系,并将查询到的订阅关系删除。After the subscribed device receives the first subscription request message and determines that the subscribing device wants to delete the subscription relationship in the subscribed device, the subscribed device can query the response subscription relationship based on the identification information of the subscribing device and delete the queried subscription relationship.
比如,当被订阅设备解析第一订阅请求消息,确定第一订阅请求消息中的KeepSubscriptions=False时,确定订阅设备要删除在被订阅设备中的订阅关系。For example, when the subscribed device parses the first subscription request message and determines that KeepSubscriptions=False in the first subscription request message, it determines that the subscribing device wants to delete the subscription relationship in the subscribed device.
在一种可能的实现方式中,在第一订阅请求消息中包含的指定参数的参数值为特定值或随机值的情况下,被订阅设备可以对指定参数的参数值不做处理。In a possible implementation manner, when the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value, the subscribed device may not process the parameter value of the specified parameter.
比如,当被订阅设备解析第一订阅请求消息,确定第一订阅请求消息中的KeepSubscriptions=False时,可以对消息中的指定参数(比如MaxIntervalCeiling字段和/或MinIntervalFloor字段)不做处理。For example, when the subscribed device parses the first subscription request message and determines that KeepSubscriptions=False in the first subscription request message, the specified parameters in the message (such as the MaxIntervalCeiling field and/or the MinIntervalFloor field) may not be processed.
可选的,上述对消息中的指定参数不做处理,可以包括不读取指定参数中的参数值,或者,不根据指定参数中的参数值设置MaxInterval和/或MinInterval的值等等。Optionally, the above-mentioned not processing the specified parameters in the message may include not reading the parameter values in the specified parameters, or not setting the values of MaxInterval and/or MinInterval according to the parameter values in the specified parameters, etc.
在一种可能的实现方式中,在第一订阅请求消息中不包含指定参数,或者,第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,被订阅设备还可以执行以下步骤:In a possible implementation, when the first subscription request message does not contain the specified parameter, or the parameter value of the specified parameter included in the first subscription request message is a specific value, the subscribed device may also perform the following: step:
对第一订阅请求消息的消息格式进行合法性检查;Check the validity of the message format of the first subscription request message;
在第一订阅请求消息的消息格式通过合法性检查的情况下,删除订阅设备与被订阅设备之间的订阅关系。If the message format of the first subscription request message passes the validity check, the subscription relationship between the subscribing device and the subscribed device is deleted.
在本申请实施例中,为了保证订阅关系删除的安全性和准确性,在第一订阅请求消息中不包含指定参数,或者,第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,被订阅消息接收到上述第一订阅请求消息,并确定订阅设备要删除在被订阅设备中的订阅关系时,可以基于指定参数的参数值来对第一订阅请求消息做合法性校验,并在合法性校验通过时,删除订阅设备与被订阅设备之间的订阅关系。In the embodiment of this application, in order to ensure the security and accuracy of deletion of the subscription relationship, the first subscription request message does not contain the specified parameter, or the parameter value of the specified parameter included in the first subscription request message is a specific value. In this case, when the subscribed message receives the above-mentioned first subscription request message and determines that the subscribing device wants to delete the subscription relationship in the subscribed device, the validity of the first subscription request message can be verified based on the parameter value of the specified parameter. , and when the legality check passes, delete the subscription relationship between the subscribing device and the subscribed device.
可选的,若合法性校验不通过,则该第一订阅请求消息可能出现传输错误,或者,该第一订阅请求消息可能时不法设备或者被病毒挟持发送的消息,此时,被订阅设备可以不执行删除订阅设备与被订阅设备之间的订阅关系的步骤。Optionally, if the legality check fails, the first subscription request message may have a transmission error, or the first subscription request message may be sent by a rogue device or hijacked by a virus. At this time, the subscribed device It is not necessary to perform the step of deleting the subscription relationship between the subscribing device and the subscribed device.
在一种可能的实现方式中,上述对第一订阅请求消息的消息格式进行合法性检查的过程可以包括:In a possible implementation, the above-mentioned process of checking the validity of the message format of the first subscription request message may include:
在第一订阅请求消息中不包含指定参数的情况下,在第一订阅请求消息中查询指定参数;在未查询到指定参数的情况下,确定第一订阅请求消息的消息格式通过合法性检查。If the first subscription request message does not contain the specified parameter, the specified parameter is queried in the first subscription request message; if the specified parameter is not queried, it is determined that the message format of the first subscription request message passes the validity check.
在本申请实施例中,若被订阅设备预先已知晓(比如协议规定)用于删除订阅关系的订阅消息中不包含指定参数,则被订阅设备接收到上述第一订阅请求消息,并确定订阅设备要删除在被订阅设备中的订阅关系时,可以在第一订阅请求消息中查询指定参数,若未查询到指定参数,则确定第一订阅请求消息的消息格式通过合法性检查;可选的,若查询到上述指 定参数,则可以确定第一订阅请求消息的消息格式未通过合法性检查。In this embodiment of the present application, if the subscribed device knows in advance (for example, the agreement stipulates) that the subscription message for deleting the subscription relationship does not contain specified parameters, the subscribed device receives the above-mentioned first subscription request message and determines that the subscribing device When you want to delete the subscription relationship in the subscribed device, you can query the specified parameters in the first subscription request message. If the specified parameters are not queried, it is determined that the message format of the first subscription request message passes the legality check; optionally, If the above specified parameters are queried, it can be determined that the message format of the first subscription request message fails the validity check.
在一种可能的实现方式中,上述对第一订阅请求消息的消息格式进行合法性检查的过程可以包括:In a possible implementation, the above-mentioned process of checking the validity of the message format of the first subscription request message may include:
在第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,读取第一订阅请求消息中包含的指定参数的参数值;在读取到的指定参数的参数值为特定值的情况下,确定第一订阅请求消息的消息格式通过合法性检查。When the parameter value of the specified parameter included in the first subscription request message is a specific value, read the parameter value of the specified parameter included in the first subscription request message; when the read parameter value of the specified parameter is a specific value In this case, it is determined that the message format of the first subscription request message passes the validity check.
在本申请实施例中,若被订阅设备预先已知晓(比如协议规定)用于删除订阅关系的订阅消息中包含的指定参数的参数值为特定值,则被订阅设备接收到上述第一订阅请求消息,并确定订阅设备要删除在被订阅设备中的订阅关系时,可以读取第一订阅请求消息中的指定参数的参数值,若读取到的参数值为指定值,则确定第一订阅请求消息的消息格式通过合法性检查;可选的,若读取到的参数值不是指定值,则可以确定第一订阅请求消息的消息格式未通过合法性检查。In this embodiment of the present application, if the subscribed device knows in advance (for example, the agreement stipulates) that the parameter value of the specified parameter contained in the subscription message for deleting the subscription relationship is a specific value, the subscribed device receives the above-mentioned first subscription request. message, and determine that when the subscribing device wants to delete the subscription relationship in the subscribed device, it can read the parameter value of the specified parameter in the first subscription request message. If the read parameter value is the specified value, determine the first subscription The message format of the request message passes the legality check; optionally, if the read parameter value is not the specified value, it can be determined that the message format of the first subscription request message does not pass the legality check.
比如,在被订阅设备预先已知晓用于删除订阅关系的订阅消息中包含的指定参数的参数值为0值的情况下,若被订阅设备读取到的指定参数的参数值为0,则确定第一订阅请求消息的消息格式通过合法性检查。For example, when the subscribed device knows in advance that the parameter value of the specified parameter contained in the subscription message for deleting the subscription relationship is 0, if the parameter value of the specified parameter read by the subscribed device is 0, then determine The message format of the first subscription request message passes the validity check.
再比如,在被订阅设备预先已知晓用于删除订阅关系的订阅消息中包含的指定参数的参数值为指定非0数值的情况下,若被订阅设备读取到的指定参数的参数值为指定非0数值,则确定第一订阅请求消息的消息格式通过合法性检查。For another example, when the subscribed device already knows in advance that the parameter value of the specified parameter contained in the subscription message for deleting the subscription relationship is a specified non-zero value, if the parameter value of the specified parameter read by the subscribed device is the specified value, If the value is non-0, it is determined that the message format of the first subscription request message passes the validity check.
再比如,在被订阅设备预先已知晓用于删除订阅关系的订阅消息中包含的指定参数的参数值为NULL值的情况下,若被订阅设备读取到的指定参数的参数值为NULL值,则确定第一订阅请求消息的消息格式通过合法性检查。For another example, when the subscribed device already knows in advance that the parameter value of the specified parameter contained in the subscription message for deleting the subscription relationship is a NULL value, if the parameter value of the specified parameter read by the subscribed device is a NULL value, Then it is determined that the message format of the first subscription request message passes the validity check.
再比如,在被订阅设备预先已知晓用于删除订阅关系的订阅消息中第一参数的参数值与第二参数的参数值为相等的数值的情况下,若被订阅设备读取到的MaxIntervalCeiling字段的参数值以及MinIntervalFloor字段的参数值相等,则确定第一订阅请求消息的消息格式通过合法性检查。For another example, when the subscribed device already knows in advance that the parameter value of the first parameter and the parameter value of the second parameter in the subscription message for deleting the subscription relationship are equal values, if the MaxIntervalCeiling field read by the subscribed device parameter value and the parameter value of the MinIntervalFloor field are equal, it is determined that the message format of the first subscription request message passes the validity check.
在一种可能的实现方式中,被订阅设备接收到上述第一订阅请求消息之后,还可以执行如下步骤:In a possible implementation, after receiving the above first subscription request message, the subscribed device may also perform the following steps:
响应于第一订阅请求消息,向订阅设备发送第一订阅报告消息;第一订阅报告消息用于指示被订阅设备中被订阅设备订阅的资源的状态;接收被订阅设备响应于第一订阅报告消息发送的第一状态响应消息;第一状态响应消息用于指示成功接收到第一订阅报告消息。In response to the first subscription request message, send a first subscription report message to the subscribing device; the first subscription report message is used to indicate the status of the resource subscribed by the subscribed device in the subscribed device; receive the subscribed device's response to the first subscription report message The first status response message is sent; the first status response message is used to indicate that the first subscription report message is successfully received.
相应的,订阅设备发送上述第一订阅请求消息之后,还可以执行如下步骤:Correspondingly, after the subscribing device sends the above-mentioned first subscription request message, it may also perform the following steps:
接收被订阅设备响应于第一订阅请求消息发送的第一订阅报告消息;向被订阅设备发送第一状态响应消息。Receive a first subscription report message sent by the subscribed device in response to the first subscription request message; send a first status response message to the subscribed device.
在本申请实施例中,订阅设备接收到第一订阅请求消息之后,还可能再上报一次订阅目标的状态,也就是发送一个订阅报告消息,该订阅报告消息中携带订阅目标的状态信息(即当前被订阅设备中被订阅设备订阅的资源的状态)。订阅设备接收到该第一订阅报告消息后,可以向被订阅设备返回一个订阅响应消息,该订阅响应消息可以用于将已成功接收到上述第一订阅报告消息的情况告知给订阅设备。In this embodiment of the present application, after receiving the first subscription request message, the subscribing device may report the status of the subscription target again, that is, send a subscription report message. The subscription report message carries the status information of the subscription target (i.e., the current status of the subscription target). The status of resources subscribed to by the subscribing device in the subscribed device). After receiving the first subscription report message, the subscribing device may return a subscription response message to the subscribed device. The subscription response message may be used to inform the subscribing device that the first subscription report message has been successfully received.
在一种可能的实现方式中,被订阅设备后续还可以执行以下操作:In a possible implementation, the subscribed device can subsequently perform the following operations:
向订阅设备发送第二状态响应消息;第二状态响应消息用于指示已删除订阅设备与被订阅设备之间的订阅关系。Send a second status response message to the subscribing device; the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
相应的,订阅设备后续还可以执行以下操作:Correspondingly, the subscribed device can also perform the following operations in the future:
接收被订阅设备发送的第二状态响应消息;第二状态响应消息用于指示已删除订阅设备与被订阅设备之间的订阅关系。Receive a second status response message sent by the subscribed device; the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
在本申请实施例中,在被订阅设备删除了订阅设备对应的订阅关系后,被订阅设备可以 向订阅设备发送一个状态响应消息,并通过该状态响应消息将对应的订阅关系已删除的信息告知给订阅设备。In the embodiment of this application, after the subscribed device deletes the subscription relationship corresponding to the subscribing device, the subscribed device can send a status response message to the subscribing device, and notify the corresponding subscription relationship that the corresponding subscription relationship has been deleted through the status response message. Give subscription equipment.
请参考图6,其示出了本申请实施例涉及的一种订阅流程的示意图。如图6所示,该订阅流程可以包括如下步骤:Please refer to FIG. 6 , which shows a schematic diagram of a subscription process involved in an embodiment of the present application. As shown in Figure 6, the subscription process may include the following steps:
S61-S63,Initiator发起一个订阅请求流程,需要生成一个订阅请求消息:在该请求消息中设置源、目标、S Flag、Dsiz Flag、将keepsubscriptions设定为TRUE,并设置MaxIntervalCeiling和MinIntervalfloor字段的参数值。S61-S63, the Initiator initiates a subscription request process and needs to generate a subscription request message: set the source, target, S Flag, Dsiz Flag, set keepsubscriptions to TRUE in the request message, and set the parameter values of the MaxIntervalCeiling and MinIntervalfloor fields. .
S64-S65,如果Initiator发起的订阅流程是一个取消所有订阅的流程,则:Initiator将keepsubscriptions设定为FALSE。另外,针对MaxIntervalCeiling和MinIntervalfloor的设定有一下几种可选的方案:S64-S65, if the subscription process initiated by the Initiator is a process of canceling all subscriptions, then: the Initiator sets keepsubscriptions to FALSE. In addition, there are several options for setting MaxIntervalCeiling and MinIntervalfloor:
1)不携带MaxIntervalCeiling和MinIntervalfloor,即两个参数对于subscribe request消息不是必要消息,仅keepsubscriptions=TRUE时需要携带;1) MaxIntervalCeiling and MinIntervalfloor are not carried, that is, the two parameters are not necessary for the subscribe request message, and only need to be carried when keepsubscriptions=TRUE;
2)MaxIntervalCeiling和MinIntervalfloor设定为0、其他相等的数值、或者其他特殊的数值;2) MaxIntervalCeiling and MinIntervalfloor are set to 0, other equal values, or other special values;
3)MaxIntervalCeiling和MinIntervalfloor设定为NULL;3) MaxIntervalCeiling and MinIntervalfloor are set to NULL;
4)MaxIntervalCeiling和MinIntervalfloor可以设定为任何值,但是如果keepsubscriptions=FALSE,则publisher不去处理这两个值。4) MaxIntervalCeiling and MinIntervalfloor can be set to any value, but if keepsubscriptions=FALSE, the publisher will not process these two values.
S66,Initiator向Publisher发送上述订阅请求消息。S66, Initiator sends the above subscription request message to Publisher.
S67-S68,Publisher收到上述订阅请求消息之后,会判定Initiator是否有权限执行上述操作。S67-S68, after receiving the above subscription request message, Publisher will determine whether the Initiator has the authority to perform the above operation.
如果订阅请求消息中的keepsubscriptions=FALSE。则针对S64步骤MaxIntervalCeiling和MinIntervalfloor的设定,判定消息格式的合法性。如果合法性检测通过,则Publisher立即结束与Initiator间的所有订阅关系。If keepsubscriptions=FALSE in the subscription request message. Then determine the legality of the message format based on the settings of MaxIntervalCeiling and MinIntervalfloor in step S64. If the legality test passes, the Publisher immediately ends all subscription relationships with the Initiator.
如果订阅请求消息中的keepsubscriptions设定为TRUE,则Publisher建立新的订阅关系。If keepsubscriptions in the subscription request message is set to TRUE, Publisher establishes a new subscription relationship.
S69-S610,Publisher向Initiator发送数据报告消息,Initiator向Publisher返回状态响应消息。S69-S610, Publisher sends a data report message to the Initiator, and the Initiator returns a status response message to the Publisher.
其中,上述S69-S610为可选步骤;其中,即使在取消订阅场景下,Initiator也可能最后一次发送data report消息。其中,200OK通常指接收成功的应答消息。Among them, the above S69-S610 are optional steps; among them, even in the unsubscription scenario, the Initiator may send the data report message for the last time. Among them, 200OK usually refers to a successful response message.
S611,在取消订阅场景下,在删除Initiator对Publisher中的资源的订阅关系之后,Publisher针对subscribe request回复一个status response,指示其已经删除所有订阅关系。该步骤也为可选步骤。S611, in the cancellation scenario, after deleting the subscription relationship of the Initiator to the resources in the Publisher, the Publisher replies with a status response to the subscribe request, indicating that it has deleted all subscription relationships. This step is also optional.
S612,在订阅场景,在建立Initiator对Publisher中的资源的新的订阅关系之后,Publisher针对subscribe request回复一个status response,其可以表示订阅成功。S612, in the subscription scenario, after establishing a new subscription relationship between the Initiator and the resources in the Publisher, the Publisher replies with a status response to the subscribe request, which can indicate that the subscription is successful.
综上所述,在本申请实施例所示的方案中,订阅设备向被订阅设备取消订阅时,可以生成不包含指定参数的第一订阅消息,或者,生成包含的指定参数的参数值为特定值或随机值的第一订阅消息,提供了在取消订阅的场景下,对订阅请求消息中的用于指示订阅数据报告的最大间隔的最大值和/或最小值的参数的明确的设置方式,统一了取消消息订阅的行为,扩展了消息订阅的应用场景。To sum up, in the solution shown in the embodiment of this application, when the subscribing device unsubscribes from the subscribed device, it can generate a first subscription message that does not contain specified parameters, or generate a first subscription message that contains specified parameters with a specific parameter value. The first subscription message with a value or a random value provides a clear way to set the parameters in the subscription request message that indicate the maximum value and/or minimum value of the maximum interval for subscription data reporting in the unsubscription scenario. Unified the behavior of canceling message subscriptions and expanded the application scenarios of message subscriptions.
请参考图7,其示出了本申请一个实施例提供的订阅消息处理装置的框图。该订阅消息处理装置700具有实现上述图3或图5所示的方法中,由订阅设备执行的功能。如图7所示,该装置可以包括:Please refer to FIG. 7 , which shows a block diagram of a subscription message processing device provided by an embodiment of the present application. The subscription message processing device 700 has the function of being executed by the subscription device in implementing the method shown in FIG. 3 or FIG. 5 . As shown in Figure 7, the device may include:
消息生成模块701,用于生成第一订阅请求消息;所述第一订阅请求消息用于删除订阅设备与被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参 数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态; Message generation module 701 is used to generate a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or , the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate the subscription The maximum value of the maximum interval of data reports; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resources subscribed by the subscription device;
发送模块702,用于向所述被订阅设备发送所述第一订阅请求消息。Sending module 702, configured to send the first subscription request message to the subscribed device.
在一种可能的实现方式中,在所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,In a possible implementation, when the parameter value of the specified parameter contained in the first subscription request message is a specific value,
所述指定参数的参数值为0值;或者,The parameter value of the specified parameter is 0; or,
所述指定参数的参数值为指定非0数值;或者,The parameter value of the specified parameter is a specified non-zero value; or,
所述指定参数的参数值为NULL值;或者,The parameter value of the specified parameter is a NULL value; or,
所述第一订阅请求消息中的所述第一参数的参数值,与所述第一订阅请求消息中的所述第二参数的参数值为相等的数值。The parameter value of the first parameter in the first subscription request message is the same value as the parameter value of the second parameter in the first subscription request message.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the device further includes:
第一接收模块,用于接收所述被订阅设备响应于所述第一订阅请求消息发送的第一订阅报告消息;所述第一订阅报告消息用于指示所述被订阅设备中被所述订阅设备订阅的资源的状态。A first receiving module, configured to receive a first subscription report message sent by the subscribed device in response to the first subscription request message; the first subscription report message is used to indicate that the subscribed device The status of the resources to which the device is subscribed.
在一种可能的实现方式中,所述发送模块702,还用于向所述被订阅设备发送第一状态响应消息;所述第一状态响应消息用于指示成功接收到所述第一订阅报告消息。In a possible implementation, the sending module 702 is also configured to send a first status response message to the subscribed device; the first status response message is used to indicate that the first subscription report is successfully received. information.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the device further includes:
第二接收模块,用于接收所述被订阅设备发送的第二状态响应消息;所述第二状态响应消息用于指示已删除所述订阅设备与所述被订阅设备之间的订阅关系。The second receiving module is configured to receive a second status response message sent by the subscribed device; the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
在一种可能的实现方式中,所述第一订阅请求消息中的保持订阅字段的参数值为第一参数值;所述第一参数值用于指示删除所述订阅设备与被订阅设备之间的订阅关系。In a possible implementation, the parameter value of the maintain subscription field in the first subscription request message is a first parameter value; the first parameter value is used to indicate deletion of the connection between the subscribing device and the subscribed device. subscription relationship.
请参考图8,其示出了本申请一个实施例提供的订阅消息处理装置的框图。该订阅消息处理装置800具有实现上述图4或图5所示的方法中,由被订阅设备执行的功能。如图8所示,该装置可以包括:Please refer to FIG. 8 , which shows a block diagram of a subscription message processing device provided by an embodiment of the present application. The subscription message processing device 800 has the function of being executed by the subscribed device in implementing the method shown in FIG. 4 or FIG. 5 . As shown in Figure 8, the device may include:
接收模块801,用于接收订阅设备发送的第一订阅请求消息;所述第一订阅请求消息用于删除所述订阅设备与被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态。Receiving module 801, configured to receive a first subscription request message sent by a subscribing device; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message contains no Contains specified parameters, or the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameters include at least one of a first parameter and a second parameter; the first The parameter is used to indicate the maximum value of the maximum interval of the subscription data report; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the resources subscribed by the subscription device status.
在一种可能的实现方式中,在所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,In a possible implementation, when the parameter value of the specified parameter contained in the first subscription request message is a specific value,
所述指定参数的参数值为0值;或者,The parameter value of the specified parameter is 0; or,
所述指定参数的参数值为指定非0数值;或者,The parameter value of the specified parameter is a specified non-zero value; or,
所述指定参数的参数值为NULL值;或者,The parameter value of the specified parameter is a NULL value; or,
所述第一订阅请求消息中的所述第一参数的参数值,与所述第一订阅请求消息中的所述第二参数的参数值为相等的数值。The parameter value of the first parameter in the first subscription request message is the same value as the parameter value of the second parameter in the first subscription request message.
在一种可能的实现方式中,在所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,所述装置还包括:In a possible implementation manner, when the first subscription request message does not contain the specified parameter, or the parameter value of the specified parameter included in the first subscription request message is a specific value, the device Also includes:
合法性检查模块,用于对所述第一订阅请求消息的消息格式进行合法性检查;A legality checking module, configured to check the legality of the message format of the first subscription request message;
删除模块,用于在所述第一订阅请求消息的消息格式通过合法性检查的情况下,删除所述订阅设备与所述被订阅设备之间的订阅关系。A deletion module configured to delete the subscription relationship between the subscribing device and the subscribed device when the message format of the first subscription request message passes the legality check.
在一种可能的实现方式中,所述合法性检查模块,用于,In a possible implementation, the legality checking module is used to,
在所述第一订阅请求消息中不包含指定参数的情况下,在所述第一订阅请求消息中查询所述指定参数;If the first subscription request message does not contain the specified parameter, query the first subscription request message for the specified parameter;
在未查询到所述指定参数的情况下,确定所述第一订阅请求消息的消息格式通过合法性检查。If the specified parameter is not queried, it is determined that the message format of the first subscription request message passes the validity check.
在一种可能的实现方式中,所述合法性检查模块,用于,In a possible implementation, the legality checking module is used to,
在所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,读取所述第一订阅请求消息中包含的指定参数的参数值;When the parameter value of the designated parameter contained in the first subscription request message is a specific value, read the parameter value of the designated parameter contained in the first subscription request message;
在读取到的所述指定参数的参数值为特定值的情况下,确定所述第一订阅请求消息的消息格式通过合法性检查。In the case where the read parameter value of the specified parameter is a specific value, it is determined that the message format of the first subscription request message passes the legality check.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the device further includes:
第一发送模块,用于响应于所述第一订阅请求消息,向所述订阅设备发送第一订阅报告消息;所述第一订阅报告消息用于指示所述被订阅设备中被所述订阅设备订阅的资源的状态。A first sending module, configured to send a first subscription report message to the subscribing device in response to the first subscription request message; the first subscription report message is used to indicate that the subscribed device among the subscribed devices The status of the subscribed resource.
在一种可能的实现方式中,所述接收模块801,还用于接收所述被订阅设备响应于所述第一订阅报告消息发送的第一状态响应消息;所述第一状态响应消息用于指示成功接收到所述第一订阅报告消息。In a possible implementation, the receiving module 801 is also configured to receive a first status response message sent by the subscribed device in response to the first subscription report message; the first status response message is used to Indicates successful reception of the first subscription report message.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the device further includes:
第二发送模块,用于向所述订阅设备发送第二状态响应消息;所述第二状态响应消息用于指示已删除所述订阅设备与所述被订阅设备之间的订阅关系。The second sending module is configured to send a second status response message to the subscribing device; the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the device further includes:
处理模块,用于在所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值的情况下,对所述指定参数的参数值不做处理。A processing module configured to not process the parameter value of the specified parameter when the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value.
在一种可能的实现方式中,所述第一订阅请求消息中的保持订阅字段的参数值为第一参数值;所述第一参数值用于指示删除所述订阅设备与被订阅设备之间的订阅关系。In a possible implementation, the parameter value of the maintain subscription field in the first subscription request message is a first parameter value; the first parameter value is used to indicate deletion of the connection between the subscribing device and the subscribed device. subscription relationship.
需要说明的一点是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that when the device provided in the above embodiment implements its functions, only the division of the above functional modules is used as an example. In practical applications, the above functions can be allocated to different functional modules according to actual needs. That is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the devices in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
请参考图9,其示出了本申请一个实施例提供的计算机设备900的结构示意图。该计算机设备900可以包括:处理器901、接收器902、发射器903、存储器904和总线905。Please refer to FIG. 9 , which shows a schematic structural diagram of a computer device 900 provided by an embodiment of the present application. The computer device 900 may include a processor 901, a receiver 902, a transmitter 903, a memory 904, and a bus 905.
处理器901包括一个或者一个以上处理核心,处理器901通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。The processor 901 includes one or more processing cores. The processor 901 executes various functional applications and information processing by running software programs and modules.
接收器902和发射器903可以实现为一个通信组件,该通信组件可以是一块通信芯片。该通信芯片也可以称为收发器。The receiver 902 and the transmitter 903 can be implemented as a communication component, and the communication component can be a communication chip. This communication chip can also be called a transceiver.
存储器904通过总线905与处理器901相连。The memory 904 is connected to the processor 901 through a bus 905.
存储器904可用于存储计算机程序,处理器901用于执行该计算机程序,以实现上述方法实施例中的各个步骤。The memory 904 can be used to store a computer program, and the processor 901 is used to execute the computer program to implement various steps in the above method embodiments.
此外,存储器904可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,易失性或非易失性存储设备包括但不限于:磁盘或光盘,电可擦除可编程只读存储器,可擦除可编程只读存储器,静态随时存取存储器,只读存储器,磁存储器,快闪存储器,可编程只读存储器。Additionally, memory 904 may be implemented by any type of volatile or non-volatile storage device, or combination thereof, including but not limited to: magnetic or optical disks, electrically erasable programmable Read-only memory, erasable programmable read-only memory, static ready-access memory, read-only memory, magnetic memory, flash memory, programmable read-only memory.
在一个示例性的方案中,当计算机设备900实现为订阅设备时,所述收处理器,用于生成第一订阅请求消息;所述第一订阅请求消息用于删除所述订阅设备与被订阅设备之间的订 阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态;所述收发器,用于向所述被订阅设备发送所述第一订阅请求消息。In an exemplary solution, when the computer device 900 is implemented as a subscribing device, the receiving processor is used to generate a first subscription request message; the first subscription request message is used to delete the subscribing device and the subscribed device. Subscription relationship between devices; the first subscription request message does not contain the specified parameter, or the parameter value of the specified parameter included in the first subscription request message is a specific value or a random value; the specified parameter includes the first At least one of a parameter and a second parameter; the first parameter is used to indicate the maximum value of the maximum interval of the subscription data report; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; The subscription data report is used to indicate the status of resources subscribed by the subscribing device; the transceiver is used to send the first subscription request message to the subscribed device.
其中,上述计算机设备900中的处理器901和/或收发器执行的过程可以参考上述图3或图5任一所示的方法中,由订阅设备执行的各个步骤。The process performed by the processor 901 and/or the transceiver in the computer device 900 may refer to the various steps performed by the subscribing device in the method shown in either FIG. 3 or FIG. 5 .
在一个示例性的方案中,当计算机设备900实现为被订阅设备时,所述收发器,用于接收订阅设备发送的第一订阅请求消息;所述第一订阅请求消息用于删除所述订阅设备与所述被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态。In an exemplary solution, when the computer device 900 is implemented as a subscribed device, the transceiver is used to receive a first subscription request message sent by the subscribing device; the first subscription request message is used to delete the subscription The subscription relationship between the device and the subscribed device; the first subscription request message does not contain the specified parameter, or the parameter value of the specified parameter included in the first subscription request message is a specific value or a random value; The specified parameters include at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum value of the maximum interval of the subscription data report; the second parameter is used to indicate the maximum interval of the subscription data report. The minimum value of the minimum interval; the subscription data report is used to indicate the status of resources subscribed by the subscribing device.
其中,上述计算机设备900中的处理器901和/或收发器执行的过程可以参考上述图4或图5任一所示的方法中,由被订阅设备执行的各个步骤。The process performed by the processor 901 and/or the transceiver in the computer device 900 may refer to the various steps performed by the subscribed device in the method shown in either FIG. 4 or FIG. 5 .
本申请实施例还提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现上述图3、图4或图5所示的方法中,由订阅设备或者被订阅设备执行的全部或者部分步骤。Embodiments of the present application also provide a computer-readable storage medium. A computer program is stored in the storage medium. The computer program is loaded and executed by a processor to implement the method shown in Figure 3, Figure 4 or Figure 5. , all or part of the steps performed by the subscribing device or the subscribed device.
本申请还提供了一种芯片,该芯片用于在计算机设备中运行,以使得计算机设备执行上述图3、图4或图5所示的方法中,由订阅设备或者被订阅设备执行的全部或者部分步骤。This application also provides a chip, which is used to run in a computer device, so that the computer device performs all or all of the methods performed by the subscribing device or the subscribed device in the above-mentioned method shown in Figure 3, Figure 4 or Figure 5. Some steps.
本申请还提供了一种计算机程序产品,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得计算机设备执行上述图3、图4或图5所示的方法中,由订阅设备或者被订阅设备执行的全部或者部分步骤。The application also provides a computer program product, which computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the method shown in FIG. 3, FIG. 4 or FIG. 5, by the subscribing device or the subscribed device. All or part of the steps to be performed.
本申请还提供了一种计算机程序,该计算机程序由计算机设备的处理器执行,以实现上述图3、图4或图5所示的方法中,由订阅设备或者被订阅设备执行的全部或者部分步骤。This application also provides a computer program, which is executed by the processor of the computer device to implement all or part of the methods executed by the subscribing device or the subscribed device in the above-mentioned method shown in Figure 3, Figure 4 or Figure 5. step.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should realize that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. Storage media can be any available media that can be accessed by a general purpose or special purpose computer.
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包括在本申请的保护范围之内。The above are only exemplary embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection of the present application. within the range.

Claims (37)

  1. 一种订阅消息处理方法,其特征在于,所述方法由订阅设备执行,所述方法包括:A subscription message processing method, characterized in that the method is executed by a subscription device, and the method includes:
    生成第一订阅请求消息;所述第一订阅请求消息用于删除所述订阅设备与被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态;Generate a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or the first The parameter value of the specified parameter contained in the subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate the maximum interval for subscribing to data reports The maximum value; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resource subscribed by the subscription device;
    向所述被订阅设备发送所述第一订阅请求消息。Send the first subscription request message to the subscribed device.
  2. 根据权利要求1所述的方法,其特征在于,在所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,The method according to claim 1, characterized in that, when the parameter value of the specified parameter contained in the first subscription request message is a specific value,
    所述指定参数的参数值为0值;或者,The parameter value of the specified parameter is 0; or,
    所述指定参数的参数值为指定非0数值;或者,The parameter value of the specified parameter is a specified non-zero value; or,
    所述指定参数的参数值为NULL值;或者,The parameter value of the specified parameter is a NULL value; or,
    所述第一订阅请求消息中的所述第一参数的参数值,与所述第一订阅请求消息中的所述第二参数的参数值为相等的数值。The parameter value of the first parameter in the first subscription request message is the same value as the parameter value of the second parameter in the first subscription request message.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, characterized in that, the method further includes:
    接收所述被订阅设备响应于所述第一订阅请求消息发送的第一订阅报告消息;所述第一订阅报告消息用于指示所述被订阅设备中被所述订阅设备订阅的资源的状态。Receive a first subscription report message sent by the subscribed device in response to the first subscription request message; the first subscription report message is used to indicate the status of resources subscribed by the subscribing device in the subscribed device.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method of claim 3, further comprising:
    向所述被订阅设备发送第一状态响应消息;所述第一状态响应消息用于指示成功接收到所述第一订阅报告消息。Send a first status response message to the subscribed device; the first status response message is used to indicate successful reception of the first subscription report message.
  5. 根据权利要求1至4任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, characterized in that the method further includes:
    接收所述被订阅设备发送的第二状态响应消息;所述第二状态响应消息用于指示已删除所述订阅设备与所述被订阅设备之间的订阅关系。Receive a second status response message sent by the subscribed device; the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
  6. 根据权利要求1至5任一所述的方法,其特征在于,所述第一订阅请求消息中的保持订阅字段的参数值为第一参数值;所述第一参数值用于指示删除所述订阅设备与被订阅设备之间的订阅关系。The method according to any one of claims 1 to 5, characterized in that the parameter value of the keep subscription field in the first subscription request message is a first parameter value; the first parameter value is used to indicate deletion of the The subscription relationship between the subscribing device and the subscribed device.
  7. 一种订阅消息处理方法,其特征在于,所述方法由被订阅设备执行,所述方法包括:A subscription message processing method, characterized in that the method is executed by a subscribed device, and the method includes:
    接收订阅设备发送的第一订阅请求消息;所述第一订阅请求消息用于删除所述订阅设备与所述被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态。Receive a first subscription request message sent by a subscribing device; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, Alternatively, the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate The maximum value of the maximum interval of the subscription data report; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resource subscribed by the subscription device.
  8. 根据权利要求7所述的方法,其特征在于,在所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,The method according to claim 7, characterized in that, when the parameter value of the specified parameter contained in the first subscription request message is a specific value,
    所述指定参数的参数值为0值;或者,The parameter value of the specified parameter is 0; or,
    所述指定参数的参数值为指定非0数值;或者,The parameter value of the specified parameter is a specified non-zero value; or,
    所述指定参数的参数值为NULL值;或者,The parameter value of the specified parameter is a NULL value; or,
    所述第一订阅请求消息中的所述第一参数的参数值,与所述第一订阅请求消息中的所述第二参数的参数值为相等的数值。The parameter value of the first parameter in the first subscription request message is the same value as the parameter value of the second parameter in the first subscription request message.
  9. 根据权利要求7或8所述的方法,其特征在于,在所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,所述方法还包括:The method according to claim 7 or 8, characterized in that the first subscription request message does not contain a specified parameter, or the parameter value of the specified parameter included in the first subscription request message is a specific value. In this case, the method also includes:
    对所述第一订阅请求消息的消息格式进行合法性检查;Perform a legality check on the message format of the first subscription request message;
    在所述第一订阅请求消息的消息格式通过合法性检查的情况下,删除所述订阅设备与所述被订阅设备之间的订阅关系。If the message format of the first subscription request message passes the legality check, delete the subscription relationship between the subscribing device and the subscribed device.
  10. 根据权利要求9所述的方法,其特征在于,所述对所述第一订阅请求消息的消息格式进行合法性检查,包括:The method according to claim 9, characterized in that said checking the validity of the message format of the first subscription request message includes:
    在所述第一订阅请求消息中不包含指定参数的情况下,在所述第一订阅请求消息中查询所述指定参数;If the first subscription request message does not contain the specified parameter, query the first subscription request message for the specified parameter;
    在未查询到所述指定参数的情况下,确定所述第一订阅请求消息的消息格式通过合法性检查。If the specified parameter is not queried, it is determined that the message format of the first subscription request message passes the validity check.
  11. 根据权利要求9所述的方法,其特征在于,所述对所述第一订阅请求消息的消息格式进行合法性检查,包括:The method according to claim 9, characterized in that said checking the validity of the message format of the first subscription request message includes:
    在所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,读取所述第一订阅请求消息中包含的指定参数的参数值;When the parameter value of the designated parameter contained in the first subscription request message is a specific value, read the parameter value of the designated parameter contained in the first subscription request message;
    在读取到的所述指定参数的参数值为特定值的情况下,确定所述第一订阅请求消息的消息格式通过合法性检查。In the case where the read parameter value of the specified parameter is a specific value, it is determined that the message format of the first subscription request message passes the legality check.
  12. 根据权利要求7至11任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 7 to 11, characterized in that the method further includes:
    响应于所述第一订阅请求消息,向所述订阅设备发送第一订阅报告消息;所述第一订阅报告消息用于指示所述被订阅设备中被所述订阅设备订阅的资源的状态。In response to the first subscription request message, a first subscription report message is sent to the subscribing device; the first subscription report message is used to indicate the status of resources subscribed by the subscribing device in the subscribed device.
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method of claim 12, further comprising:
    接收所述被订阅设备响应于所述第一订阅报告消息发送的第一状态响应消息;所述第一状态响应消息用于指示成功接收到所述第一订阅报告消息。Receive a first status response message sent by the subscribed device in response to the first subscription report message; the first status response message is used to indicate that the first subscription report message is successfully received.
  14. 根据权利要求7至13任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 7 to 13, characterized in that the method further includes:
    向所述订阅设备发送第二状态响应消息;所述第二状态响应消息用于指示已删除所述订阅设备与所述被订阅设备之间的订阅关系。Send a second status response message to the subscribing device; the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
  15. 根据权利要求7至14任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 7 to 14, characterized in that the method further includes:
    在所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值的情况下,对所述指定参数的参数值不做处理。In the case where the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value, no processing is performed on the parameter value of the specified parameter.
  16. 根据权利要求7至15任一所述的方法,其特征在于,所述第一订阅请求消息中的保持订阅字段的参数值为第一参数值;所述第一参数值用于指示删除所述订阅设备与被订阅设备之间的订阅关系。The method according to any one of claims 7 to 15, characterized in that the parameter value of the keep subscription field in the first subscription request message is a first parameter value; the first parameter value is used to indicate deletion of the The subscription relationship between the subscribing device and the subscribed device.
  17. 一种订阅消息处理装置,其特征在于,所述装置包括:A subscription message processing device, characterized in that the device includes:
    消息生成模块,用于生成第一订阅请求消息;所述第一订阅请求消息用于删除订阅设备与被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态;A message generation module, configured to generate a first subscription request message; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain specified parameters, or, The parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value; the specified parameter includes at least one of a first parameter and a second parameter; the first parameter is used to indicate subscription data The maximum value of the maximum interval of reports; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the status of the resources subscribed by the subscription device;
    发送模块,用于向所述被订阅设备发送所述第一订阅请求消息。A sending module, configured to send the first subscription request message to the subscribed device.
  18. 根据权利要求17所述的装置,其特征在于,在所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,The device according to claim 17, characterized in that when the parameter value of the specified parameter contained in the first subscription request message is a specific value,
    所述指定参数的参数值为0值;或者,The parameter value of the specified parameter is 0; or,
    所述指定参数的参数值为指定非0数值;或者,The parameter value of the specified parameter is a specified non-zero value; or,
    所述指定参数的参数值为NULL值;或者,The parameter value of the specified parameter is a NULL value; or,
    所述第一订阅请求消息中的所述第一参数的参数值,与所述第一订阅请求消息中的所述第二参数的参数值为相等的数值。The parameter value of the first parameter in the first subscription request message is the same value as the parameter value of the second parameter in the first subscription request message.
  19. 根据权利要求17或18所述的装置,其特征在于,所述装置还包括:The device according to claim 17 or 18, characterized in that the device further includes:
    第一接收模块,用于接收所述被订阅设备响应于所述第一订阅请求消息发送的第一订阅报告消息;所述第一订阅报告消息用于指示所述被订阅设备中被所述订阅设备订阅的资源的状态。A first receiving module, configured to receive a first subscription report message sent by the subscribed device in response to the first subscription request message; the first subscription report message is used to indicate that the subscribed device The status of the resources to which the device is subscribed.
  20. 根据权利要求19所述的装置,其特征在于,所述发送模块,还用于向所述被订阅设备发送第一状态响应消息;所述第一状态响应消息用于指示成功接收到所述第一订阅报告消息。The apparatus according to claim 19, wherein the sending module is further configured to send a first status response message to the subscribed device; the first status response message is used to indicate that the first status response message has been successfully received. A subscription to report messages.
  21. 根据权利要求17至20任一所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 17 to 20, characterized in that the device further includes:
    第二接收模块,用于接收所述被订阅设备发送的第二状态响应消息;所述第二状态响应消息用于指示已删除所述订阅设备与所述被订阅设备之间的订阅关系。The second receiving module is configured to receive a second status response message sent by the subscribed device; the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
  22. 根据权利要求17至21任一所述的装置,其特征在于,所述第一订阅请求消息中的保持订阅字段的参数值为第一参数值;所述第一参数值用于指示删除所述订阅设备与被订阅设备之间的订阅关系。The device according to any one of claims 17 to 21, characterized in that the parameter value of the keep subscription field in the first subscription request message is a first parameter value; the first parameter value is used to indicate deletion of the The subscription relationship between the subscribing device and the subscribed device.
  23. 一种订阅消息处理装置,其特征在于,所述装置包括:A subscription message processing device, characterized in that the device includes:
    接收模块,用于接收订阅设备发送的第一订阅请求消息;所述第一订阅请求消息用于删除所述订阅设备与被订阅设备之间的订阅关系;所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值;所述指定参数包括第一参数和第二参数中的至少一种;所述第一参数用于指示订阅数据报告的最大间隔的最大值;所述第二参数用于指示所述订阅数据报告的最小间隔的最小值;所述订阅数据报告用于指示被所述订阅设备订阅的资源的状态。A receiving module, configured to receive a first subscription request message sent by a subscribing device; the first subscription request message is used to delete the subscription relationship between the subscribing device and the subscribed device; the first subscription request message does not contain Specified parameters, or the parameter values of the specified parameters contained in the first subscription request message are specific values or random values; the specified parameters include at least one of a first parameter and a second parameter; the first parameter The maximum value used to indicate the maximum interval of the subscription data report; the second parameter is used to indicate the minimum value of the minimum interval of the subscription data report; the subscription data report is used to indicate the maximum value of the resource subscribed by the subscription device. state.
  24. 根据权利要求23所述的装置,其特征在于,在所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,The device according to claim 23, characterized in that when the parameter value of the specified parameter contained in the first subscription request message is a specific value,
    所述指定参数的参数值为0值;或者,The parameter value of the specified parameter is 0; or,
    所述指定参数的参数值为指定非0数值;或者,The parameter value of the specified parameter is a specified non-zero value; or,
    所述指定参数的参数值为NULL值;或者,The parameter value of the specified parameter is a NULL value; or,
    所述第一订阅请求消息中的所述第一参数的参数值,与所述第一订阅请求消息中的所述第二参数的参数值为相等的数值。The parameter value of the first parameter in the first subscription request message is the same value as the parameter value of the second parameter in the first subscription request message.
  25. 根据权利要求23或24所述的装置,其特征在于,在所述第一订阅请求消息中不包含指定参数,或者,所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,所述装置还包括:The device according to claim 23 or 24, characterized in that the first subscription request message does not contain a specified parameter, or the parameter value of the specified parameter included in the first subscription request message is a specific value. In case the device also includes:
    合法性检查模块,用于对所述第一订阅请求消息的消息格式进行合法性检查;A legality checking module, configured to check the legality of the message format of the first subscription request message;
    删除模块,用于在所述第一订阅请求消息的消息格式通过合法性检查的情况下,删除所述订阅设备与所述被订阅设备之间的订阅关系。A deletion module configured to delete the subscription relationship between the subscribing device and the subscribed device when the message format of the first subscription request message passes the legality check.
  26. 根据权利要求25所述的装置,其特征在于,所述合法性检查模块,用于,The device according to claim 25, characterized in that the legality check module is used to,
    在所述第一订阅请求消息中不包含指定参数的情况下,在所述第一订阅请求消息中查询所述指定参数;If the first subscription request message does not contain the specified parameter, query the first subscription request message for the specified parameter;
    在未查询到所述指定参数的情况下,确定所述第一订阅请求消息的消息格式通过合法性检查。If the specified parameter is not queried, it is determined that the message format of the first subscription request message passes the validity check.
  27. 根据权利要求25所述的装置,其特征在于,所述合法性检查模块,用于,The device according to claim 25, characterized in that the legality check module is used to,
    在所述第一订阅请求消息中包含的指定参数的参数值为特定值的情况下,读取所述第一订阅请求消息中包含的指定参数的参数值;When the parameter value of the designated parameter contained in the first subscription request message is a specific value, read the parameter value of the designated parameter contained in the first subscription request message;
    在读取到的所述指定参数的参数值为特定值的情况下,确定所述第一订阅请求消息的消息格式通过合法性检查。In the case where the read parameter value of the specified parameter is a specific value, it is determined that the message format of the first subscription request message passes the legality check.
  28. 根据权利要求23至27任一所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 23 to 27, characterized in that the device further includes:
    第一发送模块,用于响应于所述第一订阅请求消息,向所述订阅设备发送第一订阅报告消息;所述第一订阅报告消息用于指示所述被订阅设备中被所述订阅设备订阅的资源的状态。A first sending module, configured to send a first subscription report message to the subscribing device in response to the first subscription request message; the first subscription report message is used to indicate that the subscribed device among the subscribed devices The status of the subscribed resource.
  29. 根据权利要求28所述的装置,其特征在于,所述接收模块,还用于接收所述被订阅设备响应于所述第一订阅报告消息发送的第一状态响应消息;所述第一状态响应消息用于指示成功接收到所述第一订阅报告消息。The apparatus according to claim 28, wherein the receiving module is further configured to receive a first status response message sent by the subscribed device in response to the first subscription report message; the first status response message The message is used to indicate successful reception of the first subscription report message.
  30. 根据权利要求23至29任一所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 23 to 29, characterized in that the device further includes:
    第二发送模块,用于向所述订阅设备发送第二状态响应消息;所述第二状态响应消息用于指示已删除所述订阅设备与所述被订阅设备之间的订阅关系。The second sending module is configured to send a second status response message to the subscribing device; the second status response message is used to indicate that the subscription relationship between the subscribing device and the subscribed device has been deleted.
  31. 根据权利要求23至30任一所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 23 to 30, characterized in that the device further includes:
    处理模块,用于在所述第一订阅请求消息中包含的指定参数的参数值为特定值或随机值的情况下,对所述指定参数的参数值不做处理。A processing module configured to not process the parameter value of the specified parameter when the parameter value of the specified parameter contained in the first subscription request message is a specific value or a random value.
  32. 根据权利要求23至31任一所述的装置,其特征在于,所述第一订阅请求消息中的保持订阅字段的参数值为第一参数值;所述第一参数值用于指示删除所述订阅设备与被订阅设备之间的订阅关系。The device according to any one of claims 23 to 31, characterized in that the parameter value of the keep subscription field in the first subscription request message is a first parameter value; the first parameter value is used to indicate deletion of the The subscription relationship between the subscribing device and the subscribed device.
  33. 一种计算机设备,其特征在于,所述计算机设备包括处理器、存储器和收发器;A computer device, characterized in that the computer device includes a processor, a memory and a transceiver;
    所述存储器中存储有计算机程序,所述处理器执行所述计算机程序,以使得所述计算机 设备实现如上述权利要求1至16任一所述的订阅消息处理方法。A computer program is stored in the memory, and the processor executes the computer program, so that the computer device implements the subscription message processing method as described in any one of claims 1 to 16.
  34. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有计算机程序,所述计算机程序用于被处理器执行,以实现如权利要求1至16任一所述的订阅消息处理方法。A computer-readable storage medium, characterized in that a computer program is stored in the storage medium, and the computer program is used to be executed by a processor to implement the subscription message processing method as described in any one of claims 1 to 16 .
  35. 一种芯片,其特征在于,所述芯片用于在计算机设备中运行,以使得所述计算机设备执行如权利要求1至16任一所述的订阅消息处理方法。A chip, characterized in that the chip is used to run in a computer device, so that the computer device executes the subscription message processing method according to any one of claims 1 to 16.
  36. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中;计算机设备的处理器从所述计算机可读存储介质读取所述计算机指令,并执行所述计算机指令,使得所述计算机设备执行如权利要求1至16任一所述的订阅消息处理方法。A computer program product, characterized in that the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; and a processor of a computer device reads the computer instructions from the computer-readable storage medium. instructions, and execute the computer instructions, so that the computer device executes the subscription message processing method according to any one of claims 1 to 16.
  37. 一种计算机程序,其特征在于,所述计算机程序由计算机设备的处理器执行,以实现如权利要求1至16任一所述的订阅消息处理方法。A computer program, characterized in that the computer program is executed by a processor of a computer device to implement the subscription message processing method as described in any one of claims 1 to 16.
PCT/CN2022/106111 2022-07-15 2022-07-15 Subscription message processing method and apparatus, device, storage medium, and program product WO2024011634A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/106111 WO2024011634A1 (en) 2022-07-15 2022-07-15 Subscription message processing method and apparatus, device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/106111 WO2024011634A1 (en) 2022-07-15 2022-07-15 Subscription message processing method and apparatus, device, storage medium, and program product

Publications (1)

Publication Number Publication Date
WO2024011634A1 true WO2024011634A1 (en) 2024-01-18

Family

ID=89535282

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/106111 WO2024011634A1 (en) 2022-07-15 2022-07-15 Subscription message processing method and apparatus, device, storage medium, and program product

Country Status (1)

Country Link
WO (1) WO2024011634A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040003064A1 (en) * 2002-06-21 2004-01-01 International Business Machines Corporation Gapless delivery and durable subscriptions in a content-based publish/subscribe system
CN102014144A (en) * 2009-09-04 2011-04-13 华为技术有限公司 Method and device for submitting terminal data
CN112512031A (en) * 2020-11-10 2021-03-16 广州爱浦路网络技术有限公司 Data acquisition method applied to 5G network and 5G network
CN114245351A (en) * 2016-07-14 2022-03-25 康维达无线有限责任公司 Subscription and notification services
CN114556892A (en) * 2019-10-16 2022-05-27 Oppo广东移动通信有限公司 Method and device for subscribing resources

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040003064A1 (en) * 2002-06-21 2004-01-01 International Business Machines Corporation Gapless delivery and durable subscriptions in a content-based publish/subscribe system
CN102014144A (en) * 2009-09-04 2011-04-13 华为技术有限公司 Method and device for submitting terminal data
CN114245351A (en) * 2016-07-14 2022-03-25 康维达无线有限责任公司 Subscription and notification services
CN114556892A (en) * 2019-10-16 2022-05-27 Oppo广东移动通信有限公司 Method and device for subscribing resources
CN112512031A (en) * 2020-11-10 2021-03-16 广州爱浦路网络技术有限公司 Data acquisition method applied to 5G network and 5G network

Similar Documents

Publication Publication Date Title
JP6892445B2 (en) Cross-resource subscription for M2M service tier
US11750702B2 (en) Subscription and notification service
US10484512B2 (en) Management of multi-radio gateway device using virtual gateway device
US10085244B2 (en) Method for guaranteeing operation of control message in wireless communication system and device for same
WO2019242574A1 (en) Method for routing internet of things service
EP3493485B1 (en) Method, apparatus and system for notification
US9867164B2 (en) Method and device for processing a specific request message in wireless communication system
EP3849152A1 (en) Methods and systems for connecting a wireless device to a wireless network
US10495336B2 (en) Energy operations across domains
CN116506502A (en) Service layer message template in a communication network
WO2020042973A1 (en) Data processing method for security authentication, server, client device, and medium
EP4135265A1 (en) Method and apparatus for controlling device in internet of things, and gateway device and storage medium
WO2024011634A1 (en) Subscription message processing method and apparatus, device, storage medium, and program product
WO2023201587A1 (en) Device control method and apparatus, device, and storage medium
WO2023108653A1 (en) Subscription access information processing method and apparatus, computer device and storage medium
WO2023092504A1 (en) Subscription control method and apparatus, and computer device and storage medium
WO2024031682A1 (en) Device control method and apparatus, and device, storage medium and program product
WO2024007137A1 (en) Message processing methods and apparatuses, and device, storage medium and program product
WO2024031680A1 (en) Device unbinding method and apparatus, device, storage medium, and program product
WO2023065354A1 (en) Information reporting method and apparatus, and device and storage medium
US20190312929A1 (en) Information synchronization method and device
WO2023115584A1 (en) Connection configuration method and apparatus, connection establishment method and apparatus, device, and storage medium
US20180270190A1 (en) Method and device for creating application announcement resource
WO2023082113A1 (en) Method and apparatus for configuring bridging device, device, and storage medium
WO2024103374A1 (en) Processing method and apparatus for proxy subscription, and computer device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22950752

Country of ref document: EP

Kind code of ref document: A1