Notification playback method, system, communication device and computer program product

By using sequence numbers to specify notification playback between the client and server, the problem of inaccurate notification playback in the prior art is solved, achieving accurate notification playback and reducing communication overhead.

CN121603469APending Publication Date: 2026-03-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411174746.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

In existing technologies, when a client replays a notification by specifying a start time and an end time, it cannot achieve accurate replay of the notification, which increases communication overhead and disturbs the client.

Method used

The client specifies the notification to be replayed using a sequence number, and the server performs precise replay based on the client's instructions. It supports specifying the notification to be replayed using a sequence number.

Benefits of technology

It enables precise playback of notifications, reduces communication overhead, and minimizes disruption to the client.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121603469A_ABST
    Figure CN121603469A_ABST
Patent Text Reader

Abstract

The invention provides a notification playback method and system, a communication device and a computer program product, and the method comprises the steps that a client side sends a notification playback request to a server side, and then the client side receives a first notification sent by the server side based on a first serial number; wherein the client is used for subscribing to a first data set in the server from the server, the notification playback request comprises a first serial number, the first serial number is used for indicating a first notification, and the first notification is associated with the first data set. According to the method, the client side is supported to specify the notification needing to be played back to the server side through the serial number, and therefore accurate notification playback can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a notification playback method, system, communication device, and computer program product. Background Technology

[0002] Yet Another Next Generation (YANG) is a data modeling language defined by the Internet Engineering Task Force (IETF) standards organization. Configuration data, status data, and other information on devices can be expressed using data models defined in YANG. YANG-PUSH is a subscription mechanism based on the YANG model. Clients can subscribe to data in the YANG model from the server, and the server can then periodically or according to trigger conditions encapsulate the subscribed data into notifications and send them to the client.

[0003] Currently, clients can subscribe to data in the YANG model from the server via the Network Configuration Protocol (NETCONF). Clients can also specify the start and end times for notifications that need to be replayed when creating a subscription. The server will then resend all notifications reported between these start and end times to the client, thus enabling notification replay.

[0004] The aforementioned notification replay method relies on the start and end times specified by the client, and both times are only accurate to the second. Therefore, when the server reports multiple notifications to the client within the same second, and the client wants to replay only a portion of these notifications, the client can only specify that second to the server, which will then replay all notifications within that second. However, while the client only intended to replay a portion of the notifications, the server replays unexpected notifications, failing to achieve accurate replay, increasing communication overhead, and potentially causing some disruption to the client. Summary of the Invention

[0005] This application provides a notification playback method, system, communication device, and computer program product that can achieve accurate playback of notifications.

[0006] Firstly, this application provides a notification replay method applied to a client that subscribes to a first dataset on a server. Specifically, the client sends a notification replay request to the server, and then receives a first notification sent by the server based on a first sequence number. The notification replay request includes the first sequence number, which indicates the first notification and is associated with the first dataset.

[0007] As can be seen, this solution allows clients to specify which notifications need to be replayed to the server using sequence numbers, thus enabling precise notification replay. Compared to the traditional solution of replaying notifications by specifying start and end times, this solution can accurately specify which notifications need to be replayed, preventing unexpected notifications from being replayed, thereby reducing client disruption and communication overhead.

[0008] Based on the first aspect, in a possible implementation, before the client sends a notification replay request to the server, the client can send subscription information for the first dataset to the server. This subscription information indicates N sequence numbers, including the first sequence number. The server supports replaying notifications corresponding to the N sequence numbers to the client. All notifications corresponding to these N sequence numbers are associated with the first dataset, where N is a positive integer and is not limited here. It should be understood that a notification associated with the first dataset can specifically indicate that data changes have occurred in the first dataset subscribed to by the client, or it can include data from the first dataset; this is not limited here.

[0009] In other words, when a client submits a subscription to the server, it can also specify which notifications it needs to support for replay. Specifically, the sequence number can be used to indicate which notifications the server needs to support for replay, so that precise notification replay can be achieved based on the sequence number later.

[0010] Based on the first aspect, in a possible implementation, the aforementioned subscription information satisfies one of the following conditions:

[0011] (1) The subscription information includes N serial numbers;

[0012] (2) The subscription information includes at least one of the largest and smallest serial numbers among N serial numbers, and these N serial numbers are consecutive.

[0013] When the above condition (1) is met, it means that the serial numbers corresponding to each notification that needs to be supported for playback are directly listed in the subscription information. Since the N serial numbers are listed one by one, the N serial numbers can be consecutive or non-consecutive, and can be specified according to the playback requirements.

[0014] When the above condition (2) is met, the N sequence numbers are consecutive. Therefore, it is only necessary to provide the maximum and minimum sequence numbers among the N sequence numbers in the subscription information to specify a sequence number range from the minimum and maximum sequence numbers to the server. The server will automatically determine whether to support the playback of notifications corresponding to each sequence number in the sequence number range.

[0015] Based on the first aspect, in a possible implementation, the client can first determine that receiving a notification sent by the server has failed in the following way, and then send the aforementioned notification replay request to the server: The client receives the second and third notifications sent by the server. If the sequence numbers corresponding to the second and third notifications are not consecutive, the client determines that receiving the K notifications sent by the server has failed. Here, the second notification includes its corresponding sequence number, the third notification includes its corresponding sequence number, the sequence numbers corresponding to the second notification, the K notifications, and the third notification are consecutive, the second notification, the K notifications, and the third notification are all associated with the first dataset, and the K notifications include the first notification.

[0016] In other words, if the sequence numbers of two consecutive notifications received by the client are not consecutive, the client can determine that a notification has been lost; the lost notification is the one the client failed to receive. The client can also determine the sequence number of the lost notification based on the sequence numbers of the two previous notifications, and then include the sequence number of the lost notification in the notification replay request to instruct the server to replay these lost notifications.

[0017] Based on the first aspect, in a possible implementation, the client may first send a query request to the server, which instructs the server to send the sequence number corresponding to the notification that supports playback. Then, the client receives the sequence number corresponding to the notification that supports playback sent by the server. Next, the client sends a notification playback request to the server based on the sequence number corresponding to the notification that supports playback, wherein the sequence number corresponding to the notification that supports playback includes a first sequence number.

[0018] In other words, the client can first query the server to see which notifications it supports replaying. The server then returns the sequence numbers of the supported notifications to the client. Once the client determines which notifications the server supports replaying, it generates a notification replay request. This request includes some or all of the sequence numbers of the supported notifications. For example, after obtaining the sequence numbers of the supported notifications, the client can determine the intersection between these sequence numbers and the sequence numbers of lost notifications (the determination method can be found above). The client then sends a notification replay request to the server, indicating some or all of the sequence numbers in this intersection. Subsequently, the server replays the notifications corresponding to these sequence numbers to the client.

[0019] Based on the first aspect, in a possible implementation, the first notification includes M notifications, and the first sequence number satisfies one of the following conditions:

[0020] (1) The first sequence number includes the largest and smallest sequence number among the M sequence numbers. The M sequence numbers are consecutive, and M is a positive integer greater than 1.

[0021] (2) The first sequence number includes M sequence numbers, and each of the M sequence numbers corresponds to one of the M notifications.

