Method and device for determining registration mode of session initiation protocol, equipment and medium

By carrying the registration identifier in the SIP registration request, the inaccurate registration method determination caused by random generation of session identifiers and incorrect synchronization between processes in the prior art is solved, and a more accurate registration method judgment is achieved.

CN120128353APending Publication Date: 2025-06-10CHENGDU TD TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311684816.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-07
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

In the prior art, since the session identification is randomly generated by the terminal device, and different processes may be processed in the server each time the registration is registered, the registration method is inaccurate.

Method used

The terminal device carries a registration identifier in the initial registration request and the target registration request sent to the server. The registration identifier is used to indicate that the current registration method is initial registration or periodic registration; the server determines the target registration method based on the registration identifier.

Benefits of technology

It effectively improves the accuracy of the registration method and avoids errors in the registration method judgment caused by the same session identifier or incorrect message synchronization between processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120128353A_ABST
    Figure CN120128353A_ABST
Patent Text Reader

Abstract

The invention provides a registration mode determination method and device of a session initiation protocol, equipment and a medium, which can be applied to the technical field of communication. In the method, a terminal device carries a registration identifier in an initial registration request and a target registration request sent to a server, and the registration identifier is an identifier indicating that a current registration mode is initial registration or periodic registration; and the server determines a target registration mode according to the registration identifier after determining that the terminal equipment is successfully authenticated. According to the scheme, the registration identifier is determined through the terminal equipment, and then the server determines the registration mode according to the registration identifier, so that the accuracy of the determined registration mode is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device, equipment and medium for determining a registration mode of a session initiation protocol. Background Art

[0002] Session Initialization Protocol (SIP) is an application layer signaling control protocol that provides complete session creation and session change services for a variety of instant messaging services. In SIP, the terminal device needs to complete registration, that is, send a registration message to the server to inform the server of its own address, so that when other terminal devices call the terminal device, the server can transfer the call to the terminal device based on the address of the terminal device. The registration methods of terminal devices are divided into initial registration and periodic registration.

[0003] After the terminal device successfully registers, if the server determines that it is a periodic registration, the registration status of the terminal device needs to be maintained; if it is an initial registration, in addition to setting the registration status, it is also necessary to clear all previous service data of the terminal device, user subscription information, push multicast channel information, etc. Therefore, it is necessary to determine the registration method. In the prior art, the registration method is usually determined based on whether there is a registration status, whether the registration status is a registered status when there is a registration status, and whether the session identifier (call id) in the registration message is the same as the stored session identifier when the registration status is a registered status.

[0004] However, the session ID is randomly generated by the terminal device during initial registration, so there is a possibility that the generated session ID is the same; and each registration may be processed using a different process in the server, which requires message synchronization between processes, and there may be incorrect synchronization, which will lead to inaccurate registration method determination. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, device and medium for determining a registration method of a session initiation protocol, which are used to solve the problem of inaccurate registration method determination caused by the existing registration method determination method because the session identifier is randomly generated by the terminal device and each registration may be processed using a different process in the server.

[0006] In a first aspect, an embodiment of the present application provides a method for determining a registration mode of a session initiation protocol, which is applied to a terminal device, and the method includes:

[0007] Sending an initial registration request to a server, wherein the initial registration request includes a registration identifier, and the registration identifier is used to indicate that the current registration mode is initial registration, or indicates that the current registration mode is periodic registration;

[0008] Receiving first authentication information sent by the server, the first authentication information including a random character string and a login identifier indicating a user name and password used by the terminal device;

[0009] A target registration request is sent to the server, wherein the target registration request includes the registration identifier, the first authentication information and the second authentication information; the second authentication information includes response information, the user name and the uniform resource locator address of the server, and the response information is information encrypted and generated by the terminal device based on the user name, the password, the random character string and the uniform resource locator address.

[0010] In a specific implementation, before sending the initial registration request to the server, the method further includes:

[0011] Get the working mode on time;

[0012] The registration identifier is generated according to the duration of the operation mode being turned on.

[0013] In a specific implementation, determining the registration identifier according to the duration of the operation mode being turned on includes:

[0014] Determine whether the working mode is turned on for a time period less than a preset time period threshold;

[0015] If the duration of the working mode being turned on is less than a preset duration threshold, a registration mark indicating that the current registration mode is initial registration is generated;

[0016] If the duration of the operation mode being turned on is greater than or equal to the preset duration threshold, a registration mark indicating that the current registration mode is periodic registration is generated.

[0017] In a second aspect, an embodiment of the present application provides a method for determining a registration mode of a session initiation protocol, which is applied to a server, and the method includes:

