Data synchronization method and device, equipment, storage medium and product

Through NF, registration/update messages are sent to all NRFs in the same group and message forwarding comparison is performed, which solves the problem of data synchronization delay between NRFs and synchronization between different manufacturers, and achieves real-time data synchronization and business service accuracy and load sharing. .

CN118827698AActive Publication Date: 2024-10-22CHINA MOBILE GROUP DESIGN INST +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410814523.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-22
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

In the existing technology, there is a delay in data synchronization between NRFs, which cannot guarantee real-time performance, and data synchronization between different manufacturers cannot be achieved, which affects the accuracy of data consistency and business service discovery.

Method used

Use NF to send registration/update messages to all NRFs in the same group to achieve multi-registration, and perform message forwarding and comparison within the NRF group to ensure data consistency and synchronization.

Benefits of technology

Real-time data synchronization between NRFs is achieved, ensuring data consistency among NRFs in the same group, improving the accuracy of business service discovery and load sharing capabilities, and supporting data synchronization between different manufacturers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118827698A_ABST
    Figure CN118827698A_ABST
Patent Text Reader

Abstract

Disclosed are a data synchronization method, apparatus and device, a storage medium and a product, an NF sending a service request message to all NRFs in a group of NRFs while sending the service request message, so that any one NRF in the same NRF group forwards the service request message to all other NRFs in the same NRF group, thereby enabling the NRF to synchronize the service request message to all other NRFs in the same NRF group. Therefore, each NRF receives the service request message sent by the NF and the service request messages sent by all other NRFs in the same NRF group, then whether all the received service request messages are consistent or not is compared, if yes, data synchronization between the NRFs is indicated, if not, data asynchronization between the NRFs is indicated, and a success message or a failure message is returned to the NF. Therefore, the NF can resend the service request message when the NRF data are not synchronized, it is ensured that the data of all the NRFs in the same NRF group are kept synchronous, in the embodiment of the invention, the data consistency among all the NRFs in the same NRF group is realized through multiple registration of the NF, and the real-time performance of data synchronization is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to a data synchronization method, device, equipment, storage medium and product. Background Art

[0002] NRF (Network Repository Function) is a network function that provides registration and discovery functions for NF (Network Functions). A pair of NRFs is set up as one master and one backup, and both serve the NFs in the same area, such as Figure 1 As shown, the NF in the prior art only registers / updates with the primary NRF. After the primary NRF receives the registration / update message, it synchronizes with the paired NRF to ensure data consistency between the two. When the NF service user performs service discovery on the NRF, it first performs service discovery on the primary NRF. If it is found that the primary NRF is unreachable, it performs service discovery on the backup NRF. However, currently, data consistency is ensured between paired NRFs through data synchronization. Since the NF only registers / updates with one primary NRF, there will be a certain delay when the primary NRF synchronizes data with the backup NRF, resulting in the inability to ensure the real-time data synchronization of the two NRFs. In addition, when the link between the paired NRFs is interrupted, the data synchronization between the NRFs cannot be completed; the data synchronization between the paired NRFs is generally a manufacturer-proprietary interface, and the paired NRFs must be devices from the same manufacturer, and pairing between NRFs from different manufacturers cannot be achieved. Summary of the invention

[0003] The purpose of the embodiments of the present invention is to provide a data synchronization method, device, equipment, storage medium and product, through which NF sends registration / update messages to all NRFs in the same group of NRFs, NF multi-registration realizes data consistency among all NRFs in the same group, and the real-time performance of data synchronization is guaranteed.

[0004] To achieve the above object, an embodiment of the present invention provides a method for synchronizing data between all NRFs in the same group, which is applied to a first NRF. The method includes:

[0005] When receiving a service request message sent by the NF, starting a first timer, storing the service request message sent by the NF as a first message, and forwarding the service request message to the second NRF;

[0006] When receiving the service request message forwarded by the second NRF within the set time period of the first timer, storing the service request message sent by the second NRF as a second message, and comparing the first message with the second message; wherein the service request message forwarded by the second NRF to the first NRF is sent by the NF;

[0007] When the first message and the second message are consistent, a success response message is sent to the NF.

[0008] As a refinement of the above solution, the service request message includes message content and a timestamp; wherein the message content is a registration request or an update request.

[0009] As an improvement of the above solution, the NF sends the service request message to a group of NRFs at the same time; wherein each group of NRFs includes at least two NRFs.

[0010] As a refinement of the above solution, after forwarding the service request to the second NRF, the method further includes:

[0011] When the service request message forwarded by the second NRF is not received within the set time period of the first timer, a success response message is sent to the NF and a first alarm message is generated.