[0022] When the above condition (1) is met, it means that the notification replay request directly gives the maximum and minimum sequence numbers among the M sequence numbers. Since the M sequence numbers are consecutive, the maximum and minimum sequence numbers can be used to specify the replay of these M sequence numbers to the server, which can also reduce communication overhead to a certain extent.

[0023] When condition (2) above is met, it means that the notification replay request lists M sequence numbers one by one. Since the sequence numbers corresponding to the notifications to be replayed are given by enumeration, this method can support scenarios where the M sequence numbers are consecutive or non-consecutive.

[0024] Based on the first aspect, in a possible implementation, the first notification is used to indicate that a data change has occurred in the first dataset, and / or that the first dataset includes data from the first dataset.

[0025] Based on the first aspect, in a possible implementation, the first dataset is (partial or all) of the data in a data model defined using the YANG data modeling language.

[0026] Secondly, this application also provides a notification replay method, which is applied to a server, and the client subscribes to a first dataset on the server. Specifically, the server receives a notification replay request sent by the client, and then the server sends a first notification to the client based on a first sequence number. The notification replay request includes a first sequence number, which indicates the first notification, and the first notification is associated with the first dataset.

[0027] This solution allows clients to specify which notifications should be replayed by sending a sequence number to the server. The server then replays the corresponding notification based on the sequence number specified by the client, thus achieving precise notification replay. Compared to the traditional solution of replaying notifications by specifying a start and end time, this solution can accurately specify which notifications need to be replayed, preventing unexpected notifications from being replayed, thereby reducing client disruption and communication overhead.

[0028] Based on the second aspect, in a possible implementation, before the server receives the notification replay request sent by the client, the server receives the subscription information of the first dataset sent by the client. The subscription information indicates N sequence numbers. The server supports replaying notifications corresponding to the N sequence numbers to the client. All notifications corresponding to the N sequence numbers are associated with the first dataset. The N sequence numbers include the first sequence number, and N is a positive integer; this application does not limit this.

[0029] In other words, the server allows the client to specify the notifications that support playback via serial number, in order to meet the client's playback requirements.

[0030] Based on the second aspect, in a possible implementation, the aforementioned subscription information satisfies one of the following conditions:

[0031] (1) The subscription information includes N serial numbers;

[0032] (2) The subscription information includes at least one of the largest and smallest serial numbers among N serial numbers, and these N serial numbers are consecutive.

[0033] Based on the second aspect, in a possible implementation, before the server receives the notification replay request sent by the client, the server receives a query request sent by the client. The query request is used to instruct the server to send the sequence number corresponding to the notification that supports replay. Then, the server sends the sequence number corresponding to the notification that supports replay to the client based on the query request. The sequence number corresponding to the notification that supports replay includes the first sequence number.

[0034] In other words, the server can provide the client with the sequence number of the notification that supports playback, and the client can then instruct the server to play back some or all of the notifications corresponding to the above sequence number as needed.

[0035] Based on the second aspect, in a possible implementation, the first notification includes M notifications, and the first sequence number satisfies one of the following conditions:

[0036] (1) The first sequence number includes the largest and smallest sequence number among the M sequence numbers. The M sequence numbers are consecutive, and M is a positive integer greater than 1.

[0037] (2) The first sequence number includes M sequence numbers, and each of the M sequence numbers corresponds to one of the M notifications.

[0038] Based on the second aspect, in possible implementations, the first notification satisfies at least one of the following:

[0039] 1. The first notification is used to indicate that a data change has occurred in the first dataset;

[0040] 2. The first notification includes the data in the first dataset.

[0041] Based on the second aspect, in a possible implementation, the first dataset is (partial or all) of the data in a data model defined using the YANG data modeling language.

[0042] Thirdly, this application also provides a communication device including a functional module for performing a method as described in any of the possible embodiments of the first or second aspect.

[0043] Fourthly, this application also provides a notification playback system, including a client and a server. The client is used to execute the method as described in any possible implementation of the first aspect, and the server is used to execute the method as described in any possible implementation of the second aspect, as detailed above, and will not be repeated here.

[0044] Fifthly, this application also provides a chip system including a processor and a power supply circuit. The power supply circuit supplies power to the processor, which performs methods as described in any possible embodiment of the first or second aspect.

[0045] In a sixth aspect, this application also provides a computer-readable storage medium including computer program instructions that, when executed by a communication device, perform a method as described in either the first or second aspect.

[0046] In a seventh aspect, this application also provides a computer program product containing instructions. When the aforementioned instructions are executed by a communication device, the communication device performs a method as described in either the first or second aspect. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments are briefly introduced below.

[0048] Figure 1 This is an architecture diagram of a notification playback system provided in an embodiment of this application;

[0049] Figure 2 This is a flowchart illustrating a notification playback method provided in an embodiment of this application;

[0050] Figure 3 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;

[0051] Figure 4 This is a schematic diagram of another communication device provided in an embodiment of this application;

[0052] Figure 5 This is a schematic diagram of another communication device provided in an embodiment of this application. Detailed Implementation

[0053] To facilitate understanding of the technical solution of this application, a brief introduction to a notification playback system involved in this application is given below.

[0054] Please see Figure 1 , Figure 1 This is an architecture diagram of a notification playback system provided in an embodiment of this application, including a client 100 and a server 200. The client 100 and the server 200 have a communication connection, which can be a wired connection or a wireless connection. The number of clients 100 that establish a communication connection with the server 200 can be one or more. Figure 1 This application takes only one client 100 as an example and does not impose specific limitations on this. The number of servers 200 that establish communication connections with client 100 can be one or more. Figure 1 This application does not make any specific limitations on this, as it only takes a server-side 200 as an example.

[0055] Client 100 subscribes to a first dataset in server 200. The first dataset can be data from a data model defined using the YANG data modeling language (i.e., a YANG model), or data from other models; this application does not limit this. Optionally, the first dataset can correspond to a portion of the data in the YANG model (e.g., data from some nodes in the YANG model), or it can correspond to all the data in the YANG model. The specific details can be specified according to the subscription requirements of client 100; this application does not limit this. Regarding the data content represented by the YANG model, this application does not specifically limit it; for example, the YANG model can be used to represent configuration data, status data, etc., of server 200.

[0056] The client 100 can be deployed on a terminal device or a computing device. The terminal device can be a laptop, tablet, smartphone, wearable device, in-vehicle device, or smart conferencing device, etc., and the computing device can be a physical server, edge device, etc. This application does not make specific limitations in this regard.