[0018] Receiving an initial registration request sent by a terminal device, the initial registration request including a registration identifier, the registration identifier being used to indicate that a current registration mode is an initial registration, or indicating that a current registration mode is a periodic registration;

[0019] Sending first authentication information to the terminal device, the first authentication information including a random character string and a login identifier indicating a user name and password used by the terminal device;

[0020] receiving a target registration request sent by the terminal device, the target registration request including the registration identifier, the first authentication information and the second authentication information; the second authentication information including response information, the user name and the uniform resource locator address of the server, the response information being information generated by encryption by the terminal device according to the user name, the password, the random character string and the uniform resource locator address;

[0021] Generate an authentication result according to the first authentication information and the second authentication information, wherein the authentication result is used to indicate that the authentication of the terminal device is successful, or to indicate that the authentication of the terminal device fails;

[0022] If the authentication result indicates that the terminal device is successfully authenticated, a target registration method is determined according to the registration identifier.

[0023] In a specific implementation manner, determining the target registration mode according to the registration identifier includes:

[0024] If the registration identifier indicates that the current registration mode is initial registration, determining the target registration mode is initial registration;

[0025] If the registration identifier indicates that the current registration mode is periodic registration, it is determined that the target registration mode is periodic registration.

[0026] In a specific implementation manner, the initial registration request and the target registration request further include a session identifier; and the method further includes:

[0027] determining an auxiliary registration method according to whether the server has stored a registration status identifier corresponding to the terminal device and the session identifier; the registration status identifier is used to indicate that the terminal device is registered or that the terminal device is not registered;

[0028] The target registration method is updated according to the auxiliary registration method to obtain an updated target registration method.

[0029] In a specific implementation manner, updating the target registration mode according to the auxiliary registration mode to obtain an updated target registration mode includes:

[0030] If the auxiliary registration method is the same as the target registration method, the target registration method is used as the updated target registration method;

[0031] If the auxiliary registration method is different from the target registration method, the initial registration method is used as the updated target registration method.

[0032] In a third aspect, an embodiment of the present application provides a device for determining a registration mode of a session initiation protocol, including:

[0033] A sending module, used to send an initial registration request to a server, wherein the initial registration request includes a registration identifier, and the registration identifier is used to indicate that the current registration mode is an initial registration, or indicates that the current registration mode is a periodic registration;

[0034] A receiving module, configured to receive first authentication information sent by the server, wherein the first authentication information includes a random string and a login identifier indicating a user name and password used by a terminal device;

[0035] The sending module is also used to send a target registration request to the server, the target registration request includes the registration identifier, the first authentication information and the second authentication information; the second authentication information includes response information, the user name and the uniform resource locator address of the server, and the response information is information encrypted and generated by the terminal device based on the user name, the password, the random character string and the uniform resource locator address.

[0036] In a fourth aspect, an embodiment of the present application provides a device for determining a registration mode of a session initiation protocol, including:

[0037] A receiving module, configured to receive an initial registration request sent by a terminal device, wherein the initial registration request includes a registration identifier, and the registration identifier is used to indicate that a current registration mode is an initial registration, or indicates that a current registration mode is a periodic registration;

[0038] A sending module, configured to send first authentication information to the terminal device, wherein the first authentication information includes a random string and a login identifier indicating a user name and password used by the terminal device;

[0039] The receiving module is further used to receive a target registration request sent by the terminal device, the target registration request includes the registration identifier, the first authentication information and the second authentication information; the second authentication information includes response information, the user name and the uniform resource locator address of the server, and the response information is information generated by the terminal device through encryption according to the user name, the password, the random character string and the uniform resource locator address;

[0040] Processing modules for:

[0041] Generate an authentication result according to the first authentication information and the second authentication information, wherein the authentication result is used to indicate that the authentication of the terminal device is successful, or to indicate that the authentication of the terminal device fails;

[0042] If the authentication result indicates that the terminal device is successfully authenticated, a target registration method is determined according to the registration identifier.

[0043] In a fifth aspect, an embodiment of the present application provides a terminal device, including:

[0044] Processor, memory, communication interface;

[0045] The memory is used to store executable instructions of the processor;

[0046] The processor is configured to execute the method for determining a registration mode of the session initiation protocol as described in any one of the first aspects by executing the executable instructions.

[0047] In a sixth aspect, an embodiment of the present application provides a server, including:

[0048] Processor, memory, communication interface;

[0049] The memory is used to store executable instructions of the processor;

[0050] The processor is configured to execute the method for determining the registration mode of the session initiation protocol as described in any one of the second aspects by executing the executable instructions.

