CN111770096B - Method and equipment for recovering registration state - Google Patents

Method and equipment for recovering registration state Download PDF

Info

Publication number
CN111770096B
CN111770096B CN202010605915.0A CN202010605915A CN111770096B CN 111770096 B CN111770096 B CN 111770096B CN 202010605915 A CN202010605915 A CN 202010605915A CN 111770096 B CN111770096 B CN 111770096B
Authority
CN
China
Prior art keywords
registration
sip
memory
account
period
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010605915.0A
Other languages
Chinese (zh)
Other versions
CN111770096A (en
Inventor
齐红满
孙楠
张军呢
边超磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Baopu Communication Technology Co ltd
Raisecom Technology Co Ltd
Original Assignee
Xi'an Baopu Communication Technology Co ltd
Raisecom Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Baopu Communication Technology Co ltd, Raisecom Technology Co Ltd filed Critical Xi'an Baopu Communication Technology Co ltd
Priority to CN202010605915.0A priority Critical patent/CN111770096B/en
Publication of CN111770096A publication Critical patent/CN111770096A/en
Application granted granted Critical
Publication of CN111770096B publication Critical patent/CN111770096B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1073Registration or de-registration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1101Session protocols
    • H04L65/1104Session initiation protocol [SIP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a method and equipment for recovering a registration state, which are applied to SIP terminal equipment for providing interactive services for a Session Initiation Protocol (SIP) account, and the method comprises the following steps: after the equipment is determined to be restarted, reading the registration information of the SIP account in the permanent storage equipment to a memory, wherein the registration information of the SIP account in the memory is periodically stored in the permanent storage equipment; comparing the current time point with the re-registration time point corresponding to the SIP account; and sending initial registration request information to the SIP server for the SIP account which reaches or exceeds the re-registration time point at the current time point, and sending re-registration request information to the SIP server for the SIP account which does not exceed the re-registration time point when the corresponding re-registration time point is reached. The scheme provided by the invention solves the problems of overlarge information interaction amount between the SIP terminal equipment and the SIP server and overlong terminal equipment service unavailable time existing in the conventional registration state recovery method.

Description

Method and equipment for recovering registration state
Technical Field
The present invention relates to network function virtualization technologies, and in particular, to a method and an apparatus for recovering a registration status.
Background
IMS (IP Multimedia Subsystem) is a new form of Multimedia service, and can meet the demand of the existing terminal customers for more novel and diversified Multimedia services.
The IMS can not only implement the initial VoIP (voice over IP) service, but also more importantly, the IMS can manage network resources, user resources, and application resources more efficiently, improve the intelligence of the network, and enable users to cross various networks and use various terminals, and experience converged communication. The IMS is used as a communication architecture, a brand new telecommunication business mode is created, and the development space of the whole information industry is expanded.
In the IMS service system, an SIP (Session Initiation Protocol) is used to perform end-to-end call control, and after an SIP terminal is normally registered in an SIP server, the SIP server can receive a call request from the SIP terminal.
The current registration mechanism for SIP is: the SIP terminal needs to register with the SIP server before executing the related service, after the registration is successful, the SIP server carries the re-registration duration in a response message returned to the SIP terminal, the SIP terminal needs to initiate a re-registration request within the re-registration duration, otherwise, the SIP server considers that the SIP terminal is offline. The re-registration duration may be referred to as a registration validity period or a registration lifetime, and the SIP terminal will re-register on the SIP server periodically according to the registration validity period or the registration lifetime, so as to ensure an online state, thereby providing a service for the user account in the corresponding switching network.
In the running process of the SIP terminal equipment, equipment restarting conditions such as upgrading, power failure and the like exist, and after the existing SIP terminal equipment is restarted, an initial registration message is sent to an SIP server so as to recover the registration state before restarting. However, after the SIP terminal device is restarted, the following problems exist when the initial registration is initiated:
1) an initial registration process needs to be initiated for the SIP accounts of all users in the internal switching network, and under the condition that the SIP terminal device corresponds to a large number of SIP accounts, a large amount of message interaction between the SIP terminal device and the SIP server can be caused;
2) because the existing SIP server has a registration flow control mechanism, the same IP address can only process a certain number of registration messages (the current network is generally 20/s), and when the SIP terminal device corresponds to a large number of SIP accounts, the initial registration process takes a long time, and the service of the SIP account corresponding to the user is interrupted in this time period.
Therefore, the existing method for recovering the registration state after the SIP terminal device is restarted has the problems of overlarge information interaction amount between the SIP terminal device and the SIP server and overlong service unavailability time of the terminal device.
Disclosure of Invention
The invention provides a method and equipment for recovering a registration state, which are used for solving the problems of overlarge information interaction quantity between SIP terminal equipment and an SIP server and overlong time for terminal equipment service unavailability in the conventional method for recovering the registration state.
According to a first aspect of the embodiments of the present invention, a method for recovering a registration state is provided, which is applied to an SIP terminal device that provides an interactive service for a session initiation protocol SIP account, and the method includes:
after the equipment is determined to be restarted, reading the registration information of the SIP account in the permanent storage equipment to a memory, wherein the registration information of the SIP account in the memory is periodically stored in the permanent storage equipment;
comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information;
and sending initial registration request information to the SIP server for the SIP account which reaches or exceeds the re-registration time point at the current time point, and sending re-registration request information to the SIP server for the SIP account which does not exceed the re-registration time point at the current time point.
Optionally, the periodically storing the registration information of the SIP account in the memory into the permanent storage device includes:
according to a preset fixed persistence period, storing the registration information of all SIP accounts in the memory into a permanent storage device; or
Determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory, and storing the registration information of all SIP accounts in the memory into a permanent storage device according to the dynamic persistence period; or
And determining the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges, and storing the registration information of each SIP account in the memory into a permanent storage device according to the corresponding persistence period.
Optionally, the determining a dynamic persistence period according to the re-registration period corresponding to all SIP accounts in the memory includes:
and determining the minimum value in the re-registration period corresponding to all SIP accounts in the memory, and determining a set period smaller than the minimum value as a dynamic persistence period.
Optionally, the determining a dynamic persistence period according to the re-registration period corresponding to all SIP accounts in the memory includes:
and when determining that the re-registration period corresponding to any SIP account in the memory changes, determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory.
Optionally, the determining the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges includes:
if the re-registration period corresponding to the SIP account is not less than the preset restarting duration of the SIP terminal equipment, adopting a first persistence period which is less than or equal to the re-registration period corresponding to the SIP account;
otherwise, adopting a second persistence period which is greater than a preset duration threshold, wherein the second persistence period is greater than the first persistence period.
Optionally, the adopting a first persistence period that is less than or equal to a re-registration period corresponding to the SIP account includes:
comparing the re-registration period corresponding to the SIP account with a preset time threshold, wherein the preset time threshold is a threshold not smaller than the maximum value of the historical persistence periods of different SIP accounts;
if the re-registration period is not larger than the preset duration threshold, adopting a persistence period smaller than the re-registration period;
otherwise, determining the average value of the historical persistence periods of different SIP accounts as the persistence period.
Optionally, the method further comprises:
storing the registration information of the SIP account number which is successfully initially registered into a memory;
replacing the registration information of the SIP account in the memory by using the registration information of the SIP account which is successfully re-registered;
and deleting the registration information of the SIP account which fails to be initially registered, fails to be re-registered or is cancelled in the memory.
Optionally, the method further comprises:
and deleting the registration information of the SIP account in the memory for the SIP account which reaches or exceeds the re-registration time point at the current time point.
Optionally, when the registration information of the SIP account in the memory is stored in the permanent storage device, the method further includes:
and deleting the registration information of the SIP account in the memory stored in the permanent storage equipment.
Optionally, the comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information includes:
determining the latest registration information of the SIP account in the memory, and storing the latest registration information into a persistent time point in a permanent storage device;
if the current time point exceeds the persistence time point and the time difference is smaller than a preset threshold value, comparing the current time point with a re-registration time point corresponding to the SIP account in the registration information;
otherwise, deleting the registration information of the SIP account in the memory, and sending the request information of initial registration to the SIP server for the SIP account.
According to a second aspect of the embodiments of the present invention, there is provided a registration state recovery apparatus, including:
the data access module is used for reading the registration information of the SIP account in the permanent storage device to the memory after the device is determined to be restarted, wherein the registration information of the SIP account in the memory is periodically stored in the permanent storage device;
the time comparison module is used for comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information;
and the registration recovery module is used for sending initial registration request information to the SIP server for the SIP accounts which reach or exceed the re-registration time point at the current time point, and sending re-registration request information to the SIP server for the SIP accounts which do not exceed the re-registration time point at the current time point.
Optionally, the step of periodically storing, by the data access module, the registration information of the SIP account in the memory to the permanent storage device includes:
according to a preset fixed persistence period, storing the registration information of all SIP accounts in the memory into a permanent storage device; or
Determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory, and storing the registration information of all SIP accounts in the memory into a permanent storage device according to the dynamic persistence period; or
And determining the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges, and storing the registration information of each SIP account in the memory into a permanent storage device according to the corresponding persistence period.
Optionally, the determining, by the data access module, a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory includes:
and determining the minimum value in the re-registration period corresponding to all SIP accounts in the memory, and determining a set period smaller than the minimum value as a dynamic persistence period.
Optionally, the determining, by the data access module, a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory includes:
and when determining that the re-registration period corresponding to any SIP account in the memory changes, determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory.
Optionally, the determining, by the data access module, the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges includes:
if the re-registration period corresponding to the SIP account is not less than the preset restarting duration of the SIP terminal equipment, adopting a first persistence period which is less than or equal to the re-registration period corresponding to the SIP account;
otherwise, adopting a second persistence period which is greater than a preset duration threshold, wherein the second persistence period is greater than the first persistence period.
Optionally, the data access module adopts a first persistence period that is less than or equal to a re-registration period corresponding to the SIP account, and includes:
comparing the re-registration period corresponding to the SIP account with a preset time threshold, wherein the preset time threshold is a threshold not smaller than the maximum value of the historical persistence periods of different SIP accounts;
if the re-registration period is not larger than the preset duration threshold, adopting a persistence period smaller than the re-registration period;
otherwise, determining the average value of the historical persistence periods of different SIP accounts as the persistence period.
Optionally, the data access module is further configured to:
storing the registration information of the SIP account number which is successfully initially registered into a memory;
replacing the registration information of the SIP account in the memory by using the registration information of the SIP account which is successfully re-registered;
and deleting the registration information of the SIP account which fails to be initially registered, fails to be re-registered or is cancelled in the memory.
Optionally, the data access module is further configured to:
and deleting the registration information of the SIP account in the memory for the SIP account which reaches or exceeds the re-registration time point at the current time point.
Optionally, when the data access module stores the registration information of the SIP account in the memory into the permanent storage device, the method further includes:
and deleting the registration information of the SIP account in the memory stored in the permanent storage equipment.
Optionally, the comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information by the time comparison module includes:
determining the latest registration information of the SIP account in the memory, and storing the latest registration information into a persistent time point in a permanent storage device;
if the current time point exceeds the persistence time point and the time difference is smaller than a preset threshold value, comparing the current time point with a re-registration time point corresponding to the SIP account in the registration information;
otherwise, deleting the registration information of the SIP account in the memory, and sending the request information of initial registration to the SIP server for the SIP account.
According to a third aspect of the embodiments of the present invention, there is provided an apparatus for recovering a registration state, including: a memory and a processor; wherein:
the memory is used for storing programs;
the processor is used for executing the program in the memory and comprises the following steps:
after the equipment is determined to be restarted, reading the registration information of the SIP account in the permanent storage equipment to a memory, wherein the registration information of the SIP account in the memory is periodically stored in the permanent storage equipment;
comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information;
and sending initial registration request information to the SIP server for the SIP account which reaches or exceeds the re-registration time point at the current time point, and sending re-registration request information to the SIP server for the SIP account which does not exceed the re-registration time point at the current time point.
Optionally, the periodically storing, by the processor, the registration information of the SIP account in the memory to the permanent storage device includes:
according to a preset fixed persistence period, storing the registration information of all SIP accounts in the memory into a permanent storage device; or
Determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory, and storing the registration information of all SIP accounts in the memory into a permanent storage device according to the dynamic persistence period; or
And determining the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges, and storing the registration information of each SIP account in the memory into a permanent storage device according to the corresponding persistence period.
Optionally, the determining, by the processor, a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory includes:
and determining the minimum value in the re-registration period corresponding to all SIP accounts in the memory, and determining a set period smaller than the minimum value as a dynamic persistence period.
Optionally, the determining, by the processor, a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory includes:
and when determining that the re-registration period corresponding to any SIP account in the memory changes, determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory.
Optionally, the determining, by the processor, the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges includes:
if the re-registration period corresponding to the SIP account is not less than the preset restarting duration of the SIP terminal equipment, adopting a first persistence period which is less than or equal to the re-registration period corresponding to the SIP account;
otherwise, adopting a second persistence period which is greater than a preset duration threshold, wherein the second persistence period is greater than the first persistence period.
Optionally, the processor employs a first persistence period that is less than or equal to a re-registration period corresponding to the SIP account, including:
comparing the re-registration period corresponding to the SIP account with a preset time threshold, wherein the preset time threshold is a threshold not smaller than the maximum value of the historical persistence periods of different SIP accounts;
if the re-registration period is not larger than the preset duration threshold, adopting a persistence period smaller than the re-registration period;
otherwise, determining the average value of the historical persistence periods of different SIP accounts as the persistence period.
Optionally, the processor is further configured to:
storing the registration information of the SIP account number which is successfully initially registered into a memory;
replacing the registration information of the SIP account in the memory by using the registration information of the SIP account which is successfully re-registered;
and deleting the registration information of the SIP account which fails to be initially registered, fails to be re-registered or is cancelled in the memory.
Optionally, the processor is further configured to:
and deleting the registration information of the SIP account in the memory for the SIP account which reaches or exceeds the re-registration time point at the current time point.
Optionally, when the processor stores the registration information of the SIP account in the memory into the permanent storage device, the method further includes:
and deleting the registration information of the SIP account in the memory stored in the permanent storage equipment.
Optionally, the comparing, by the processor, the current time point and the re-registration time point corresponding to the SIP account in the registration information includes:
determining the latest registration information of the SIP account in the memory, and storing the latest registration information into a persistent time point in a permanent storage device;
if the current time point exceeds the persistence time point and the time difference is smaller than a preset threshold value, comparing the current time point with a re-registration time point corresponding to the SIP account in the registration information;
otherwise, deleting the registration information of the SIP account in the memory, and sending the request information of initial registration to the SIP server for the SIP account.
According to a fourth aspect of the embodiments of the present invention, there is provided a chip, the chip is coupled to a memory in a device, so that the chip invokes, when running, program instructions stored in the memory, to implement the above aspects of the embodiments of the present application and any method that may be designed according to the aspects.
According to a fifth aspect of the embodiments of the present invention, there is provided a computer-readable storage medium storing program instructions which, when executed on a computer, cause the computer to perform the method of any of the possible designs to which the above aspects and aspects relate.
According to a sixth aspect of the embodiments of the present invention, there is provided a computer program product, which, when run on an electronic device, causes the electronic device to perform a method of implementing the above aspects of the embodiments of the present application and any possible design related to the aspects.
The method and the device for recovering the registration state provided by the invention have the following beneficial effects:
after the equipment is restarted, only the SIP account needing to be registered currently is registered, so that the data processing amount and the time cost caused by unnecessary registration are avoided, and the problems of overlarge information interaction amount between the SIP terminal equipment and the SIP server and overlong unavailable time of the terminal equipment service in the conventional registration state recovery method are solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a method for recovering a registration status according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an application system of a method for recovering a registration state according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating that an SIP terminal device registers an SIP account according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a successful initial registration provided in an embodiment of the present invention;
FIG. 5 is a schematic diagram of a successful re-registration provided in an embodiment of the present invention;
fig. 6 is a schematic diagram of a failed registration provided in an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating a cancellation of an SIP account according to an embodiment of the present invention;
fig. 8 is a flowchart illustrating a method for recovering a registration status according to an embodiment of the present invention;
fig. 9 is a flowchart illustrating a method for recovering a registration status according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a device for recovering a registration state according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a device for recovering a registration state according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. For convenience of understanding, terms referred to in the embodiments of the present invention are explained below:
1) persistence (Persistence): is a mechanism for transferring program data between a persistent state and a transient state, i.e., transient data that cannot be permanently saved is persisted as persistent data, e.g., data in memory is saved to a permanently-storable storage device; the main application of persistence is to store objects in memory in a database, or in a disk file, an XML (extensible markup language) data file, or the like.
With the rapid development of the communication industry, after the IMS is fully deployed, the PBX (Private Branch Exchange) of the enterprise customer will mainly access the IMS network. The IP pbx (IP Private Branch Exchange) technology is a professional enterprise access scheme, and can meet various complex networking and personalized application requirements.
The IPPBX equipment is positioned at the interface of the customer internal exchange network and the IMS network and provides internal interactive service for the extension in the customer internal exchange network and the access service between the extension and the IMS network. When the IPPBX provides the incoming call service, the registration of the IMS network is initiated for the public network account number allocated to the IPPBX, the registration response message (200OK) fed back by the IMS network can be identified, and the public network account number state is set to be registered, so that the subsequent incoming call service request is processed.
At present, service interaction between the ip pbx device and the IMS is mainly completed through SIP (Session Initiation Protocol). The relationship between the IPPBX equipment and the IMS is equivalent to the relationship between the SIP terminal and the SIP server, and the SIP server can only receive the call request of the SIP terminal after the SIP terminal is normally registered in the SIP server.
However, the existing method for recovering the registration state after the SIP terminal device is restarted has the problems of too large information interaction amount between the terminal device and the server and too long time for the terminal device service to be unavailable.
In view of this, embodiments of the present invention provide a method and a device for recovering a registration state, which are applied to a system including an SIP terminal and an SIP server, and can enable the SIP terminal device to quickly recover the registration state before the restart after the restart, thereby ensuring service continuity. The method for recovering the registration state is executed by a SIP terminal therein, for example, an ip pbx device, and a corresponding SIP server may be an IMS device.
Fig. 1 is a schematic structural diagram of an application system of a method for recovering a registration state according to an embodiment of the present invention.
The system applied to the method for recovering the registration state provided by the embodiment of the invention comprises at least one intranet terminal, at least one IPPBX device and at least one IMS. As shown in the figure, the intranet terminal is specifically an intranet phone, UCS (Unified Computing System) is equivalent to an ip pbx device, there may be a plurality of intranet phones hung down, and the IMS server may be a telecommunications IMS, a mobile IMS, or the like shown in the figure.
The UCS communicates with the telecommunication IMS through a public network IP address 1, communicates with the mobile IMS through a public network IP address 2, and communicates with each intranet terminal through an intranet IP address 3. The telecom IMS distributes at least 1 telecom public network number to UCS, the mobile IMS distributes at least 1 mobile public network number to UCS, and UCS distributes 1 internal number to each internal network terminal. The public network side IMS in the network architecture may contain any 1, 2 or more, or even all of the plurality of telecommunications operators IMS. The intranet terminal and the IPPBX device can be respectively used as an SIP terminal device and an SIP server; the ip pbx device and the IMS device may function as a SIP terminal device and a SIP server, respectively. When the IPPBX equipment is used as SIP terminal equipment, the telecom IMS and the mobile IMS are used as SIP servers. In the embodiment of the invention, when the IPPBX device is used as the SIP terminal device, the IPPBX device corresponds to at least 1 public network number of telecommunication and registers to a corresponding SIP server (telecommunication IMS), and corresponds to at least 1 public network number of mobile and registers to a corresponding SIP server (mobile IMS).
It should be noted that the above system architecture is only an example of the system architecture applicable to the embodiment of the present invention, and the system architecture applicable to the embodiment of the present invention may also add other entities or reduce part of the entities compared to the system architecture shown in fig. 2.
Example 1
The embodiment of the invention provides a method for recovering a registration state, which is applied to SIP terminal equipment for providing interactive services for a Session Initiation Protocol (SIP) account. As shown in fig. 2, the method includes:
step S201, after the equipment is determined to be restarted, reading the registration information of the SIP account in the permanent storage equipment to a memory, wherein the registration information of the SIP account in the memory is periodically stored in the permanent storage equipment;
in the embodiment of the present invention, the SIP terminal device may be an ip pbx device that provides communication services for different user terminals, such as a telephone, and may initiate registration to the IMS network for at least 1 public network number (SIP account) allocated to itself.
Data in the memory of the device is lost after the device is restarted, so that the registration information of the SIP account stored in the memory is temporary, and if the data is used after the device is restarted, the data needs to be persisted. Therefore, the embodiment of the invention adopts a periodic storage mechanism to persist the registration information of the SIP account in the memory, and the registration information of the SIP account stored in the memory is solidified into the permanent storage device by setting the persistent period timer every time a persistent period is reached, so that data can not be lost due to the restart of the device system. In the embodiment of the present invention, the persistence specifically refers to storing the registration information of the SIP account stored in the memory into a persistent storage device.
In the embodiment of the invention, the registration information of the SIP account supported by the SIP terminal equipment is stored in the equipment memory in real time, and the registration information of the SIP account in the memory is also stored in the permanent storage equipment at regular time according to the determined persistence period, no matter before or after the SIP equipment is restarted.
As an optional implementation manner, in the embodiment of the present invention, a registration information table is established in a memory in advance (for example, after the SIP terminal device is started or initialized after being restarted), and is used for recording the registration information of the SIP account with successful registration in real time. The registration information comprises SIP account identification, a re-registration period, a re-registration time point, parameters required by re-registration and the like. Because the memory table is not written to the disk, the system performance can be ensured to the maximum extent.
The method for registering the SIP account includes that 1 entry in a registration information table correspondingly records registration information of 1 SIP account, and the registration information is related to the latest registration of the SIP account, and specifically includes: the SIP account id (e.g. a user number), a re-registration period, a re-registration time point (a time point of a next re-registration), and parameters required for re-registration (e.g. core network gateway and service server information), where the SIP account id is an id of a user corresponding to the SIP account, and may be a primary key.
Since the parameters required for re-registration are unique to the entire SIP terminal device and the parameters required for re-registration of each SIP account are the same, the parameters may not be included in the registration information of each SIP account, but may be recorded and persistently stored independently.
In the embodiment of the present invention, when the SIP account status changes, for example, the registration status of the SIP account, the re-registration period, or the re-registration time point changes, the registration data corresponding to the SIP account stored in the registration information table is updated in real time. The process of triggering the state change of the SIP account is mainly a registration process.
Fig. 3 is a schematic diagram illustrating that an SIP terminal device registers an SIP account according to an embodiment of the present invention. As shown in the figure, the SIP server is a registration server in the SIP protocol, and not only can receive a REGISTER message request, but also can store information in a received message packet on a positioning server that manages a corresponding domain name. The SIP protocol has a discovery capability, and if a user corresponding to one SIP account wants to start a session with a user corresponding to another SIP account, the SIP protocol must discover the existence of a host which can be reached by the SIP account. This discovery process is done by the location server, since the location server can receive the request message and find where to send. This is achieved based on the location server managing each domain maintaining a location database. The registration server may receive not only the IP address of the client, but also other types of messages.
Before a terminal corresponding to a SIP account can receive a session, it needs to have registration information in a database, which includes respective associated IP addresses of terminals (e.g., phones) corresponding to all SIP accounts.
In the embodiment of the present invention, the registration data corresponding to the SIP account stored in the memory is updated in real time according to the change of the registration state of the SIP account, which includes the following situations:
1) storing the registration information of the SIP account number which is successfully initially registered into a memory;
referring to fig. 4, a schematic diagram of a successful initial registration according to an embodiment of the present invention is provided. As shown in the figure, after the SIP terminal device sends an initial registration request REGISTER for an SIP account, it will receive a new challenge message (401Unauthorized) returned by the SIP server, at this time, the SIP terminal device needs to initiate a registration request REGISTER carrying authentication information again, after receiving the request, the SIP server judges whether the SIP terminal device has a registration right according to the authentication information in the request, if it passes the verification, it sends a 200OK response message to the SIP terminal device.
After receiving the 200OK response message of the SIP server, the SIP terminal device indicates that the initial registration is successful, and then stores the registration information of the SIP account number which is successfully initially registered in the memory, specifically inserts a record in the registration information table established in the memory to indicate that the corresponding SIP account number is successfully registered with the SIP server at a certain time. The re-registration period is half of the re-registration time length carried in the received 200OK response message, and the corresponding re-registration time point is half of the current time point plus the re-registration time length.
2) Replacing the registration information of the SIP account in the memory by using the registration information of the SIP account which is successfully re-registered;
referring to fig. 5, a schematic diagram of successful re-registration according to an embodiment of the present invention is provided. As shown in the figure, after the SIP terminal device sends a re-registration request REGISTER for a SIP account, since the SIP terminal device is no longer a new registration (initial registration) and the request message already contains the digest, the SIP server will not return new challenge information (401 Unauthorized). In order to change the corresponding information in the registration information table in the memory, the SIP terminal device only needs to send a piece of registration information with new CONTACT information in the CONTACT header. And after receiving the request and passing the verification, the SIP server sends a 200OK response message to the SIP terminal equipment.
After receiving the 200OK response message of the SIP server, the SIP terminal device indicates that the re-registration is successful, then stores the registration information of the SIP account which is successfully re-registered in the memory, deletes the registration information of the SIP account which is originally stored in the memory, and specifically updates the registration information of the SIP account recorded in the registration information table established in the memory to the registration information of the SIP account which is successfully re-registered at the present time, thereby indicating that the corresponding SIP account is successfully registered with the SIP server at a certain time. The re-registration period is half of the re-registration time length carried in the received 200OK response message, and the corresponding re-registration time point is half of the current time point plus the re-registration time length.
3) And deleting the registration information of the SIP account which fails to be initially registered, fails to be re-registered or is cancelled in the memory.
Fig. 6 is a schematic diagram of a failed registration according to an embodiment of the present invention. As shown in the figure, after the SIP terminal device sends an initial registration or re-registration request REGISTER for an SIP Account, it receives a new challenge information (401Unauthorized) returned by the SIP server, at this time, the SIP terminal device needs to initiate a registration request REGISTER carrying authentication information again, however, in this process, the SIP terminal device performs hash operation to try authentication, and if the server detects that an invalid password fails to pass the authentication, it continues to send a 401Unauthorized message to the SIP terminal device, and this process is repeated until the number of repetitions exceeds a maximum value set in User Account Control (UAC) of the SIP terminal device, and it confirms that the registration fails.
When the initial registration of the SIP account fails, a non-401 Unautered message and a non-200 OK response message sent by the SIP server are received, or no response is received after overtime, and the registration information table in the memory is not updated.
And when the SIP account re-registration fails, receiving a non-401 Unautered message and a non-200 OK response message sent by the SIP server, or not receiving a response after overtime, and deleting the registration information of the corresponding SIP account recorded in the registration information table in the memory.
Fig. 7 is a schematic diagram of deregistering an SIP account according to an embodiment of the present invention. As shown in the figure, when the SIP terminal device sends a deregistration request REGISTER for one SIP account, the EXPIRES header is set to 0 in the sent message, and the CONTACT header is set to x indicating that this procedure is applied to all existing CONTACT information. After receiving the request, the SIP server performs corresponding logout operation and sends 200OK response message to the SIP terminal equipment.
And after receiving the 200OK response message of the SIP server, the SIP terminal equipment indicates that the logout is successful, and deletes the registration information of the corresponding SIP account recorded in the registration information table in the memory.
At present, for the same SIP server, the registration time lengths of the SIP accounts returned to the SIP terminal device are generally the same value, but the registration time length is also modified, and the registration time length returned after subsequently receiving the registration message sent by the SIP terminal device is the modified registration time length. Therefore, in the embodiment of the present invention, for the registration information of each SIP account, the registration period obtained according to the registration duration returned by the SIP server is recorded respectively.
When the SIP terminal device performs registration or deregistration, the interaction method with the SIP server can adopt the prior art, and is not described in detail here.
In the embodiment of the invention, the methods 1), 2) and 3) are executed before and after the SIP terminal equipment is restarted. In addition, after the equipment is restarted, the registration information of the SIP account in the memory is deleted for the SIP account of which the current time point reaches or exceeds the re-registration time point.
In the embodiment of the present invention, when the registration information of the SIP account in the memory is stored in the permanent storage device, the registration information of the SIP account in the memory, which is previously stored in the permanent storage device, is deleted at the same time, that is, the registration information of the SIP account in the permanent storage device is updated according to the persistence period and is updated to the registration information of the SIP account in the current memory.
In the embodiment of the invention, during the starting operation process of the SIP terminal equipment, the registration information of the SIP account in the memory is periodically stored in the permanent storage equipment. Specifically, any one of the following methods may be adopted:
mode 1
And storing the registration information of all SIP accounts in the memory into a permanent storage device according to a preset fixed persistence period.
The fixed persistence period is preset in a manual configuration manner, and a specific value of the fixed persistence period may be determined empirically by combining a general re-registration period duration, and may be, for example, 5 minutes, 10 minutes, and the like.
Mode 2
And determining a dynamic persistence period according to the re-registration periods corresponding to all the SIP accounts in the memory, and storing the registration information of all the SIP accounts in the memory into a permanent storage device according to the dynamic persistence period.
In the embodiment of the invention, when the change of the re-registration period corresponding to any SIP account in the memory is determined, a dynamic persistence period is determined according to the re-registration periods corresponding to all SIP accounts in the memory. Specifically, the minimum value in the re-registration period corresponding to all SIP accounts in the memory is determined, and a set period smaller than the minimum value is determined as a dynamic persistence period.
The longer the data persistence period is, the more old the data which is persisted last time is, the more likely that the user registration information stored in the memory, especially the re-registration period and the re-registration time point, will have been updated more than once in the process, so that the registration information of the SIP account stored in the current memory cannot be correctly described, and the missed judgment and the erroneous judgment on whether the initial registration is initiated or not after the subsequent device is restarted are caused. Therefore, the present embodiment provides: the data persistence period is less than the minimum re-registration period in all SIP account registration information stored in the memory, and when the re-registration period in any SIP account registration information stored in the memory is monitored to change, the data persistence period is triggered to be updated once to determine a dynamic persistence period, and the dynamic persistence period can be automatically set as follows: and a value smaller than the minimum re-registration period in the registration information of all the SIP accounts stored in the current memory, which may be specifically 1/2, 2/3 and the like of the minimum re-registration period, and is not specifically limited herein.
Mode 3
And determining the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges, and storing the registration information of each SIP account in the memory into a permanent storage device according to the corresponding persistence period.
In the embodiment of the invention, the corresponding relationship between different re-registration period ranges and the persistence period is created in advance, the re-registration period range corresponding to the re-registration period of each SIP account is adopted to determine the corresponding persistence period, and the registration information of each SIP account is persisted. Specifically, if the re-registration period corresponding to the SIP account is not less than the preset restart duration of the SIP terminal device, a first persistence period which is less than or equal to the re-registration period corresponding to the SIP account is adopted; otherwise, adopting a second persistence period which is greater than a preset duration threshold, wherein the second persistence period is greater than the first persistence period.
In the specific implementation, when the re-registration period is very short, even if the persistence period is also correspondingly set to be very short, the re-registration time point may be reached very soon after the device is restarted, and much time is not saved when the persistence is performed. Therefore, when the re-registration period is short, the significance of data persistence is not great, and the initial registration can be reinitiated after the device is restarted.
Therefore, in the embodiment, in order to give consideration to both the accuracy of persistent storage and the device performance, different persistent period durations are set for SIP accounts within different re-registration period ranges according to the relationship between the re-registration period and the restart duration of the SIP terminal device.
Specifically, when the re-registration period in the registration information of the SIP account is less than a preset restart time (for example, 300 seconds) of the SIP terminal device, a long-period persistence operation on the registration information of the SIP account is triggered, and specifically, the registration information of the SIP account may be persisted according to a second persistence period that is greater than a preset time threshold, where in current practical application, the re-registration time generally does not exceed 1 hour, and therefore, the preset time threshold may be 1 hour, and the second persistence period may be a time value that is greater than 1 hour. Alternatively, the second persistence period may be a preset value, such as a maximum persistence period value determined from historical registration information or empirically, such as 2 hours, etc. By adopting a relatively long persistence period to persist the SIP account, the resource consumption caused by unnecessary persistence can be reduced.
The restarting time length of the equipment can be determined as the time length of the persistence period which is determined experimentally or set empirically and meets the persistence meaningless critical condition; or, determining the shortest restart duration of the SIP terminal equipment applied by the method according to historical data statistics; or, the average value of the restart duration of the SIP terminal equipment applied by the method according to the historical data statistics is determined.
When the re-registration period in the registration information of the SIP account is not less than the preset restart time of the SIP terminal device, triggering a short-period persistence operation on the registration information of the SIP account, and using a first persistence period that is less than or equal to the re-registration period corresponding to the SIP account, for example, specifically, 1/2, 2/3, etc. of the re-registration period, which is not specifically limited herein.
Furthermore, when the re-registration period in the registration information of the SIP account is not less than the preset restart duration of the SIP terminal device, the re-registration period range corresponding to the re-registration period of the SIP account can be further divided according to a preset time threshold, so that a more appropriate persistence period can be determined according to the re-registration period of the SIP account.
Specifically, a re-registration period corresponding to the SIP account is compared with a preset time threshold, where the preset time threshold is a threshold determined according to the maximum value of the historical persistence periods of different SIP accounts, and specifically, the preset time threshold is a threshold not less than the maximum value of the historical persistence periods of different SIP accounts; if the re-registration period is not larger than the preset duration threshold, adopting a persistence period smaller than the re-registration period; otherwise, adopting a persistence period determined according to the historical persistence period average value of different SIP accounts, and specifically determining the historical persistence period average value of different SIP accounts as the persistence period. The specific implementation can adopt any one of the following modes:
1) and when determining that the re-registration period corresponding to the SIP account is not less than the preset restarting time of the SIP terminal equipment and not more than the preset time threshold, adopting a persistence period less than the re-registration period to persist the registration information of the SIP account.
2) And when determining that the re-registration period corresponding to the SIP account is greater than a preset time threshold, determining the average value of the historical persistence periods of different SIP accounts as the persistence period.
The average value may be estimated and determined according to the average level of the historical persistence periods of different SIP accounts, or may be accurately determined and obtained by calculating the average value of the historical persistence periods of different SIP accounts. As an alternative embodiment, the persistence period may also adopt a value of a persistence period in which different SIP accounts are frequently used, or an average value of a plurality of persistence periods in which most SIP accounts are frequently used, where the frequency of use may be that the number of times of use exceeds a set value or a set ratio, etc.
In view of the fact that in current practical applications, the re-registration period is usually 1/2 of the re-registration period, and the re-registration period is generally not greater than 1 hour, therefore, the preset period threshold value is preferably 1 hour, and when it is determined that the re-registration period corresponding to the SIP account is not less than the preset restart period of the SIP terminal device and is not greater than the preset period threshold value, the corresponding persistence period adopted is preferably 1/2 of the re-registration period. And when the re-registration period corresponding to the SIP account is determined to be greater than the preset time threshold, the adopted corresponding persistence period is preferably 30 minutes.
Referring to table 1 below, for the correspondence between different re-registration period ranges and the persistence period provided in the embodiment of the present invention, the persistence period is determined according to the correspondence in the table, which is a preferred method provided in the embodiment of the present invention.
TABLE 1 correspondence between different re-registration period ranges and persistence periods
Figure BDA0002559041950000201
Wherein, T1 is a re-registration period corresponding to the SIP account, and T2 is a persistence period corresponding to the SIP account.
As an optional implementation manner, the above periodically stores the registration information of the SIP account in the memory into the permanent storage device, and a manner in which the above manner 1 and manner 2 are combined may also be adopted.
Specifically, the persistence cycle determination method described in the above mode 1 is controlled by setting a switch or using an instruction. For example, when the switch is turned on or a start instruction is received, the change of the persistence cycle is triggered by the change of the re-registration cycle, and the corresponding persistence cycle is determined by adopting the above mode 1; and when the switch is closed or a starting instruction is not received, determining the corresponding persistence period by adopting the mode 2.
In the embodiment of the present invention, in the methods described in the above mode 1 and mode 2, only one timer is used for a persistence period, and after the persistence period is reached, the registration information of all SIP accounts stored in the memory is written into the permanent storage device for persistence storage.
In the embodiment of the present invention, the permanent storage device may be a nonvolatile memory, a hard disk, a database device, a cloud server device, or the like, and the permanent storage device may be integrated into the SIP terminal device, or may exist separately, and is connected to the SIP terminal device in a wired or wireless manner.
In the embodiment of the invention, in the starting operation process of the SIP terminal equipment, when the equipment is restarted, the data stored in the memory is lost, so that after the equipment is restarted, the registration information of the SIP account in the permanent storage equipment is read to the memory, the data in the memory can be recovered to the data of a one-time persistence time point before the equipment is restarted, and then the following judgment of initial registration or re-registration is carried out according to the data.
Step S202, comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information;
specifically, for the registration information of each SIP account, it is determined whether the current time point is greater than or equal to a re-registration time point in the registration information, where the re-registration time point is a time point at which the re-registration period is increased from a latest re-registration time point before the SIP account.
Further, in order to avoid as much as possible that registration information of the SIP account loaded into the memory after the device is restarted is incorrect due to persistence failure or error, in the embodiment of the present invention, before comparing a current time point with a re-registration time point corresponding to the SIP account in the registration information, it is determined whether registration information of the SIP account loaded into the memory from the permanent storage device is reliable, and if not, initial registration of the SIP account is performed to the SIP server; and if the SIP account registration information is reliable, executing the step of comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information.
Specifically, the registration information of the SIP account in the memory is determined and stored to the persistent time point in the persistent storage device for the last time, if the current time point exceeds the persistent time point and the time difference is smaller than a preset threshold, the current time point is compared with the re-registration time point corresponding to the SIP account in the registration information, otherwise, the registration information of the SIP account in the memory is deleted, and the request information of initial registration is sent to the SIP account to the SIP server.
In the embodiment of the invention, when judging whether the SIP account registration information loaded into the memory from the permanent storage device is reliable, the current time point of the SIP terminal device is obtained and compared with the persistence time point of the registration information of the latest SIP account which is stored in a persistence manner before.
In current practical applications, in general, the re-registration time length does not exceed 1 hour, and the re-registration period is generally half of the re-registration time length, so that at present, after the SIP account is successfully initially registered, re-registration of the SIP account is initiated in 30 minutes. In view of this, in the embodiment of the present invention, the preset threshold is preferably set to 30 minutes. When the time difference between the current time point and the last persistence time point for storing the registration information of the SIP account in the memory into the permanent storage device exceeds 30 minutes, the last persistence time point is determined to have elapsed 30 minutes, the registration information of the SIP account is considered to be untrustworthy, and therefore the registration information of the SIP account in the memory is deleted, the registration state of the SIP account is unregistered, and initial registration of the SIP account is carried out; when the time difference between the current time point and the last persistence time point of storing the registration information of the SIP account in the memory into the permanent storage device does not exceed 30 minutes, the last persistence time point is determined to be within 30 minutes, the registration information of the SIP account is considered to be trusted, and then the step of comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information is executed.
Step S203, sending request information for initial registration to the SIP server for the SIP account whose current time point reaches or exceeds the re-registration time point, and sending request information for re-registration to the SIP server for the SIP account whose current time does not exceed the re-registration time point when the corresponding re-registration time point is reached.
After the current time point and the re-registration time point corresponding to the SIP account in the registration information are compared through the steps, for each SIP account, if the current time point is determined to reach or exceed the re-registration time point, the re-registration time point is indicated to be exceeded after the equipment is restarted, and the last registration is invalid, the registration information of the SIP account is deleted, and new initial registration is carried out on the SIP server for the user identified in the registration information of the SIP account; if the current time point is determined not to exceed the re-registration time point, the last registration after the equipment is restarted is shown to be within the validity period at present, new initial registration does not need to be initiated in the initialization process, an initial registration request is not sent to the SIP server, meanwhile, the registration state in the registration information of the SIP account stored in the memory is updated to be registered, and when the corresponding re-registration time point arrives, re-registration request information is sent to the SIP server according to the parameter set required by re-registration, so that re-registration of the SIP account is carried out.
In the method and device for recovering the registration state provided by the above embodiment of the present invention, the registration information of the SIP account is recorded in a dynamic and static dual-database storage manner during the operation of the SIP terminal device, and the registration information stored in the memory is stored in the permanent storage device according to the persistence period. After the SIP terminal equipment is restarted, the record before the starting is loaded from the permanent storage equipment, and the registration before the SIP account is judged to be not required to initiate initial registration in the initialization process after the registration is still valid, but the registration is performed after the re-registration time is up, so that the registration process of the SIP account is simplified on the premise of ensuring normal use of the service. The method solves the problems of overlarge information interaction quantity between the SIP terminal equipment and the SIP server and overlong terminal equipment service unavailable time in the conventional registration state recovery method.
Example 2
Fig. 8 is a flowchart illustrating a method for recovering a registration status according to an embodiment of the present invention. As shown, the method flow includes:
step S801, recording the registration information of the corresponding SIP account in a memory in real time during the operation of the SIP terminal equipment;
step S802, when the determined persistence period is reached, the registration information of the SIP account in the memory is persisted and is stored in the permanent storage device;
the method comprises the steps that registration information of all SIP accounts in a memory is stored in a permanent storage device according to a preset fixed persistence period; or, determining a dynamic persistence period according to the re-registration periods corresponding to all the SIP accounts in the memory, and storing the registration information of all the SIP accounts in the memory into a permanent storage device according to the dynamic persistence period; or when the switch for automatically determining the persistence period according to the re-registration period is turned on, determining a dynamic persistence period according to the re-registration periods corresponding to all the SIP accounts in the memory, and storing the registration information of all the SIP accounts in the memory into the permanent storage device according to the dynamic persistence period, or storing the registration information of all the SIP accounts in the memory into the permanent storage device according to a preset fixed persistence period.
Step S803, after determining that the SIP terminal device is restarted, reading the registration information of the SIP account in the permanent storage device to a memory;
step S804, judging whether the SIP account registration information loaded to the memory from the permanent storage device is reliable;
if so, go to step S805, otherwise go to step S807.
Step S805, judging whether the current time point reaches or exceeds the corresponding re-registration time point or not for each SIP account;
if so, go to step S806, otherwise go to step S807.
Step 806, sending request information of initial registration to the SIP server, and performing initial registration on the SIP account;
step S807, when the corresponding re-registration time point is reached, sending re-registration request information to the SIP server, and re-registering the SIP account.
For the specific implementation of the above steps, reference may be made to the specific embodiment of the foregoing method for recovering the registration status, and the description thereof is not repeated here.
Example 3
Fig. 9 is a flowchart illustrating a method for recovering a registration status according to an embodiment of the present invention. As shown, the method flow includes:
step 901, during the operation of the SIP terminal device, recording the registration information of the corresponding SIP account in a memory in real time;
step S902, determining a persistence cycle corresponding to each SIP account according to a value range of a re-registration cycle corresponding to each SIP account in a memory and persistence cycles corresponding to different value ranges;
preferably, the persistence period corresponding to each SIP account is determined according to the correspondence between the re-registration periods and the persistence periods in different ranges shown in table 1 in the foregoing embodiment.
Step S903, aiming at each SIP account, when determining that the corresponding persistence period is reached, persisting the registration information of the SIP account in the memory and storing the registration information into a persistent storage device;
step S904, after determining that the SIP terminal device is restarted, reading the registration information of the SIP account in the permanent storage device to a memory;
step S905, judging whether the SIP account registration information loaded into the memory from the permanent storage device is reliable or not;
if so, go to step S906, otherwise, go to step S907.
Step S906, judging whether the current time point reaches or exceeds the corresponding re-registration time point or not aiming at each SIP account;
if so, go to step S907, otherwise, go to step S908.
Step 907, sending request information of initial registration to the SIP server, and performing initial registration on the SIP account;
step S908, when the corresponding re-registration time point is reached, sends re-registration request information to the SIP server, and re-registers the SIP account.
For the specific implementation of the above steps, reference may be made to the specific embodiment of the foregoing method for recovering the registration status, and the description thereof is not repeated here.
Example 4
A method of recovering a registration state in the present invention is explained above, and an apparatus for performing the method of recovering a registration state is explained below.
Referring to fig. 10, an embodiment of the present invention provides a device for recovering a registration state, including:
the data access module 1001 is configured to read, after determining that the device is restarted, registration information of an SIP account in the persistent storage device to the memory, where the registration information of the SIP account in the memory is periodically stored in the persistent storage device;
a time comparison module 1002, configured to compare a current time point with a re-registration time point corresponding to the SIP account in the registration information;
the registration recovery module 1003 is configured to send request information for initial registration to the SIP server for the SIP account that the current time point reaches or exceeds the re-registration time point, and send request information for re-registration to the SIP server when the current time point reaches the corresponding re-registration time point for the SIP account that the current time point does not exceed the re-registration time point.
Optionally, the step of periodically storing, by the data access module, the registration information of the SIP account in the memory to the permanent storage device includes:
according to a preset fixed persistence period, storing the registration information of all SIP accounts in the memory into a permanent storage device; or
Determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory, and storing the registration information of all SIP accounts in the memory into a permanent storage device according to the dynamic persistence period; or
And determining the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges, and storing the registration information of each SIP account in the memory into a permanent storage device according to the corresponding persistence period.
Optionally, the determining, by the data access module, a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory includes:
and determining the minimum value in the re-registration period corresponding to all SIP accounts in the memory, and determining a set period smaller than the minimum value as a dynamic persistence period.
Optionally, the determining, by the data access module, a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory includes:
and when determining that the re-registration period corresponding to any SIP account in the memory changes, determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory.
Optionally, the determining, by the data access module, the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges includes:
if the re-registration period corresponding to the SIP account is not less than the preset restarting duration of the SIP terminal equipment, adopting a first persistence period which is less than or equal to the re-registration period corresponding to the SIP account;
otherwise, adopting a second persistence period which is greater than a preset duration threshold, wherein the second persistence period is greater than the first persistence period.
Optionally, the data access module adopts a first persistence period that is less than or equal to a re-registration period corresponding to the SIP account, and includes:
comparing the re-registration period corresponding to the SIP account with a preset time threshold, wherein the preset time threshold is a threshold not smaller than the maximum value of the historical persistence periods of different SIP accounts;
if the re-registration period is not larger than the preset duration threshold, adopting a persistence period smaller than the re-registration period;
otherwise, determining the average value of the historical persistence periods of different SIP accounts as the persistence period.
Optionally, the data access module is further configured to:
storing the registration information of the SIP account number which is successfully initially registered into a memory;
replacing the registration information of the SIP account in the memory by using the registration information of the SIP account which is successfully re-registered;
and deleting the registration information of the SIP account which fails to be initially registered, fails to be re-registered or is cancelled in the memory.
Optionally, the data access module is further configured to:
and deleting the registration information of the SIP account in the memory for the SIP account which reaches or exceeds the re-registration time point at the current time point.
Optionally, when the data access module stores the registration information of the SIP account in the memory into the permanent storage device, the method further includes:
and deleting the registration information of the SIP account in the memory stored in the permanent storage equipment.
Optionally, the comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information by the time comparison module includes:
determining the latest registration information of the SIP account in the memory, and storing the latest registration information into a persistent time point in a permanent storage device;
if the current time point exceeds the persistence time point and the time difference is smaller than a preset threshold value, comparing the current time point with a re-registration time point corresponding to the SIP account in the registration information;
otherwise, deleting the registration information of the SIP account in the memory, and sending the request information of initial registration to the SIP server for the SIP account.
The above describes the device for recovering the registration state in the embodiment of the present application from the perspective of the modular functional entity, and the following describes the device for recovering the registration state in the embodiment of the present application from the perspective of hardware processing.
Example 5
Referring to fig. 11, another embodiment of the device for recovering the registration state in the embodiment of the present application includes:
a processor 1101, a memory 1102, a transceiver 1109, and a bus system 1111;
the memory is used for storing programs;
the processor is used for executing the program in the memory and comprises the following steps:
after the equipment is determined to be restarted, reading the registration information of the SIP account in the permanent storage equipment to a memory, wherein the registration information of the SIP account in the memory is periodically stored in the permanent storage equipment;
comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information;
and sending initial registration request information to the SIP server for the SIP account which reaches or exceeds the re-registration time point at the current time point, and sending re-registration request information to the SIP server for the SIP account which does not exceed the re-registration time point at the current time point.
Fig. 11 is a schematic structural diagram of a device for recovering a registration state, which is applied to an upper server in an NFV architecture, where the device 1100 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPU) 1101 (e.g., one or more processors) and a memory 1102, and one or more storage media 1103 (e.g., one or more mass storage devices) storing an application 1104 or data 1106. The memory 1102 and the storage medium 1103 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 1103 may include one or more modules (not shown), and each module may include a series of instruction operations on the information processing apparatus. Further, the processor 1101 may be configured to communicate with the storage medium 1103 to execute a series of instruction operations in the storage medium 1103 on the device 1100.
Device 1100 may also include one or more power supplies 1110, one or more wired or wireless network interfaces 1107, one or more input-output interfaces 1108, and/or one or more operating systems 1105, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
Optionally, the periodically storing, by the processor, the registration information of the SIP account in the memory to the permanent storage device includes:
according to a preset fixed persistence period, storing the registration information of all SIP accounts in the memory into a permanent storage device; or
Determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory, and storing the registration information of all SIP accounts in the memory into a permanent storage device according to the dynamic persistence period; or
And determining the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges, and storing the registration information of each SIP account in the memory into a permanent storage device according to the corresponding persistence period.
Optionally, the determining, by the processor, a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory includes:
and determining the minimum value in the re-registration period corresponding to all SIP accounts in the memory, and determining a set period smaller than the minimum value as a dynamic persistence period.
Optionally, the determining, by the processor, a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory includes:
and when determining that the re-registration period corresponding to any SIP account in the memory changes, determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory.
Optionally, the determining, by the processor, the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges includes:
if the re-registration period corresponding to the SIP account is not less than the preset restarting duration of the SIP terminal equipment, adopting a first persistence period which is less than or equal to the re-registration period corresponding to the SIP account;
otherwise, adopting a second persistence period which is greater than a preset duration threshold, wherein the second persistence period is greater than the first persistence period.
Optionally, the processor employs a first persistence period that is less than or equal to a re-registration period corresponding to the SIP account, including:
comparing the re-registration period corresponding to the SIP account with a preset time threshold, wherein the preset time threshold is a threshold not smaller than the maximum value of the historical persistence periods of different SIP accounts;
if the re-registration period is not larger than the preset duration threshold, adopting a persistence period smaller than the re-registration period;
otherwise, determining the average value of the historical persistence periods of different SIP accounts as the persistence period.
Optionally, the processor is further configured to:
storing the registration information of the SIP account number which is successfully initially registered into a memory;
replacing the registration information of the SIP account in the memory by using the registration information of the SIP account which is successfully re-registered;
and deleting the registration information of the SIP account which fails to be initially registered, fails to be re-registered or is cancelled in the memory.
Optionally, the processor is further configured to:
and deleting the registration information of the SIP account in the memory for the SIP account which reaches or exceeds the re-registration time point at the current time point.
Optionally, when the processor stores the registration information of the SIP account in the memory into the permanent storage device, the method further includes:
and deleting the registration information of the SIP account in the memory stored in the permanent storage equipment.
Optionally, the comparing, by the processor, the current time point and the re-registration time point corresponding to the SIP account in the registration information includes:
determining the latest registration information of the SIP account in the memory, and storing the latest registration information into a persistent time point in a permanent storage device;
if the current time point exceeds the persistence time point and the time difference is smaller than a preset threshold value, comparing the current time point with a re-registration time point corresponding to the SIP account in the registration information;
otherwise, deleting the registration information of the SIP account in the memory, and sending the request information of initial registration to the SIP server for the SIP account.
Embodiments of the present invention also provide a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the method for recovering a registration state provided in the foregoing embodiments.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The technical solutions provided by the present application are introduced in detail, and the present application applies specific examples to explain the principles and embodiments of the present application, and the descriptions of the above examples are only used to help understand the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (13)