[0012] As a refinement of the above solution, the method further includes:

[0013] When receiving the service request message forwarded by the second NRF but not receiving the service request message sent by the NF, starting the second timer;

[0014] When the service request message sent by the NF is still not received within the set time period of the second timer, a second alarm information is generated.

[0015] As a refinement of the above solution, after starting the second timer, the method further includes:

[0016] When a service request message sent by the NF is received within the time period set by the second timer, the service request message is stored as the first message;

[0017] When the first message and the second message are consistent, a success response message is sent to the NF.

[0018] As a refinement of the above solution, the method further includes:

[0019] When the message contents in the first message and the second message are consistent but the timestamps are inconsistent, sending a success response message to the NF and generating a third alarm message;

[0020] When the message contents in the first message and the second message are inconsistent, a failure message is sent to the NF and a fourth alarm message is generated, so that the NF resends the service request message.

[0021] To achieve the above object, an embodiment of the present invention further provides a data synchronization method, which is applied to NF, and the method includes:

[0022] Sending a service request message to all NRFs in a group of NRFs at the same time, so that any NRF in the same NRF group forwards the service request message to all other NRFs in the same NRF group after receiving the service request message, and the NRF compares the service request message sent by the NF with the service request message sent by other NRFs;

[0023] The receiving NRF returns a successful response message after comparing the service request message sent by the NF with the service request messages sent by other NRFs.

[0024] As a refinement of the above solution, after simultaneously sending the service request message to a group of NRFs, the method further includes:

[0025] When receiving a failure message returned by any NRF, sending the service request message to all NRFs in a group of NRFs;

[0026] When the first alarm information or the fourth alarm information returned by any NRF is received, the service request message is sent to all NRFs in a group of NRFs; wherein, the first alarm information is sent by the NRF when it does not receive the service request message forwarded by other NRFs in the group within the set time period of the first timer, and the fourth alarm information is sent by the NRF when the message contents in the first message and the second message are inconsistent.

[0027] To achieve the above object, an embodiment of the present invention further provides a data synchronization device, which is applied to a first NRF, and the device includes:

[0028] A data synchronization module, configured to start a first timer when receiving a service request message sent by the NF, store the service request message sent by the NF as a first message, and forward the service request message to the second NRF; when receiving a service request message forwarded by the second NRF within a set time period of the first timer, store the service request message sent by the second NRF as a second message;

[0029] A data comparison module, configured to compare the first message and the second message; wherein the service request message forwarded by the second NRF to the first NRF is sent by the NF;

[0030] The message sending module is used to send a success response message to the NF when the first message and the second message are consistent.

[0031] To achieve the above object, an embodiment of the present invention further provides a data synchronization device, which is applied to NF, and the device includes:

[0032] A service request message sending module is used to send a service request message to all NRFs in a group of NRFs at the same time, so that any NRF in the same NRF group forwards the service request message to all other NRFs in the same NRF group after receiving the service request message, and the NRF compares the service request message sent by the NF with the service request message sent by other NRFs;

[0033] The success response message receiving module is used to receive the success response message returned by the NRF after comparing the service request message sent by the NF with the service request message sent by other NRFs.

[0034] To achieve the above objectives, an embodiment of the present invention further provides a data synchronization device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the data synchronization method as described in any of the above embodiments is implemented.

[0035] To achieve the above objectives, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the data synchronization method as described in any of the above embodiments.

[0036] To achieve the above objectives, an embodiment of the present invention further provides a computer program product, including computer instructions, which, when executed by a processor, implement the data synchronization method as described in any of the above embodiments.

[0037] Compared with the prior art, the data synchronization method, apparatus, device, storage medium and product disclosed in the present invention, when the network function NF sends a service request message, simultaneously sends the service request message to all NRFs in a group of network storage repository functions NRF to which it belongs, so that any NRF in the same NRF group forwards the service request message to all other NRFs in the same NRF group after receiving the service request message, so that each NRF will receive the service request message sent by its own NF and the service request message sent by all other NRFs in the same NRF group, and then compare whether the above-mentioned received service request messages are consistent, if they are consistent, it means that the data is synchronized, if they are inconsistent, it means that the data between the NRFs is not synchronized, and return a success message or a failure message to the NF, ensuring that the data between the various NRFs in the same NRF group remains synchronized. In an embodiment of the present invention, the NRF sends registration and update messages to all NRFs in the same NRF group, so as to achieve data consistency between the various NRFs in the same NRF group, and the real-time data synchronization is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1It is a schematic diagram of information interaction between NF and paired NRF provided by the prior art;