[0051] In a seventh aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for determining a registration mode of the session initiation protocol described in any one of the first aspect or the second aspect is implemented.

[0052] In an eighth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the method for determining the registration mode of the session initiation protocol described in any one of the first aspect or the second aspect.

[0053] The method, apparatus, device and medium for determining the registration mode of the session initiation protocol provided in the embodiment of the present application carry a registration identifier in the initial registration request and the target registration request sent by the terminal device to the server, and the registration identifier is an identifier indicating that the current registration mode is initial registration or periodic registration; and then the server determines the target registration mode according to the registration identifier after determining that the terminal device is successfully authenticated. This solution determines the registration identifier by the terminal device, and then the server determines the registration mode according to the registration identifier, which effectively improves the accuracy of the determined registration mode. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0055] Figure 1 A flowchart of a method for determining a registration mode of a session initiation protocol provided in this application;

[0056] Figure 2 A flow chart of a second embodiment of a method for determining a registration mode of a session initiation protocol provided by the present application;

[0057] Figure 3 A flowchart of a third embodiment of a method for determining a registration mode of a session initiation protocol provided in the present application;

[0058] Figure 4 A structural diagram of a first embodiment of a device for determining a registration mode of a session initiation protocol provided by the present application;

[0059] Figure 5 A structural diagram of a second embodiment of a device for determining a registration mode of a session initiation protocol provided by the present application;

[0060] Figure 6 A schematic diagram of the structure of a terminal device provided for this application;

[0061] Figure 7 A schematic diagram of the structure of a server provided for this application. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments made by ordinary technicians in this field under the enlightenment of the embodiments belong to the scope of protection of the present application.

[0063] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0064] With the development of science and technology, the Internet Protocol (IP) data network based on packet switching technology has replaced the traditional telephone network based on circuit switching in the core position of the communication field with its convenience and low cost. The Session Initialization Protocol (SIP) protocol, as an application layer signaling control protocol, provides complete session creation and session change services for a variety of instant messaging services.

[0065] In SIP, the terminal device needs to complete registration, that is, send a registration message to the server to inform the server of its own address, so that when other terminal devices call the terminal device, the server can transfer the call to the terminal device according to the address of the terminal device.

[0066] The registration methods for terminal devices are divided into initial registration and periodic registration. After the terminal device is successfully registered, the server will perform different follow-up processing according to the registration method. If it is a periodic registration, the registration status of the terminal device needs to be maintained; if it is an initial registration, in addition to setting the registration status, all previous business data, user subscription information, push multicast channel information, etc. of the terminal device need to be cleared. Therefore, the registration method needs to be determined.

[0067] In the prior art, the registration method is usually determined based on whether there is a registration state, whether the registration state is a registered state when there is a registration state, and whether the session identifier (call id) in the registration message is the same as the stored session identifier when the registration state is a registered state.

[0068] However, the session ID is randomly generated by the terminal device during initial registration, so there is a possibility that the generated session ID is the same. In the case of two consecutive initial registrations, if the registration status is determined to be registered in the second time, there is a possibility that the session ID is the same, resulting in an error in the registration method. In addition, each registration may be processed by a different process in the server, which requires message synchronization between processes, which may result in incorrect synchronization and inaccurate registration method determination.

[0069] In view of the problems existing in the prior art, the inventor discovered in the process of studying the registration method determination method of the session initiation protocol that since the initial registration is performed after the terminal device just enters the working mode, and after the initial registration, if the terminal device has been in the working mode, a periodic registration is performed at intervals, so the terminal device can determine whether the initial registration or periodic registration is required according to the duration of the working mode, and then when registering, the registration identifier indicating the registration method is added to the registration request, and then sent to the server; the server can determine the registration method based on the registration identifier, which effectively improves the accuracy of determining the registration method. Based on the above invention concept, the registration method determination scheme of the session initiation protocol in this application is designed.

[0070] The following is an example of an application scenario of the method for determining the registration mode of the session initiation protocol provided in this application.

[0071] Exemplarily, in this application scenario, after the terminal device is turned on and enters the working mode, it will obtain the working mode activation time to generate a registration identifier. Since the working mode has just been entered at this time, a registration identifier will be generated indicating that the current registration method is initial registration.

[0072] Then, the initial registration is performed, and an initial registration request is sent to the server, wherein the initial registration request includes the registration identifier.

[0073] After receiving the initial registration request, the server sends the first authentication information to the terminal device. The terminal device sends a target registration request to the server, and the target registration request includes a registration identifier, the first authentication information and the second authentication information.