1. A method for recovering registration state is applied to SIP terminal equipment for providing interactive service for SIP account number of session initiation protocol, and is characterized by comprising the following steps:
after the equipment is determined to be restarted, reading the registration information of the SIP account in the permanent storage equipment to a memory, wherein the registration information of the SIP account in the memory is periodically stored in the permanent storage equipment;
comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information;
and sending initial registration request information to the SIP server for the SIP account which reaches or exceeds the re-registration time point at the current time point, and sending re-registration request information to the SIP server for the SIP account which does not exceed the re-registration time point at the current time point.
2. The method of claim 1, wherein the periodically storing the registration information of the SIP account in the memory in the permanent storage device comprises:
according to a preset fixed persistence period, storing the registration information of all SIP accounts in the memory into a permanent storage device; or
Determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory, and storing the registration information of all SIP accounts in the memory into a permanent storage device according to the dynamic persistence period; or
And determining the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges, and storing the registration information of each SIP account in the memory into a permanent storage device according to the corresponding persistence period.
3. The method according to claim 2, wherein the determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory comprises:
and determining the minimum value in the re-registration period corresponding to all SIP accounts in the memory, and determining a set period smaller than the minimum value as a dynamic persistence period.
4. The method according to claim 2, wherein the determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory comprises:
and when determining that the re-registration period corresponding to any SIP account in the memory changes, determining a dynamic persistence period according to the re-registration periods corresponding to all SIP accounts in the memory.
5. The method according to claim 2, wherein the determining the persistence period corresponding to each SIP account according to the value range of the re-registration period corresponding to each SIP account in the memory and the persistence periods corresponding to different value ranges comprises:
if the re-registration period corresponding to the SIP account is not less than the preset restarting duration of the SIP terminal equipment, adopting a first persistence period which is less than or equal to the re-registration period corresponding to the SIP account;
otherwise, adopting a second persistence period which is greater than a preset duration threshold, wherein the second persistence period is greater than the first persistence period.
6. The method according to claim 5, wherein the employing the first persistence period that is less than or equal to the re-registration period corresponding to the SIP account includes:
comparing the re-registration period corresponding to the SIP account with a preset time threshold, wherein the preset time threshold is a threshold not smaller than the maximum value of the historical persistence periods of different SIP accounts;
if the re-registration period is not larger than the preset duration threshold, adopting a persistence period smaller than the re-registration period;
otherwise, determining the average value of the historical persistence periods of different SIP accounts as the persistence period.
7. The method of claim 1, further comprising:
storing the registration information of the SIP account number which is successfully initially registered into a memory;
replacing the registration information of the SIP account in the memory by using the registration information of the SIP account which is successfully re-registered;
and deleting the registration information of the SIP account which fails to be initially registered, fails to be re-registered or is cancelled in the memory.
8. The method of claim 1, further comprising:
and deleting the registration information of the SIP account in the memory for the SIP account which reaches or exceeds the re-registration time point at the current time point.
9. The method of claim 1, wherein when storing the registration information of the SIP account in the memory in the persistent storage device, the method further comprises:
and deleting the registration information of the SIP account in the memory stored in the permanent storage equipment.
10. The method of claim 1, wherein the comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information comprises:
determining the latest registration information of the SIP account in the memory, and storing the latest registration information into a persistent time point in a permanent storage device;
if the current time point exceeds the persistence time point and the time difference is smaller than a preset threshold value, comparing the current time point with a re-registration time point corresponding to the SIP account in the registration information;
otherwise, deleting the registration information of the SIP account in the memory, and sending the request information of initial registration to the SIP server for the SIP account.
11. An apparatus for registration state recovery, comprising:
the data access module is used for reading the registration information of the SIP account in the permanent storage device to the memory after the device is determined to be restarted, wherein the registration information of the SIP account in the memory is periodically stored in the permanent storage device;
the time comparison module is used for comparing the current time point with the re-registration time point corresponding to the SIP account in the registration information;
and the registration recovery module is used for sending initial registration request information to the SIP server for the SIP accounts which reach or exceed the re-registration time point at the current time point, and sending re-registration request information to the SIP server for the SIP accounts which do not exceed the re-registration time point at the current time point.
12. An apparatus for registration state recovery, comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory and realizing the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 10.
CN202010605915.0A 2020-06-29 2020-06-29 Method and equipment for recovering registration state Active CN111770096B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010605915.0A CN111770096B (en) 2020-06-29 2020-06-29 Method and equipment for recovering registration state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010605915.0A CN111770096B (en) 2020-06-29 2020-06-29 Method and equipment for recovering registration state