[0057] Server 200 is used to send a notification related to the first dataset to client 100. It should be understood that a notification related to the first dataset can specifically be an indication that data changes have occurred in the first dataset subscribed to by client 100, or it can include data from the first dataset; this application does not limit this. Assuming the first notification indicates that data changes have occurred in the first dataset, client 100 can learn about the data changes (such as the addition, update, or deletion of data, and corresponding numerical or status changes) by parsing the first notification sent by server 200. This application does not limit the specific content of the notification. For example, a notification may include a notification reporting time, data change information, and a corresponding sequence number. The notification reporting time refers to the time when the server 200 sends the notification to the client 100. The data change information indicates the location of the data change in the first dataset (e.g., indicating one or more nodes in the YANG model), the change type (e.g., adding, updating, or deleting data), and the corresponding change result. The data change information may also indicate the time the data change occurred (e.g., providing a timestamp). The corresponding sequence number uniquely identifies / indicates the notification. There may be one or more notifications associated with the first dataset, and the content of different notifications may not be completely identical. Different notifications may correspond to the same triggering condition (i.e., the condition that triggers the server 200 to generate a notification and send it to the client 100), or different notifications may correspond to different triggering conditions. This application does not limit this; the specific settings can be configured according to the client 100's subscription requirements. In addition to reporting a notification to the client 100 when the triggering condition is met, the server 200 may also send notifications to the client 100 according to a set reporting period. This application does not limit this as well.

[0058] The server-side 200 can be deployed on network devices, computing devices (a single computing device or a cluster of computing devices), or terminal devices. Network devices can be routers, switches, etc.; computing devices can be physical servers, virtual machines, containers, or edge computing devices; terminal devices are described above.

[0059] In one possible implementation, client 100 can be a network management system (referred to as network manager) such as a controller, analyzer, or collector, while server 200 can be a network device / network element (NE) such as a router or switch. The controller is responsible for managing and controlling devices and resources in the network; specifically, it can be a Software Defined Network Controller (SDN) controller, an Element Management System (EMS), or other controllers. The analyzer is a tool used to analyze network data traffic and performance (such as analyzing data packets, traffic patterns, performance metrics, etc.) to help administrators understand the network's operational status and diagnose network problems. The collector is used to collect data information from the network (including device status, performance metrics, log information, etc.), such as periodically obtaining data from network devices, thereby helping administrators understand the network's operational status and device status.

[0060] It should be understood that the above examples are for illustrative purposes only, and the specific deployment of client 100 and server 200 can be determined according to the actual application scenario.

[0061] Based on the above description, the following describes an embodiment of the notification playback method provided in this application.

[0062] Please see Figure 2 , Figure 2 This is a flowchart illustrating a notification playback method provided in an embodiment of this application, including the following steps S201 to S204.

[0063] S201, Client 100 sends subscription information for the first dataset to Server 200.

[0064] The subscription information is used to indicate N sequence numbers. The server 200 supports replaying the notifications corresponding to the N sequence numbers to the client 100. The notifications corresponding to the N sequence numbers are all used to indicate that the first dataset has changed. N is a positive integer, and this application does not limit it.

[0065] The first dataset mentioned above is the dataset in server 200. It can be part or all of the data in the data model defined using the YANG data modeling language, or it can be data in other models. For details, please refer to the previous introduction, which will not be repeated here.

[0066] The aforementioned subscription information indicates that client 100 needs to subscribe to the first dataset. Client 100 subscribes to the first dataset by sending the subscription information to server 200. According to this subscription, server 200 can send notifications related to the first dataset to client 100 according to a reporting cycle (periodic / timed / regular) or triggering conditions, so that client 100 can be informed about the status of the first dataset. This application does not specifically limit the content of the aforementioned triggering conditions and reporting cycle; they can be set according to requirements.

[0067] It should be understood that a notification is associated with a first dataset. Specifically, the notification may indicate that data changes have occurred in the first dataset subscribed to by client 100, or the notification may include data from the first dataset. This application does not limit this. Taking a notification indicating data changes in the first dataset as an example, if the first dataset has undergone multiple / multiple data changes, server 200 can send multiple notifications to client 100. Each notification indicates that a corresponding location in the first dataset has changed. Different notifications can be used to indicate changes in different locations in the first dataset, and different notifications can also indicate changes in the same location in the first dataset at different times. This application does not specifically limit this.

[0068] It should be noted that each notification can carry a corresponding serial number. The serial number is used to indicate / uniquely identify the corresponding notification. Different notifications have different serial numbers, thus allowing different notifications to be distinguished based on the serial number. This application does not limit the structure or number of bits of the serial number, as long as it can distinguish different notifications.

[0069] This application does not specify the method by which client 100 sends subscription information to server 200. For example, client 100 can create a subscription for the first dataset to server 200 using methods such as create-subscription or establish-subscription, thereby server 200 can send a notification to client 100 that it is associated with the first dataset; client 100 can also subscribe to the first dataset to server 200 through configuration, thereby server 200 can send a notification to client 100 that it is associated with the first dataset.

[0070] The N mentioned above is a positive integer, and this application does not limit it. Client 100 can (in advance) indicate N sequence numbers in the subscription information of the first dataset to request server 200 to support replaying the notifications corresponding to these N sequence numbers (a total of N notifications, each corresponding to one of the N sequence numbers). Therefore, when server 200 first generates and sends the notifications corresponding to these N sequence numbers to client 100, server 200 can record these notifications locally. Subsequently, when client 100 needs to replay part or all of the notifications corresponding to these N sequence numbers, server 200 can send part or all of the notifications corresponding to these N sequence numbers to client 100 based on the previous record, thereby achieving notification replay.

[0071] The subscription information of the first dataset is used to indicate the aforementioned N sequence numbers. This application does not specify the method by which the subscription information indicates the N sequence numbers; the following explanation uses methods one through four as examples:

[0072] Method 1: The subscription information includes N serial numbers.

[0073] In other words, this method specifies N sequence numbers by directly including them in the subscription information, enabling the server 200 to replay notifications corresponding to these N sequence numbers to the client 100. It should be noted that since this method directly specifies the sequence numbers, these N sequence numbers can be consecutive or non-consecutive, depending on the replay requirements.

[0074] For example, if client 100 wants server 200 to support replaying notifications corresponding to sequence numbers 1 and 5, client 100 can include these two sequence numbers in the subscription information when sending the subscription information for the first dataset to server 200, thereby specifying these two sequence numbers. Then, based on these two sequence numbers in the subscription information, server 200 can determine that client 100 requires server 200 to support replaying notifications corresponding to sequence numbers 1 and 5.

[0075] Method 2: The subscription information includes the maximum and minimum serial numbers among N serial numbers, and the N serial numbers are consecutive.

[0076] Since the N sequence numbers in this method are consecutive, it is unnecessary to directly provide all N sequence numbers in the subscription information. Instead, only the maximum and minimum sequence numbers among these N sequence numbers need to be provided. This reduces the amount of information in the subscription information, thereby reducing communication overhead. Then, based on the maximum and minimum sequence numbers in the subscription information, the server 200 can determine whether the client 100 needs the server 200 to support the playback of notifications corresponding to the sequence number range from the minimum to the maximum sequence number. In other words, which notifications the server 200 supports playback is determined by the sequence number range formed by the minimum and maximum sequence numbers, where the minimum and maximum sequence numbers are the lower and upper bounds of the sequence number range, respectively. The server 200 supports playback of notifications corresponding to sequence numbers within this sequence number range to the client 100.

[0077] It should be noted that the N sequence numbers are consecutive, meaning that there is a definite rule between adjacent sequence numbers among these N sequence numbers, and all sequence numbers among these N sequence numbers can be deduced through this rule. This application does not limit the specific sequence numbering rule used by the server-side 200.