[0074] The server authenticates the terminal device according to the first authentication information and the second authentication information, and after successful authentication, it can determine that the registration mode is initial registration according to the registration identifier.

[0075] Then the terminal device is always in working mode, and performs periodic registration after a certain period of time. A registration identifier indicating that the current registration mode is periodic registration can be generated. The registration identifier is carried in both the initial registration request and the target registration request. The server can determine that the registration mode is periodic registration.

[0076] It should be noted that the above scenario is only an example of an application scenario provided by an embodiment of the present application. The embodiment of the present application does not limit the actual form of the various devices included in the scenario, nor does it limit the interaction method between the devices. In the specific application of the solution, it can be set according to actual needs.

[0077] Next, the technical solutions of the present application will be described in detail through specific embodiments. It should be noted that the following several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0078] Figure 1 FIG. 4 is a schematic flowchart of the first embodiment of the method for determining the registration method of the Session Initiation Protocol provided by the present application. The embodiments of the present application illustrate the situation where a terminal device sends a registration request carrying a registration identifier to a server, and the server determines the registration method according to the registration request. The method in this embodiment can be implemented by software, hardware, or a combination of software and hardware. As Figure 1 shown, the method for determining the registration method of the Session Initiation Protocol specifically includes the following steps:

[0079] S101: The terminal device sends an initial registration request to the server.

[0080] In this step, when the terminal device performs registration, it sends an initial registration request to the server. The initial registration request includes a registration identifier generated according to the duration of the working mode. The registration identifier is used to indicate that the current registration method is an initial registration or to indicate that the current registration method is a periodic registration.

[0081] S102: After receiving the initial registration request sent by the terminal device, the server sends the first authentication information to the terminal device.

[0082] In this step, after the terminal device sends the initial registration request to the server, the server can obtain the request, and then trigger the sending of the first authentication information to the terminal device.

[0083] The first authentication information includes a random string (nonce) and a login identifier indicating the username and password used by the terminal device.

[0084] S103: After receiving the first authentication information sent by the server, the terminal device sends a target registration request to the server.

[0085] In this step, after the server sends the first authentication information to the terminal device, it determines the username and password according to the login identifier therein, and then combines the random string and the Uniform Resource Locator (URL) address of the server to encrypt and generate a response message (response), and then generates the second authentication information in combination with the username and the URL address. Then, it sends a target registration request to the server. The target registration request includes a registration identifier, the first authentication information, and the second authentication information.

[0086] S104: After the server receives the target registration request sent by the terminal device, it generates an authentication result based on the first authentication information and the second authentication information.

[0087] In this step, after the terminal device sends a target registration request to the server, the server can receive this request and then generate an authentication result based on the first authentication information and the second authentication information. The authentication result is used to indicate that the terminal device is authenticated successfully or to indicate that the terminal device is authenticated failed.

[0088] First, it is judged whether the random string in the first authentication information sent by the terminal device is the same as the random string in the first authentication information sent by the server to the terminal device. If the two are not the same, an authentication result indicating that the terminal device is authenticated failed is generated.

[0089] If the two are the same, the password is searched according to the user name in the second authentication information, and then combined with the random string and the URL address, an encrypted response information is generated. It is judged whether the generated response information is the same as the response information in the second authentication information. If the two are not the same, an authentication result indicating that the terminal device is authenticated failed is generated. If the two are the same, an authentication result indicating that the terminal device is authenticated successfully is generated.

[0090] S105: If the authentication result indicates that the terminal device is authenticated successfully, the server determines the target registration method according to the registration identifier.

[0091] In this step, after the server generates the authentication result, if the authentication result indicates that the terminal device is authenticated successfully, the server determines the target registration method according to the registration identifier.

[0092] If the registration identifier indicates that the current registration method is initial registration, the target registration method is determined to be initial registration. If the registration identifier indicates that the current registration method is periodic registration, the target registration method is determined to be periodic registration.

[0093] It should be noted that the initial registration and the periodic registration can be divided into Mission-Critical Push To Talk (MCPTT for short) registration, Mission-Critical Video (MCVideo for short) registration, and Mission-Critical Data (MCData for short) registration. The registration identifier is added to the Body content in the header field of the initial registration request and the target registration request.

[0094] It should be noted that after the server generates the authentication result, if the authentication result indicates that the terminal device authentication is successful, a 200 OK response message is returned to the terminal device so that the terminal device can know that the authentication is successful. If the authentication result indicates that the terminal device authentication fails, a 401 response message is returned to the terminal device so that the terminal device can know that the authentication fails and the registration fails.