Publications (2)

Publication Number Publication Date
CN111770096A CN111770096A (en) 2020-10-13
CN111770096B true CN111770096B (en) 2022-04-15

Family

ID=72722910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010605915.0A Active CN111770096B (en) 2020-06-29 2020-06-29 Method and equipment for recovering registration state

Country Status (1)

Country Link
CN (1) CN111770096B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114189499B (en) * 2021-11-10 2024-02-23 厦门亿联网络技术股份有限公司 Converged communication system, method and device for multi-service association interaction

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1783651A1 (en) * 2004-07-15 2007-05-09 Matsushita Electric Industrial Co., Ltd. Device registration system and device registration apparatus
CN101175251A (en) * 2007-09-04 2008-05-07 中兴通讯股份有限公司 Time negotiation method for registration time-out, re-registration method and log-out method
CN101448318A (en) * 2008-12-22 2009-06-03 华为技术有限公司 Registration method, boundary proxy device and communication system thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2386169B1 (en) * 2009-01-08 2012-11-28 France Télécom Method and system for controlling the restart traffic in a telecommunication network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1783651A1 (en) * 2004-07-15 2007-05-09 Matsushita Electric Industrial Co., Ltd. Device registration system and device registration apparatus
CN101175251A (en) * 2007-09-04 2008-05-07 中兴通讯股份有限公司 Time negotiation method for registration time-out, re-registration method and log-out method
CN101448318A (en) * 2008-12-22 2009-06-03 华为技术有限公司 Registration method, boundary proxy device and communication system thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"R5-192856 Addition of applicability of NR test case".《3GPP tsg_ran\tsg_ran》.2019,全文. *