[0039] Figure 2 is a flow chart of a data synchronization method provided by an embodiment of the present invention;

[0040] Figure 3 is a diagram of the NRF network architecture provided by an embodiment of the present invention;

[0041] Figure 4 This is a schematic diagram of the first information interaction between the NF and the paired NRF provided by an embodiment of the present invention;

[0042] Figure 5 is a schematic diagram of a second type of information interaction between a NF and a paired NRF provided in an embodiment of the present invention;

[0043] Figure 6 Schematic diagram of the third information interaction between the NF and the paired NRF provided in the embodiment of the present invention;

[0044] Figure 7 is a processing flow chart when data between paired NRFs is not synchronized according to an embodiment of the present invention;

[0045] Figure 8 4 is a schematic diagram of the fourth information interaction between the NF and the paired NRF provided in the embodiment of the present invention;

[0046] Fig. 9 is a structural block diagram of a data synchronization device provided by an embodiment of the present invention;

[0047] Fig.10 is a structural block diagram of another data synchronization device provided by an embodiment of the present invention;

[0048] Fig.11 It is a structural block diagram of a data synchronization device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] In the prior art, when NRFs in other regions perform service discovery on NRFs in this region, one of them is used as the main NRF and the other is used as the backup NRF for data configuration. The data link configuration between paired NRFs is complex, and when a link disaster recovery switch occurs between some NFs and paired NRFs, the link between some NFs and the main NRF is interrupted, and the backup NRF is used as the main NRF. On the contrary, some other network elements still use the main NRF as the main NRF. In this scenario, it cannot be guaranteed that all NF registrations / updates are on the main NRF, and the main and backup working modes are inconsistent, which may affect the accuracy of business service discovery. Overall, the NRF data synchronization method in the prior art, because the NF only registers / updates with one of the main NRFs, and data synchronization is performed between NRFs, in order to ensure the accuracy of the business, the paired NRFs work in a master-slave mode, which cannot achieve complete load sharing of the business between paired NRFs, and after the link is switched, it will also trigger a partial switch of the main and backup working modes.

[0051] In order to overcome the above defects, an embodiment of the present invention provides a data synchronization method, in which NF sends NF registration / update messages to a group of NRFs at the same time. The NRFs in the group forward the messages to other NRFs in the group respectively and perform data comparison to ensure data consistency. When NF service users discover services from NRFs, they can randomly discover services from one NRF in the group to achieve full load sharing of services between the NRFs in the group. At the same time, the synchronization comparison interface between NRFs also adopts a standardized interface, which has the conditions to realize dual-plane heterogeneous networking between a group of NRFs.

[0052] See also Figure 2 , Figure 2 is a flow chart of a data synchronization method provided by an embodiment of the present invention. It is worth noting that Figure 2 The example of "the number of NRFs in the same group of NRFs is 2" is used for explanation. In other embodiments of actual application, the number of NRFs in a group of NRFs may be greater than 2. The data synchronization method described in the embodiment of the present invention is applied to the first NRF, and the method includes:

[0053] S11, when receiving a service request message sent by the NF, starting a first timer, storing the service request message sent by the NF as a first message, and forwarding the service request message to a second NRF;

[0054] S12, when receiving the service request message forwarded by the second NRF within the set time period of the first timer, storing the service request message sent by the second NRF as a second message, and comparing the first message with the second message; wherein the service request message forwarded by the second NRF to the first NRF is sent by the NF;

[0055] S13. When the first message and the second message are consistent, send a success response message to NF.

[0056] Specifically, the service request message includes message content and a timestamp; wherein the message content is a registration request or an update request.

[0057] For example, see Figure 3 , Figure 3 The network architecture diagram of the network repository function NRF provided by the embodiment of the present invention is as follows. For area A and area B, a pair of network repository functions NRF are respectively provided. The two serve and manage the network function NF of the same area. The network function NF sends the service request message to a group of NRFs at the same time; wherein each group of NRFs includes at least two NRFs , like Figure 3 As shown, NF sends a service request message to two NRFs. The network function NF sends a NF service request message to a group of NRFs through the service interface Nnrf at the same time. The service request message includes the first registration message and the subsequent update message. After receiving the NF service request message, the network repository function NRF in the group forwards the message to all other network repository functions NRFs in the group and performs data comparison, thereby ensuring the consistency of data of all network repository functions NRFs in the group.

[0058] For example, see Figure 4 , Figure 4 is a schematic diagram of the first information interaction between NF and paired NRF provided in an embodiment of the present invention. Figure 2 Taking NRF1-1 and NRF1-2 in region A as an example, the above steps S11 to S13 are described, including the following steps:

[0059] Step 1a / 1b: NF sends a service request message to NRF1-1 / NRF1-2 at the same time. The service request message may carry a timestamp, which is used for deduplication and timing judgment. For example, the service request message in 1a carries a timestamp Ta=t1, and the service request message in 1b carries a timestamp Tb=t1. The values ​​of timestamps Ta and Tb are consistent, and the value is t1, the time when NF decides to send messages to NRF1-1 and NRF1-2.

[0060] Step 2a / 2b: NRF1-1 and NRF1-2 respectively receive the service request message sent by NF, store the service request message as the first message, and respectively activate the first timer, waiting for the paired NRF to forward the NF service request message (ie, the second message), and the set time period of the first timer is T1.

[0061] Step 3a / 3b: NRF1-1 forwards the service request message to NRF1-2, which may carry a timestamp. Similarly, NRF1-2 forwards the service request message to NRF1-1, and this service request message may also carry a timestamp. NRF1-1 stores the service request message forwarded by NRF1-2 as the second message, and NRF1-2 similarly stores the service request message forwarded by NRF1-1 as the second message. Therefore, all NRFs in a group of NRFs store the service request message sent by the NF as the first message, and store the service request messages forwarded by other NRFs in the group as the second message. The timestamps Ta and Tb carried by the first message and the second message are consistent with the timestamps of the messages received in 1a / 1b, both of which are t1.

[0062] Step 4a / 4b: Within the set time period T1, NRF1-1 compares the first message received from NF with the second message, including the message content and timestamp. If the message content and timestamp are consistent, the registration / update message from NF to NRF1-1 takes effect. Similarly, within the set time period T1, NRF1-2 compares the first message received from NF with the second message sent by the paired NRF1-1. If the message content and timestamp are consistent, the registration / update message from NF to NRF1-2 takes effect. This step ensures that the data update of NF takes effect on the paired NRF at the same time.

[0063] Step 5a / 5b: NRF1-1 / NRF1-2 replies a success response message to NF respectively, informing NF that data synchronization is complete and accurate.

[0064] It is worth mentioning that Figure 4 The processing timing of the paired NRFs receiving the NF service request is basically simultaneous. Steps a and b in steps 1a / 1b, 2a / 2b, 3a / 3b, 4a / 4b, and 5a / 5b are slightly different in process time, but it does not affect the processing results.

[0065] In the embodiment of the present invention, data consistency among a group of NRFs is achieved by executing multiple registrations with NRFs by NF, and the real-time data synchronization is guaranteed. In addition, the service request message sent by NF to NRF can carry a timestamp, which is convenient for NRF to deduplicate and distinguish the timing of service request messages. In addition, when the NRF in the group compares the service request message sent by NF and the service request message sent by another NRF, it will feedback a successful response message to NF, so that NF knows that the data multiple registration is successful at this time, so there is no need to continue to send service request messages.

[0066] Specifically, after forwarding the service request message to the second NRF, the method further includes:

[0067] S14: When no service request message forwarded by the second NRF is received within the set time period of the first timer, a success response message is sent to the NF and a first alarm message is generated.

[0068] For example, see Figure 5 , Figure 5 is a schematic diagram of the second information interaction between NF and paired NRF provided in an embodiment of the present invention, compared with Figure 4 In a normal scenario, this NRF only receives the NF registration / update message, but does not receive the paired NRF forwarding message. The following takes NRF1-1 as an example to illustrate step S14. NRF1-2 is processed similarly in the same scenario, including the following steps:

[0069] Steps 1a / 1b, 2a / 2b, 3a / 3b: Same as Figure 4 Normal registration process.

[0070] Step 4a: Within the first timer time T1, NRF1-1 still does not receive the service request message forwarded by NRF1-2, and generates a first alarm message of not receiving the service request message forwarded by NRF1-2. Further, NRF1-1 can also send the first alarm message to NRF1-2 to inform NRF1-2 of the data synchronization result.

[0071] Step 5a: Same Figure 4 Normal registration process, and include the first alarm information in the message replied to NF. Later, when NF receives the first alarm information sent by NRF1-1, it can perform the registration / update service process again to each NRF in the group of NRFs to which it belongs.

[0072] In an embodiment of the present invention, during the NRF data synchronization within the group, if any NRF does not receive the service request message forwarded by another NRF, an alarm message of not receiving the service request message sent by another NRF is generated. This alarm message can be sent to the NF to inform the NF of the data synchronization status at this time. The NRF can also publish this alarm message on its own end to inform the paired NRF of the data synchronization status.

[0073] Specifically, the method further includes:

[0074] S21, when receiving the service request message forwarded by the second NRF but not receiving the service request message sent by the NF, starting the second timer;

[0075] S22. When no service request message sent by the NF is received within the time period set by the second timer, a second alarm message is generated;

[0076] S23. When a service request message sent by the NF is received within the time period set by the second timer, the service request message is stored as the first message;

[0077] S24. When the first message and the second message are consistent, send a success response message to NF.

[0078] For example, see Figure 6 , Figure 6 is a schematic diagram of the third information interaction between NF and paired NRF provided in an embodiment of the present invention, compared with Figure 4 In normal scenarios, NRF receives other NRFs first ( Figure 4 The paired NRF in the example above forwards the service request message, and then receives the service request message sent by the NF. The following takes NRF1-1 as an example to illustrate steps S21 to S24. The paired NRF1-2 is processed similarly in the same scenario, including the following steps:

[0079] Step 1a: NF sends a service request message. Figure 4 Normal process.

[0080] Step 1b / 2b / 3b: Same as Figure 4 Normal registration process.

[0081] Step 4a: After receiving the service request message sent by NRF1-2, NRF1-1 stores the service request message sent by NRF1-2 as the second message, and starts the second timer before receiving the service request message sent by NF. The setting time period of the second timer is T2. At this time, there are the following two situations:

[0082] Case 1: If a service request message is received from NF before T2 times out, the service request message is stored as the first message, and the first message is compared with the second message. If the comparison is consistent, the normal process 5a is executed to reply a registration / update success message to NF.

[0083] Case 2: If the service request message sent by NF is not received before T2 times out, a second alarm message indicating that the service request message sent by NF is not received is generated. NRF can also send the second alarm message to the paired NRF1-2 to inform NRF1-2 of the data synchronization status. At the same time, as shown in 3a in the figure, since the service request message sent by NF is received before T2 times out, NRF1-1 can forward the service request message to NRF1-2.

[0084] In the embodiment of the present invention, during the NRF data synchronization within the group, if any NRF fails to receive the service request message sent by the NF within the set time period of the second timer, an alarm message of not receiving the service request message sent by the NF is generated.

[0085] Specifically, the method further includes:

[0086] S15. When the message contents in the first message and the second message are consistent but the timestamps are inconsistent, a success response message is sent to the NF and a third alarm message is generated;

[0087] S16. When the message contents in the first message and the second message are inconsistent, a failure message is sent to the NF and a fourth alarm message is generated, so that the NF resends the service request message.

[0088] Among them, the failure message includes a registration failure message and an update failure message; when the message content in the service request message is a registration request, the failure message is a registration failure message, and when the message content in the service request message is an update request, the failure message is an update failure message.

[0089] For example, see Figure 7 , Figure 7 This is a processing flow chart when the data between paired NRFs is not synchronized provided by an embodiment of the present invention. When NF initiates multiple registrations / updates, in the above steps 4a and 4b, taking NRF1-1 as an example, after NRF1-1 stores the first message and the second message, it compares the first message and the second message and finds that the messages are inconsistent. Then, the subsequent message processing process has the following three situations, and an alarm is generated.

[0090] Case 1: After comparing the first message and the second message, NRF1-1 finds that the message contents are consistent but the timestamps are inconsistent, then NRF1-1 returns a successful response message to the paired NF and generates a third alarm message indicating that the contents are consistent but the registration times are inconsistent. NRF1-1 can send the third alarm message to NF and / or NRF1-2.

[0091] Case 2: After comparing the first message and the second message, NRF1-1 finds that the message contents are inconsistent but the timestamps are consistent, then NRF1-1 sends a failure message (failure reason value 404) to NF and generates a fourth alarm message indicating that the message contents are inconsistent but the registration time is consistent. NRF1-1 can send the fourth alarm message to NF and / or NRF1-2. After receiving the failure message, NF initiates a re-registration / update request to all NRFs in the group, i.e., re-initiates a service request message. This process can be referred to Figure 8 At this time, after comparing the first message and the second message, NRF1-1 finds that the message contents are inconsistent, and executes step 5a to send a failure message to NF. After receiving the failure message, NF re-initiates a service request message to NRF1-1 and NRF1-2 in the group. The processes of 6a and 6b can refer to 1a and 1b.

[0092] Case 3: After comparing the first message and the second message, NRF1-1 finds that the message content and timestamp are inconsistent, then NRF1-1 sends a failure message (failure reason value 404) to NF, and generates a fourth alarm message that the message content and registration time are inconsistent. NRF1-1 can send the fourth alarm message to NF and / or NRF1-2. After receiving the failure message, NF initiates a re-registration / update request to all NRFs in the group, that is, re-initiates a service request message. This process can also be referred to Figure 8 .

[0093] In an embodiment of the present invention, when the NRF in the group compares the service request message sent by the NF received by itself and the service request message sent by another NRF in the group and finds that they are inconsistent, it will generate corresponding alarm information as a record and send a corresponding failure message to the NF, so that the NF can re-initiate the service request as soon as possible.

[0094] Furthermore, to achieve the above-mentioned purpose, an embodiment of the present invention further provides a data synchronization method, which is applied to NF, and the method includes:

[0095] Sending a service request message to all NRFs in a group of NRFs at the same time, so that any NRF in the same NRF group forwards the service request message to all other NRFs in the same NRF group after receiving the service request message, and the NRF compares the service request message sent by the NF with the service request message sent by other NRFs;

[0096] The receiving NRF returns a successful response message after comparing the service request message sent by the NF with the service request messages sent by other NRFs.

[0097] Specifically, after simultaneously sending the service request message to all NRFs in a group of NRFs, the method further includes:

[0098] When a failure message returned by any NRF is received, the service request message is sent to all NRFs in a group of NRFs.

[0099] When the first alarm information or the fourth alarm information returned by any NRF is received, the service request message is sent to all NRFs in a group of NRFs; wherein, the first alarm information is sent by the NRF when it does not receive the service request message forwarded by other NRFs in the group within the set time period of the first timer, and the fourth alarm information is sent by the NRF when the message contents in the first message and the second message are inconsistent.

[0100] It is worth noting that the specific working process of each step in the data synchronization method applied to NF can refer to the specific working process of NF described in the above embodiment, which will not be repeated here.

[0101] Compared with the prior art, the data synchronization method disclosed in the present invention is that when the network function NF sends a service request message, the network function NF also sends the service request message to all NRFs in a group of network storage repository functions NRF to which it belongs, so that any NRF in the same NRF group forwards the service request message to all other NRFs in the same NRF group after receiving the service request message, so that each NRF will receive the service request message sent by its own NF and the service request message sent by all other NRFs in the same NRF group, and then compare whether the received service request messages are consistent. If they are consistent, it means that the data is synchronized, and if they are inconsistent, it means that the data between the NRFs is not synchronized, and return a success message or a failure message to the NF, ensuring that the data between the various NRFs in the same NRF group remains synchronized. In an embodiment of the present invention, the NRF sends registration and update messages to all NRFs in the same NRF group to achieve data consistency between the various NRFs in the same NRF group, and the real-time data synchronization is guaranteed.

[0102] In addition, based on the real-time data synchronization between NRFs, NRFs can use dual planes and load sharing mechanisms for service discovery, and the security and reliability of NRFs are greatly improved compared to the master-slave mode. Through NF initiating multiple registrations and forwarding messages between NRFs, the data synchronization interface message is relatively simple and can be aligned based on the standard service interface, so that NRFs from different manufacturers can be located in the same NRF group, and service load sharing and disaster recovery backup can be achieved between NRFs in the same group. Furthermore, the working mode between NRFs in the group can be consistent with the existing STP (signaling transfer point) / DRA (Di ameter Routing Agent), and after adopting the load sharing mode and introducing SCP (Service Communication Proxy), it is easy to realize the fusion networking of 2G / 4G / 5G signaling network.

[0103] See also Fig. 9 , Fig. 9 1 is a structural block diagram of a data synchronization device 100 provided in an embodiment of the present invention. The data synchronization device 100 is provided in a first NRF, and the data synchronization device 100 includes:

[0104] The data synchronization module 11 is used to start a first timer when receiving a service request message sent by the NF, store the service request message sent by the NF as a first message, and forward the service request message to the second NRF; when receiving a service request message forwarded by the second NRF within a set time period of the first timer, store the service request message sent by the second NRF as a second message;

[0105] A data comparison module 12, configured to compare the first message and the second message; wherein the service request message forwarded by the second NRF to the first NRF is sent by the NF;

[0106] The message sending module 13 is used to send a success response message to the NF when the first message and the second message are consistent.

[0107] Specifically, the service request message includes message content and a timestamp; wherein the message content is a registration request or an update request.

[0108] Specifically, the NF sends the service request message to a group of NRFs at the same time; wherein each group of NRFs includes at least two NRFs.

[0109] Specifically, the data synchronization device 100 further includes:

[0110] The alarm information generating module is used to generate first alarm information when the service request message forwarded by the second NRF is not received within the set time period of the first timer after the service request message is forwarded to the second NRF.

[0111] Specifically, the data synchronization module 11 is also used to start the second timer when a service request message forwarded by the second NRF is received but a service request message sent by the NF is not received; then, the alarm information generation module is also used to generate a second alarm message when a service request message sent by the NF is still not received within the set time period of the second timer.

[0112] Specifically, the data synchronization module 11 is also used to store the service request message as the first message when a service request message sent by the NF is received within the set time period of the second timer; the data comparison module 12 is also used to send a success response message to the NF when the first message and the second message are consistent.

[0113] Specifically, the message sending module 13 is used to send a success response message to the NF when the message contents in the first message and the second message are consistent, but the timestamps are inconsistent; the alarm information generation module is used to generate a third alarm message when the message contents in the first message and the second message are consistent, but the timestamps are inconsistent.

[0114] Specifically, the message sending module 13 is used to send a failure message to the NF when the message contents in the first message and the second message are inconsistent; the alarm information generating module is used to generate a fourth alarm information when the message contents in the first message and the second message are inconsistent.

[0115] It is worth noting that the working process of each module in the data synchronization device 100 described in the embodiment of the present invention can refer to the working process of the data synchronization method described in the above embodiment, and will not be repeated here.

[0116] See also Fig.10 , FIG. 10 is a structural block diagram of another data synchronization device 200 provided in an embodiment of the present invention. The data synchronization device 200 is arranged in a NF, and the data synchronization device 200 includes:

[0117] The service request message sending module 21 is used to send the service request message to all NRFs in a group of NRFs at the same time, so that any NRF in the same NRF group forwards the service request message to all other NRFs in the same NRF group after receiving the service request message, and the NRF compares the service request message sent by the NF with the service request message sent by other NRFs;

[0118] The success response message receiving module 22 is used to receive the success response message returned by the NRF after comparing the service request message sent by the NF with the service request messages sent by other NRFs.

[0119] Specifically, the data synchronization device 200 further includes:

[0120] A failure message receiving module is used to receive a failure message returned by any NRF;

[0121] Then, the service request message sending module 21 is further configured to send the service request message to all NRFs in a group of NRFs when receiving a failure message returned by any NRF.

[0122] Specifically, the data synchronization device 200 further includes:

[0123] An alarm information receiving module, used for receiving the first alarm information or the fourth alarm information returned by any NRF;

[0124] Then, the service request message sending module 21 is also used to send the service request message to all NRFs in a group of NRFs when receiving the first alarm information or the fourth alarm information returned by any NRF; wherein, the first alarm information is sent by the NRF when it does not receive the service request message forwarded by other NRFs in the group within the set time period of the first timer, and the fourth alarm information is sent by the NRF when the message contents in the first message and the second message are inconsistent.

[0125] It is worth noting that the working process of each module in the data synchronization device 200 described in the embodiment of the present invention can refer to the working process of the NF in the data synchronization method described in the above embodiment, and will not be repeated here.

[0126] See also Fig.11 , Fig.11 1 is a structural block diagram of a data synchronization device 300 provided in an embodiment of the present invention. The data synchronization device 300 includes a processor 31, a memory 32, and a computer program stored in the memory 32 and executable on the processor 31. When the processor 31 executes the computer program, the steps in the above-mentioned data synchronization method embodiments are implemented, such as steps S11 to S16, S21 to S24.

[0127] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 32 and executed by the processor 31 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the data synchronization device 300.

[0128] The data synchronization device 300 may include, but is not limited to, a processor 31 and a memory 32. Those skilled in the art will appreciate that the schematic diagram is merely an example of the data synchronization device 300 and does not constitute a limitation on the data synchronization device 300. The data synchronization device 300 may include more or fewer components than shown in the diagram, or may combine certain components, or different components. For example, the data synchronization device 300 may also include input and output devices, network access devices, buses, and the like.

[0129] The processor 31 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 31 is the control center of the data synchronization device 300, and uses various interfaces and lines to connect various parts of the entire data synchronization device 200.

[0130] The memory 32 can be used to store the computer program and / or module. The processor 31 implements various functions of the data synchronization device 300 by running or executing the computer program and / or module stored in the memory 32 and calling the data stored in the memory 32. The memory 32 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 32 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0131] Wherein, if the module / unit integrated in the data synchronization device 300 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 31, the steps of the above-mentioned method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-On l yMemory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0132] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A data synchronization method, characterized in that: Applied to a first NRF, the method comprises: When receiving a service request message sent by the NF, starting a first timer, storing the service request message sent by the NF as a first message, and forwarding the service request message to the second NRF; When receiving a service request message forwarded by the second NRF within the set time period of the first timer, storing the service request message sent by the second NRF as a second message, and comparing the first message with the second message; wherein the service request message forwarded by the second NRF to the first NRF is sent by the NF; When the first message and the second message are consistent, a success response message is sent to the NF.

2. The data synchronization method according to claim 1, characterized in that: The service request message includes message content and a timestamp; wherein the message content is a registration request or an update request.

3. The data synchronization method according to claim 1, characterized in that: The NF simultaneously sends the service request message to a group of NRFs; wherein each group of NRFs includes at least two NRFs.

4. The data synchronization method according to claim 1, characterized in that: After forwarding the service request message to the second NRF, the method further includes: When the service request message forwarded by the second NRF is not received within the set time period of the first timer, a success response message is sent to the NF and a first alarm message is generated.

5. The data synchronization method according to claim 1, characterized in that: The method further comprises: When receiving the service request message forwarded by the second NRF but not receiving the service request message sent by the NF, starting the second timer; When the service request message sent by the NF is still not received within the set time period of the second timer, a second alarm information is generated.

6. The data synchronization method according to claim 5, characterized in that: After starting the second timer, the method further includes: When a service request message sent by the NF is received within the time period set by the second timer, the service request message is stored as the first message; When the first message and the second message are consistent, a success response message is sent to the NF.

7. The data synchronization method according to claim 2, characterized in that: The method further comprises: When the message contents in the first message and the second message are consistent but the timestamps are inconsistent, sending a success response message to the NF and generating a third alarm message; When the message contents in the first message and the second message are inconsistent, a failure message is sent to the NF and a fourth alarm message is generated, so that the NF resends the service request message.