[0095] The method for determining the registration method of the Session Initiation Protocol provided in this embodiment enables the terminal device to carry a registration identifier in the initial registration request and the target registration request sent to the server, where the registration identifier is an identifier indicating that the current registration method is initial registration or periodic registration; then, after the server determines that the terminal device authentication is successful, the target registration method is determined according to the registration identifier. Compared with the prior art in which the registration method is determined according to the registration status and then the session identifier, in this solution, the terminal device determines the registration identifier, and then the server determines the registration method according to the registration identifier, effectively improving the accuracy of the determined registration method.

[0096] Figure 2 FIG. is a schematic flowchart of the second embodiment of the method for determining the registration method of the Session Initiation Protocol provided in this application. On the basis of the above embodiment, this application embodiment describes the situation where the terminal device generates a registration identifier according to the obtained working mode opening duration before registration. As Figure 2 shown, the method for determining the registration method of the Session Initiation Protocol specifically includes the following steps:

[0097] S201: Obtain the working mode opening duration.

[0098] In this step, before the terminal device performs registration, in order to determine the registration method, the working mode opening duration is first obtained.

[0099] When the terminal device is powered off, it is not in the working mode; when the terminal device is powered on, there are two modes, one is the working mode and the other is the non-working mode (flight mode). After the non-working mode is turned off, the working mode will be entered. Therefore, the terminal device can determine the opening duration of the working mode according to its own situation.

[0100] S202: Determine whether the working mode opening duration is less than a preset duration threshold; if the working mode opening duration is less than the preset duration threshold, execute step S203; if the working mode opening duration is greater than or equal to the preset duration threshold, execute step S204.

[0101] In this step, after the terminal device obtains the working mode opening duration, it can generate a registration identifier according to the working mode opening duration, that is, determine whether the working mode opening duration is less than the preset duration threshold.

[0102] It should be noted that the preset duration threshold can be 15 seconds, 30 seconds, 5 minutes, etc. In the embodiments of the present application, the preset duration threshold is not limited, and can be set according to the actual situation.

[0103] S203: Generate a registration identifier indicating that the current registration method is initial registration.

[0104] In this step, if the terminal device determines that the working mode start duration is less than the preset duration threshold, it means that the terminal device has just entered the working mode. At this time, initial registration should be performed to generate a registration identifier indicating that the current registration method is initial registration.

[0105] S204: Generate a registration identifier indicating that the current registration method is periodic registration.

[0106] In this step, if the terminal device determines that the working mode start duration is greater than or equal to the preset duration threshold, it means that the terminal device has entered the working mode for a long time. At this time, periodic registration should be performed to generate a registration identifier indicating that the current registration method is periodic registration.

[0107] The method for determining the registration method of the session initiation protocol provided in this embodiment generates a registration identifier by judging whether the obtained working mode start duration is less than the preset duration threshold, making the registration identifier more accurate.

[0108] Figure 3 This is a flowchart of the third embodiment of the method for determining the registration method of the session initiation protocol provided by the present application. On the basis of the above embodiments, the embodiments of the present application illustrate the situation where the server generates an auxiliary registration method according to the registration status identifier and the session identifier, and then updates the target registration method. As Figure 3 shown, the method for determining the registration method of the session initiation protocol specifically includes the following steps:

[0109] S301: Determine the auxiliary registration method according to whether the server has stored the registration status identifier corresponding to the terminal device and the session identifier.

[0110] In this step, after obtaining the target registration method, the server can also update and correct it. Since the initial registration request and the target registration request also include the session identifier, the auxiliary registration method can be determined according to whether the server has stored the registration status identifier corresponding to the terminal device and the session identifier. The registration status identifier is used to indicate that the terminal device has been registered or that the terminal device has not been registered.

[0111] Specifically, when the terminal device registers for the first time, the server does not store the registration status identifier corresponding to the terminal device. When the terminal device is not registering for the first time, the server stores the registration status identifier corresponding to the terminal device, and after successful registration, the registration status identifier indicates that the terminal device has been registered. The server will then start timing. When the timing duration is greater than the preset duration, it indicates that the terminal device has not performed periodic registration and should perform initial registration subsequently, and the registration status identifier is changed to an identifier indicating that the terminal device is not registered. The preset duration can be half an hour, 1 hour, 2 hours, etc.

[0112] Therefore, the server can first determine whether it has stored the registration status identifier corresponding to the terminal device. If it has not stored the registration status identifier corresponding to the terminal device, it determines that the auxiliary registration method is initial registration.

[0113] If it has stored the registration status identifier corresponding to the terminal device, it determines whether the registration status identifier indicates that the terminal device is not registered. If the registration status identifier indicates that the terminal device is not registered, it determines that the auxiliary registration method is initial registration.