[0078] For example, N serial numbers can be arranged in an increasing order of 1, 2, 3... each time incrementing by 1, resulting in consecutive serial numbers; or, N serial numbers can be arranged in a geometric sequence like 2, 4, 8... each serial number can be multiplied by 2 to obtain its next serial number, also resulting in consecutive serial numbers. This application does not specify which serial number to start arranging (i.e., the first serial number).

[0079] Optionally, the serial numbers within the aforementioned serial number range may include both the minimum and maximum serial numbers, meaning that the notifications that the server 200 supports replaying to the client 100 include both the notifications corresponding to the minimum serial number and the notifications corresponding to the maximum serial number. Alternatively, the serial numbers within the aforementioned serial number range may include the minimum serial number but exclude the maximum serial number, meaning that the notifications that the server 200 supports replaying to the client 100 include the notifications corresponding to the minimum serial number but exclude the notifications corresponding to the maximum serial number. Or, the serial numbers within the aforementioned serial number range may include the maximum serial number but exclude the minimum serial number, meaning that the notifications that the server 200 supports replaying to the client 100 include the notifications corresponding to the maximum serial number but exclude the notifications corresponding to the minimum serial number.

[0080] For example, suppose client 100 wants server 200 to support replaying notifications corresponding to sequence numbers in the range 1 to 5. Client 100 can include the minimum sequence number (1) and the maximum sequence number (5) of this sequence number range in the subscription information when sending the subscription information for the first dataset to server 200. Then, server 200 can determine, based on the maximum sequence number (1) and the minimum sequence number (5) in the subscription information, that client 100 requires server 200 to support replaying notifications corresponding to sequence numbers within the range 1 to 5.

[0081] Method 3: The subscription information includes the smallest sequence number among N sequence numbers, and the N sequence numbers are consecutive.

[0082] This method only requires the client 100 to specify the minimum sequence number in the subscription information. The server 200 can automatically determine, based on the minimum sequence number in the subscription information, whether the client 100 needs the server 200 to support replaying the notifications corresponding to the sequence numbers after the minimum sequence number. All sequence numbers after the minimum sequence number belong to the above N sequence numbers.

[0083] It should be understood that this method only specifies a minimum sequence number, which is the starting sequence number for notifications that support replay. All notifications generated after the notification corresponding to this minimum sequence number need to support replay, and the sequence numbers corresponding to notifications supporting replay are all greater than or equal to this minimum sequence number. Therefore, the number of N sequence numbers that support replay in this method is not fixed, but varies with the number of notifications generated by the server 200. The more notifications generated after the notification corresponding to the minimum sequence number, the more notifications the server 200 needs to record, and the more notifications the server 200 supports replaying (the larger N is).

[0084] For example, suppose client 100 wants server 200 to support replaying notifications corresponding to sequence numbers starting from 10. Then, client 100 can specify the minimum sequence number 10 in the subscription information when sending the subscription information for the first dataset to server 200. Then, server 200 can determine, based on the minimum sequence number 10 in the subscription information, that client 100 needs server 200 to support replaying notifications corresponding to sequence numbers starting from sequence number 10.

[0085] Method 4: The subscription information includes the largest serial number among N serial numbers, and the N serial numbers are consecutive.

[0086] This method only requires the client 100 to specify the maximum sequence number in the subscription information. The server 200 can automatically determine whether the client 100 needs the server 200 to support replaying notifications corresponding to the sequence numbers before the maximum sequence number based on the maximum sequence number in the subscription information. All sequence numbers before the maximum sequence number belong to the above N sequence numbers.

[0087] It should be understood that this method only specifies the maximum sequence number, which is the end sequence number of notifications that support replay. All notifications generated before the notification corresponding to this maximum sequence number need to support replay, and the sequence numbers corresponding to notifications that support replay are all less than or equal to this minimum sequence number. Notifications generated before the notification corresponding to the maximum sequence number can be any notification between the first notification (with the minimum sequence number) generated by the server 200 after the client 100 subscribes to the first dataset and the notification corresponding to this maximum sequence number. Alternatively, it can be any notification within the range from a default sequence number on the server 200 to this maximum sequence number, where the default sequence number is less than or equal to this maximum sequence number.

[0088] It should be noted that the above methods one to four are merely examples and do not constitute specific limitations. In actual application scenarios, client 100 can also use other methods to specify the notifications that need to be supported for playback to server 200.

[0089] In addition to the client 100 specifying to the server 200 which notifications need to be replayed, the client 100 may also choose not to specify which notifications need to be replayed. In this case, the server 200 defaults to supporting the replay of notifications corresponding to N sequence numbers. These N notifications corresponding to the N sequence numbers can be cached on the server 200 to support replay. Optionally, the number of these N notifications may depend on the caching capacity of the server 200; the larger the caching capacity of the server 200, the more notifications can be cached. The server 200 can cache some notifications randomly / periodically, and it can also cache notifications corresponding to specific sequence numbers; this application does not impose specific limitations on this.

[0090] S202, Server 200 sends the first notification to Client 100, and the first notification is associated with the first dataset.

[0091] Regarding the relationship between the notification and the first dataset, please refer to the previous introduction; it will not be repeated here. This application does not limit the specific content of the first notification; please refer to the previous introduction; it will not be repeated here.

[0092] The first notification corresponds to a first serial number, which is used to indicate the first notification. The first serial number may include M serial numbers, where M is a positive integer. This application does not limit the number of serial numbers. Correspondingly, the first notification includes M notifications, and these M notifications correspond one-to-one with the M serial numbers.

[0093] The aforementioned M sequence numbers can be some or all of the N sequence numbers (see step S201). In other words, the M notifications corresponding to these M sequence numbers are all notifications that the server 200 supports replaying to the client 100.

[0094] It should be noted that, in addition to the first notification, the server 200 may also send other notifications related to the first dataset to the client 100. These other notifications may be notifications that the server 200 supports replaying, or they may not be notifications that the server 200 supports replaying (notifications that the server 200 does not cache do not support replaying).

[0095] Optionally, the first notification may be a notification of the associated first dataset generated by the server 200 after the client 100 subscribes to the first dataset from the server 200 (i.e., the client 100 sends the subscription information of the first dataset to the server 200 in step S201). Therefore, after the client 100 subscribes to the first dataset, the server 200 will send the first notification to the client 100 (i.e., step S202). Subsequently, the client 100 may request the server 200 to replay the first notification as needed, i.e., replay the notification after the subscription time.

[0096] Optionally, the first notification may be a notification associated with the first dataset generated by the server 200 before the client 100 subscribes to the first dataset from the server 200. Therefore, before the client 100 subscribes to the first dataset from the server 200 in step S201, the server 200 has not sent a first notification to the client 100 (there is no step S202 at this time). The first notification is cached in the server 200. After the client 100 subscribes to the first dataset from the server 200, the client 100 can request the server 200 to replay the aforementioned first notification, that is, replay the notification before the subscription time.

[0097] S203, Client 100 sends a notification replay request to Server 200, wherein the notification replay request includes a first sequence number, which is used to indicate the first notification.

[0098] In other words, client 100 can send a notification replay request to server 200 as needed to instruct server 200 to replay the corresponding notification (including the first notification corresponding to the first sequence number, and the first notification associated with the first dataset).