8. A data synchronization method, characterized in that: Applied to NF, the method comprises: Sending a service request message to all NRFs in a group of NRFs at the same time, so that any NRF in the same NRF group forwards the service request message to all other NRFs in the same NRF group after receiving the service request message, and the NRF compares the service request message sent by the NF with the service request message sent by other NRFs; The receiving NRF returns a successful response message after comparing the service request message sent by the NF with the service request messages sent by other NRFs.

9. The data synchronization method according to claim 8, characterized in that: After simultaneously sending the service request message to a group of NRFs, the method further includes: When receiving a failure message returned by any NRF, sending the service request message to all NRFs in a group of NRFs; When the first alarm information or the fourth alarm information returned by any NRF is received, the service request message is sent to all NRFs in a group of NRFs; wherein, the first alarm information is sent by the NRF when it does not receive the service request message forwarded by other NRFs in the group within the set time period of the first timer, and the fourth alarm information is sent by the NRF when the message contents in the first message and the second message are inconsistent.

10. A data synchronization device, characterized in that: Applied to the first NRF, the device comprises: A data synchronization module, configured to start a first timer when receiving a service request message sent by the NF, store the service request message sent by the NF as a first message, and forward the service request message to the second NRF; when receiving a service request message forwarded by the second NRF within a set time period of the first timer, store the service request message sent by the second NRF as a second message; A data comparison module, configured to compare the first message and the second message; wherein the service request message forwarded by the second NRF to the first NRF is sent by the NF; The message sending module is used to send a success response message to the NF when the first message and the second message are consistent.

11. A data synchronization device, characterized in that: Applied to NF, the device comprises: A service request message sending module is used to send a service request message to all NRFs in a group of NRFs at the same time, so that any NRF in the same NRF group forwards the service request message to all other NRFs in the same NRF group after receiving the service request message, and the NRF compares the service request message sent by the NF with the service request message sent by other NRFs; The success response message receiving module is used to receive the success response message returned by the NRF after comparing the service request message sent by the NF with the service request message sent by other NRFs.

12. A data synchronization device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the data synchronization method as claimed in any one of claims 1 to 9 when executing the computer program.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the data synchronization method according to any one of claims 1 to 9.

14. A computer program product, characterized in that It comprises computer instructions, which, when executed by a processor, implement the data synchronization method as claimed in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Session routing information verifying method and device

    CN105530235A

  • Method and device for synchronizing data between service instances

    CN113691599A

  • Service processing method and device and storage medium

    CN114095987A

  • Message service disaster recovery method and device, equipment and storage medium

    CN116939675A

  • Disaster recovery system control method, disaster recovery system, electronic device and readable storage medium

    CN117294723A