[0114] If the registration status identifier indicates that the terminal device has been registered, it determines whether the session identifier is the same as the session identifier used by the terminal device for the previous registration stored in the server. If the two are different, it determines that the auxiliary registration method is initial registration. If the two are the same, it determines that the auxiliary registration method is periodic registration.

[0115] S302: Update the target registration method according to the auxiliary registration method to obtain the updated target registration method.

[0116] In this step, after the server obtains the auxiliary registration method, it updates the target registration method according to the auxiliary registration method to obtain the updated target registration method.

[0117] If the auxiliary registration method is the same as the target registration method, the target registration method is used as the updated target registration method; if the auxiliary registration method is different from the target registration method, the initial registration method is used as the updated target registration method to ensure that the terminal device can perform business processing normally.

[0118] The method for determining the registration method of the session initial protocol provided in this embodiment determines the auxiliary registration method by whether the server has stored the registration status identifier corresponding to the terminal device and the session identifier, and then updates the target registration method, making the updated target registration method more accurate and also ensuring that the terminal device can perform business processing normally.

[0119] The following is the device embodiment of the present application, which can be used to execute the method embodiment of the present application. For the details not disclosed in the device embodiment of the present application, please refer to the method embodiment of the present application.

[0120] Figure 4 This is a schematic diagram of the structure of the first embodiment of the apparatus for determining the registration mode of the session initiation protocol provided by the present application; the apparatus can be integrated into the terminal device in the above method embodiment, or can be implemented by the terminal device in the above method embodiment. Figure 4 As shown, the session initiation protocol registration mode determination device 40 includes:

[0121] A sending module 41 is used to send an initial registration request to a server, wherein the initial registration request includes a registration identifier, and the registration identifier is used to indicate that the current registration mode is an initial registration, or indicates that the current registration mode is a periodic registration;

[0122] A receiving module 42, configured to receive first authentication information sent by the server, wherein the first authentication information includes a random string and a login identifier indicating a user name and password used by a terminal device;

[0123] The sending module 41 is also used to send a target registration request to the server, and the target registration request includes the registration identifier, the first authentication information and the second authentication information; the second authentication information includes response information, the user name and the uniform resource locator address of the server, and the response information is information encrypted and generated by the terminal device based on the user name, the password, the random string and the uniform resource locator address.

[0124] An acquisition module 43 is used to acquire the duration of the working mode being turned on;

[0125] The processing module 44 is used to generate the registration mark according to the duration of the operation mode being turned on.

[0126] Furthermore, the processing module 44 is specifically used for:

[0127] Determine whether the working mode is turned on for a time period less than a preset time period threshold;

[0128] If the duration of the working mode being turned on is less than a preset duration threshold, a registration mark indicating that the current registration mode is initial registration is generated;

[0129] If the duration of the operation mode being turned on is greater than or equal to the preset duration threshold, a registration mark indicating that the current registration mode is periodic registration is generated.

[0130] The apparatus for determining the registration mode of the session initiation protocol provided in this embodiment is used to execute the technical solution of the terminal device in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar and will not be described in detail here.

[0131] Figure 5This is a schematic diagram of the structure of the second embodiment of the apparatus for determining the registration mode of the session initiation protocol provided by the present application; the apparatus can be integrated into the server in the above method embodiment, or can be implemented by the server in the above method embodiment. Figure 5 As shown, the session initiation protocol registration mode determination device 50 includes:

[0132] The receiving module 51 is used to receive an initial registration request sent by a terminal device, wherein the initial registration request includes a registration identifier, and the registration identifier is used to indicate that the current registration mode is an initial registration, or indicates that the current registration mode is a periodic registration;

[0133] A sending module 52, configured to send first authentication information to the terminal device, wherein the first authentication information includes a random string and a login identifier indicating a user name and password used by the terminal device;

[0134] The receiving module 51 is further configured to receive a target registration request sent by the terminal device, wherein the target registration request includes the registration identifier, the first authentication information, and the second authentication information; the second authentication information includes response information, the user name, and a uniform resource locator address of a server, and the response information is information encrypted and generated by the terminal device according to the user name, the password, the random string, and the uniform resource locator address;

[0135] The processing module 53 is used for:

[0136] Generate an authentication result according to the first authentication information and the second authentication information, wherein the authentication result is used to indicate that the authentication of the terminal device is successful, or to indicate that the authentication of the terminal device fails;

[0137] If the authentication result indicates that the terminal device is successfully authenticated, a target registration method is determined according to the registration identifier.

[0138] Furthermore, the processing module 53 is specifically used for:

[0139] If the registration identifier indicates that the current registration mode is initial registration, determining the target registration mode is initial registration;

[0140] If the registration identifier indicates that the current registration mode is periodic registration, it is determined that the target registration mode is periodic registration.

[0141] Furthermore, the initial registration request and the target registration request further include a session identifier; and the processing module 53 is further configured to:

[0142] determining an auxiliary registration method according to whether the server has stored a registration status identifier corresponding to the terminal device and the session identifier; the registration status identifier is used to indicate that the terminal device is registered or that the terminal device is not registered;

[0143] The target registration method is updated according to the auxiliary registration method to obtain an updated target registration method.

[0144] Furthermore, the processing module 53 is specifically used for:

[0145] If the auxiliary registration method is the same as the target registration method, the target registration method is used as the updated target registration method;

[0146] If the auxiliary registration method is different from the target registration method, the initial registration method is used as the updated target registration method.

[0147] The apparatus for determining the registration mode of the session initiation protocol provided in this embodiment is used to execute the technical solution of the server in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar and will not be described in detail here.

[0148] Figure 6 This is a schematic diagram of the structure of a terminal device provided by this application. Figure 6 As shown, the terminal device 60 includes:

[0149] Processor 61, memory 62, and communication interface 63;

[0150] The memory 62 is used to store executable instructions of the processor 61;

[0151] The processor 61 is configured to execute the technical solution of the terminal device in any of the aforementioned method embodiments by executing the executable instructions.

[0152] Optionally, the memory 62 may be independent or integrated with the processor 61 .

[0153] Optionally, when the memory 62 is a device independent of the processor 61, the terminal device 60 may further include:

[0154] The bus 64 , the memory 62 and the communication interface 63 are connected to the processor 61 via the bus 64 and communicate with each other. The communication interface 63 is used to communicate with other devices.

[0155] Optionally, the communication interface 63 may be implemented by a transceiver. The communication interface is used to implement communication between the database access device and other devices (such as a client, a read-write library, and a read-only library). The memory may include a random access memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.

[0156] The bus 64 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0157] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0158] The terminal device is used to execute the technical solution of the terminal device in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.

[0159] Figure 7 A schematic diagram of the structure of a server provided in this application. Figure 7 As shown, the server 70 includes:

[0160] Processor 71, memory 72, and communication interface 73;

[0161] The memory 72 is used to store executable instructions of the processor 71;

[0162] The processor 71 is configured to execute the technical solution of the server in any of the aforementioned method embodiments by executing the executable instructions.

[0163] Optionally, the memory 72 can be independent or integrated with the processor 71.

[0164] Optionally, when the memory 72 is a device independent of the processor 71, the server 70 may further include:

[0165] The bus 74 , the memory 72 and the communication interface 73 are connected to the processor 71 via the bus 74 and communicate with each other. The communication interface 73 is used to communicate with other devices.

[0166] Optionally, the communication interface 73 may be implemented by a transceiver. The communication interface is used to implement communication between the database access device and other devices (such as a client, a read-write library, and a read-only library). The memory may include a random access memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.

[0167] The bus 74 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0168] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0169] The server is used to execute the technical solution of the server in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.

[0170] An embodiment of the present application also provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the technical solution provided by any of the aforementioned method embodiments is implemented.

[0171] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement the technical solution provided by any of the aforementioned method embodiments when executed by a processor.

[0172] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for determining a registration method of the Session Initiation Protocol, characterized in that, applied to a terminal device, the method includes: sending an initial registration request to a server, the initial registration request includes a registration identifier, and the registration identifier is used to indicate that the current registration method is an initial registration or to indicate that the current registration method is a periodic registration; receiving first authentication information sent by the server, the first authentication information includes a random string and a login identifier indicating the username and password used by the terminal device; sending a target registration request to the server, the target registration request includes the registration identifier, the first authentication information and second authentication information; the second authentication information includes a response message, the username and the uniform resource locator address of the server, and the response message is information encrypted by the terminal device according to the username, the password, the random string, and the uniform resource locator address.

2. The method according to claim 1, characterized in that, before sending the initial registration request to the server, the method further includes: obtaining the duration of the working mode being turned on; generating the registration identifier according to the duration of the working mode being turned on.

3. The method according to claim 2, characterized in that, determining the registration identifier according to the duration of the working mode being turned on includes: judging whether the duration of the working mode being turned on is less than a preset duration threshold; if the duration of the working mode being turned on is less than the preset duration threshold, then generating a registration identifier indicating that the current registration method is an initial registration; if the duration of the working mode being turned on is greater than or equal to the preset duration threshold, then generating a registration identifier indicating that the current registration method is a periodic registration.