[0099] For example, if client 100 fails to receive the first notification sent by server 200, client 100 can send a notification replay request to server 200, thereby instructing server 200 to replay the first notification, that is, server 200 resends the first notification to client 100. Besides requesting replay in the scenario of notification reception failure, client 100 can also request notification replay from server 200 in other scenarios, which are not limited in this application.

[0100] This application does not specify the reasons why client 100 failed to receive the first notification.

[0101] For example, if client 100 misses the first notification sent by server 200 due to network connection problems, client 100 going offline and reconnecting to server midway, or other reasons, client 100 can send a notification replay request to server 200 to instruct server 200 to replay the first notification to client 100.

[0102] For example, suppose the first notification is used to indicate data changes in the first dataset. Due to network fluctuations, signal interference, or other reasons, the content of the first notification actually received by the client 100 is incorrect or incomplete. In this case, it can also be considered that the client 100 failed to receive the first notification. Then, the client 100 can send a notification replay request to the server 200 to instruct the server 200 to replay the first notification to the client 100. This can help the client 100 correct the error or obtain the missing data change information.

[0103] To determine how to confirm that client 100 failed to receive the first notification, the following method can be used:

[0104] Client 100 receives a second notification sent by server 200 and a third notification sent by server 200. The second notification includes a sequence number corresponding to the second notification, and the third notification includes a sequence number corresponding to the third notification. If the sequence numbers corresponding to the second and third notifications are not consecutive, client 100 determines that receiving the K notifications sent by server 200 has failed. The sequence numbers corresponding to the second notification, the K notifications, and the third notification are consecutive. The second notification, the K notifications, and the third notification are all associated with the first dataset. The K notifications include the first notification, which can be some or all of the K notifications. K is a positive integer, and this application does not limit its scope.

[0105] In other words, when client 100 receives the second and third notifications sequentially, if it finds that the sequence numbers corresponding to these two notifications are not consecutive, it assumes that K notifications were lost between the second and third notifications. Since the sequence numbers corresponding to the second notification, the K notifications, and the third notification are consecutive (according to a certain sequence numbering rule, see the description in step S201), client 100 can determine the sequence numbers corresponding to these K notifications based on the sequence number corresponding to the second notification, the sequence number corresponding to the third notification, and the sequence numbering rule (see the description in step S201).

[0106] For example, assuming that the server 200 uses a sequence numbering rule that increments by 1 each time (1, 2, 3...), the client 100 receives a second notification with a sequence number of 2 and a third notification with a sequence number of 5 from the server 200. Based on this, the client 100 can determine that some notifications have been lost, specifically the notifications corresponding to sequence numbers 3 and 4 (corresponding to the aforementioned K notifications).

[0107] As described in step S202, the first notification may include M notifications, and the first sequence number corresponding to the first notification includes M sequence numbers, which correspond one-to-one with the M notifications. Therefore, in some possible implementations, the notification replay request needs to satisfy one of the following conditions (1 and 2) to request the server 200 to replay these M notifications:

[0108] Condition 1: The notification replay request includes a first sequence number, which includes M sequence numbers.

[0109] The notification playback information at this time directly carries the aforementioned M sequence numbers. Based on this notification information, the server 200 can determine that it needs to play back the notification corresponding to these M sequence numbers to the client 100. It should be noted that since the sequence numbers are directly specified here, these M sequence numbers can be consecutive or non-consecutive, depending on the playback requirements.

[0110] Condition 2: The notification replay request includes a first sequence number, which includes the largest and smallest sequence number among M sequence numbers, and the M sequence numbers are consecutive.

[0111] Since the M sequence numbers are consecutive, client 100 does not need to directly provide all M sequence numbers in the notification replay request. Instead, it only needs to provide the maximum and minimum sequence numbers among these M sequence numbers. This reduces the amount of information in the notification replay request, thereby reducing communication overhead between client 100 and server 200. In other words, when client 100 needs to replay, it can instruct server 200 to replay the notification corresponding to the range from the minimum to the maximum sequence number by specifying the minimum and maximum sequence numbers in the notification replay request.

[0112] The following examples, using Examples 1, 2, and 3, illustrate how client 100 can send a notification to server 200 specifying playback.

[0113] Example 1: The following is a partial example of a YANG model corresponding to the first dataset:

[0114]

[0115]

[0116] Notifications is the name of the YANG model.

[0117] The following content (rpcs) refers to some parameters that can be specified in the Remote Procedure Call (RPC) message (corresponding to the notification replay request mentioned above) sent by client 100 when subscribing to data in this YANG model using the create-subscription method.

[0118] replay-sequence-numbers represents the sequence number of the notification that needs to be replayed.

[0119] The sequence number corresponding to the notification that needs to be replayed can be specified using either `replay-sequence-range` or `replay-sequence-number-list`. `replay-sequence-range` specifies a range of sequence numbers, corresponding to condition two above. `replay-start-sequence-number` is the smallest sequence number (starting sequence number) within this range, and `replay-end-sequence-number` is the largest sequence number (ending sequence number) within the range. `replay-sequence-number-list` enumerates the sequence numbers corresponding to the notifications that need to be replayed, corresponding to condition one above. `replay-sequence-number*` represents the specific sequence number, and one or more sequence numbers can be listed here.

[0120] Suppose client 100 needs to subscribe to data in the YANG model (corresponding to the first dataset described above) from server 200, and specifies that server 200 replays the notifications corresponding to sequence numbers 1 to 5 (all associated with the first dataset), then client 100 can send the following RPC message to server 200:

[0121]

[0122] The first line of the RPC message is an Extensible Markup Language (XML) declaration, specifying that the XML version is 1.0 and the encoding is UTF-8.

[0123] The second line is an RPC element, which specifies the XML namespace as "urn:ietf:params:xml:ns:netconf:base:1.0" and the message identifier (ID) as "1711630507494".

[0124] The third line represents the create-subscription element, which indicates that a subscription should be created using the create-subscription method, and specifies the XML namespace as "urn:ietf:params:xml:ns:netconf:notification:1.0".

[0125] The fourth to sixth lines are filter elements, which specify that the filter type for the subscription is a subtree, indicating that the content being subscribed to is a tree structure, and provide the specific filter content.

[0126] The seventh line specifies that the minimum sequence number (i.e., the starting sequence number) of the notification that needs to be replayed is 1, and the eighth line specifies that the maximum sequence number (i.e., the ending sequence number) of the notification that needs to be replayed is 5. Therefore, the server 200 needs to send notifications to the client 100 with sequence numbers ranging from 1 to 5.

[0127] Example 2: The following is a partial example of a YANG model corresponding to the first dataset:

[0128]

[0129]

[0130] Here, ietf-subscribed-notifications is the name of the YANG model.

[0131] The `establish-subscription` element indicates that you want to subscribe to the data in this YANG model using the `establish-subscription` method. `input` refers to some parameters that can be specified when creating the subscription.

[0132] replay-sequence-numbers represents the sequence number of the notification that needs to be replayed.

