Data synchronization method, apparatus, device, storage medium, and product
By comparing data within the NRF group and adopting standardized interfaces, the problem of insufficient real-time data synchronization between NRFs is solved, achieving data consistency and service reliability between NRFs from different vendors, and supporting load sharing and disaster recovery backup.
Patent Information
- Application Number
- CN202410814523.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-06-24
AI Technical Summary
In existing technologies, data synchronization between NRFs lacks real-time performance, cannot guarantee data consistency, and cannot achieve pairing between NRFs from different vendors, which affects the accuracy and reliability of business service discovery.
The NF sends registration/update messages to all NRFs within the same group and performs data comparison within the group to ensure data consistency. A standardized interface is used to achieve data synchronization between NRFs from different vendors.
It enables real-time data synchronization between NRFs, improves the accuracy and reliability of service discovery, and supports load sharing and disaster recovery backup between NRFs from different vendors.
Smart Images

Figure CN118827698B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communications, and more particularly to a data synchronization method, apparatus, device, storage medium, and product. Background Technology
[0002] An NRF (Network Repository Function) is a network function that provides registration and discovery capabilities for NFs (Network Functions). Paired NRFs are configured with one primary and one backup, both serving NFs in the same area, such as... Figure 1 As shown, in existing technologies, an NF only registers / updates with the primary NRF. After receiving the registration / update message, the primary NRF synchronizes it with the paired NRF to ensure data consistency between them. When an NF service user performs service discovery with an NRF, it prioritizes the primary NRF. If the primary NRF is unreachable, it then performs service discovery with the backup NRF. However, currently, paired NRFs rely on data synchronization to ensure data consistency. Since the NF only registers / updates with one primary NRF, there is a certain delay when the primary NRF synchronizes data with the backup NRF, making it impossible to guarantee the real-time nature of data synchronization between the two NRFs. Furthermore, when the link between paired NRFs is interrupted, data synchronization between NRFs cannot be completed. Data synchronization between paired NRFs is generally a vendor-specific interface, requiring paired NRFs to be from the same vendor, making pairing between NRFs from different vendors impossible. Summary of the Invention
[0003] The purpose of this invention is to provide a data synchronization method, apparatus, device, storage medium, and product. By sending registration / update messages to all NRFs within the same group through NF, multiple registrations of NFs achieve data consistency among all NRFs in the same group, and the real-time performance of data synchronization is guaranteed.
[0004] To achieve the above objectives, embodiments of the present invention provide a method for data synchronization among all NRFs within the same group, applied to a first NRF, the method comprising:
[0005] Upon receiving a service request message from an NF, a first timer is started, the service request message sent by the NF is stored as a first message, and the service request message is forwarded to a second NRF;
[0006] When a service request message forwarded by the second NRF is received within the set time period of the first timer, the service request message sent by the second NRF is stored as the second message, and the first message and the second message are compared; 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 NF.
[0008] As a refinement of the above scheme, the business request message includes message content and a timestamp; wherein, the message content is a registration request or an update request.
[0009] As an improvement to the above scheme, the NF simultaneously sends the service request message to a group of NRFs; wherein each group of NRFs includes at least two NRFs.
[0010] As a refinement of the above scheme, after forwarding the service request to the second NRF, the method further includes:
[0011] If 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.
[0012] As a refinement of the above scheme, the method further includes:
[0013] When a service request message forwarded by the second NRF is received, but no service request message sent by the NF is received, a second timer is started;
[0014] If no service request message is received from NF within the set time period of the second timer, a second alarm message is generated.
[0015] As a refinement of the above scheme, after starting the second timer, the method further includes:
[0016] When a service request message sent by NF is received within the set time period of 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 NF.
[0018] As a refinement of the above scheme, the method further includes:
[0019] When the message content in the first message and the second message are the same, but the timestamps are different, a success response message is sent to NF and a third alarm message is generated;
[0020] When the message content in the first message and the second message is inconsistent, a failure message is sent to the NF and a fourth alarm message is generated so that the NF can resend the service request message.
[0021] To achieve the above objectives, embodiments of the present invention also provide a data synchronization method applied to NF, the method comprising:
[0022] Simultaneously, a service request message is sent to all NRFs within a group of NRFs, so that any NRF within the same NRF group, upon receiving the service request message, forwards it to all other NRFs within the same NRF group. The NRFs then compare the service request message sent by the NF with the service request messages sent by the other NRFs.
[0023] Receive a 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.
[0024] As a refinement of the above scheme, after simultaneously sending service request messages to a group of NRFs, the method further includes:
[0025] Upon receiving a failure message from any NRF, the service request message is sent to all NRFs within the group of NRFs;
[0026] Upon receiving a first alarm message or a fourth alarm message from any NRF, the service request message is sent to all NRFs within the group; wherein, the first alarm message is sent by the NRF when it has not received a service request message forwarded by other NRFs within the set time period of the first timer, and the fourth alarm message is sent by the NRF when the message content in the first message and the second message is inconsistent.
[0027] To achieve the above objectives, embodiments of the present invention also provide a data synchronization device applied to a first NRF, the device comprising:
[0028] The data synchronization module is used to start a first timer when it receives a service request message sent by an NF, store the service request message sent by the NF as a first message, and forward the service request message to a second NRF; when it receives a service request message forwarded by the second NRF within a set time period of the first timer, it stores the service request message sent by the second NRF as a second message.
[0029] A data comparison module is used 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 NF when the first message and the second message are consistent.
[0031] To achieve the above objectives, embodiments of the present invention also provide a data synchronization device applied to NF, the device comprising:
[0032] The service request message sending module is used to simultaneously send service request messages to all NRFs within a group of NRFs, so that any NRF in the same NRF group, after receiving the service request message, forwards the service request message to all other NRFs in the same NRF group. The NRFs compare the service request message sent by the NF with the service request messages sent by other NRFs.
[0033] The successful response message receiving module is used to receive the successful 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.
[0034] To achieve the above objectives, embodiments of the present invention also provide a data synchronization device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the data synchronization method as described in any of the above embodiments.
[0035] To achieve the above objectives, embodiments of the present invention also provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the data synchronization method as described in any of the above embodiments.
[0036] To achieve the above objectives, embodiments of the present invention also provide 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 to existing technologies, the data synchronization method, apparatus, device, storage medium, and product disclosed in this invention, when a Network Function (NF) sends a service request message, simultaneously sends this service request message to all NRFs within the same group of Network Repository Functions (NRFs). This allows any NRF within the same NRF group to forward the service request message to all other NRFs within the same group upon receiving it. Thus, each NRF receives both the service request message from its own NF and those from all other NRFs within the same NRF group. The received service request messages are then compared for consistency. If they match, data synchronization is indicated; otherwise, data synchronization between NRFs is indicated, and a success or failure message is returned to the NF. This ensures data synchronization among NRFs within the same NRF group. In this embodiment, data consistency among NRFs within the same NRF group is achieved by having an NRF send registration and update messages to all NRFs within the same NRF group, ensuring real-time data synchronization. Attached Figure Description
[0038] Figure 1This is a schematic diagram of information interaction between NF and paired NRF provided by existing technology;
[0039] Figure 2 This is a flowchart of a data synchronization method provided in an embodiment of the present invention;
[0040] Figure 3 This is an NRF network architecture diagram provided in an embodiment of the present invention;
[0041] Figure 4 This is a schematic diagram of the first type of information interaction between NF and paired NRF provided in an embodiment of the present invention;
[0042] Figure 5 This is a schematic diagram of the second type of information interaction between NF and paired NRF provided in an embodiment of the present invention;
[0043] Figure 6 This is a schematic diagram of the third type of information interaction between NF and paired NRF provided in the embodiments of the present invention;
[0044] Figure 7 This is a flowchart illustrating the processing of data asynchrony between paired NRFs provided in an embodiment of the present invention.
[0045] Figure 8 This is a schematic diagram of the fourth type of information interaction between NF and paired NRF provided in the embodiments of the present invention;
[0046] Figure 9 This is a structural block diagram of a data synchronization device provided in an embodiment of the present invention;
[0047] Figure 10 This is a structural block diagram of another data synchronization device provided in an embodiment of the present invention;
[0048] Figure 11 This is a structural block diagram of a data synchronization device provided in an embodiment of the present invention. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] In existing technologies, when NRFs from other regions perform service discovery with NRFs in the local region, one NRF is used as the primary NRF and the other as a backup NRF for data configuration. This results in complex data link configuration between paired NRFs. Furthermore, when a link failover occurs between some NFs and paired NRFs, the link between some NFs and the primary NRF is interrupted, and the backup NRF becomes the primary NRF. Conversely, some network elements continue to use the primary NRF as the primary NRF. In this scenario, it cannot be guaranteed that all NF registrations / updates occur on the primary NRF, leading to inconsistencies in primary and backup operation methods, which may affect the accuracy of service discovery. Overall, existing NRF data synchronization methods, where NFs only register / update with one primary NRF and NRFs synchronize data, require a primary / backup approach between paired NRFs to ensure service accuracy. This approach fails to achieve complete load sharing between paired NRFs, and link failover can also trigger partial failover of the primary / backup operation method.
[0051] To overcome the above-mentioned defects, this invention provides a data synchronization method. An NF simultaneously sends NF registration / update messages to a group of NRFs. The NRFs within the group forward the messages to other NRFs within the group and perform data comparison to ensure data consistency. When an NF service user performs service discovery to an NRF, it can randomly perform service discovery to one of the NRFs in the group, achieving complete load sharing of services among the NRFs. Simultaneously, the synchronization comparison interface between NRFs also adopts a standardized interface, enabling the implementation of a dual-plane, heterogeneous vendor network among a group of NRFs.
[0052] See Figure 2 , Figure 2 This is a flowchart of a data synchronization method provided in an embodiment of the present invention. It is worth noting that in the embodiments of the present invention... Figure 2 This explanation uses the example of "two NRFs within the same NRF group" as an example. In other practical embodiments, the number of NRFs within a group can be greater than two. The data synchronization method described in this embodiment is applied to the first NRF, and the method includes:
[0053] S11. When a service request message is received from an NF, a first timer is started, the service request message sent by the NF is stored as a first message, and the service request message is forwarded to a second NRF;
[0054] S12. When a service request message forwarded by the second NRF is received within a set time period of the first timer, the service request message sent by the second NRF is stored as a second message, and the first message and the second message are compared; 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 This is a network architecture diagram of the Network Repository Function (NRF) provided in an embodiment of the present invention. For region A and region B, there are pairs of Network Repository Functions (NRFs), each managing the Network Functions (NFs) in the same region. The Network Functions (NFs) simultaneously send the service request message to a pair of NRFs; wherein each pair of NRFs includes at least two NRFs. , like Figure 3 As shown, the Network Function (NF) sends a service request message to two Network Repository Functions (NRFs). The NF simultaneously sends NF service request messages to a group of NRFs via the service interface Nnrf. These service request messages include initial registration messages and subsequent update messages. Upon receiving the NF service request message, each NRF within the group forwards the message to all other NRFs within the group and performs data comparison, thereby ensuring data consistency across all NRFs within the group.
[0058] For example, see Figure 4 , Figure 4 This is a schematic diagram of the first type of 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 examples, the above steps S11 to S13 are explained, including the following steps:
[0059] Steps 1a / 1b: The NF simultaneously sends service request messages to NRF1-1 / NRF1-2. These service request messages may carry timestamps, which are used for deduplication and timing checks. For example, the service request message in step 1a carries a timestamp Ta = t1, and the service request message in step 1b carries a timestamp Tb = t1. The timestamps Ta and Tb have the same value, which is the time t1 at which the NF decides to send the message to NRF1-1 and NRF1-2.
[0060] Step 2a / 2b: NRF1-1 and NRF1-2 respectively receive the service request message sent by the NF, store the service request message as the first message, and start the first timer respectively to wait for the paired NRF to forward the NF service request message (i.e., the second message). The time period set for the first timer is T1.
[0061] Steps 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, which may also carry a timestamp. NRF1-1 stores the service request message forwarded by NRF1-2 as a second message, and NRF1-2 also stores the service request message forwarded by NRF1-1 as a second message. Therefore, all NRFs within a group store the service request message sent by the NF as a first message, and store the service request messages forwarded by other NRFs in the group as second messages. The timestamps Ta and Tb carried in the first and second messages have the same values as the timestamps of the messages received in 1a / 1b, which are both t1.
[0062] Steps 4a / 4b: Within the set time period T1, NRF1-1 compares the first message received from NF with the second message. The comparison includes the message content and the timestamp. If the message content and timestamp are found to be 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 found to be consistent, the registration / update message from NF to NRF1-2 takes effect. This step ensures that the data update from NF takes effect simultaneously on the paired NRF.
[0063] Steps 5a / 5b: NRF1-1 / NRF1-2 reply with a success response message to NF respectively, informing NF that data synchronization is complete and accurate.
[0064] It is worth noting that, Figure 4 The processing sequence of the NRF 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 sequential in terms of process time, but this does not affect the processing result.
[0065] In this embodiment of the invention, data consistency among a group of NRFs is achieved through multiple registrations from the NF to the NRF, ensuring real-time data synchronization. Furthermore, the service request messages sent by the NF to the NRF can carry timestamps, facilitating deduplication and time-sequence determination by the NRF. Additionally, when an NRF within the group compares a service request message received from an NF with a service request message from another NRF, it will send a success response message to the NF, informing the NF that the multiple registrations have been successful and eliminating the need to send further service request messages.
[0066] Specifically, after forwarding the service request message to the second NRF, the method further includes:
[0067] S14. If 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 This is a schematic diagram of the second type of information interaction between NF and paired NRF provided in an embodiment of the present invention, in comparison. Figure 4 In a normal scenario, this NRF only receives NF registration / update messages and does not receive paired NRF forwarding messages. The following explanation uses NRF1-1 as an example to illustrate step S14. Similar processing is applied to NRF1-2 in similar scenarios, including the following steps:
[0069] Steps 1a / 1b, 2a / 2b, 3a / 3b: Same Figure 4 Normal registration process.
[0070] Step 4a: If NRF1-1 still does not receive the service request message forwarded by NRF1-2 within the first timer period T1, it generates a first alarm message indicating that the service request message forwarded by NRF1-2 has not been received. Furthermore, 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 The normal registration process is followed, and the first alarm information is included in the message sent back to the NF. Subsequently, when the NF receives the first alarm information sent by NRF1-1, it can again execute the registration / update process to each NRF within the group of NRFs it belongs to.
[0072] In this embodiment of the invention, during NRF data synchronization within a group, if any NRF does not receive a service request message forwarded by another NRF, an alarm message indicating that no service request message has been received from another NRF is generated. This alarm message can be sent to the NF to inform the NF of the current data synchronization status. 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 a service request message forwarded by the second NRF is received, but no service request message sent by the NF is received, start the second timer;
[0075] S22. If no service request message is received from NF within the set time period of the second timer, generate a second alarm message;
[0076] S23. When a service request message sent by NF is received within the set time period of 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 This is a schematic diagram of the third type of information interaction between NF and paired NRF provided in the embodiments of the present invention, in comparison. Figure 4 In a normal scenario, NRF first receives other NRFs ( Figure 4 The paired NRF (Network RF) forwards the service request message and then receives the service request message sent by the NF (Network NF). The following explanation uses NRF1-1 as an example to illustrate steps S21-S24. Paired NRF1-2 follows a similar process in similar scenarios, including the following steps:
[0079] Step 1a: NF sends a service request message. (Same as above) Figure 4 Normal procedure.
[0080] Steps 1b / 2b / 3b: Same 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. Before receiving the service request message from NF, it starts the second timer. The set time period for the second timer is T2. At this time, the following two situations exist:
[0082] Scenario 1: If a service request message is received from NF before T2 times out, this service request message is stored as the first message. The first message is compared with the second message. If they match, the normal process 5a is executed, and a registration / update success message is sent back to NF.
[0083] Scenario 2: If the service request message from the NF is not received before T2 times out, a second alarm message indicating that the service request message from the NF has not been received is generated. The NRF can also send the second alarm message to the paired NRF1-2 to inform NRF1-2 of the data synchronization status. Meanwhile, as shown in Figure 3a, since the service request message from the NF was received before T2 times out, NRF1-1 can forward the service request message to NRF1-2.
[0084] In this embodiment of the invention, during NRF data synchronization within a group, if any NRF does not receive a service request message from an NF within a set time period of the second timer, an alarm message indicating that a service request message has not been received from an NF is generated.
[0085] Specifically, the method further includes:
[0086] S15. When the message content in the first message and the second message are the same, but the timestamps are different, send a success response message to NF and generate a third alarm message;
[0087] S16. When the message content in the first message and the second message is inconsistent, a failure message is sent to the NF and a fourth alarm message is generated so that the NF can resend the service request message.
[0088] The failure messages include registration failure messages and update failure messages; when the message content in the business request message is a registration request, the failure message is a registration failure message; when the message content in the business 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 flowchart of the processing when data between paired NRFs is out of sync, provided by an embodiment of the present invention. When an NF initiates multiple registrations / updates, in steps 4a and 4b above, 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 flow has the following three situations and generates an alarm.
[0090] Scenario 1: After comparing the first and second messages, NRF1-1 finds that the message content is the same but the timestamps are different. NRF1-1 then returns a success response to the paired NF and generates a third alarm message indicating that the content is the same but the registration time is different. NRF1-1 can then send this third alarm message to the NF and / or NRF1-2.
[0091] Scenario 2: After comparing the first and second messages, NRF1-1 finds that the message content is inconsistent but the timestamps are the same. Therefore, NRF1-1 sends a failure message (failure reason value 404) to NF and generates a fourth alarm message indicating inconsistent message content but consistent registration time. 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 the service request message. This process can be referenced. Figure 8 At this point, after comparing the first and second messages, NRF1-1 finds that the message content is inconsistent and executes step 5a, sending a failure message to NF. After receiving the failure message, NF re-initiates the service request message to NRF1-1 and NRF1-2 in the group. The processes of 6a and 6b can be referred to 1a and 1b.
[0092] Scenario 3: After comparing the first and second messages, NRF1-1 finds that the message content and timestamp are inconsistent. Therefore, NRF1-1 sends a failure message (failure reason value 404) to the NF and generates a fourth alarm message indicating that the message content and registration time are inconsistent. NRF1-1 can send the fourth alarm message to the NF and / or NRF1-2. After receiving the failure message, the NF initiates a re-registration / update request to all NRFs in the group, i.e., re-initiates the service request message. This process can also be referenced. Figure 8 .
[0093] In this embodiment of the invention, when the NRF within the group compares the service request message it receives from the NF with the service request message sent by another NRF within the group and finds them inconsistent, it will generate corresponding alarm information as a record and send corresponding failure messages to the NF so that the NF can re-initiate the service request as soon as possible.
[0094] Furthermore, to achieve the above objectives, embodiments of the present invention also provide a data synchronization method applied to NF, the method comprising:
[0095] Simultaneously, a service request message is sent to all NRFs within a group of NRFs, so that any NRF within the same NRF group, upon receiving the service request message, forwards it to all other NRFs within the same NRF group. The NRFs then compare the service request message sent by the NF with the service request messages sent by the other NRFs.
[0096] Receive a 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.
[0097] Specifically, after simultaneously sending service request messages to all NRFs within a group of NRFs, the method further includes:
[0098] Upon receiving a failure message from any NRF, the service request message is sent to all NRFs within the group of NRFs.
[0099] Upon receiving a first alarm message or a fourth alarm message from any NRF, the service request message is sent to all NRFs within the group; wherein, the first alarm message is sent by the NRF when it has not received a service request message forwarded by other NRFs within the set time period of the first timer, and the fourth alarm message is sent by the NRF when the message content in the first message and the second message is inconsistent.
[0100] It is worth noting that the specific working process of each step in the data synchronization method applied to NF can be referred to the specific working process of NF described in the above embodiments, and will not be repeated here.
[0101] Compared to existing technologies, the data synchronization method disclosed in this invention involves a Network Function (NF) simultaneously sending a service request message to all NRFs within the same group of Network Repository Functions (NRFs) when sending the message. This ensures that any NRF within the same NRF group, upon receiving the service request message, forwards it to all other NRFs within the same group. Each NRF receives both the service request message from its own NF and those from all other NRFs within the same group. The received service request messages are then compared; consistency indicates data synchronization, while discrepancies indicate data asynchrony between NRFs. A success or failure message is then returned to the NF, ensuring data synchronization among NRFs within the same group. In this embodiment, data consistency is achieved by sending registration and update messages from an NRF to all NRFs within the same group, guaranteeing real-time data synchronization.
[0102] Furthermore, based on the real-time data synchronization between NRFs, service discovery can be performed using a dual-plane and load-sharing mechanism, significantly improving the security and reliability of NRFs compared to the primary / backup approach. Through multiple registrations initiated by NFs and message forwarding between NRFs, the data synchronization interface messages are relatively simple and can be aligned based on standard service interfaces. This facilitates NRFs from different vendors to reside within the same NRF group, enabling load balancing and disaster recovery backup among NRFs within the same group. Further, the operating mode of NRFs within the group can be consistent with the existing STP (Signaling Transfer Point) / DRA (Digital Routing Agent) operating mode, employing load balancing. The introduction of SCP (Service Communication Proxy) facilitates the convergence of 2G / 4G / 5G signaling networks.
[0103] See Figure 9 , Figure 9 This 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 disposed in a first NRF and includes:
[0104] The data synchronization module 11 is used to start a first timer when it receives a service request message sent by an NF, and to store the service request message sent by the NF as a first message and forward the service request message to a second NRF; when it receives a service request message forwarded by the second NRF within a set time period of the first timer, it stores the service request message sent by the second NRF as a second message.
[0105] The data comparison module 12 is used 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 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 simultaneously sends the service request message to a group of NRFs; wherein each group of NRFs includes at least two NRFs.
[0109] Specifically, the data synchronization device 100 further includes:
[0110] The alarm information generation module is used to generate a first alarm information when, after forwarding the service request message to the second NRF, no service request message forwarded by the second NRF is received within a set time period of the first timer.
[0111] Specifically, the data synchronization module 11 is further configured to start a second timer when it receives a service request message forwarded by the second NRF but does not receive a service request message sent by the NF; then, the alarm information generation module is further configured to generate a second alarm information when it still does not receive a service request message sent by the NF within the set time period of the second timer.
[0112] Specifically, the data synchronization module 11 is further configured to store the service request message as a first message when it receives the service request message sent by the NF within the set time period of the second timer; the data comparison module 12 is further configured 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 NF when the message content in the first message and the second message are the same, but the timestamps are different; the alarm information generation module is used to generate a third alarm information when the message content in the first message and the second message are the same, but the timestamps are different.
[0114] Specifically, the message sending module 13 is used to send a failure message to NF when the message content in the first message and the second message is inconsistent; the alarm information generation module is used to generate a fourth alarm information when the message content in the first message and the second message is inconsistent.
[0115] It is worth noting that the working process of each module in the data synchronization device 100 described in the embodiments of the present invention can refer to the working process of the data synchronization method described in the above embodiments, and will not be repeated here.
[0116] See Figure 10 Figure 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 located in NF and includes:
[0117] The service request message sending module 21 is used to simultaneously send a service request message to all NRFs in a group of NRFs, so that any NRF in the same NRF group, after receiving the service request message, forwards the service request message to all other NRFs in the same NRF group, and the NRFs compare the service request message sent by the NF with the service request messages sent by other NRFs.
[0118] Successful response message receiving module 22 is used to receive a successful response message returned by NRF after comparing the service request message sent by NF with the service request messages sent by other NRFs.
[0119] Specifically, the data synchronization device 200 further includes:
[0120] The failure message receiving module is used to receive failure messages 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 within a group of NRFs when it receives a failure message returned by any NRF.
[0122] Specifically, the data synchronization device 200 further includes:
[0123] The alarm information receiving module is used to receive the first or fourth alarm information returned by any NRF;
[0124] 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 it receives a first alarm message or a fourth alarm message returned by any NRF; wherein, the first alarm message is sent by the NRF when it has not received a service request message forwarded by other NRFs in the group within a set time period of the first timer, and the fourth alarm message is sent by the NRF when the message content in the first message and the second message is inconsistent.
[0125] It is worth noting that the working process of each module in the data synchronization device 200 described in the embodiments of the present invention can refer to the working process of NF in the data synchronization method described in the above embodiments, and will not be repeated here.
[0126] See Figure 11 , Figure 11 This 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, it implements the steps in the above-described data synchronization method embodiments, such as steps S11-S16 and S21-S24.
[0127] For example, 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 complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which 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 understand 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. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the data synchronization device 300 may also include input / output devices, network access devices, buses, etc.
[0129] The processor 31 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 31 is the control center of the data synchronization device 300, connecting various parts of the data synchronization device 200 via various interfaces and lines.
[0130] The memory 32 can be used to store the computer programs and / or modules. The processor 31 implements various functions of the data synchronization device 300 by running or executing the computer programs and / or modules stored in the memory 32 and calling the data stored in the memory 32. The memory 32 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 32 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart memory card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0131] If the modules / units integrated in the data synchronization device 300 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 31, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0132] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and 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 includes: Upon receiving a service request message from an NF, a first timer is started, and the service request message sent by the NF is stored as a first message. The service request message is then forwarded to a second NRF. The NF simultaneously sends the service request message to a group of NRFs, and each group of NRFs includes at least two NRFs. When a service request message forwarded by the second NRF is received within the set time period of the first timer, the service request message sent by the second NRF is stored as the second message, and the first message and the second message are compared; 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 NF.
2. The data synchronization method as described in 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 as described in claim 1, characterized in that, After forwarding the service request message to the second NRF, the method further includes: If 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.
4. The data synchronization method as described in claim 1, characterized in that, The method further includes: When a service request message forwarded by the second NRF is received, but no service request message sent by the NF is received, a second timer is started; If no service request message is received from NF within the set time period of the second timer, a second alarm message is generated.
5. The data synchronization method as described in claim 4, characterized in that, After starting the second timer, the method further includes: When a service request message sent by NF is received within the set time period of 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 NF.
6. The data synchronization method as described in claim 2, characterized in that, The method further includes: When the message content in the first message and the second message are the same, but the timestamps are different, a success response message is sent to NF and a third alarm message is generated; When the message content in the first message and the second message is inconsistent, a failure message is sent to the NF and a fourth alarm message is generated so that the NF can resend the service request message.
7. A data synchronization method, characterized in that, Applied to NF, the method includes: Simultaneously, a service request message is sent to all NRFs within a group of NRFs, so that any NRF within the same NRF group, upon receiving the service request message, forwards it to all other NRFs within the same NRF group. The NRFs compare the service request message sent by the NRF with the service request messages sent by the other NRFs; wherein each group of NRFs includes at least two NRFs. Receive a 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.
8. The data synchronization method as described in claim 7, characterized in that, After simultaneously sending service request messages to a group of NRFs, the method further includes: Upon receiving a failure message from any NRF, the service request message is sent to all NRFs within the group of NRFs; Upon receiving a first alarm message or a fourth alarm message from any NRF, the service request message is sent to all NRFs within the group; wherein, the first alarm message is sent by the NRF when it has not received a service request message forwarded by other NRFs within the group within a set time period of the first timer, and the fourth alarm message is sent by the NRF when the message content in the first message and the second message is inconsistent.
9. A data synchronization device, characterized in that, Applied to a first NRF, the device includes: The data synchronization module is used to start a first timer when it receives a service request message sent by an NF, store the service request message sent by the NF as a first message, and forward the service request message to a second NRF; when it receives a service request message forwarded by the second NRF within a set time period of the first timer, it stores the service request message sent by the second NRF as a second message; wherein, the NF simultaneously sends the service request message to a group of NRFs, and each group of NRFs includes at least two NRFs; A data comparison module is used 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 NF when the first message and the second message are consistent.
10. A data synchronization device, characterized in that, Applied to NF, the device includes: The service request message sending module is used to simultaneously send service request messages to all NRFs within a group of NRFs, so that any NRF within the same NRF group, upon receiving the service request message, forwards the service request message to all other NRFs within the same NRF group. The NRFs compare the service request message sent by the NRF with the service request messages sent by the other NRFs; wherein each group of NRFs includes at least two NRFs. The successful response message receiving module is used to receive the successful 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.
11. A data synchronization device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the data synchronization method as described in any one of claims 1 to 8.
12. 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, it controls the device on which the computer-readable storage medium is located to perform the data synchronization method as described in any one of claims 1 to 8.
13. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the data synchronization method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Session routing information verifying method and device
CN105530235A