Method, system, and storage medium for message transfer based on session initiation protocol
By introducing a distributed caching middleware into the Session Initiation Protocol (SIP) signaling service cluster, the problems of extended complexity and insufficient device capacity of the SIP signaling service are solved, achieving more efficient device load management and system expansion.
Patent Information
- Application Number
- CN202511468937.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-10-15
AI Technical Summary
The existing session initiation protocol signaling service suffers from problems such as complex horizontal scaling and limited capacity of a single service node device.
By introducing a distributed caching middleware into the Session Initiation Protocol (SIP) signaling service cluster, SIP commands are stored and managed, the strong binding relationship between SIP interaction objects and service nodes is removed, and a caching and retry mechanism for commands is implemented.
It reduces the difficulty of horizontal scaling of the session initiation protocol signaling service, increases the device capacity of a single service node, and improves the scalability and efficiency of the system.
Smart Images

Figure CN120935147B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of video monitoring security, in particular to a message transmission method and system based on a session initiation protocol and a storage medium. BACKGROUND
[0002] With the continuous development of video monitoring networking technology, devices conforming to the GB / T 28181 standard are also vigorously spread across the country. With the sharp increase in the number of related monitoring devices, the performance requirements of the session initiation protocol signaling service platform responsible for the access and management of national standard devices are also increasing.
[0003] Currently, the communication of devices conforming to the GB / T 28181 standard usually adopts the session initiation protocol (SIP for short), which is a control protocol belonging to the application layer. The session initiation protocol is a stateful protocol, and there may be business association between multiple messages sent by the communication device to the session initiation protocol signaling service, and there is a session association between the request and response messages. The existing session initiation protocol signaling service is implemented in a single node deployment or a cluster internal forwarding message manner. This scheme has the problems of complex horizontal expansion of the session initiation protocol signaling service and low device carrying capacity of a single service node. SUMMARY
[0004] In the present embodiment, a message transmission method, system and storage medium based on a session initiation protocol are provided to solve the problems of complex horizontal expansion of the session initiation protocol signaling service and low device carrying capacity of a single service node in the related art.
[0005] In a first aspect, a message transmission method based on a session initiation protocol is provided in the present embodiment, which is used for any one service node in a session initiation protocol signaling service cluster, and the method comprises the following steps:
[0006] After receiving a business request distributed by a business gateway, the business request is converted into a first session initiation protocol instruction, and then the first session initiation protocol instruction is sent to a session initiation protocol interactive object, and the first session initiation protocol instruction is stored in a distributed cache middleware;
[0007] After receiving a receiving response sent by the session initiation protocol interactive object for the first session initiation protocol instruction, the first session initiation protocol instruction is removed from the distributed cache middleware, and after sequentially receiving a plurality of second session initiation protocol instructions sent by the session initiation protocol interactive object, the plurality of second session initiation protocol instructions are respectively stored in the distributed cache middleware; the second session initiation protocol instruction is an instruction generated after the session initiation protocol interactive object processes the business request.
[0008] According to the protocol header content of the second session initiation protocol instruction, the same batch of the second session initiation protocol instruction stored in the distributed cache middleware is determined and read;
[0009] The read same batch of the second session initiation protocol instruction is converted into a request result, and the request result is sent to the service gateway.
[0010] In some embodiments, the storing the first session initiation protocol instruction to the distributed cache middleware comprises:
[0011] The protocol header content of the first session initiation protocol instruction is used as a key, the protocol body content of the first session initiation protocol instruction is used as a value, a key-value pair is formed, and the key-value pair is stored in the distributed cache middleware; the distributed cache middleware stores session initiation protocol instructions corresponding to different protocol header contents.
[0012] In some embodiments, the removing the first session initiation protocol instruction from the distributed cache middleware comprises:
[0013] According to the protocol header content of the first session initiation protocol instruction, the session initiation protocol instruction to be removed is determined from the distributed cache middleware, and the session initiation protocol instruction to be removed is removed from the distributed cache middleware.
[0014] In some embodiments, the plurality of second session initiation protocol instructions stored in the distributed cache middleware are all stored with the same protocol header content corresponding to the plurality of second session initiation protocol instructions as a key and with the protocol body content corresponding to each second session initiation protocol instruction as a value.
[0015] In some embodiments, the method further comprises:
[0016] In the case where the receiving response sent by the session initiation protocol interaction object is not received, the first session initiation protocol instruction stored in the distributed cache middleware is read according to the protocol header content of the first session initiation protocol instruction, and the first session initiation protocol instruction is re-sent to the session initiation protocol interaction object until the receiving response sent by the session initiation protocol interaction object is received.
[0017] In a second aspect, a session initiation protocol signaling service cluster is provided in the embodiment, comprising at least two service nodes, and the service nodes are used to execute the message transmission method in the first aspect.
[0018] In some embodiments, the service node comprises a message aggregation module and a message retry module.
[0019] The message aggregation module is configured to aggregate the same batch of SIP instructions, and the message retry module is configured to resend the SIP instructions.
[0020] In a third aspect, a message transmission system based on SIP is provided in the present embodiment, comprising a distributed cache middleware, a service gateway, and the SIP signaling service cluster of the second aspect.
[0021] In a fourth aspect, an electronic device is provided in the present embodiment, comprising a memory and a processor, the memory storing a computer program, and the processor is configured to run the computer program to execute the message transmission method of the first aspect.
[0022] In a fifth aspect, a storage medium is provided in the present embodiment, storing a computer program, which is executed by a processor to implement the message transmission method of the first aspect.
[0023] Compared with the related art, the message transmission method, system and storage medium based on SIP are provided in the present embodiment. In the message transmission method, after receiving a service request distributed by the service gateway, the service request is converted into a first SIP instruction, and the first SIP instruction is sent to a SIP interactive object, and the first SIP instruction is stored in the distributed cache middleware. After receiving a receiving response sent by the SIP interactive object for the first SIP instruction, the first SIP instruction is removed from the distributed cache middleware, and after receiving a plurality of second SIP instructions sent by the SIP interactive object in sequence, the plurality of second SIP instructions are stored in the distributed cache middleware respectively. The second SIP instruction is generated after the SIP interactive object processes the service request. According to the protocol header content of the second SIP instruction, the same batch of second SIP instructions stored in the distributed cache middleware are determined and read. The read same batch of second SIP instructions are converted into a request result, and the request result is sent to the service gateway. It can break the strong binding relationship between the SIP interactive object and the SIP signaling service node, reduce the difficulty of horizontal expansion of the SIP signaling service, and improve the device carrying capacity of a single service node.
[0024] The details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects and advantages of the present application more apparent. BRIEF DESCRIPTION OF DRAWINGS
[0025] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0026] Figure 1 This is a block diagram of the terminal hardware structure of the message transmission method based on the session initiation protocol in this embodiment;
[0027] Figure 2 This is a flowchart of the message transmission method based on the session initiation protocol in this embodiment;
[0028] Figure 3 This is a block diagram of the Session Initiation Protocol (SIP) signaling service cluster structure for the message transmission method based on the SIP in this embodiment.
[0029] Figure 4 This is a structural block diagram of the message transmission system based on the session initiation protocol in this embodiment. Detailed Implementation
[0030] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0031] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this application do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," "third," etc., used in this application are merely to distinguish similar objects and do not represent a specific order of objects.
[0032] The method embodiments provided in this example can be executed on a terminal, computer, or similar electronic device with a certain computing power. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of the terminal for the message transmission method based on the session initiation protocol in this embodiment. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.
[0033] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the message transmission method based on the session initiation protocol in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0035] This embodiment provides a message transmission method based on the Session Initiation Protocol (SIP), which is used for any one service node in the SIP signaling service cluster, wherein the SIP signaling service cluster includes at least two service nodes. Figure 2This is a flowchart of the message transmission method based on the session initiation protocol in this embodiment, as follows: Figure 2 As shown, the process includes the following steps:
[0036] Step S210: After receiving the service request distributed by the service gateway, the service request is converted into a first session initialization protocol instruction, and then the first session initialization protocol instruction is sent to the session initialization protocol interaction object. At the same time, the first session initialization protocol instruction is stored in the distributed cache middleware.
[0037] The Session Initiation Protocol (SIP) signaling service cluster includes at least two service nodes, which may include a load balancer, such as Nginx, HAProxy, or Linux Virtual Server. The service gateway can receive service requests from web or mobile clients. These service requests may be related to services such as video recording list queries. The SIP interaction object can be a device conforming to the GB / T 28181 standard, such as a network camera or network video recorder. The distributed caching middleware can provide high-performance, high-availability, and high-capacity caching access capabilities, such as Redis, Memcached, or Couchbase. It should be noted that any service node in the aforementioned SIP signaling service cluster can be a specific service node determined through load balancing within the SIP signaling service cluster.
[0038] Specifically, the business gateway forwards the business request sent by the client to the Session Initiation Protocol (SIP) signaling service cluster. Through load balancing within the SIP signaling service cluster, the request is then forwarded to a currently healthy service node with relatively low load. This service node converts the business request from the business gateway into a first SIP instruction. This first SIP instruction includes a start line, a header, and a body. The start line represents the request and response, the header contains a series of header fields, and the body contains content related to the business request; for example, the header fields could be Via, From, or Call-ID. Subsequently, the service node sends this first SIP instruction to the SIP interaction object and simultaneously stores it in a distributed cache middleware.
[0039] Step S220: After receiving the receive response sent by the session initialization protocol interaction object for the first session initialization protocol instruction, the first session initialization protocol instruction is removed from the distributed cache middleware. After receiving multiple second session initialization protocol instructions sent by the session initialization protocol interaction object in sequence, the multiple second session initialization protocol instructions are stored in the distributed cache middleware respectively. The second session initialization protocol instruction is the instruction generated by the session initialization protocol interaction object after performing business processing on the business request.
[0040] After receiving the first session initiation protocol instruction, the session initiation protocol interaction object sends the received response to the service node executing step S210. Based on this response, the service node executing step S210 removes the first session initiation protocol instruction from the distributed cache middleware.
[0041] After processing a business request, the session initiation protocol interaction object generates a second session initiation protocol instruction. This instruction is then sent to the session initiation protocol signaling service cluster. Through load balancing, the cluster distributes the instruction to a healthy service node with relatively low load. This service node then stores the instruction in a distributed cache middleware. In this way, each second session initiation protocol instruction generated by the session initiation protocol interaction object after processing a business request can be stored in the distributed cache middleware. The service node used in each operation can be different.
[0042] Step S230: Based on the protocol header content of the second session initialization protocol instruction, determine and read the second session initialization protocol instructions stored in the same batch in the distributed cache middleware.
[0043] The service node stores the second session initialization protocol instruction in the distributed cache middleware by using the header content of the second session initialization protocol instruction as the key and the body content of the second session initialization protocol instruction as the value to form a key-value pair. Specifically, the service node stores the second session initialization protocol instruction in the distributed cache middleware by using the device code and instruction service code in the header content of the second session initialization protocol instruction as the key and the body content of the second session initialization protocol instruction as the value to form a key-value pair.
[0044] Multiple second session initialization protocol instructions generated by the session initialization protocol interaction object after processing the same business request have the same protocol header content and belong to the same batch; multiple second session initialization protocol instructions generated by the session initialization protocol interaction object after processing different business requests have different protocol header content and do not belong to the same batch.
[0045] Therefore, based on the device code and instruction service code in the protocol header of the second session initial protocol instruction, the second session initial protocol instructions in the same batch stored in the distributed cache middleware can be determined and read.
[0046] The reading method can be either timed fetching or asynchronous notification. Timed fetching involves reading the same batch of second session initial protocol instructions stored in the distributed cache middleware at regular intervals, which is completed by a timed task. Asynchronous notification involves obtaining the number of second session initial protocol instructions sent by the session initial protocol interaction object based on the protocol header content of the second session initial protocol instructions. When the service node determines that the session initial protocol interaction object has finished sending, the service node directly reads the same batch of second session initial protocol instructions stored in the distributed cache middleware.
[0047] Step S240: Convert the second session initialization protocol instructions read from the same batch into a request result and send the request result to the business gateway.
[0048] After the service node reads the second session initialization protocol instructions in the same batch, it performs business processing on the read second session initialization protocol instructions in the same batch according to the business request, obtains the request result, and sends the request result to the business gateway.
[0049] Specifically, after the service node reads the second session initialization protocol instructions in the same batch, it can sort the read second session initialization protocol instructions in the same batch according to the business request, and send the sorted result to the business gateway, which then sends the result to the client.
[0050] Through the above steps S210 to S240, compared with related technologies, this application, after receiving a service request distributed by the service gateway, converts the service request into a first session initialization protocol instruction by any service node in the session initialization protocol signaling service cluster, sends the first session initialization protocol instruction to the session initialization protocol interaction object, and simultaneously stores the first session initialization protocol instruction in the distributed cache middleware; after receiving the receive response sent by the session initialization protocol interaction object for the first session initialization protocol instruction, the first session initialization protocol instruction is removed from the distributed cache middleware, and after sequentially receiving multiple second session initialization protocol instructions sent by the session initialization protocol interaction object, the multiple second session initialization protocol instructions are stored in the distributed cache middleware respectively; the second session initialization protocol instruction is the instruction generated by the session initialization protocol interaction object after performing business processing on the service request; based on the protocol header content of the second session initialization protocol instruction, the same batch of second session initialization protocol instructions stored in the distributed cache middleware is determined and read; the read same batch of second session initialization protocol instructions are converted into request results and sent to the service gateway. It can break the strong binding relationship between the session initiation protocol interaction object and the session initiation protocol signaling service node, reduce the difficulty of horizontal expansion of the session initiation protocol signaling service, and increase the device capacity of a single service node.
[0051] In one embodiment, storing the first session initiation protocol instruction to a distributed cache middleware includes:
[0052] Using the header content of the first session initialization protocol instruction as the key and the body content of the first session initialization protocol instruction as the value, a key-value pair is formed and stored in the distributed cache middleware; the distributed cache middleware stores session initialization protocol instructions corresponding to different protocol header contents.
[0053] Specifically, the service node uses the request code in the header of the first session initial protocol instruction as the key and the protocol body of the first session initial protocol instruction as the value to form a key-value pair, and stores the first session initial protocol instruction in the distributed cache middleware.
[0054] By storing the first session initialization protocol command in a distributed cache middleware, the service node can resend the first session initialization protocol command if it fails to do so.
[0055] In one embodiment, moving the first session initiation protocol instruction out of the distributed cache middleware includes:
[0056] Based on the header content of the first session initialization protocol instruction, determine the session initialization protocol instruction to be removed from the distributed cache middleware, and remove the session initialization protocol instruction to be removed from the distributed cache middleware.
[0057] Specifically, the service node determines the session initialization protocol instruction to be removed from the distributed cache middleware based on the request code in the protocol header of the first session initialization protocol instruction, and removes the session initialization protocol instruction to be removed from the distributed cache middleware.
[0058] By moving the initial protocol instruction of the first session out of the distributed cache middleware, the distributed cache middleware can have more storage space.
[0059] In one embodiment, the multiple second session initialization protocol instructions stored in the distributed caching middleware are all stored with the same protocol header content corresponding to the multiple second session initialization protocol instructions as the key and the protocol body content corresponding to each second session initialization protocol instruction as the value.
[0060] Specifically, the multiple second session initialization protocol instructions stored in the distributed caching middleware are all stored with the device code and instruction service code in the same protocol header content corresponding to the multiple second session initialization protocol instructions as keys, and the protocol body content corresponding to each second session initialization protocol instruction as values.
[0061] By storing the same protocol header content corresponding to multiple second session initialization protocol instructions as the key and the protocol body content corresponding to each second session initialization protocol instruction as the value, these multiple second session initialization protocol instructions can be associated.
[0062] In one embodiment, the message transmission method based on the session initiation protocol may further include:
[0063] If no receive response is received from the session initiation protocol interaction object, the first session initiation protocol instruction stored in the distributed cache middleware is read according to the protocol header content of the first session initiation protocol instruction, and the first session initiation protocol instruction is resent to the session initiation protocol interaction object until a receive response is received from the session initiation protocol interaction object.
[0064] Specifically, if the service node does not receive a receive response from the session initialization protocol interaction object within the set time range, it is considered that the service node has not received a receive response from the session initialization protocol interaction object. Based on the request code in the header of the first session initialization protocol instruction, the service node reads the first session initialization protocol instruction stored in the distributed cache middleware. According to the retry policy, the service node resends the first session initialization protocol instruction to the session initialization protocol interaction object until a receive response is received from the session initialization protocol interaction object. The retry policy can specify the number of retries and the retry interval.
[0065] By reading the first session initialization protocol instruction stored in the distributed cache middleware according to the protocol header content of the first session initialization protocol instruction, and resending the first session initialization protocol instruction to the session initialization protocol interaction object until a receive response is received from the session initialization protocol interaction object, the situation where the service node fails to send the first session initialization protocol instruction can be resolved.
[0066] This embodiment also provides a session initiation protocol signaling service cluster 30, such as Figure 3 As shown, it includes at least two service nodes 302, which are used to execute the message transmission method provided in any of the above embodiments. This Session Initiation Protocol (SIP) signaling service cluster 30 can decouple the strong binding relationship between the SIP interaction object and the SIP signaling service node, reducing the difficulty of horizontal scaling of the SIP signaling service and increasing the device capacity of a single service node.
[0067] In one embodiment, the service node 302 includes a message aggregation module 303 and a message retry module 304. The message aggregation module 303 is used to aggregate session initialization protocol instructions in the same batch and can associate multiple session initialization protocol instructions in the same batch. The message retry module 304 is used to resend session initialization protocol instructions and can resolve the situation where the session initialization protocol instructions fail to be sent.
[0068] Among them, the message aggregation module 303 is responsible for determining and reading the same batch of second session initial protocol instructions stored in the distributed cache middleware according to the protocol header content of the second session initial protocol instructions; and is responsible for converting the read second session initial protocol instructions of the same batch into request results and sending the request results to the business gateway.
[0069] The message retry module 304 is responsible for storing the first session initialization protocol instruction in the distributed cache middleware; and for performing different processing based on the response of the session initialization protocol interaction object to the first session initialization protocol instruction. Specifically, when the session initialization protocol interaction object sends a receive response to the first session initialization protocol instruction, this module removes the first session initialization protocol instruction from the distributed cache middleware; when the session initialization protocol interaction object does not send a receive response to the first session initialization protocol instruction, this module first reads the first session initialization protocol instruction from the distributed cache middleware and then resends the first session initialization protocol instruction.
[0070] This embodiment also provides a message transmission system 40 based on a session initiation protocol, such as... Figure 4 As shown, it includes a distributed caching middleware 41, a service gateway 42, and a session initiation protocol signaling service cluster 30 provided in the above embodiments.
[0071] This embodiment also provides an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0072] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0073] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0074] S1, after receiving the business request distributed by the business gateway, converts the business request into a first session initialization protocol instruction, sends the first session initialization protocol instruction to the session initialization protocol interaction object, and stores the first session initialization protocol instruction in the distributed cache middleware.
[0075] S2, after receiving the receive response sent by the session initialization protocol interaction object in response to the first session initialization protocol instruction, the first session initialization protocol instruction is removed from the distributed cache middleware, and after receiving multiple second session initialization protocol instructions sent by the session initialization protocol interaction object in sequence, the multiple second session initialization protocol instructions are stored in the distributed cache middleware respectively; the second session initialization protocol instruction is the instruction generated by the session initialization protocol interaction object after performing business processing on the business request;
[0076] S3, based on the protocol header content of the second session initial protocol instruction, determine and read the same batch of second session initial protocol instructions stored in the distributed cache middleware;
[0077] S4 converts the second session initialization protocol instructions read from the same batch into a request result and sends the request result to the business gateway.
[0078] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.
[0079] Furthermore, in conjunction with the message transmission method based on the session initiation protocol provided in the above embodiments, this embodiment can also provide a storage medium for implementation. The storage medium stores a computer program; when executed by a processor, the computer program implements any of the message transmission methods based on the session initiation protocol in the above embodiments.
[0080] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0081] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0082] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.
[0083] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0084] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A message transmission method based on a session initiation protocol, characterized in that, The method is used for any one of the service nodes in a session initiation protocol signaling service cluster, wherein the session initiation protocol signaling service cluster includes at least two of the service nodes; the method includes: After receiving a business request distributed by the business gateway, the business request is converted into a first session initialization protocol instruction, and then the first session initialization protocol instruction is sent to the session initialization protocol interaction object. At the same time, the first session initialization protocol instruction is stored in the distributed cache middleware. After receiving the receive response from the Session Initialization Protocol (SIP) interaction object in response to the first SIP instruction, the first SIP instruction is removed from the distributed cache middleware. After receiving multiple second SIP instructions from the SIP interaction object in sequence, the multiple second SIP instructions are stored in the distributed cache middleware respectively. The second SIP instruction is an instruction generated by the SIP interaction object after performing business processing on the business request. Based on the header content of the second session initialization protocol instruction, determine and read the same batch of second session initialization protocol instructions stored in the distributed cache middleware; The second session initialization protocol instructions read from the same batch are converted into request results, and the request results are sent to the service gateway.
2. The message transmission method according to claim 1, characterized in that, The step of storing the first session initialization protocol instruction to a distributed cache middleware includes: Using the header content of the first session initiation protocol instruction as the key and the body content of the first session initiation protocol instruction as the value, a key-value pair is formed, and the key-value pair is stored in the distributed cache middleware; the distributed cache middleware stores session initiation protocol instructions corresponding to different protocol header contents.
3. The message transmission method according to claim 2, characterized in that, The step of removing the first session initiation protocol instruction from the distributed cache middleware includes: Based on the protocol header content of the first session initialization protocol instruction, the session initialization protocol instruction to be removed is determined from the distributed cache middleware, and the session initialization protocol instruction to be removed is removed from the distributed cache middleware.
4. The message transmission method according to claim 1, characterized in that, The distributed caching middleware stores multiple second session initialization protocol instructions, each with the same protocol header content corresponding to the multiple second session initialization protocol instructions as the key and the protocol body content corresponding to each second session initialization protocol instruction as the value.
5. The message transmission method according to claim 1, characterized in that, The method further includes: If no receive response is received from the Session Initiation Protocol (SIP) interaction object, the first SIP instruction stored in the distributed cache middleware is read according to the protocol header content of the first SIP instruction, and the first SIP instruction is resent to the SIP interaction object until the receive response is received from the SIP interaction object.
6. A session initiation protocol signaling service cluster, characterized in that, It includes at least two service nodes; the service nodes are used to execute the message transmission method according to any one of claims 1 to 5.
7. The Session Initiation Protocol Signalling Service Cluster according to claim 6, characterized in that, The service node includes a message aggregation module and a message retry module; The message aggregation module is used to aggregate session initialization protocol instructions in the same batch. The message retry module is used to resend the session initiation protocol command.
8. A message transmission system based on a session initiation protocol, characterized in that, include: Distributed caching middleware, business gateway, and the session initiation protocol signaling service cluster as described in claim 6.
9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the message transmission method according to any one of claims 1 to 5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the message transmission method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method for processing initial SIP requests by back-ends of an SIP group in the presence of a fault, and associated processing device
EP2442518A1
A method and a means for load balancing based on sip
WO2007131441A1