Also Published As

Publication number Publication date
CN111770096A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
US8223926B2 (en) Resilient registration with a call manager
US7882235B2 (en) Session control apparatus, software applied to session control apparatus, communication control method, and network system
US8719617B2 (en) Method and device for realizing IP multimedia subsystem disaster tolerance
US8374079B2 (en) Proxy server, communication system, communication method and program
US8364827B2 (en) Communication system
CN102204222B (en) IMS restoration procedures for multiple contacts
EP2050006B1 (en) Resetting/restarting endpoint devices
US8935374B2 (en) Method, system, and device for realizing registration mechanism of IP multimedia subsystem
CN101291305A (en) Method and customer terminal realizing plug-in management
US20150312387A1 (en) Methods and apparatus for resolving data inconsistencies in an ims network
US9021300B2 (en) Method of changing over from a primary HSS to a backup HSS in an IP network
CN111193688A (en) Method, device, equipment and medium for realizing video color ring
CN111770096B (en) Method and equipment for recovering registration state
EP2962442B1 (en) Registration of sip-based communications in a hosted voip network
KR101620809B1 (en) A method for sip proxy failover
RU2665303C2 (en) Multimedia subsystem on basis of internet protocol (ims) and method and device for configuring service in ims
CN103037501A (en) Registration method, device and system of internet protocol multimedia subsystem terminal
US20160241601A1 (en) Technique for restoring a service in a network
US11419167B2 (en) Session initiated protocol (SIP) session establishment with a home subscriber server (HSS) outage
US20100017527A1 (en) Sip server and communication system
EP4123984A1 (en) Associated service registration method, related device and computer-readable storage medium
CN115002194A (en) Management method and related device for microservice
US11166327B1 (en) Session initiated protocol (SIP) session establishment with a home subscriber server (HSS) outage
CN115349119A (en) Method and apparatus for enhanced 5GC recovery when deploying a Network Function (NF) set in a network
JP6352828B2 (en) Call control server and operation method of call control server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant