Subscription request method and device, equipment and storage medium
Patent Information
- Application Number
- CN202280099604.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-06
- Publication Date
- 2025-05-06
AI Technical Summary
In the Internet of Things communication system, when the value of the subscription field is kept as False in the existing subscription request method, the cancellation of the subscription relationship has certain limitations and is not flexible enough.
Carrying the subscription identification field in the subscription request enables the second terminal to determine the subscription relationship to be canceled based on the subscription identification field, thereby improving the flexibility of the subscription.
By carrying the subscription identification field, the second terminal can accurately determine and cancel the subscription relationship, improving the flexibility and controllability of the subscription.
Smart Images

Figure CN119948853A_ABST
Abstract
Description
Subscription request method, device, equipment and storage medium Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a subscription request method, apparatus, device, and storage medium. Background Art
[0002] In an IoT communication system, a first terminal may initiate a subscription request to a second terminal and wait for a response from the second terminal to activate or cancel the subscription.
[0003] For example, consider a first terminal as the subscription initiator and a second terminal as the subscription responder. The first terminal sends a subscription request to the second terminal, which includes a "KeepSubscriptions" field. If this field is set to False, all subscriptions between the first terminal and the second terminal will be canceled. This results in limited and inflexible cancellation of subscriptions.
[0004] Summary of the Invention
[0005] Embodiments of the present application provide a subscription request method, apparatus, device, and storage medium. By including a subscription identification field in a subscription request, a second terminal can determine the subscription relationship to be canceled based on the subscription identification field, thereby improving subscription flexibility. The technical solution is as follows:
[0006] According to one aspect of the present application, a subscription request method is provided, which is executed by a first terminal and includes:
[0007] Sending a subscription request to the second terminal;
[0008] The subscription request carries a subscription identification field.
[0009] According to one aspect of the present application, a subscription request method is provided, which is executed by a second terminal and includes:
[0010] receiving a subscription request sent by the first terminal;
[0011] The subscription request carries a subscription identification field.
[0012] According to one aspect of the present application, a subscription request device is provided, the device comprising:
[0013] A sending module, configured to send a subscription request to the second terminal;
[0014] The subscription request carries a subscription identification field.
[0015] According to one aspect of the present application, a subscription request device is provided, the device comprising:
[0016] A receiving module, configured to receive a subscription request sent by a first terminal;
[0017] The subscription request carries a subscription identification field.
[0018] According to one aspect of the present application, a first terminal is provided, which includes a memory and a processor; at least one program code is stored in the memory, and the program code is loaded and executed by the processor to implement the subscription request method described above.
[0019] According to one aspect of the present application, a second terminal is provided, which includes a memory and a processor; the memory stores at least one program code, and the program code is loaded and executed by the processor to implement the subscription request method described above.
[0020] According to one aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to be executed by a processor to implement the subscription request method described above.
[0021] According to one aspect of the present application, a chip is provided, which includes a programmable logic circuit and / or program instructions, and is used to implement the subscription request method described above when an electronic device equipped with the chip is running.
[0022] According to one aspect of the present application, a computer program product is provided, which includes computer instructions stored in a computer-readable storage medium. A processor reads and executes the computer instructions from the computer-readable storage medium to implement the subscription request method described above.
[0023] The technical solutions provided by the embodiments of the present application include at least the following beneficial effects:
[0024] By carrying the subscription identification field in the subscription request, the second terminal can determine the subscription relationship to be canceled according to the subscription identification field, thereby improving the flexibility of subscription. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0026] FIG1 is a schematic diagram of a subscription process provided by an exemplary embodiment of the present application;
[0027] FIG2 is a schematic diagram of a data model of a terminal provided by an exemplary embodiment of the present application;
[0028] FIG3 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application;
[0029] FIG4 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application;
[0030] FIG5 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application;
[0031] FIG6 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application;
[0032] FIG7 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application;
[0033] FIG8 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application;
[0034] FIG9 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application;
[0035] FIG10 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application;
[0036] FIG11 is a schematic diagram of a subscription request apparatus provided by an exemplary embodiment of the present application;
[0037] FIG12 is a schematic diagram of a subscription request apparatus provided by an exemplary embodiment of the present application;
[0038] FIG13 is a block diagram of a communication device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0040] The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: Global System of Mobile communication (GSM) system, Code Division Multiple Access (CDMA) system, Wideband Code Division Multiple Access (WCDMA) system, General Packet Radio Service (GPRS), Long Term Evolution (LTE) system, Advanced Long Term Evolution (LTE-A) system, New Radio (NR) system, NR system evolution system, LTE on unlicensed spectrum (LTE-U) system, NR on unlicensed spectrum (NR-U) system, Non-Terrestrial Networks (NTN) system, Universal Mobile Telecommunication System (UMTS), Wireless Local Area Networks (WLAN), Wireless Fidelity (Wireless Fidelity) system. Fidelity, WiFi), fifth-generation communication (5th-Generation, 5G) system or other communication systems, etc.
[0041] With the development of communication technology, mobile communication systems will not only support traditional communications, but also support, for example, Internet of Things (IoT) communications, and the embodiments of the present application can be applied to IoT communication systems.
[0042] The IoT communication system includes multiple terminals, and information exchange and communication can be achieved between each two terminals.
[0043] The terminal may also be referred to as User Equipment (UE). A terminal may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, an in-vehicle device, a wearable device, a terminal device in a next-generation communication system such as a NR network, or a terminal device in a future evolved Public Land Mobile Network (PLMN) network.
[0044] In an embodiment of the present application, the terminal can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted; it can also be deployed on the water surface (such as a ship, etc.); it can also be deployed in the air (for example, on an airplane, balloon, and satellite, etc.).
[0045] In an embodiment of the present application, the terminal may be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self-driving, a wireless terminal device in remote medical, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc.
[0046] As an example and not a limitation, in the embodiment of the present application, the terminal may also be a wearable device. Wearable devices may also be called wearable smart devices, which are a general term for wearable devices that use wearable technology to intelligently design and develop wearable devices for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and independent of smartphones to achieve complete or partial functions, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0047] It should be understood that the terms "system" and "network" are often used interchangeably herein. The term "and / or" is simply a description of an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " generally indicates that the related objects are in an "or" relationship.
[0048] The terms used in the embodiments of this application are intended only to explain the specific embodiments of this application and are not intended to limit this application. The terms "first," "second," "third," and "fourth," etc. in the specification and claims of this application and the accompanying drawings are used to distinguish different objects, not to describe a specific order. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions.
[0049] It should be understood that the "indication" mentioned in the embodiments of this application can be a direct indication, an indirect indication, or an indication of an association. For example, "A indicates B" can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association between A and B.
[0050] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between the two, or an association relationship between the two, or a relationship between indication and being indicated, configuration and being configured, etc.
[0051] In the embodiments of the present application, "predefined" can be implemented by pre-storing corresponding codes, tables, or other methods that can be used to indicate relevant information in a device (for example, a terminal and a network device), and the present application does not limit the specific implementation method. For example, predefined can refer to information defined in a protocol.
[0052] In the embodiments of the present application, the “protocol” may refer to a standard protocol in the communications field, for example, it may include an LTE protocol, an NR protocol, and related protocols used in future communication systems, and the present application does not limit this.
[0053] FIG1 is a schematic diagram of a subscription process provided by an exemplary embodiment of the present application.
[0054] In an IoT communication system, a first terminal can initiate a subscription request to a second terminal and wait for the second terminal's response to activate or cancel the subscription. For example, if the first terminal is the subscription initiator and the second terminal is the subscription responder, the subscription process includes the following steps:
[0055] Step 1: The subscription initiator initiates a subscription request to the subscription responder.
[0056] Illustratively, a subscription request is used to request a subscription to a target resource from a subscription responder. The target resource may include attributes and / or events, and the requested attributes and / or events may be one or more. Optionally, the subscription request includes at least one field indicating the resource information being subscribed to.
[0057] The parameter fields carried in the subscription request are shown in Table 1:
[0058] Table 1
[0059]
[0060] in:
[0061] When the value of the KeepSubscriptions field is False, all existing subscriptions from the subscription initiator are terminated.
[0062] The MinIntervalFloor field indicates the requested lower (lowest) minimum interval value. Alternatively, the value of the MinIntervalFloor field indicates the boundary value of the requested minimum reporting interval, measured in seconds. Based on this field, if a subscriber needs to report multiple data items, and the reporting interval defined by the subscriber for these multiple data items is less than the minimum interval, the multiple data items will be cached and reported once the minimum interval is reached.
[0063] The MaxIntervalCeil field indicates the upper (highest) maximum interval value for the request. Alternatively, the value of the MaxInterval field indicates the maximum reporting timeout for the request, measured in seconds. Based on this field, the subscriber must report data at least once within this timeframe.
[0064] The AttributeRequests field is used to indicate a list of zero or more request paths for cluster attribute data. A cluster can optionally include two roles: the client and the server. The client is the controller, and the server is the controlled.
[0065] The DataVersionFilters field indicates a list of zero or more cluster instance data versions. The DataVersionFilters field is optional and may be present when an attribute request list is present. If the DataVersion of two reported data is the same, only the DataVersion is reported the second time, without reporting the attribute value.
[0066] The EventRequests field is used to indicate a list of zero or more request paths for cluster events.
[0067] The EventFilters field is used to indicate a list of zero or more minimum event counts for each specific node, which can also be understood as a filter condition for requesting event reporting.
[0068] When the value of the FabricFilters field is true, the data read from the Fabric range list is limited to the accessed Fabric domain.
[0069] In some embodiments, the subscription process is based on the Matter protocol.
[0070] The Matter protocol, also known as Project Connected Home over IP, is an open-source smart home standard project that aims to develop and promote a new connectivity protocol to simplify development costs for smart home device vendors and improve compatibility between smart home products from different manufacturers. Building on the Internet Protocol, the Matter protocol will support communication between smart home devices, mobile applications, and cloud services, defining a specific set of Internet Protocol-based network technologies for devices.
[0071] In the Matter protocol, the device data model can be referred to Figure 2, as follows:
[0072] Node: represents a device node and belongs to a logical device;
[0073] Endpoint: A node contains multiple endpoints, each of which represents a service instance or a virtual device. The device type corresponding to the endpoint can be indicated by device_type;
[0074] Cluster: An endpoint contains multiple clusters. Clusters are elements that build a functional set. Clusters can optionally include two roles: user side and service side. The user side belongs to the control side, and the service side belongs to the controlled side.
[0075] Attribute: A cluster contains 0 or more attributes, which are used to describe the functional units in the functional set;
[0076] Command: A cluster contains 0 or more commands, which are used to describe the control of functional units;
[0077] Event: A cluster contains 0 or more events. Events are used to describe the records of specific behaviors that have occurred in the past of functional units.
[0078] Taking a vehicle device as an example, the device data model is explained below. The device type of the vehicle device's root node (RootNode) is stored under Endpoint 0, and the air conditioner device type of the vehicle device is stored under Endpoint 5.
[0079] In some embodiments, the clusters included in endpoint 5 include a temperature control cluster and a fan cluster. The attributes included in the temperature control cluster may optionally include temperature attribute values, the commands included in the temperature control cluster may optionally include temperature increase commands and temperature decrease commands, and the events included in the temperature control cluster may optionally include temperature abnormality alarm events.
[0080] For example, the attribute request field can be expressed as follows: AttributeRequests[endpoint-id / cluster-id / attribute-id, endpoint-id / cluster-id / attribute-id,…]; the event request field can be expressed as follows: EventRequests[endpoint-id / cluster-id / event-id, endpoint-id / cluster-id / event-id,…].
[0081] It should be understood that the above is only an illustrative example and does not limit the present application. Different data models can be formed for different types of devices or different devices of the same type, and the data model can be set according to actual needs.
[0082] Step 2: The subscription responder sends the first data report to the subscription initiator.
[0083] After receiving the subscription request initiated by the subscription initiator, the subscription responder needs to report the data.
[0084] Optionally, in the first data reporting, the subscription responder may report the resource information to be subscribed according to the attribute request field and the event request field carried in the subscription request.
[0085] Step 3: The subscription initiator reports the success or failure status to the subscription responder.
[0086] After receiving the data reported by the subscription responder, the subscription initiator can determine whether the status is successful or not based on the first data report. Optionally, step 3 can be implemented as follows: the subscription initiator sends a success status message to the subscription responder.
[0087] Step 4: The subscription responder confirms whether to return a subscription response based on the status information returned by the subscription initiator.
[0088] Illustratively, the subscription responder may determine whether to return a subscription response to the subscription initiator based on the received status information. Optionally, upon receiving the success status information returned by the subscription initiator, the subscription responder determines that a subscription response needs to be returned to the subscription initiator and generates parameter data for the subscription response.
[0089] Step 5: After receiving the success status sent by the subscription initiator, the subscription responder returns the subscription response.
[0090] Indicatively, the subscription responder sends the generated parameter data to the subscription initiator via a subscription response message. The parameter fields carried in the subscription response are shown in Table 2:
[0091] Table 2
[0092] Parameter Field Field Type Mandatory / Optional Description Subscription ID uint32 Mandatory Used to identify a subscription Maximum Interval uint16 Mandatory The maximum reporting timeout of the final subscription decision
[0093] in:
[0094] The Subscription ID field is used to identify a subscription. The Subscription ID field is generated based on a subscription request sent by a subscription initiator to a subscription responder.
[0095] The MaxInterval field indicates the maximum time interval negotiated between the subscription initiator and the subscription responder. Alternatively, the value of the MaxInterval field indicates the negotiated maximum reporting timeout limit, in seconds. Based on this field, the subscription responder should make its second data report within a timeframe that does not exceed this limit.
[0096] Step 6: The subscription responder sends a second data report to the subscription initiator.
[0097] According to the above content, after confirming the return of the subscription response to the subscription initiator, the subscription responder sends a second data report to the subscription initiator. Among them, the second data report should be completed within the time not exceeding the boundary value indicated by the maximum interval field.
[0098] Step 7: The subscription initiator sends a status response to the subscription responder.
[0099] Indicatively, after receiving the second data report sent by the subscription responder, the subscription initiator will return a status response to the subscription responder to achieve the purpose of keeping the subscription connection alive.
[0100] According to the above content, the subscription request carries a keep subscription field. If the value of this field is False, all subscriptions between the subscription initiator and the subscription responder will be canceled. This will result in certain limitations in subscription cancellation and is not flexible enough.
[0101] An embodiment of the present application provides a subscription request method, which can carry a subscription identification field in the subscription request so that the second terminal (i.e., the subscription responder) determines the response, full or partial cancellation of the subscription based on the value of the subscription identification field, thereby improving the flexibility of the subscription.
[0102] FIG3 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application. The method is executed by a first terminal and includes the following steps:
[0103] Step 102: Send a subscription request to the second terminal.
[0104] Illustratively, the subscription request carries a subscription identification field.
[0105] The subscription identification field is used to identify one or more attributes and / or events of the subscription. For example, a subscription identification field can be used to identify n attributes and m events of the subscription, where n and m are positive integers greater than 0, and n and m can be the same or different.
[0106] In some embodiments, the value of the Subscription Identifier field indicates a new subscription request; in other embodiments, the value of the Subscription Identifier field corresponds to an existing subscription, which may include at least one attribute and / or event. For example, a value of 0 in the Subscription Identifier field indicates a new subscription request; in another example, a value of 1 in the Subscription Identifier field indicates an existing subscription, where a Subscription Identifier of 1 indicates n attributes and m events have been subscribed to.
[0107] For example, if the first terminal is a mobile terminal and the second terminal is a smart home appliance, the mobile terminal initiates a subscription request to the smart home appliance. This subscription request carries at least one subscription identification field, each of which corresponds to a different attribute and / or event. For example, if the smart home appliance has five attributes and five events, the subscription request carries two subscription identification fields. The first subscription identification field identifies the three attributes and two events being subscribed to, and the second subscription identification field identifies the one attribute and one event being subscribed to.
[0108] Optionally, the subscription request also carries at least one of the following fields:
[0109] Minimum interval time field;
[0110] Maximum interval time field;
[0111] Attribute request fields;
[0112] Data version filter field;
[0113] Event request fields;
[0114] Event filter fields;
[0115] Network structure domain filter field.
[0116] Illustratively, in the subscription request method provided in the embodiment of the present application, the parameter fields carried in the subscription request are shown in Table 3:
[0117] Table 3
[0118]
[0119] in:
[0120] The SubscriptionID field is used to identify one or more attributes and / or events of a subscription.
[0121] The MinIntervalFloor field indicates the requested lower (lowest) minimum interval value. Alternatively, the value of the MinIntervalFloor field indicates the boundary value of the requested minimum reporting interval, measured in seconds. Based on this field, if a subscriber needs to report multiple data items, and the reporting interval defined by the subscriber for these multiple data items is less than the minimum interval, the multiple data items will be cached and reported once the minimum interval is reached.
[0122] The MaxIntervalCeil field indicates the upper (highest) maximum interval value for the request. Alternatively, the value of the MaxInterval field indicates the maximum reporting timeout for the request, measured in seconds. Based on this field, the subscriber must report data at least once within this timeframe.
[0123] The AttributeRequests field is used to indicate a list of zero or more request paths for cluster attribute data.
[0124] The DataVersionFilters field is used to indicate a list of zero or more cluster instance data versions. Optionally, the DataVersionFilters field is present when the attribute request list is present.
[0125] The EventRequests field is used to indicate a list of zero or more request paths for cluster events.
[0126] The EventFilters field is used to indicate a list of zero or more minimum event counts for each specific node, which can also be understood as a filter condition for requesting event reporting.
[0127] When the value of the FabricFilters field is true, the data read from the Fabric range list is limited to the accessed Fabric domain.
[0128] In some embodiments, the subscription request method provided in the embodiments of the present application is based on the Matter protocol.
[0129] As shown in Table 3, the attribute request field and / or event request field are optional. Taking the attribute request field as an example, there are three scenarios: the subscription request does not include the attribute request field; the subscription request includes the attribute request field and the list is completely empty; the subscription request includes the attribute request field and the list contains data information, which can be set according to actual needs. The event request field is similar and can be used as a reference, so it will not be explained in detail.
[0130] For example, if the subscription request does not include the attribute request field and / or the event request field, the list corresponding to the attribute request field and / or the event request field is assumed to be a wildcard. The wildcard can be set as needed, such as a general value or an asterisk.
[0131] For example, when the subscription request carries the attribute request field and the event request field and the lists are all empty, it can be considered that a status error occurs, and the second terminal needs to report the error status to the first terminal.
[0132] For example, when the subscription request carries the attribute request field and / or the event request field and there is data information in the list, a corresponding response can be made according to the data information in the list, which will be explained in detail below.
[0133] Optionally, the subscription request is used to request the establishment of a new subscription relationship; alternatively, the subscription request is used to request the cancellation of an already subscribed target resource. Exemplarily, if the subscription identifier field is the first value, the subscription request is used to request the establishment of a new subscription relationship; if the subscription identifier field is a value other than the first value, the subscription request is used to request the cancellation of an already subscribed target resource. The subscribed target resource indicates all or part of the subscription relationship between the first terminal and the second terminal.
[0134] For example, if the value of the subscription identification field is 0, the subscription request is used to request the establishment of a new subscription relationship; if the value of the subscription identification field is 0xFFFFFFFF, the subscription request is used to request the cancellation of all subscription relationships between the first terminal and the second terminal; if 0<subscription identification field<0xFFFFFFFF, that is, if the value of the subscription identification field is non-0 and non-F, the subscription request is used to request the cancellation of part of the subscription relationship between the first terminal and the second terminal, and the part of the subscription relationship to be cancelled is determined according to the subscription request.
[0135] Based on the value of the subscription identification field, the second terminal can report status and determine a subscription response with the first terminal. Optionally, the subscription identification field is used to trigger the second terminal to report resource information status to the first terminal based at least on the value of the subscription identification field; and / or, the subscription identification field is used to trigger the second terminal to send a subscription response to the first terminal based at least on the value of the subscription identification field, the subscription response indicating the cancellation of all or part of the first terminal's subscription relationship with the second terminal.
[0136] In some embodiments, the second terminal may make a determination based solely on the value of the subscription identification field. For example, if the subscription identification field is 0xFFFFFFFF, all subscriptions between the first terminal and the second terminal are canceled. For another example, if 0 < subscription identification field < 0xFFFFFFFF and the subscription request does not include the attribute request field and / or event request field (i.e., a wildcard is used by default), all subscriptions corresponding to the subscription identification field are canceled.
[0137] In other embodiments, the second terminal may make a determination based on the value of the subscription identification field and other fields included in the subscription request. For example, if the subscription request includes both an attribute request field and an event request field, and both are empty, the second terminal sends an error status report to the first terminal. The error status report indicates that the subscription request does not specify the target resource corresponding to the subscription identification field. Alternatively, the error status report indicates that both the attribute request field and the event request field included in the subscription request are empty, resulting in incorrect resource information.
[0138] For example, if 0 < subscription identifier < 0xFFFFFFFF and both the attribute request field and the event request field are wildcards, all subscription relationships corresponding to the subscription identifier field are canceled. For another example, if 0 < subscription identifier < 0xFFFFFFFF and either the attribute request field or the event request field is not a wildcard, the subscription relationship for the data information indicated by the subscription identifier field is canceled, and data reporting is performed for the remaining data information not indicated by the subscription identifier field.
[0139] According to the foregoing, after receiving the subscription request sent by the first terminal, the second terminal may determine the status report and / or subscription response to send to the first terminal based on the value of the subscription identification field carried in the subscription request.
[0140] A subscription identification field corresponds to a status report or subscription response sent by the second terminal to the first terminal. It should be understood that the value of the subscription identification field and the corresponding relationship between the status report and / or subscription response sent by the second terminal to the first terminal can be set according to actual needs and are not limited in this application.
[0141] The following are three examples of how to obtain the value of the subscription identifier field:
[0142] Exemplarily, when the subscription identification field has the first value, the subscription request is used to request to establish a new subscription relationship.
[0143] When both the attribute request field and the event request field are empty, the second terminal sends an error status report to the first terminal, where the error status report is used to indicate that the subscription request does not indicate the target resource corresponding to the subscription identification field.
[0144] If the minimum interval time field and the maximum interval time field are mandatory and one of the attribute request field and the event request field is not empty, the second terminal sends a first subscription response to the first terminal, and the subscription identification field carried in the first subscription response does not have the first value. The subscription identification field carried in the first subscription response is generated by the second terminal based on the subscription request. The first and second terminals can determine existing subscriptions based on the subscription identification field.
[0145] Exemplarily, when the subscription identifier field is the second value, the subscription request is used to request cancellation of all subscription relationships between the first terminal and the second terminal.
[0146] Based on this, the second terminal sends a second subscription response to the first terminal, indicating the cancellation of all subscriptions between the first terminal and the second terminal. It should be understood that this cancellation cancels all existing subscriptions between the first terminal and the second terminal. If the subscription identifier field has the second value, all subscriptions between the first terminal and the second terminal are canceled, regardless of whether other fields are included in the subscription request.
[0147] Exemplarily, when the subscription identifier field has the third value, the subscription request is used to request cancellation of an existing subscription. The third value is generated by the second terminal based on a historical subscription request initiated by the first terminal prior to the current subscription request. It should be understood that the third value is a value distinct from the first and second values. For example, if the first value is 0 and the second value is 0xFFFFFFFF, the third value is a non-zero and non-F value.
[0148] When both the attribute request field and the event request field are empty, the second terminal sends an error status report to the first terminal, where the error status report is used to indicate that the subscription request does not indicate the target resource corresponding to the subscription identification field.
[0149] When both the default attribute request field and the event request field are the fourth value (i.e., a wildcard), the second terminal sends a third subscription response to the first terminal, where the third subscription response is used to indicate the cancellation of all subscription relationships between the first terminal and the second terminal corresponding to the subscription identifier field. Optionally, when the subscription request does not carry the attribute request field and the event request field, the default attribute request field and the event request field are both the fourth value.
[0150] It should be understood that the fourth value may also be carried in the subscription request. That is, when both the attribute request field and the event request field carried in the subscription request are the fourth value, the second terminal sends a third subscription response to the first terminal.
[0151] The fourth value of the attribute request field and / or the event request field can be understood as the fourth value of the list identifier corresponding to the attribute request field and / or the event request field. For example, if the fourth value is a wildcard, the list identifier corresponding to the attribute request field and / or the event request field is a wildcard.
[0152] When there is at least the fifth value in the list corresponding to the attribute request field and the event request field, the second terminal sends a fourth subscription response to the first terminal, and the fourth subscription response is used to indicate the cancellation of the first terminal's subscription relationship with the second terminal regarding the fifth value indication.
[0153] It should be understood that the first value, second value, third value, fourth value, and fifth value can be set according to actual needs. For example, the first value is 0, the second value is 0xFFFFFFFF, 0 < third value < 0xFFFFFFFF, the fourth value is a wildcard, and the fifth value is used to indicate a specific attribute and / or event. The third value can be understood as a non-zero and non-F value.
[0154] For example, the first terminal is a mobile terminal, the second terminal is a smart home appliance, and the cluster of the smart home appliance includes 5 attributes and 5 events. The mobile terminal has no subscription relationship with the smart home appliance.
[0155] Schematically, the mobile terminal sends the first subscription request to the smart home appliance, the value of the subscription identification field is 0, and the attribute request field and the event request field are both empty. The smart home appliance sends an error status report to the mobile terminal, and the error status report is used to indicate that the first subscription request does not indicate the target resource corresponding to the subscription identification field.
[0156] In an optional implementation scenario, a mobile terminal sends a first subscription request to a smart home appliance, the subscription identifier field is set to 0, the attribute request field includes three attributes, and the event request field includes two events. The smart home appliance then returns a first subscription response to the mobile terminal. The subscription identifier field in the first subscription response is not 0 or 0xFFFFFFFF, but is generated based on the subscription request. For example, the subscription identifier field in the first subscription response is set to 3.
[0157] In another optional implementation scenario, the mobile terminal sends a second subscription request to the smart home appliance, the value of the subscription identification field is 0, and the attribute request field includes 2 attributes and the event request field includes 3 events. The smart home appliance returns a first subscription response to the mobile terminal, and the subscription identification field carried in the first subscription response is 4.
[0158] Subsequently, the mobile terminal sends a third subscription request to the smart home appliance. Depending on the value of the subscription identifier field carried in the third subscription request, there are the following situations:
[0159] (1) When the value of the subscription identification field is 0xFFFFFFFF (which can be understood as all Fs), the smart home appliance sends a second subscription response to the mobile terminal. The second subscription response is used to instruct the mobile terminal to cancel all existing subscription relationships between the mobile terminal and the smart home appliance, that is, to cancel all subscription relationships established based on the first subscription request and the second subscription request (all subscriptions with the subscription identification fields being 3 and 4).
[0160] (2) When 0<subscription identification field<0xFFFFFFFF (for example, the value of the subscription identification field is 3) and both the attribute request field and the event request field are empty, the smart home appliance sends an error status report to the mobile terminal. The error status report is used to indicate that the subscription request does not indicate the target resource corresponding to the subscription identification field.
[0161] (3) When 0<subscription identification field<0xFFFFFFFF (for example, the value of the subscription identification field is 3) and both the attribute request field and the event request field are wildcards, the smart home appliance sends a third subscription response to the mobile terminal. The third subscription response is used to indicate the cancellation of all subscription relationships corresponding to the subscription identification field between the first terminal and the second terminal, that is, the cancellation of the subscription relationships of the three attributes and two events established according to the first subscription request.
[0162] (4-1) When 0<subscription identification field<0xFFFFFFFF (for example, the value of the subscription identification field is 3), and at least one of the attribute request field and the event request field is not a wildcard, the smart home appliance sends a fourth subscription response to the mobile terminal. The fourth subscription response is used to indicate the cancellation of the first terminal's subscription to the data information indicated by the subscription identification field by the second terminal. For example, there are 2 attributes in the attribute request field (that is, there is at least a fifth value in the list corresponding to the list of the attribute request field), and the event request field is a wildcard, then the subscription relationship of the 2 attributes and 3 events is canceled, and the remaining 1 attribute still exists. It should be understood that in this example, based on the fact that the event request field is a wildcard, the subscription relationship of all events corresponding to the subscription identification field is canceled. If the event request field includes a specific value corresponding to at least one event, the subscription relationship of all events corresponding to the subscription identification field is not canceled, and only the subscription relationship of the event corresponding to the specific value is canceled.
[0163] If (4-2) 0 < subscription identifier < 0xFFFFFFFF (for example, the subscription identifier is 4), and at least one of the attribute request field and the event request field is not a wildcard, the smart home appliance sends a fourth subscription response to the mobile terminal. The fourth subscription response indicates the cancellation of the first terminal's subscription to the second terminal's data information indicated by the subscription identifier. For example, if the attribute request field contains one attribute, the subscription for that attribute is canceled, and the remaining one attribute and three events remain.
[0164] It should be understood that the above examples are merely illustrative examples and do not limit this application; other value-taking methods and corresponding relationships set to implement other subscription methods are all within the scope of protection of this application and will not be repeated here.
[0165] In summary, in the subscription request method provided in the embodiment of the present application, by carrying a subscription identification field in the subscription request, the second terminal can determine the subscription relationship to be canceled according to the subscription identification field, thereby improving the flexibility of subscription.
[0166] FIG4 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application. The method is executed by the second terminal and includes the following steps:
[0167] Step 202: Receive a subscription request sent by the first terminal.
[0168] Illustratively, the subscription request carries a subscription identification field.
[0169] The subscription identification field is used to identify one or more attributes and / or events of the subscription. For example, a subscription identification field can be used to identify n attributes and m events of the subscription, where n and m are positive integers greater than 0, and n and m can be the same or different.
[0170] Optionally, the subscription request also carries at least one of the following fields: minimum interval time field; maximum interval time field; attribute request field; data version filter field; event request field; event filter field; network structure domain filter field.
[0171] Among them, the parameter fields carried in the subscription request can refer to the relevant description of the aforementioned Table 3.
[0172] In some embodiments, the subscription request method provided in the embodiments of the present application is based on the Matter protocol.
[0173] Optionally, a subscription request is used to request the establishment of a new subscription relationship; or, a subscription request is used to request the cancellation of a subscribed target resource.
[0174] Optionally, the subscription identification field is used by the second terminal to report the status of resource information to the first terminal based at least on the value of the subscription identification field; and / or, the subscription identification field is used by the second terminal to send a subscription response to the first terminal based at least on the value of the subscription identification field, and the subscription response is used to indicate the cancellation of all or part of the subscription relationship between the first terminal and the second terminal.
[0175] In some embodiments, the second terminal may make a determination based solely on the value of the subscription identification field. For example, if the subscription identification field is 0xFFFFFFFF, all subscriptions between the first terminal and the second terminal are canceled. For another example, if 0 < subscription identification field < 0xFFFFFFFF and the subscription request does not include the attribute request field and / or event request field (i.e., a wildcard is used by default), all subscriptions corresponding to the subscription identification field are canceled.
[0176] In other embodiments, the second terminal may make a judgment based on the value of the subscription identification field and other fields carried in the subscription request. For example, if 0 < subscription identification field < 0xFFFFFFFF and both the attribute request field and the event request field are wildcards, all subscriptions corresponding to the subscription identification field are canceled. For another example, if 0 < subscription identification field < 0xFFFFFFFF and either the attribute request field or the event request field is not a wildcard, the subscription relationship for the data information indicated by the subscription identification field is canceled, and data reporting is performed for the remaining data information not indicated by the subscription identification field.
[0177] According to the foregoing, after receiving the subscription request sent by the first terminal, the second terminal may determine the status report and / or subscription response to send to the first terminal based on the value of the subscription identification field carried in the subscription request.
[0178] A subscription identification field corresponds to a status report or subscription response sent by the second terminal to the first terminal. It should be understood that the value of the subscription identification field and the corresponding relationship between the status report and / or subscription response sent by the second terminal to the first terminal can be set according to actual needs and are not limited in this application.
[0179] In some embodiments, depending on the value of the subscription identification field, the subscription request can be used to request the establishment of a new subscription relationship; alternatively, the value of the subscription identification field corresponds to an existing subscription, which may include at least one attribute and / or event, and the subscription request can be used to request the cancellation of all or part of the subscription relationship between the first terminal and the second terminal.
[0180] For examples of how to obtain the value of the subscription identification field, please refer to the above content and will not be repeated here.
[0181] In summary, in the subscription request method provided in the embodiment of the present application, by carrying a subscription identification field in the subscription request, the second terminal can determine the subscription relationship to be canceled according to the subscription identification field, thereby improving the flexibility of subscription.
[0182] FIG5 is a flowchart of a subscription request method provided by an exemplary embodiment of the present application, the method comprising the following steps:
[0183] Step 302: The first terminal sends a subscription request to the second terminal.
[0184] Illustratively, the subscription request carries a subscription identification field.
[0185] The subscription identification field is used to identify one or more attributes and / or events of the subscription. For example, a subscription identification field can be used to identify n attributes and m events of the subscription, where n and m are positive integers greater than 0, and n and m can be the same or different.
[0186] Optionally, the subscription request also carries at least one of the following fields: minimum interval time field; maximum interval time field; attribute request field; data version filter field; event request field; event filter field; network structure domain filter field.
[0187] Among them, the parameter fields carried in the subscription request can refer to the relevant description of the aforementioned Table 3.
[0188] In some embodiments, the subscription request method provided in the embodiments of the present application is based on the Matter protocol.
[0189] Optionally, a subscription request is used to request the establishment of a new subscription relationship; or, a subscription request is used to request the cancellation of a subscribed target resource.
[0190] Optionally, the subscription identification field is used by the second terminal to report the status of resource information to the first terminal based at least on the value of the subscription identification field; and / or, the subscription identification field is used by the second terminal to send a subscription response to the first terminal based at least on the value of the subscription identification field, and the subscription response is used to indicate the cancellation of all or part of the subscription relationship between the first terminal and the second terminal.
[0191] In some embodiments, the second terminal may make a determination based solely on the value of the subscription identification field. For example, if the subscription identification field is 0xFFFFFFFF, all subscriptions between the first terminal and the second terminal are canceled. For another example, if 0 < subscription identification field < 0xFFFFFFFF and the subscription request does not include the attribute request field and / or event request field (i.e., a wildcard is used by default), all subscriptions corresponding to the subscription identification field are canceled.
[0192] In other embodiments, the second terminal may make a judgment based on the value of the subscription identification field and other fields carried in the subscription request. For example, if 0 < subscription identification field < 0xFFFFFFFF and both the attribute request field and the event request field are wildcards, all subscriptions corresponding to the subscription identification field are canceled. For another example, if 0 < subscription identification field < 0xFFFFFFFF and either the attribute request field or the event request field is not a wildcard, the subscription relationship for the data information indicated by the subscription identification field is canceled, and data reporting is performed for the remaining data information not indicated by the subscription identification field.
[0193] According to the foregoing, after receiving the subscription request sent by the first terminal, the second terminal may determine the status report and / or subscription response to send to the first terminal based on the value of the subscription identification field carried in the subscription request.
[0194] A subscription identification field corresponds to a status report or subscription response sent by the second terminal to the first terminal. It should be understood that the value of the subscription identification field and the corresponding relationship between the status report and / or subscription response sent by the second terminal to the first terminal can be set according to actual needs and are not limited in this application.
[0195] For examples of how to obtain the value of the subscription identification field, please refer to the above content and will not be repeated here.
[0196] It should be understood that in the above embodiment, the steps on the first terminal side and the steps on the second terminal side can be independently implemented as an embodiment of the subscription request method. For specific explanations, please refer to the above content.
[0197] In summary, in the subscription request method provided in the embodiment of the present application, by carrying a subscription identification field in the subscription request, the second terminal can determine the subscription relationship to be canceled according to the subscription identification field, thereby improving the flexibility of subscription.
[0198] As previously mentioned, the attribute request field and / or event request field are optional fields in a subscription request. In one optional implementation scenario, the subscription request includes both the attribute request field and the event request field, and the lists are all empty. In this case, the second terminal needs to send an error status report to the first terminal.
[0199] Based on FIG5 , FIG6 shows a flowchart of a subscription request method provided by an exemplary embodiment of the present application. The subscription request method provided by the embodiment of the present application further includes step 303, which is as follows:
[0200] Optionally, if the subscription request carries an attribute request field and an event request field, and both the attribute request field and the event request field are empty, then step 303 is executed, as follows:
[0201] Step 303: The second terminal sends an error status report to the first terminal.
[0202] Illustratively, the error status report is used to indicate that the subscription request does not indicate the target resource corresponding to the subscription identification field.
[0203] As previously mentioned, the attribute request field contains a list of attributes for which reportable data is requested, and the event request field contains a list of events for which reportable events are requested. If both the attribute request field and the event request field are left blank in a subscription request, the second terminal cannot determine the attributes and events to which the first terminal subscribes, and therefore cannot determine the data information to be reported to the first terminal.
[0204] Based on this, the second terminal needs to send an error status report to the first terminal to inform the first terminal that the attribute request field and the event request field do not indicate the target resource corresponding to the subscription identification field. Alternatively, the error status report is used to indicate that the attribute request field and the event request field carried in the subscription request are both empty, resulting in incorrect resource information.
[0205] In some embodiments, only whether the attribute request field and the event request field are both empty is considered. Regardless of the value of the subscription identifier field, the second terminal sends an error status report when both the attribute request field and the event request field are empty.
[0206] According to the above content, for different values of the subscription identification field, the second terminal can send different information to the first terminal. The following will be described in detail according to different values of the subscription identification field:
[0207] 1. The subscription identifier field is the first value.
[0208] Illustratively, the first subscription request is used to request to establish a new subscription relationship.
[0209] The specific value of the first value can be set according to actual needs. For example, the first value is 0.
[0210] In some embodiments, the attribute request field and the event request field carried in the first subscription request are both empty. In this case, the second terminal sends an error status report to the first terminal, where the error status report is used to indicate that the first subscription request does not indicate the target resource corresponding to the first subscription identification field.
[0211] In other embodiments, the first subscription request carries an attribute request field and an event request field, and neither field is empty. In this case, the second terminal needs to return a subscription response to the first terminal, as follows:
[0212] Based on Figure 5, Figure 7 shows a flowchart of a subscription request method provided by an exemplary embodiment of the present application. Among them, step 302 can be implemented as step 3021. The subscription request method provided by the embodiment of the present application also includes step 304, which is as follows:
[0213] Step 3021: The first terminal sends a first subscription request to the second terminal.
[0214] Illustratively, the first subscription request carries a first subscription identification field, the first subscription identification field has a first value, and the first subscription request is used to request to establish a new subscription relationship.
[0215] The first subscription identification field is used to identify one or more attributes and / or events of the subscription. For example, a subscription identification field can be used to identify n attributes and m events of the subscription, where n and m are positive integers greater than 0, and n and m can be the same or different.
[0216] Optionally, the first subscription request also carries at least one of the following fields: minimum interval time field; maximum interval time field; attribute request field; data version filter field; event request field; event filter field; network structure domain filter field.
[0217] Among them, the parameter fields carried in the first subscription request can refer to the relevant description of the aforementioned Table 3.
[0218] In an optional implementation scenario, the first subscription request carries a minimum interval time field and a maximum interval time field, and step 304 is executed. The first subscription request carries a minimum interval time field and a maximum interval time field, which can also be understood as mandatory requirements for the minimum interval time field and the maximum interval time field. Schematically, step 304 is as follows:
[0219] Step 304: When the attribute request field and / or event request field carried in the first subscription request is not empty, the second terminal sends a first subscription response to the first terminal.
[0220] Illustratively, the subscription identifier field carried in the first subscription response is not the first value.
[0221] It should be understood that the subscription identification field carried in the first subscription response is generated by the second terminal based on the first subscription request, and the first terminal and the second terminal can determine the existing subscription relationship based on the subscription identification field.
[0222] As previously mentioned, the attribute request field is a list of attributes for which reportable data is requested, and the event request field is a list of events for which reportable events are requested. If the first subscription request includes both the attribute request field and the event request field, and either field is not empty, the second terminal can determine the attributes and events to which the first terminal subscribes, and can therefore respond to the subscription relationship indicated by the first subscription identification field and report data for the attributes and events to which the first terminal subscribes.
[0223] After determining that a subscription response is required, the second terminal (i.e., the subscriber) generates parameter data for the first subscription response corresponding to the first subscription request. The first subscription response includes at least a subscription identification field. It should be understood that this field, distinct from the first subscription identification field, is generated by the second terminal based on the first subscription request and is used to identify the relevant information for this subscription.
[0224] Based on this, if the attribute request field and / or event request field is not empty, the second terminal sends a first subscription response to the first terminal. Optionally, the second terminal may also report resource information of the attribute and / or field indicated by the first subscription identification field to the first terminal.
[0225] For example, the first terminal is a mobile terminal, the second terminal is a smart home appliance, and the first value is 0. The smart home appliance corresponds to 5 attributes and 5 events. The first subscription identification field carried in the first subscription request is used to identify the 3 attributes and 2 events requested for subscription.
[0226] Among them, when the first subscription identification field is 0 and the attribute request field and the event request field are both empty, the smart home appliance sends an error status report to the mobile terminal, and the error status report is used to indicate that the first subscription request does not indicate the target resource corresponding to the first subscription identification field.
[0227] When the first subscription identification field is 0, the minimum interval time field and the maximum interval time field are mandatory, and at least one of the attribute request field and the event request field is not empty, the smart home appliance sends a first subscription response to the mobile terminal, and the subscription identification field carried in the first subscription response is not 0 or 0xFFFFFFFF. Optionally, the smart home appliance reports data information of at least one attribute and / or event to the mobile terminal, where the at least one attribute and / or event is determined from three attributes and two events based on the attribute request field and the event request field.
[0228] 2. The subscription identifier field is the second value.
[0229] Illustratively, the second subscription request is used to request cancellation of all subscription relationships between the first terminal and the second terminal.
[0230] The specific numerical value of the second value can be set according to actual needs. For example, the second value is 0xFFFFFFFF.
[0231] Based on Figure 5, Figure 8 shows a flowchart of a subscription request method provided by an exemplary embodiment of the present application. Among them, step 302 can be implemented as step 3022. The subscription request method provided by the embodiment of the present application also includes step 305, which is as follows:
[0232] Step 3022: The first terminal sends a second subscription request to the second terminal.
[0233] Illustratively, the second subscription request carries a second subscription identification field, the second subscription identification field has a second value, and the second subscription request is used to request cancellation of all subscription relationships between the first terminal and the second terminal.
[0234] The second subscription identification field is used to identify one or more attributes and / or events of the subscription. For example, one subscription identification field can be used to identify n attributes and m events of the subscription, where n and m are positive integers greater than 0, and n and m can be the same or different.
[0235] Optionally, the second subscription request also carries at least one of the following fields: minimum interval time field; maximum interval time field; attribute request field; data version filter field; event request field; event filter field; network structure domain filter field.
[0236] Among them, the parameter fields carried in the second subscription request can refer to the relevant description of the aforementioned Table 3.
[0237] Step 305: The second terminal sends a second subscription response to the first terminal.
[0238] Illustratively, the second subscription response is used to indicate the cancellation of all subscription relationships between the first terminal and the second terminal. It should be understood that all the cancelled subscription relationships between the first terminal and the second terminal are existing subscription relationships.
[0239] According to the above content, if both the attribute request field and the event request field are empty, they need to be configured through a subscription request. It can be understood that the second subscription request carries the attribute request field and / or the event request field, and the attribute request field and / or the event request field are empty.
[0240] Based on the above, step 305 can be implemented as follows:
[0241] In a case where both the attribute request field and the event request field carried in the second subscription request are empty, the second terminal sends a second subscription response to the first terminal.
[0242] As previously mentioned, the second subscription request is used to request the cancellation of all subscriptions between the first terminal and the second terminal. Based on this, it can also be understood that, regardless of whether the attribute request field and event request field carried in the second subscription request are empty or wildcard, if the second subscription identifier field has the second value, all subscriptions between the first terminal and the second terminal are canceled.
[0243] Optionally, when the second subscription identifier field has the second value, the second terminal no longer reports data information to the first terminal.
[0244] For example, consider a mobile terminal as the first terminal, a smart appliance as the second terminal, and the second value of 0xFFFFFFFF. The smart appliance has five attributes and five events, and two subscription relationships exist between the mobile terminal and the smart appliance. If the second subscription identifier field is 0xFFFFFFFF, the smart appliance sends a second subscription response to the mobile terminal, indicating the cancellation of both subscription relationships between the mobile terminal and the smart appliance.
[0245] 3. The subscription identifier field is the third value.
[0246] Illustratively, the third subscription request is used to request cancellation of an existing subscription relationship.
[0247] The third value is generated by the second terminal based on a historical subscription request initiated by the first terminal prior to the current subscription request. The third value is a value distinct from the first and second values. For example, if the first value is 0 and the second value is 0xFFFFFFFF, then 0 < third value < 0xFFFFFFFF. The third value can also be understood as a value that is neither 0 nor F.
[0248] Based on Figure 5, Figure 9 shows a flowchart of a subscription request method provided by an exemplary embodiment of the present application. Among them, step 302 can be implemented as step 3023. The subscription request method provided by the embodiment of the present application also includes step 3061, which is as follows:
[0249] Step 3023: The first terminal sends a third subscription request to the second terminal.
[0250] Illustratively, the third subscription request carries a third subscription identification field, and the third subscription identification field has a third value.
[0251] The third subscription identification field is used to identify one or more attributes and / or events of the subscription. For example, a subscription identification field can be used to identify n attributes and m events of the subscription, where n and m are positive integers greater than 0, and n and m can be the same or different.
[0252] Optionally, the third subscription request also carries at least one of the following fields: minimum interval time field; maximum interval time field; attribute request field; data version filter field; event request field; event filter field; network structure domain filter field.
[0253] Among them, the parameter fields carried in the third subscription request can refer to the relevant description of the aforementioned Table 3.
[0254] In some embodiments, the attribute request field and the event request field carried in the third subscription request are both empty. In this case, the second terminal sends an error status report to the first terminal, where the error status report is used to indicate that the third subscription request does not indicate the target resource corresponding to the third subscription identification field.
[0255] In other embodiments, the third subscription request includes an attribute request field and an event request field, and either field is not empty. In this case, the second terminal may return a subscription response to the first terminal based on the attributes and / or events that are not empty, as follows:
[0256] Step 3061: The second terminal sends a third subscription response to the first terminal.
[0257] Illustratively, the third subscription response is used to indicate cancellation of all subscription relationships between the first terminal and the second terminal corresponding to the third subscription identification field.
[0258] In some embodiments, the attribute request field and / or event request field carried in the third subscription request is a fourth value, or the third subscription request does not carry the attribute request field and / or event request field, and the third subscription request is used to request cancellation of all subscription relationships corresponding to the third subscription identification field.
[0259] The fourth value may be a wildcard.
[0260] In an optional implementation scenario, both the attribute request field and the event request field may be configured as wildcards by default. This means that if the subscription request does not include the attribute request field and / or the event request field, the attribute request field and / or the event request field are both wildcards by default.
[0261] In another optional implementation scenario, both the attribute request field and the event request field can be configured as wildcards through a third subscription request. This can be understood as the third subscription request carrying the attribute request field and / or the event request field, and defining the attribute request field and / or the event request field as wildcards.
[0262] Based on the above content, step 3061 can be implemented as follows:
[0263] In a case where the third subscription request does not carry the attribute request field and the event request field, the second terminal sends a third subscription response to the first terminal;
[0264] Alternatively, when both the attribute request field and the event request field carried in the third subscription request are wildcards, the second terminal sends a third subscription response to the first terminal.
[0265] According to the foregoing content, the third subscription request is used to request cancellation of an existing subscription relationship.
[0266] When the attribute request field and the event request field are both wildcards by default or defined as wildcards, the second terminal sends a third subscription response to the first terminal to cancel all attributes and events that the first terminal has subscribed to the second terminal corresponding to the third value.
[0267] Based on Figure 5, Figure 10 shows a flowchart of a subscription request method provided by an exemplary embodiment of the present application. Among them, step 302 can be implemented as step 3023. The subscription request method provided by the embodiment of the present application also includes step 3062, which is as follows:
[0268] Step 3023: The first terminal sends a third subscription request to the second terminal.
[0269] Illustratively, the third subscription request carries a third subscription identification field, and the third subscription identification field has a third value.
[0270] The third subscription identification field is used to identify one or more attributes and / or events of the subscription. For example, a subscription identification field can be used to identify n attributes and m events of the subscription, where n and m are positive integers greater than 0, and n and m can be the same or different.
[0271] Optionally, the third subscription request also carries at least one of the following fields: minimum interval time field; maximum interval time field; attribute request field; data version filter field; event request field; event filter field; network structure domain filter field.
[0272] Among them, the parameter fields carried in the third subscription request can refer to the relevant description of the aforementioned Table 3.
[0273] In some embodiments, the attribute request field and the event request field carried in the third subscription request are both empty. In this case, the second terminal sends an error status report to the first terminal, where the error status report is used to indicate that the third subscription request does not indicate the target resource corresponding to the third subscription identification field.
[0274] In other embodiments, the third subscription request carries an attribute request field and an event request field, and neither of the fields is empty. In this case, the second terminal needs to return a subscription response to the first terminal, as follows:
[0275] When the attribute request field and / or event request field is not empty, its value may be the fourth value, or its value may be used to indicate a specific attribute and / or event. The fourth value may be a wildcard, and the description of the wildcard can refer to the above content.
[0276] In an optional implementation scenario, if the value of the attribute request field and / or event request field carried in the third subscription request is not the fourth value, that is, there is at least a fifth value in the list corresponding to the attribute request field and / or event request field, and the fifth value is a numerical value different from the fourth value, then step 3062 is executed, and the fifth value is used to indicate the subscription relationship requested to be canceled in the subscription corresponding to the third subscription identification field. Step 3062 is specifically as follows:
[0277] Step 3062: The second terminal sends a fourth subscription response to the first terminal.
[0278] Illustratively, the fourth subscription response is used to indicate cancellation of the first terminal's subscription relationship with the second terminal regarding the fifth value indication.
[0279] According to the foregoing content, the third subscription request is used to request cancellation of an existing subscription relationship.
[0280] If the attribute request field and / or event request field are not wildcard characters, the second terminal can determine at least one attribute and / or event in the existing subscription relationship corresponding to the third value. Based on this, the second terminal sends a fourth subscription response to the first terminal to cancel the subscription relationship indicated by the fifth value, where the canceled subscription relationship is an attribute and / or event in the subscription corresponding to the third value.
[0281] Optionally, the remaining attributes and / or events in the subscription relationship corresponding to the third value still need to be responded to. It can be understood that the subscription relationship corresponding to the third value includes multiple attributes and / or events, and only a part of the values exist in the list corresponding to the attribute request field and / or event request field carried in the third subscription request, and this part of the values corresponds to a part of the multiple attributes and / or events. Then, the remaining attributes and / or events in the subscription relationship corresponding to the third value will not be determined. This part of the attributes and / or events that cannot be determined still needs to be responded to, or still needs to be retained.
[0282] For example, if the first terminal is a mobile terminal and the second terminal is a smart appliance, and 0 < the third value < 0xFFFFFFFF, the smart appliance has five attributes and five events. There are two subscription relationships between the mobile terminal and the smart appliance. The subscription relationship with a subscription ID of 3 corresponds to three attributes and two events, and the subscription relationship with a subscription ID of 4 corresponds to two attributes and three events.
[0283] If 0 < third value < 0xFFFFFFFF, and both the attribute request field and the event request field are wildcards by default or defined as wildcards, the smart home appliance sends a third subscription response to the mobile terminal. The third subscription response is used to request the cancellation of all subscriptions between the first terminal and the second terminal corresponding to the subscription identification field. If the third value is 3, the three attributes and two events corresponding to the subscription identification field 3 are canceled; if the third value is 4, the two attributes and three events corresponding to the subscription identification field 4 are canceled.
[0284] When 0 < the third value < 0xFFFFFFFF, and one of the attribute request field and the event request field is not a wildcard, there is at least a fifth value in the list corresponding to the attribute request field and / or the event request field, and the smart home appliance sends a fourth subscription response to the mobile terminal, where the fourth subscription response is used to indicate the cancellation of the first terminal's subscription relationship with the second terminal regarding the fifth value. For example, if the third value is 3, and there are two attributes in the attribute request field (that is, the value of the list in the attribute request field is not a wildcard, and there are two specific values in the list), and the list in the event request field is defined as a wildcard, then the subscription for the two attributes and three events is canceled, and the remaining one attribute still exists.
[0285] In some embodiments, the fifth value may also be a wildcard. In the case where the fifth value is a wildcard, the fifth value is used to indicate that the attribute and / or event corresponding to the fifth value is adjusted to a preset configuration.
[0286] It should be understood that both the fourth value and the fifth value can be wildcards. Among them, if the fourth value is a wildcard, the third subscription request is used to request the cancellation of all subscription relationships corresponding to the third subscription identification field. It can be understood that the third subscription request carries an attribute request field and / or an event request field, and the list corresponding to the attribute request field and / or the event request field is defined as a wildcard. In the case where the fifth value is a wildcard, the third subscription request carries an attribute request field and / or an event request field, and there is at least one wildcard in the list corresponding to the attribute request field and / or the event request field, and the attribute and / or event corresponding to the wildcard will be adjusted to the preset configuration.
[0287] It should be understood that in the above-mentioned multiple embodiments, the steps on the side of the first terminal and the steps on the side of the second terminal can be separately implemented as an embodiment of the subscription request method, and the specific explanation can refer to the foregoing content.
[0288] In summary, in the subscription request method provided by the embodiments of the present application, five response methods of the second terminal are given for different values of the subscription identification field, enabling the second terminal to judge the specific response information according to different situations, thereby improving the flexibility of subscription.
[0289] Exemplarily, taking the first value as 0, the second value as 0xFFFFFFFF, and 0 < the third value < 0xFFFFFFFF as an example, the subscription request method provided by the embodiments of the present application can be implemented as follows:
[0290] The first terminal sends a subscription request to the second terminal, and the subscription request carries at least the SubscriptionID field;
[0291] According to the value of the SubscriptionID field, the second terminal executes one of the following steps:
[0292] (1) When SubscriptionID = 0 and both the AttributeRequests field and the EventRequests field are empty, the second terminal shall return an error status, that is, send an error status report to the first terminal;
[0293] (2) When SubscriptionID = 0, the MinIntervalFloor field and the MaxIntervalCeil field are mandatory, and one of the AttributeRequests field and the EventRequests field is not empty, the second terminal returns a subscription message, and the SubscriptionID included in the subscription message cannot be 0 and 0xFFFFFFFF, and the SubscriptionID included in the subscription message is generated according to the subscription request;
[0294] (3) When SubscriptionID = 0xFFFFFFFF, cancel all subscription relationships of the first terminal to the second terminal;
[0295] (4) When 0 < SubscriptionID < 0xFFFFFFFF and both the AttributeRequests field and the EventRequests field are empty, the second terminal sends an error status report to the first terminal;
[0296] (5) When 0 < SubscriptionID < 0xFFFFFFFF and the AttributeRequests field and the EventRequests field default to wildcards or are defined as wildcards, cancel all subscription relationships of the first terminal to the second terminal corresponding to SubscriptionID;
[0297] (5) When 0 < SubscriptionID < 0xFFFFFFFF and the AttributeRequests field or the EventRequests field is not all wildcards, cancel the subscription relationship of the first terminal to the second terminal for the relevant data information under SubscriptionID, such as canceling the subscription relationship indicated by the fifth value in the list of the AttributeRequests field and / or the EventRequests field carried in the subscription cancellation request.
[0298] The following are the device embodiments of this application. For the details not described in detail in the device embodiments, reference can be made to the corresponding records in the above method embodiments, which will not be elaborated herein.
[0299] FIG. 11 shows a schematic diagram of a subscription request device provided by an exemplary embodiment of this application. The device includes:
[0300] A sending module 1120, configured to send a subscription request to a second terminal;
[0301] Among them, a subscription identifier field is carried in the subscription request.
[0302] Optionally, the subscription request is used to request to establish a new subscription relationship; or, the subscription request is used to request to cancel the subscribed target resource.
[0303] Optionally, the subscription identifier field is used to trigger the second terminal to report the status of resource information to the first terminal at least based on the value of the subscription identifier field; and / or, the subscription identifier field is used to trigger the second terminal to send a subscription response to the first terminal at least based on the value of the subscription identifier field, and the subscription response is used to indicate canceling all or part of the subscription relationships of the first terminal to the second terminal.
[0304] Optionally, the subscription request further carries at least one of the following fields: minimum interval time field; maximum interval time field; attribute request field; data version filtering field; event request field; event filtering field; network domain filtering field.
[0305] Optionally, both the attribute request field and the event request field carried in the subscription request are empty.
[0306] Optionally, the sending module 1120 is configured to send a first subscription request to the second terminal, where the first subscription identifier field carried in the first subscription request is a first value, and the first subscription request is used to request to establish a new subscription relationship.
[0307] Optionally, the device also includes: a receiving module 1140, used to receive a first subscription response sent by the second terminal; wherein, the first subscription response is sent when the attribute request field and / or event request field carried in the first subscription request is not empty, and the subscription identification field carried in the first subscription response is not the first value.
[0308] Optionally, the first subscription request further carries a minimum interval time field and a maximum interval time field.
[0309] Optionally, the attribute request field and event request field carried in the first subscription request are both empty, and the device also includes: a receiving module 1140, used to receive an error status report sent by the second terminal, and the error status report is used to indicate that the first subscription request does not indicate the target resource corresponding to the first subscription identification field.
[0310] Optionally, the sending module 1120 is configured to send a second subscription request to the second terminal, where the second subscription identifier field carried in the second subscription request is a second value, and the second subscription request is used to request cancellation of all subscription relationships between the first terminal and the second terminal.
[0311] Optionally, the device further includes: a receiving module 1140, configured to receive a second subscription response sent by the second terminal; wherein the second subscription response is used to indicate cancellation of all subscription relationships between the first terminal and the second terminal.
[0312] Optionally, the sending module 1120 is configured to send a third subscription request to the second terminal, where the third subscription identifier field carried in the third subscription request is a third value, and the third subscription request is used to request cancellation of an existing subscription relationship.
[0313] Optionally, the device further includes: a receiving module 1140, configured to receive a third subscription response sent by the second terminal; wherein the third subscription response is used to indicate cancellation of all subscription relationships corresponding to the third subscription identification field of the first terminal to the second terminal.
[0314] Optionally, the attribute request field and / or event request field carried in the third subscription request is the fourth value; or, the third subscription request does not carry the attribute request field and / or event request field.
[0315] Optionally, there is at least a fifth value in the list corresponding to the attribute request field and / or event request field carried in the third subscription request, and the fifth value is used to indicate the subscription relationship requested to be canceled in the subscription corresponding to the third subscription identification field; optionally, the device also includes: a receiving module 1140, used to receive a fourth subscription response sent by the second terminal; wherein the fourth subscription response is used to indicate the cancellation of the subscription relationship of the first terminal to the second terminal indicated by the fifth value.
[0316] Optionally, the attribute request field and event request field carried in the third subscription request are both empty, and the device also includes: a receiving module 1140, used to receive an error status report sent by the second terminal, and the error status report is used to indicate that the third subscription request does not indicate the target resource corresponding to the third subscription identification field.
[0317] FIG12 shows a schematic diagram of a subscription request apparatus provided by an exemplary embodiment of the present application, the apparatus comprising:
[0318] The receiving module 1220 is configured to receive a subscription request sent by the first terminal;
[0319] The subscription request carries a subscription identification field.
[0320] Optionally, a subscription request is used to request the establishment of a new subscription relationship; or, a subscription request is used to request the cancellation of a subscribed target resource.
[0321] Optionally, the subscription identification field is used by the second terminal to report the status of resource information to the first terminal based at least on the value of the subscription identification field; and / or, the subscription identification field is used by the second terminal to send a subscription response to the first terminal based at least on the value of the subscription identification field, and the subscription response is used to indicate the cancellation of all or part of the subscription relationship between the first terminal and the second terminal.
[0322] Optionally, the subscription request also carries at least one of the following fields: minimum interval time field; maximum interval time field; attribute request field; data version filter field; event request field; event filter field; network structure domain filter field.
[0323] Optionally, the receiving module 1220 is configured to receive a first subscription request sent by a first terminal, where the first subscription identifier field carried in the first subscription request is a first value, and the first subscription request is used to request to establish a new subscription relationship.
[0324] Optionally, the device also includes: a sending module 1240, which is used to send a first subscription response to the first terminal when the attribute request field and / or event request field carried in the first subscription request is not empty; wherein the subscription identification field carried in the first subscription response is not the first value.
[0325] Optionally, the first subscription request further carries a minimum interval time field and a maximum interval time field.
[0326] Optionally, the attribute request field and event request field carried in the first subscription request are both empty; the device also includes: a sending module 1240, used to send an error status report to the first terminal, and the error status report is used to indicate that the first subscription request does not indicate the target resource corresponding to the first subscription identification field.
[0327] Optionally, the receiving module 1220 is configured to receive a second subscription request sent by the first terminal, the second subscription identifier field carried in the second subscription request is a second value, and the second subscription request is used to request cancellation of all subscription relationships between the first terminal and the second terminal.
[0328] Optionally, the device further includes: a sending module 1240, configured to send a second subscription response to the first terminal; wherein the second subscription response is used to indicate cancellation of all subscription relationships between the first terminal and the second terminal.
[0329] Optionally, the receiving module 1220 is configured to receive a third subscription request sent by the first terminal, where the third subscription identifier field carried in the third subscription request is a third value, and the third subscription request is used to indicate cancellation of an existing subscription relationship.
[0330] Optionally, the apparatus further includes: a sending module 1240, configured to send a third subscription response to the first terminal; wherein the third subscription response is used to indicate cancellation of all subscriptions corresponding to the third subscription identification field.
[0331] Optionally, the attribute request field and / or event request field carried in the third subscription request is not all the fourth value, and the fourth value is used to indicate the attribute and / or event requested for response in the third subscription identification field.
[0332] Optionally, the attribute request field and / or event request field carried in the third subscription request is the fourth value; or, the third subscription request does not carry the attribute request field and / or event request field.
[0333] Optionally, there is at least a fifth value in the list corresponding to the attribute request field and / or event request field carried in the third subscription request, and the fifth value is used to indicate the subscription relationship requested to be canceled in the subscription corresponding to the third subscription identification field. The device also includes: a sending module 1240, used to send a fourth subscription response to the first terminal; wherein the fourth subscription response is used to indicate the cancellation of the subscription relationship of the first terminal to the second terminal indicated by the fifth value.
[0334] Optionally, the attribute request field and event request field carried in the third subscription request are both empty, and the receiving module 1220 is further used to receive an error status report sent by the second terminal, and the error status report is used to indicate that the third subscription request does not indicate the target resource corresponding to the third subscription identification field.
[0335] FIG13 is a block diagram of a communication device (a first terminal or a second terminal) provided by an exemplary embodiment of the present application. The communication device includes: a processor 1301 , a receiver 1302 , a transmitter 1303 , a memory 1304 and a bus 1305 .
[0336] The processor 1301 includes one or more processing cores. The processor 1301 executes various functional applications and information processing by running software programs and modules.
[0337] The receiver 1302 and the transmitter 1303 may be implemented as a communication component, which may be a communication chip.
[0338] The memory 1304 is connected to the processor 1301 via a bus 1305 .
[0339] The memory 1304 may be configured to store at least one instruction, and the processor 1301 may be configured to execute the at least one instruction to implement the various steps of the method for determining the RAR receiving window mentioned in the above method embodiment.
[0340] In addition, the memory 1304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof. Volatile or non-volatile storage devices include but are not limited to: magnetic disks or optical disks, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), read-only memory (ROM), magnetic memory, flash memory, and programmable read-only memory (PROM).
[0341] The present application also provides a first terminal, which includes a memory and a processor; at least one program code is stored in the memory, and the program code is loaded and executed by the processor to implement the aforementioned subscription request method.
[0342] The present application also provides a second terminal, which includes a memory and a processor; the memory stores at least one program code, and the program code is loaded and executed by the processor to implement the aforementioned subscription request method.
[0343] The present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a processor to implement the aforementioned subscription request method.
[0344] The present application also provides a chip, which includes a programmable logic circuit and / or program instructions, and is used to implement the aforementioned subscription request method when an electronic device equipped with the chip is running.
[0345] The present application also provides a computer program product, which includes computer instructions. The computer instructions are stored in a computer-readable storage medium. A processor reads and executes the computer instructions from the computer-readable storage medium to implement the aforementioned subscription request method.
[0346] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A subscription request method, characterized in that: The method is performed by a first terminal, and includes: Sending a subscription request to the second terminal; The subscription request carries a subscription identification field.
2. The method according to claim 1, characterized in that The subscription request is used to request to establish a new subscription relationship; Alternatively, the subscription request is used to request cancellation of a subscribed target resource.
3. The method according to claim 1, characterized in that The subscription identification field is used to trigger the second terminal to report the status of resource information to the first terminal based on at least the value of the subscription identification field; And / or, the subscription identification field is used to trigger the second terminal to send a subscription response to the first terminal based at least on the value of the subscription identification field, and the subscription response is used to indicate cancellation of all or part of the subscription relationship between the first terminal and the second terminal.
4. The method according to claim 1, wherein The subscription request also carries at least one of the following fields: Minimum interval time field; Maximum interval time field; Attribute request fields; Data version filter field; Event request fields; Event filter fields; Network structure domain filter field.
5. The method according to any one of claims 1 to 4, characterized in that: The sending a subscription request to the second terminal includes: A first subscription request is sent to the second terminal, where the first subscription identifier field carried in the first subscription request is a first value, and the first subscription request is used to request establishment of a new subscription relationship.
6. The method according to claim 5, characterized in that The method further comprises: receiving a first subscription response sent by the second terminal; The first subscription response is sent when the attribute request field and / or event request field carried in the first subscription request is not empty, and the subscription identification field carried in the first subscription response is not the first value.
7. The method according to claim 5, characterized in that The first subscription request also carries a minimum interval time field and a maximum interval time field.
8. The method according to claim 5, characterized in that The attribute request field and the event request field carried in the first subscription request are both empty, and the method further includes: An error status report sent by the second terminal is received, where the error status report is used to indicate that the first subscription request does not indicate a target resource corresponding to the first subscription identification field.
9. The method according to any one of claims 1 to 4, characterized in that: The sending a subscription request to the second terminal includes: A second subscription request is sent to the second terminal, where the second subscription identifier field carried in the second subscription request is a second value, and the second subscription request is used to request cancellation of all subscription relationships between the first terminal and the second terminal.
10. The method according to claim 9, characterized in that The method further comprises: receiving a second subscription response sent by the second terminal; The second subscription response is used to indicate the cancellation of all subscription relationships between the first terminal and the second terminal.
11. The method according to any one of claims 1 to 4, characterized in that: The sending a subscription request to the second terminal includes: A third subscription request is sent to the second terminal, where the third subscription identifier field carried in the third subscription request is a third value, and the third subscription request is used to request cancellation of an existing subscription relationship.
12. The method according to claim 11, characterized in that The method further comprises: receiving a third subscription response sent by the second terminal; The third subscription response is used to instruct cancellation of all subscription relationships between the first terminal and the second terminal corresponding to the third subscription identification field.
13. The method according to claim 12, characterized in that The attribute request field and / or event request field carried in the third subscription request is a fourth value; Alternatively, the third subscription request does not carry the attribute request field and / or the event request field.
14. The method according to claim 11, characterized in that The list corresponding to the attribute request field and / or the event request field carried in the third subscription request contains at least a fifth value, the fifth value being used to indicate the subscription relationship requested to be canceled in the subscription corresponding to the third subscription identification field, and the method further comprising: receiving a fourth subscription response sent by the second terminal; The fourth subscription response is used to indicate cancellation of the first terminal's subscription relationship with the second terminal regarding the fifth value indication.
15. The method according to claim 11, characterized in that The attribute request field and the event request field carried in the third subscription request are both empty, and the method further includes: An error status report sent by the second terminal is received, where the error status report is used to indicate that the third subscription request does not indicate a target resource corresponding to the third subscription identification field.
16. A subscription request method, characterized in that: The method is performed by the second terminal, and the method includes: receiving a subscription request sent by the first terminal; The subscription request carries a subscription identification field.
17. The method according to claim 16, characterized in that The subscription request is used to request to establish a new subscription relationship; Alternatively, the subscription request is used to request cancellation of a subscribed target resource.
18. The method according to claim 16, characterized in that The subscription identification field is used by the second terminal to report the status of resource information to the first terminal based at least on the value of the subscription identification field; And / or, the subscription identification field is used by the second terminal to send a subscription response to the first terminal based at least on the value of the subscription identification field, where the subscription response is used to indicate cancellation of all or part of the subscription relationship between the first terminal and the second terminal.
19. The method according to claim 16, wherein The subscription request also carries at least one of the following fields: Minimum interval time field; Maximum interval time field; Attribute request fields; Data version filter field; Event request fields; Event filter fields; Network structure domain filter field.
20. The method according to any one of claims 16 to 19, characterized in that The receiving a subscription request sent by the first terminal includes: A first subscription request sent by the first terminal is received, where the first subscription identifier field carried in the first subscription request is a first value, and the first subscription request is used to request establishment of a new subscription relationship.
21. The method according to claim 20, characterized in that The method further comprises: When the attribute request field and / or the event request field carried in the first subscription request is not empty, sending a first subscription response to the first terminal; Among them, the subscription identification field carried in the first subscription response is not the first value.
22. The method according to claim 20, characterized in that The first subscription request also carries a minimum interval time field and a maximum interval time field.
23. The method according to claim 20, characterized in that The attribute request field and the event request field carried in the first subscription request are both empty, and the method further includes: An error status report is sent to the first terminal, where the error status report is used to indicate that the first subscription request does not indicate a target resource corresponding to the first subscription identification field.
24. The method according to any one of claims 16 to 19, characterized in that The receiving a subscription request sent by the first terminal includes: A second subscription request sent by the first terminal is received, where the second subscription identifier field carried in the second subscription request is a second value, and the second subscription request is used to request cancellation of all subscription relationships between the first terminal and the second terminal.
25. The method according to claim 24, characterized in that The method further comprises: Sending a second subscription response to the first terminal; The second subscription response is used to indicate the cancellation of all subscription relationships between the first terminal and the second terminal.
26. The method according to any one of claims 16 to 19, characterized in that The receiving a subscription request sent by the first terminal includes: A third subscription request sent by the first terminal is received, where the third subscription identifier field carried in the third subscription request is a third value, and the third subscription request is used to request cancellation of an existing subscription relationship.
27. The method according to claim 26, characterized in that The method further comprises: Sending a third subscription response to the first terminal; The third subscription response is used to instruct cancellation of all subscription relationships between the first terminal and the second terminal corresponding to the third subscription identification field.
28. The method according to claim 27, characterized in that The attribute request field and / or event request field carried in the third subscription request is a fourth value; Alternatively, the third subscription request does not carry the attribute request field and / or the event request field.
29. The method according to claim 26, wherein The list corresponding to the attribute request field and / or the event request field carried in the third subscription request contains at least a fifth value, the fifth value being used to indicate the subscription relationship requested to be canceled in the subscription corresponding to the third subscription identification field, and the method further comprising: Sending a fourth subscription response to the first terminal; The fourth subscription response is used to indicate cancellation of the first terminal's subscription relationship with the second terminal regarding the fifth value indication.
30. The method according to claim 26, wherein The attribute request field and the event request field carried in the third subscription request are both empty, and the method further includes: An error status report sent by the second terminal is received, where the error status report is used to indicate that the third subscription request does not indicate a target resource corresponding to the third subscription identification field.
31. A subscription request device, characterized in that The device comprises: A sending module, configured to send a subscription request to the second terminal; The subscription request carries a subscription identification field.
32. The method according to claim 31, characterized in that The subscription request is used to request to establish a new subscription relationship; Alternatively, the subscription request is used to request cancellation of a subscribed target resource.
33. The device according to claim 31, characterized in that The subscription identification field is used to trigger the second terminal to report the status of resource information to the first terminal based on at least the value of the subscription identification field; And / or, the subscription identification field is used to trigger the second terminal to send a subscription response to the first terminal based at least on the value of the subscription identification field, and the subscription response is used to indicate cancellation of all or part of the subscription relationship between the first terminal and the second terminal.
34. The device according to claim 31, characterized in that The subscription request also carries at least one of the following fields: Minimum interval time field; Maximum interval time field; Attribute request fields; Data version filter field; Event request fields; Event filter fields; Network structure domain filter field.
35. The device according to any one of claims 31 to 34, characterized in that The sending module is configured to send a first subscription request to the second terminal, wherein the first subscription identification field carried in the first subscription request has a first value, and the first subscription request is used to request to establish a new subscription relationship.
36. The device according to claim 35, characterized in that The device further comprises: A receiving module, configured to receive a first subscription response sent by the second terminal; The first subscription response is sent when the attribute request field and / or event request field carried in the first subscription request is not empty, and the subscription identification field carried in the first subscription response is not the first value.
37. The device according to claim 36, characterized in that The first subscription request also carries a minimum interval time field and a maximum interval time field.
38. The device according to claim 35, characterized in that The attribute request field and the event request field carried in the first subscription request are both empty, and the apparatus further includes: The receiving module is configured to receive an error status report sent by the second terminal, where the error status report is used to indicate that the first subscription request does not indicate a target resource corresponding to the first subscription identification field.
39. The device according to any one of claims 31 to 34, characterized in that The sending module is configured to send a second subscription request to the second terminal, wherein the second subscription identifier field carried in the second subscription request has a second value, and the second subscription request is used to request cancellation of all subscription relationships between the first terminal and the second terminal.
40. The device according to claim 39, characterized in that The device further comprises: A receiving module, configured to receive a second subscription response sent by the second terminal; The second subscription response is used to indicate the cancellation of all subscription relationships between the first terminal and the second terminal.
41. The device according to any one of claims 31 to 34, characterized in that The sending module is configured to send a third subscription request to the second terminal, wherein the third subscription identifier field carried in the third subscription request is a third value, and the third subscription request is used to request cancellation of an existing subscription relationship.
42. The device according to claim 41, characterized in that The device further comprises: A receiving module, configured to receive a third subscription response sent by the second terminal; The third subscription response is used to instruct cancellation of all subscription relationships between the first terminal and the second terminal corresponding to the third subscription identification field.
43. The device according to claim 42, characterized in that The attribute request field and / or event request field carried in the third subscription request is a fourth value; Alternatively, the third subscription request does not carry the attribute request field and / or the event request field.
44. The device according to claim 41, characterized in that At least a fifth value exists in the list corresponding to the attribute request field and / or the event request field carried in the third subscription request, and the fifth value is used to indicate the subscription relationship requested to be canceled in the subscription corresponding to the third subscription identification field. The apparatus further includes: A receiving module, configured to receive a fourth subscription response sent by the second terminal; The fourth subscription response is used to indicate cancellation of the first terminal's subscription relationship with the second terminal regarding the fifth value indication.
45. The device according to claim 41, characterized in that The attribute request field and the event request field carried in the third subscription request are both empty, and the apparatus further includes: The receiving module is configured to receive an error status report sent by the second terminal, where the error status report is used to indicate that the third subscription request does not indicate a target resource corresponding to the third subscription identification field.
46. A subscription request device, characterized in that The device comprises: A receiving module, configured to receive a subscription request sent by a first terminal; The subscription request carries a subscription identification field.
47. The device according to claim 46, characterized in that The subscription request is used to request to establish a new subscription relationship; Alternatively, the subscription request is used to request cancellation of a subscribed target resource.
48. The device according to claim 46, characterized in that The subscription identification field is used by the second terminal to report the status of resource information to the first terminal based at least on the value of the subscription identification field; And / or, the subscription identification field is used by the second terminal to send a subscription response to the first terminal based at least on the value of the subscription identification field, where the subscription response is used to indicate cancellation of all or part of the subscription relationship between the first terminal and the second terminal.
49. The device according to claim 46, characterized in that The subscription request also carries at least one of the following fields: Minimum interval time field; Maximum interval time field; Attribute request fields; Data version filter field; Event request fields; Event filter fields; Network structure domain filter field.
50. The device according to any one of claims 46 to 49, characterized in that The receiving module is configured to receive a first subscription request sent by the first terminal, wherein the first subscription identification field carried in the first subscription request has a first value, and the first subscription request is used to request establishment of a new subscription relationship.
51. The device according to claim 50, characterized in that The device further comprises: a sending module, configured to send a first subscription response to the first terminal if the attribute request field and / or the event request field carried in the first subscription request is not empty; Among them, the subscription identification field carried in the first subscription response is not the first value.
52. The device according to claim 50, characterized in that The first subscription request also carries a minimum interval time field and a maximum interval time field.
53. The device according to claim 50, characterized in that The attribute request field and the event request field carried in the first subscription request are both empty, and the apparatus further includes: The sending module is used to send an error status report to the first terminal, where the error status report is used to indicate that the first subscription request does not indicate a target resource corresponding to the first subscription identification field.
54. The device according to any one of claims 46 to 49, characterized in that The receiving module is configured to receive a second subscription request sent by the first terminal, the second subscription identifier field carried in the second subscription request being a second value, and the second subscription request being used to request cancellation of all subscription relationships between the first terminal and the second terminal.
55. The device according to claim 54, characterized in that The device further comprises: A sending module, configured to send a second subscription response to the first terminal; The second subscription response is used to indicate the cancellation of all subscription relationships between the first terminal and the second terminal.
56. The device according to any one of claims 46 to 49, characterized in that The receiving module is configured to receive a third subscription request sent by the first terminal, wherein the third subscription identifier field carried in the third subscription request is a third value, and the third subscription request is used to instruct cancellation of an existing subscription relationship.
57. The device according to claim 56, characterized in that The device further comprises: A sending module, configured to send a third subscription response to the first terminal; The third subscription response is used to instruct cancellation of all subscription relationships between the first terminal and the second terminal corresponding to the third subscription identification field.
58. The device according to claim 57, characterized in that The attribute request field and / or event request field carried in the third subscription request is a fourth value; Alternatively, the third subscription request does not carry the attribute request field and / or the event request field.
59. The device according to claim 56, characterized in that At least a fifth value exists in the list corresponding to the attribute request field and / or the event request field carried in the third subscription request, and the fifth value is used to indicate the subscription relationship requested to be canceled in the subscription corresponding to the third subscription identification field. The apparatus further includes: A sending module, configured to send a fourth subscription response to the first terminal; The fourth subscription response is used to indicate cancellation of the first terminal's subscription relationship with the second terminal regarding the fifth value indication.
60. The method according to claim 56, wherein The attribute request field and the event request field carried in the third subscription request are both empty, and the apparatus further includes: The receiving module is configured to receive an error status report sent by the second terminal, where the error status report is used to indicate that the third subscription request does not indicate a target resource corresponding to the third subscription identification field.
61. A first terminal, characterized in that: The first terminal includes a memory and a processor; At least one program code is stored in the memory, and the program code is loaded and executed by the processor to implement the subscription request method according to any one of claims 1 to 15.
62. A second terminal, characterized in that: The second terminal includes a memory and a processor; At least one program code is stored in the memory, and the program code is loaded and executed by the processor to implement the subscription request method according to any one of claims 16 to 30.
63. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which is used to be executed by a processor to implement the subscription request method according to any one of claims 1 to 30.
64. A chip, characterized in that The chip includes a programmable logic circuit and / or program instructions, and when an electronic device equipped with the chip is running, is used to implement the subscription request method according to any one of claims 1 to 30.
65. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor reads and executes the computer instructions from the computer-readable storage medium to implement the subscription request method according to any one of claims 1 to 30.
Citation Information
Patent Citations
Resource subscription method and apparatus, computer device, and storage medium
CN113940037A
Method and device for subscribing resources
CN114556892A
Euicc and activation method thereof, internet of things system, remote subscription management platform
US20180242141A1
Resource subscription method and device, and storage medium
WO2021087892A1