4. A method for determining a registration method of the Session Initiation Protocol, characterized in that, applied to a server, the method includes: receiving an initial registration request sent by a terminal device, the initial registration request includes a registration identifier, and the registration identifier is used to indicate that the current registration method is an initial registration or to indicate that the current registration method is a periodic registration; sending first authentication information to the terminal device, the first authentication information includes a random string and a login identifier indicating the username and password used by the terminal device; receiving a target registration request sent by the terminal device, the target registration request includes the registration identifier, the first authentication information and second authentication information; the second authentication information includes a response message, the username and the uniform resource locator address of the server, and the response message is information encrypted by the terminal device according to the username, the password, the random string, and the uniform resource locator address; generating an authentication result according to the first authentication information and the second authentication information, and the authentication result is used to indicate that the terminal device is authenticated successfully or to indicate that the terminal device is authenticated failed; if the authentication result indicates that the terminal device is authenticated successfully, then determining a target registration method according to the registration identifier.

5. The method according to claim 4, characterized in that, determining the target registration method according to the registration identifier includes: If the registration identifier indicates that the current registration method is initial registration, determine that the target registration method is initial registration; If the registration identifier indicates that the current registration method is periodic registration, determine that the target registration method is periodic registration.

6. The method according to claim 4, wherein, the initial registration request and the target registration request further include a session identifier; the method further includes: determining an auxiliary registration method according to whether the server has stored a registration status identifier corresponding to the terminal device and the session identifier; the registration status identifier is used to indicate that the terminal device is registered or that the terminal device is not registered; updating the target registration method according to the auxiliary registration method to obtain an updated target registration method.

7. The method according to claim 6, wherein, the updating the target registration method according to the auxiliary registration method to obtain an updated target registration method includes: if the auxiliary registration method is the same as the target registration method, using the target registration method as the updated target registration method; if the auxiliary registration method is different from the target registration method, using the initial registration method as the updated target registration method.

8. A registration method determination device for a session initiation protocol, wherein, it includes: a sending module, configured to send an initial registration request to a server, the initial registration request including a registration identifier, the registration identifier being used to indicate that the current registration method is initial registration or to indicate that the current registration method is periodic registration; a receiving module, configured to receive first authentication information sent by the server, the first authentication information including a random string and a login identifier indicating the username and password used by the terminal device; the sending module is further configured to send a target registration request to the server, the target registration request including the registration identifier, the first authentication information, and second authentication information; the second authentication information includes a response message, the username, and the uniform resource locator address of the server, and the response message is information encrypted by the terminal device according to the username, the password, the random string, and the uniform resource locator address.

9. A registration method determination device for a session initiation protocol, wherein, it includes: a receiving module, configured to receive an initial registration request sent by a terminal device, the initial registration request including a registration identifier, the registration identifier being used to indicate that the current registration method is initial registration or to indicate that the current registration method is periodic registration; a sending module, configured to send first authentication information to the terminal device, the first authentication information including a random string and a login identifier indicating the username and password used by the terminal device; The receiving module is further configured to receive a target registration request sent by the terminal device, where the target registration request includes the registration identifier, the first authentication information, and second authentication information; the second authentication information includes a response message, the user name, and the uniform resource locator of the server, and the response message is information encrypted by the terminal device according to the user name, the password, the random string, and the uniform resource locator. The processing module is configured to: generate an authentication result according to the first authentication information and the second authentication information, where the authentication result is used to indicate that the authentication of the terminal device is successful or indicate that the authentication of the terminal device fails; if the authentication result indicates that the authentication of the terminal device is successful, determine a target registration method according to the registration identifier.

10. A terminal device characterized in that it includes: a processor, a memory, and a communication interface; the memory is used to store executable instructions of the processor; wherein, the processor is configured to execute the method for determining the registration method of the session initiation protocol according to any one of claims 1 to 3 by executing the executable instructions.

11. A server characterized in that it includes: a processor, a memory, and a communication interface; the memory is used to store executable instructions of the processor; wherein, the processor is configured to execute the method for determining the registration method of the session initiation protocol according to any one of claims 4 to 7 by executing the executable instructions.

12. A readable storage medium, on which a computer program is stored characterized in that when the computer program is executed by a processor, it implements the method for determining the registration method of the session initiation protocol according to any one of claims 1 to 3, or any one of claims 4 to 7.

13. A computer program product characterized in that it includes a computer program, and when the computer program is executed by a processor, it is used to implement the method for determining the registration method of the session initiation protocol according to any one of claims 1 to 3, or any one of claims 4 to 7.