[0133] The sequence number corresponding to the notification that needs to be replayed can be specified using either `replay-sequence-range` or `replay-sequence-number-list`. `replay-sequence-range` specifies a range of sequence numbers, corresponding to condition two above. `replay-start-sequence-number` is the smallest sequence number (starting sequence number) within this range, and `replay-end-sequence-number` is the largest sequence number (ending sequence number) within the range. `replay-sequence-number-list` enumerates the sequence numbers corresponding to the notifications that need to be replayed, corresponding to condition one above. `replay-sequence-number*` represents the specific sequence number, and one or more sequence numbers can be listed here.

[0134] Suppose client 100 needs to subscribe to data in the YANG model from server 200, and specifies that server 200 should replay the notifications corresponding to sequence numbers 1 and 5, then client 100 can send the following RPC message to server 200:

[0135]

[0136] The first line of the RPC message is an XML declaration, which specifies that the XML version is 1.0 and the encoding method is UTF-8.

[0137] The second line is an RPC element, which specifies the XML namespace as "urn:ietf:params:xml:ns:netconf:base:1.0" and the message ID as "1719212104658".

[0138] The third line is an establish-subscription element, which indicates that a subscription should be created using the establish-subscription method, and specifies the XML namespace as "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications".

[0139] The fourth line is a stream-xpath-filter element, which specifically filters the subscribed content based on XML Path Language (XPath) expressions.

[0140] The fifth line is a stream element used to specify the stream to be subscribed to.

[0141] The sixth line specifies that the sequence number of one notification that needs to be replayed is 1, and the seventh line specifies that the sequence number of another notification that needs to be replayed is 5. Therefore, the server 200 needs to replay the notifications corresponding to sequence numbers 1 and 5 to the client 100.

[0142] Suppose client 100 needs to modify a previously created subscription and specifies server 200 to replay notifications corresponding to sequence numbers 1 to 5, then client 100 can send the following RPC message to server 200:

[0143]

[0144]

[0145] The first line of the RPC message is an XML declaration, which specifies that the XML version is 1.0 and the encoding method is UTF-8.

[0146] The second line is an RPC element, which specifies the XML namespace as "urn:ietf:params:xml:ns:netconf:base:1.0" and the message ID as "1719212104658".

[0147] The third line is a modify-subscription element, which specifies the XML namespace as "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications", indicating that a subscription is to be modified.

[0148] The fourth line is an id element, which specifies that the unique identifier of the subscription to be modified is 1.

[0149] The fifth line is a stream-xpath-filter element, which filters the subscribed content based on XPath expressions.

[0150] The sixth line specifies that the minimum sequence number of the notification that needs to be replayed is 1, and the seventh line specifies that the maximum sequence number of the notification that needs to be replayed is 5. Therefore, the server 200 needs to send notifications to the client 100 with sequence numbers ranging from 1 to 5.

[0151] Example 3: The following is a partial example of a YANG model corresponding to the first dataset:

[0152]

[0153] Here, ietf-subscribed-notifications is the name of the YANG model.

[0154] The "subscriptions" node is defined within the module and is used to manage subscriptions.

[0155] The subscription*[id] indicates that one or more subscription nodes are defined under the subscriptions node, and each subscription node has a unique identifier named id.

[0156] (replay-sequence-numbers): This means that a selection node named replay-sequence-numbers is defined under the subscription node, which represents the sequence number of the notification that needs to be replayed.

[0157] The sequence number corresponding to the notification that needs to be replayed can be specified using either `replay-sequence-range` or `replay-sequence-number-list`. `replay-sequence-range` specifies a range of sequence numbers, corresponding to condition two above. `replay-start-sequence-number` is the smallest sequence number (starting sequence number) within this range, and `replay-end-sequence-number` is the largest sequence number (ending sequence number) within the range. `replay-sequence-number-list` enumerates the sequence numbers corresponding to the notifications that need to be replayed, corresponding to condition one above. `replay-sequence-number*` represents the specific sequence number, and one or more sequence numbers can be listed here.

[0158] Suppose that the configuration needs to be edited on server 200, and the notifications corresponding to replay sequence numbers 1 to 5 need to be specified, then client 100 can send the following RPC message to server 200 (only part of the content is listed):

[0159]

[0160]

[0161] The first line of the RPC message is an XML declaration, which specifies that the XML version is 1.0 and the encoding method is UTF-8.

[0162] The second line is an RPC element, which specifies the XML namespace as "urn:ietf:params:xml:ns:netconf:base:1.0" and the message ID as "1719212104658".

[0163] The third line, edit-config, is the element for editing configuration settings.

[0164] The "config" in the fourth line indicates that the following lines contain the configuration information to be edited.

[0165] The fifth line specifies that the configuration to be edited contains a node named subscriptions, whose XML namespace is "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications", indicating that the operation is on ietf-subscribed-notifications.

[0166] The sixth line defines the configuration information for a subscription.

[0167] The seventh line specifies that the unique identifier for the subscription is 1.

[0168] The eighth line specifies that the minimum sequence number (i.e., the starting sequence number) of the notification that needs to be replayed is 1, and the ninth line specifies that the maximum sequence number (i.e., the ending sequence number) of the notification that needs to be replayed is 5. Therefore, the server 200 needs to send notifications to the client 100 with sequence numbers ranging from 1 to 5.

[0169] Optionally, before sending a notification replay request to the server 200, the client 100 may send a query request to the server 200. The query request is used to instruct the server 200 to send the sequence number corresponding to the notification that supports replay. Regarding the sequence number corresponding to the notification that supports replay, refer to the N sequence numbers in step S201. These N sequence numbers include the first sequence number corresponding to the first notification, which will not be elaborated here.

[0170] When client 100 obtains the sequence number corresponding to the notification that supports replay, it combines this with the sequence numbers corresponding to the previously determined K lost notifications to determine which notifications it can request to be replayed from server 200, and then generates a notification replay request, which may include the following situations:

[0171] Case 1: The N sequence numbers are exactly the same as the sequence numbers corresponding to the K lost notifications.

[0172] In other words, the K failed notifications received by client 100 are exactly the N notifications (corresponding to N sequence numbers) that server 200 supports replaying. Therefore, client 100 can send a notification replay request to server 200, indicating the sequence numbers corresponding to these K notifications (a total of K sequence numbers, each corresponding to one of the K notifications). Then, server 200 can resend these K notifications to client 100 based on the notification replay request, thereby achieving accurate replay of these K notifications.

[0173] Case 2: The N sequence numbers only partially overlap with the sequence numbers corresponding to the K lost notifications.

[0174] In other words, among the K notifications that client 100 failed to receive, only a portion of the notifications support replay. The first notification is among the replayable notifications, while the remaining K notifications do not support replay. Therefore, client 100 can send a notification replay request to server 200, indicating the sequence numbers of some or all of the K notifications that support replay. Then, server 200 can resend the corresponding notifications to client 100 based on the notification replay request, thereby achieving accurate notification replay.

[0175] For example, the following is a partial example of a YANG model corresponding to the first dataset:

[0176]

[0177] Here, ietf-subscribed-notifications is the name of the YANG model.

[0178] treams indicates that a node named streams is defined in the model.

[0179] stream*[name] means defining one or more stream nodes under the streams node, and each stream node has a unique identifier named name.

[0180] `replay-log-start-sequence-number` and `replay-log-end-sequence-number` are two extended attributes under `stream`. `replay-log-start-sequence-number` represents the minimum sequence number (i.e., the start sequence number) corresponding to a notification that supports playback, and `replay-log-end-sequence-number` represents the maximum sequence number (i.e., the end sequence number) corresponding to a notification that supports playback.

[0181] Suppose client 100 wants to query the sequence number corresponding to a notification that server 200 supports for playback, then client 100 can send the following RPC message to server 200 (only part of the content is shown):

[0182]

[0183]

[0184] The contents of each line in the above RPC message can be referred to the previous description, and will not be repeated here.

[0185] S204. Server 200 sends the first notification to client 100 based on the first serial number.

[0186] It should be understood that, in addition to the first notification, the server 200 may also replay other notifications to the client 100 based on the notification replay request. For details, please refer to the description in step S203, which will not be repeated here.

[0187] In summary, the notification replay method provided in this application supports specifying the notification to be replayed using a sequence number, thus allowing for precise specification of the notifications to be replayed. Specifically, client 100 can specify a sequence number in the notification replay request sent to server 200. Server 200 can then determine the corresponding notification based on the sequence number in the notification replay request and replay these notifications to client 100, thereby achieving precise notification replay and avoiding the replay of notifications that client 100 does not expect. This avoids unnecessary interference to client 100 and reduces communication overhead between client 100 and server 200.

[0188] Please see Figure 3 This application also provides a communication device 300 for subscribing to a first dataset in a server 200. The communication device 300 includes a sending module 310 and a receiving module 320.

[0189] The sending module 310 is used to send a notification replay request to the server 200. The notification replay request includes a first sequence number, which indicates a first notification associated with a first dataset.

[0190] The receiving module 320 is used to receive the first notification sent by the server 200 based on the first sequence number.

[0191] Optionally, before sending the notification playback request to the server 200, the sending module 310 is further configured to: send subscription information of the first dataset to the server 200. The subscription information indicates N sequence numbers, including the first sequence number. The server 200 supports replaying notifications corresponding to the N sequence numbers to the communication device 300, and all notifications corresponding to the N sequence numbers are associated with the first dataset.

[0192] Optionally, the above subscription information must meet one of the following conditions:

[0193] (1) The subscription information includes N serial numbers;

[0194] (2) The subscription information includes at least one of the largest and smallest serial numbers among N serial numbers, and these N serial numbers are consecutive.

[0195] Optionally, the communication device 300 further includes a determining module 330. The receiving module 320 is further configured to: receive a second notification and a third notification sent by the server 200, wherein the second notification includes a sequence number corresponding to the second notification, and the third notification includes a sequence number corresponding to the third notification. The determining module 330 is configured to: determine that receiving K notifications sent by the server 200 has failed if the sequence numbers corresponding to the second notification and the third notification are not consecutive, wherein the sequence numbers corresponding to the second notification, the K notifications, and the third notification are consecutive, the second notification, the K notifications, and the third notification are all associated with the first dataset, and the K notifications include the first notification.

[0196] Optionally, the sending module 310 is further configured to: send a query request to the server 200, the query request instructing the server 200 to send the sequence number corresponding to the notification that supports playback. The receiving module 320 is further configured to: receive the sequence number corresponding to the notification that supports playback sent by the server 200. Specifically, the sending module 310 is configured to: send a notification playback request to the server 200 based on the aforementioned sequence number corresponding to the notification that supports playback, wherein the sequence number corresponding to the notification that supports playback includes a first sequence number.

[0197] Optionally, the first notification includes M notifications, and the first sequence number satisfies one of the following conditions:

[0198] (1) The first sequence number includes the largest and smallest sequence number among the M sequence numbers, and the M sequence numbers are consecutive;

[0199] (2) The first sequence number includes M sequence numbers, and each of the M sequence numbers corresponds to one of the M notifications.

[0200] Optionally, the first notification satisfies at least one of the following:

[0201] 1. The first notification is used to indicate that a data change has occurred in the first dataset;

[0202] 2. The first notification includes the data in the first dataset.

[0203] Optionally, the first dataset is data from a data model defined using the YANG data modeling language.

[0204] It should be noted that, Figure 3 The communication device 300 can be used to perform Figure 2 The execution steps on the client 100 side in the notification replay method are detailed in the previous text and will not be repeated here. Figure 3 Based on function, the communication device 300 is exemplarily divided into a transmitting module 310, a receiving module 320, and a determining module 330. In practice, the communication device 300 may contain more or fewer modules. For example, one of the above modules may be split into multiple functional modules, or two or more of the above modules may be merged into one functional module. Other functional modules may also be added to the communication device 300. This application does not limit this. The transmitting module 310, the receiving module 320, and the determining module 330 can all be implemented by software and / or hardware, and this application does not limit this either.

[0205] Please see Figure 4 This application also provides another communication device 400, in which a client 100 subscribes to a first dataset in the communication device 400. The communication device 400 includes a receiving module 410 and a transmitting module 420.

[0206] The receiving module 410 is used to: receive a notification playback request sent by the client 100, wherein the notification playback request includes a first sequence number, the first sequence number is used to indicate a first notification, and the first notification is associated with a first dataset.

[0207] The sending module 420 is used to send a first notification to the client 100 based on the first sequence number.

[0208] Optionally, before receiving the notification playback request sent by the client 100, the receiving module 410 is further configured to: receive subscription information of the first dataset sent by the client 100, wherein the subscription information is used to indicate N sequence numbers, the communication device 400 supports playing back the notifications corresponding to the N sequence numbers to the client 100, the notifications corresponding to the N sequence numbers are all associated with the first dataset, and the N sequence numbers include the first sequence number.

[0209] Optionally, the above subscription information must meet one of the following conditions:

[0210] (1) The subscription information includes N serial numbers;

[0211] (2) The subscription information includes at least one of the largest and smallest serial numbers among N serial numbers, and these N serial numbers are consecutive.

[0212] Optionally, before receiving the notification playback request sent by client 100, receiving module 410 is further configured to: receive a query request sent by client 100, the query request instructing communication device 400 to send the sequence number corresponding to the notification that supports playback. Sending module 420 is further configured to: send the sequence number corresponding to the notification that supports playback to client 100 based on the query request, the sequence number corresponding to the notification that supports playback includes a first sequence number.

[0213] Optionally, the first notification includes M notifications, and the first sequence number satisfies one of the following conditions:

[0214] (1) The first sequence number includes the largest and smallest sequence number among the M sequence numbers, and the M sequence numbers are consecutive;

[0215] (2) The first sequence number includes M sequence numbers, and each of the M sequence numbers corresponds to one of the M notifications.

[0216] Optionally, the first notification satisfies at least one of the following:

[0217] 1. The first notification is used to indicate that a data change has occurred in the first dataset;

[0218] 2. The first notification includes the data in the first dataset.

[0219] Optionally, the first dataset is data from a data model defined using the YANG data modeling language.

[0220] It should be noted that, Figure 4 The communication device 400 can be used to perform Figure 2 The execution steps on the server-side 200 side in the notification replay method are detailed in the previous text and will not be repeated here. Figure 4 Based on function, the communication device 400 is exemplarily divided into a receiving module 410 and a transmitting module 420. In reality, the communication device 400 may contain more or fewer modules. For example, one of the above modules may be split into multiple functional modules, or two or more of the above modules may be merged into one functional module. Other functional modules may also be added to the communication device 400. This application does not limit this. Both the receiving module 410 and the transmitting module 420 can be implemented by software and / or hardware, and this application does not limit this either.

[0221] Please see Figure 5This application also provides a communication device 500, including a bus 502, a processor 504, a memory 506, and a network interface 508. The processor 504, the memory 506, and the network interface 508 communicate with each other via the bus 502. The communication device 500 can be a switch, router, server, desktop computer, etc., and this application does not specifically limit it, nor does it limit the number of processors, memory, etc. in the communication device 500.

[0222] Bus 502 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 5 The bus 502 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 502 may include a path for transmitting information between various components of the communication device 500 (e.g., memory 506, processor 504, network interface 508).

[0223] Processor 504 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0224] Memory 506 may include volatile memory, such as random access memory (RAM). Processor 504 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0225] Memory 506 stores executable program code. Processor 504 executes this executable program code to implement... Figure 3 The functions of the sending module 310, receiving module 320, and determining module 330 in the present application are implemented. Figure 2 The execution steps on the client 100 side in the notification replay method. Alternatively, the processor 504 executes the executable program code to implement respectively. Figure 4 The receiving module 410 and the transmitting module 420 in the present application perform their functions, thereby realizing the present application. Figure 2 The execution steps on the server side 200 in the notification replay method.

[0226] The network interface 508 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the communication device 500 and other devices or communication networks.

[0227] This application also provides a notification playback system, including a client and a server. The client is used to execute... Figure 2 The steps on the client-side (100 side) of the notification replay method are used by the server to execute... Figure 2 The steps on the server-side 200 side in the notification replay method are detailed in the previous text and will not be repeated here.

[0228] This application also provides a chip system including a processor and a power supply circuit, wherein the power supply circuit supplies power to the processor, and the processor performs... Figure 2 The steps in the notification replay method on the client side (100) or server side (200) are described below for brevity. These steps will not be elaborated upon here. The processor can be implemented using a GPU, or a computing device such as a DPU, NPU, XPU, SoC, offload card, or accelerator card.

[0229] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a communication device. This available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc. The computer-readable storage medium includes instructions for directing the communication device to perform... Figure 2 The execution steps on the client 100 side in the notification playback method, or the instruction used to instruct the communication device to execute... Figure 2 The execution steps on the server side 200 in the notification replay method.

[0230] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a communication device or stored on any usable medium. When the computer program product runs on the communication device, it causes the communication device to execute... Figure 2 The execution steps on the client 100 or server 200 side in the notification replay method.

[0231] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

Claims

1. A notification playback method, characterized in that, The method is applied to a client, which subscribes to a first dataset on the server. The method includes: The client sends a notification replay request to the server, wherein the notification replay request includes a first sequence number, the first sequence number is used to indicate a first notification, and the first notification is associated with the first dataset; The client receives the first notification sent by the server based on the first sequence number.

2. The method according to claim 1, characterized in that, Before the client sends a notification replay request to the server, the method further includes: The client sends subscription information for the first dataset to the server, wherein the subscription information is used to indicate N sequence numbers, the N sequence numbers including the first sequence number, the server supports replaying the notifications corresponding to the N sequence numbers to the client, and the notifications corresponding to the N sequence numbers are all associated with the first dataset.

3. The method according to claim 2, characterized in that, The subscription information meets one of the following conditions: The subscription information includes the N serial numbers; Alternatively, the subscription information may include at least one of the largest and smallest sequence numbers among the N sequence numbers, wherein the N sequence numbers are consecutive.

4. The method according to any one of claims 1 to 3, characterized in that, Before the client sends a notification replay request to the server, the method further includes: The client receives a second notification and a third notification sent by the server, wherein the second notification includes a sequence number corresponding to the second notification, and the third notification includes a sequence number corresponding to the third notification; If the sequence number corresponding to the second notification and the sequence number corresponding to the third notification are not consecutive, the client determines that receiving the K notifications sent by the server has failed. The sequence numbers corresponding to the second notification, the K notifications, and the third notification are consecutive, and the second notification, the K notifications, and the third notification are all associated with the first dataset. The K notifications include the first notification.

5. The method according to any one of claims 1 to 4, characterized in that, The client sends a notification replay request to the server, including: The client sends a query request to the server, the query request being used to instruct the server to send the sequence number corresponding to the notification that supports playback; The client receives the sequence number corresponding to the playback-supported notification sent by the server; The client sends the notification replay request to the server based on the sequence number corresponding to the notification that supports replay, wherein the sequence number corresponding to the notification that supports replay includes the first sequence number.

6. The method according to any one of claims 1 to 5, characterized in that, The first notification includes M notifications, and the first sequence number satisfies one of the following conditions: The first sequence number includes the largest and smallest sequence number among M sequence numbers, and the M sequence numbers are consecutive; Alternatively, the first sequence number may include the M sequence numbers, and the M sequence numbers correspond one-to-one with the M notifications.

7. The method according to any one of claims 1 to 6, characterized in that, The first notification is used to indicate that data changes have occurred in the first dataset, and / or the first notification includes data in the first dataset.

8. A notification playback method, characterized in that, The method is applied to a server, and a client subscribes to a first dataset on the server. The method includes: The server receives a notification replay request sent by the client, wherein the notification replay request includes a first sequence number, the first sequence number is used to indicate a first notification, and the first notification is associated with the first dataset; The server sends the first notification to the client based on the first serial number.

9. The method according to claim 8, characterized in that, Before the server receives the notification replay request sent by the client, the method further includes: The server receives subscription information for the first dataset sent by the client, wherein the subscription information is used to indicate N sequence numbers, the server supports replaying notifications corresponding to the N sequence numbers to the client, the notifications corresponding to the N sequence numbers are all associated with the first dataset, and the N sequence numbers include the first sequence number.

10. The method according to claim 9, characterized in that, The subscription information meets one of the following conditions: The subscription information includes the N serial numbers; Alternatively, the subscription information may include at least one of the largest and smallest sequence numbers among the N sequence numbers, wherein the N sequence numbers are consecutive.

11. The method according to any one of claims 8 to 10, characterized in that, Before the server receives the notification replay request sent by the client, the method further includes: The server receives a query request sent by the client, and the query request is used to instruct the server to send the sequence number corresponding to the notification that supports playback; The server sends the sequence number corresponding to the playback-supported notification to the client based on the query request, and the sequence number corresponding to the playback-supported notification includes the first sequence number.

12. The method according to any one of claims 8 to 11, characterized in that, The first notification includes M notifications, and the first sequence number satisfies one of the following conditions: The first sequence number includes the largest and smallest sequence number among M sequence numbers, and the M sequence numbers are consecutive; Alternatively, the first sequence number may include the M sequence numbers, and the M sequence numbers correspond one-to-one with the M notifications.

13. The method according to any one of claims 8 to 12, characterized in that, The first notification is used to indicate that data changes have occurred in the first dataset, and / or the first notification includes data in the first dataset.