A communication method, device, system and storage medium
By separating the encrypted/decrypting services in the RTC communication system and using session status information for session recovery, the session interruption problem caused by SFU restart is solved, and the automatic recovery of encrypted communication and the improvement of user experience is achieved.
Patent Information
- Application Number
- CN202110064807.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-18
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-01-18
AI Technical Summary
During RTC real-time audio and video communication, the restart of the SFU will cause encrypt/decryption failure and session interruption, and the user must re-establish the session, especially in the case of high load, and the loss will be greater.
By separating the encrypted/decrypted service from the forwarding device in the communication system, using the encrypted/decrypted unit to undertake the encrypted/decrypted service work, and after the forwarding device is restarted, encrypted communication is realized by using the session status information in the storage unit to restore the session. Automatic recovery of the process.
It avoids session interruptions caused by rebooting of forwarding devices, improves user experience, ensures the continuity and stability of encrypted communication, and users are basically unaware of restarts.
Smart Images

Figure CN114827093B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method, device, system and storage medium. Background Art
[0002] In the RTC real-time audio and video communication process, the SFU (Selective forwarding Unit) is responsible for the encryption / decryption and forwarding processing of the audio and video media streams, and is the central node of the audio and video communication system.
[0003] SFU needs to be restarted in many cases such as crash, upgrade or expansion. SFU restart will cause encryption / decryption failure in RTC and session interruption. Users must re-establish the session, which brings inconvenience to users. Especially when the number of users under SFU load is high, the loss caused by restart is greater. Summary of the invention
[0004] Multiple aspects of the present application provide a communication method, device, system and storage medium for implementing hot restart of encrypted communication services.
[0005] The embodiment of the present application provides a communication system, including a forwarding device, an encryption / decryption unit and a storage unit, wherein the forwarding device is communicatively connected with the encryption / decryption unit and the storage unit;
[0006] The forwarding device is configured to record the session state information of the target session in the storage unit during the process of encrypting and forwarding the target session, as a basis for restoring the target session after the forwarding device is restarted; and initiate an encryption / decryption service request to the encryption / decryption unit for the target session;
[0007] The encryption / decryption unit is used to perform encryption / decryption processing on the target session according to the encryption / decryption service request to support the forwarding device to encrypt and forward the target session;
[0008] The storage unit is used to store the session state information of the target session.
[0009] The embodiment of the present application further provides a communication method, which is applicable to a forwarding device in a communication system, including:
[0010] In the process of encrypting and forwarding the target session, recording the session state information of the target session in a storage unit in the communication system as a basis for restoring the target session after the forwarding device is restarted;
[0011] An encryption / decryption service request is initiated to the encryption / decryption unit for the target session, so that the encryption / decryption unit performs encryption / decryption processing on the target session according to the encryption / decryption service request to support the forwarding device to encrypt and forward the target session.
[0012] The embodiment of the present application also provides a communication method, which is applicable to an encryption / decryption device in a communication system, including:
[0013] Receiving a communication handshake message for a target media stream initiated by a communication end of a target session forwarded by a forwarding device in the communication system;
[0014] According to the communication handshake message, perform communication negotiation with the communication end corresponding to the target session to obtain a communication key;
[0015] Based on the communication key, encrypting / decrypting the target media stream;
[0016] The encrypted / decrypted media stream is returned to the forwarding device so that the forwarding device can encrypt and forward the target session.
[0017] The embodiment of the present application also provides a forwarding device, including a memory, a processor, and a communication component;
[0018] The memory is used to store one or more computer instructions;
[0019] The processor is coupled to the memory and the communication component and is configured to execute the one or more computer instructions for:
[0020] In the process of encrypting and forwarding the target session, the communication component records the session state information of the target session in a storage unit in the communication system as a basis for restoring the target session after the forwarding device is restarted;
[0021] An encryption / decryption service request is initiated to the encryption / decryption unit for the target session, so that the encryption / decryption unit performs encryption / decryption processing on the target session according to the encryption / decryption service request to support the forwarding device to encrypt and forward the target session.
[0022] The embodiment of the present application also provides an encryption / decryption device, including a memory, a processor, and a communication component;
[0023] The memory is used to store one or more computer instructions;
[0024] The processor is coupled to the memory and the communication component and is configured to execute the one or more computer instructions for:
[0025] Receiving a communication handshake message for a target media stream initiated by a communication end of a target session forwarded by a forwarding device in the communication system;
[0026] According to the communication handshake message, perform communication negotiation with the communication end corresponding to the target session to obtain a communication key;
[0027] Based on the communication key, encrypting / decrypting the target media stream;
[0028] The encrypted / decrypted media stream is returned to the forwarding device so that the forwarding device can encrypt and forward the target session.
[0029] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the aforementioned communication method.
[0030] In the embodiment of the present application, the encryption / decryption unit is used to undertake the encryption / decryption service work, so that the encryption / decryption service can be separated from the forwarding device, which ensures that the encryption / decryption service in the encrypted communication process will not be affected by the restart of the forwarding device; the forwarding device undertakes the forwarding service work, and in the forwarding process, the session state information of the running session is recorded in the storage unit. Based on this, after the forwarding device is restarted, the session state information in the storage unit can be used as the basis for session recovery, so that the session can be automatically restored after the restart and the encryption / decryption service can be restored. Accordingly, in the embodiment of the present application, the restart of the forwarding device will no longer cause the session to be interrupted, and the user is basically unaware of the restart of the forwarding device, which can effectively improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0032] Figure 1 A schematic diagram of the structure of a communication system provided for an exemplary embodiment of the present application;
[0033] Figure 2 A logical diagram of an automatic recovery solution after a forwarding device restarts provided by an exemplary embodiment of the present application;
[0034] Figure 3 A schematic diagram of the structure of another communication system provided for an exemplary embodiment of the present application;
[0035] Figure 4 A logical schematic diagram of an encryption / decryption scheme provided for an exemplary embodiment of the present application;
[0036] Figure 5 A flow chart of a communication method provided for another exemplary embodiment of the present application;
[0037] Figure 6 A flowchart of another communication method provided for another exemplary embodiment of the present application;
[0038] Figure 7 A schematic diagram of the structure of a forwarding device provided for another exemplary embodiment of the present application;
[0039] Figure 8 A schematic structural diagram of an encryption / decryption device provided as yet another exemplary embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0041] At present, the restart of the forwarding device will cause the session to be interrupted, which brings inconvenience to the user. To improve these problems, in some embodiments of the present application: the encryption / decryption unit is used to undertake the encryption / decryption service work, so that the encryption / decryption service can be separated from the forwarding device, which ensures that the encryption / decryption service in the encrypted communication process will not be affected by the restart of the forwarding device; the forwarding device undertakes the forwarding service work, and in the forwarding process, the session state information of the running session is recorded in the storage unit. Based on this, after the forwarding device is restarted, the session state information in the storage unit can be used as a basis for session recovery, so that the session can be automatically restored after the restart and the encryption / decryption service can be restored. Accordingly, in the embodiments of the present application, the restart of the forwarding device will no longer cause the session to be interrupted, and the user is basically unaware of the restart of the forwarding device, which can effectively improve the user experience.
[0042] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0043] Figure 1 The structure diagram of the communication system provided by an exemplary embodiment of the present application is shown in FIG. Figure 1 As shown, the system includes: a forwarding device 10, an encryption / decryption unit 20 and a storage unit 30, and the forwarding device 10 is communicatively connected with the encryption / decryption unit 20 and the storage unit 30.
[0044] In terms of physical implementation, the forwarding device 10 can be a server device such as a conventional server, a cloud server, a cloud host, a virtual center, etc., wherein the composition of the server device mainly includes a processor, a hard disk, a memory, a system bus, etc., which is similar to a general computer architecture. For example, in an RTC scenario, the forwarding device 10 can be an SFU (Selective forwarding Unit). The storage unit 30 can be a distributed storage system, such as redis (Remote Dictionary Server). Of course, this embodiment is not limited to this, and this embodiment does not limit the physical implementation form of the forwarding device 10 and the storage unit 30.
[0045] The communication system provided in this embodiment can be used in various encrypted communication scenarios, for example, RTC (Real-time communication) scenarios, live broadcast scenarios, etc., wherein RTC scenarios may include but are not limited to online conferences, online education, video calls, etc., and live broadcast scenarios may include but are not limited to video surveillance, video live broadcast, etc. This embodiment does not limit the application scenarios.
[0046] In the encrypted communication scenario, the session is encrypted to protect the privacy of the communicator. Among them, the session is used to distinguish different communication terminals, and a single session corresponds to one communication terminal. When the communication terminal initiates a forwarding request to the forwarding device 10 for the first time, the forwarding device 10 can issue a session ID to it. When the communication terminal subsequently initiates a forwarding request to the forwarding device 10, the forwarding device 10 will confirm whether there is already a session ID corresponding to the communication terminal. If it exists, it is considered that these forwarding requests belong to the same session. If it does not exist (for example, the communication terminal has not initiated a forwarding request for a long time, the forwarding device 10 will delete the session ID sent to the communication terminal), then a new session ID will be created for the communication terminal. In this embodiment, the forwarding device 10 can provide forwarding services for different sessions (that is, different communication terminals). In the above-mentioned RTC-type scenarios, the session is usually bidirectional, and the communication terminal can initiate a push stream request to the forwarding device 10, and can also initiate a pull stream request. In the above-mentioned live broadcast scenario, the session is usually unidirectional, and the communication end usually only initiates a stream pull request to the forwarding device 10. Of course, this embodiment does not limit this, and the session can be configured as unidirectional or bidirectional according to actual needs.
[0047] Based on this, in this embodiment, the forwarding device 10 can create a target session and is responsible for encrypting and forwarding the target session. When the communication system is operating normally, the forwarding device 10 can record the session state information of the target session in the storage unit 30 during the process of encrypting and forwarding the target session, as a basis for restoring the target session after the forwarding device 10 is restarted. Preferably, the forwarding device 10 can select the storage unit 30 that is closest (for example, in the same area or the same computer room) to record the session state information to increase the session recovery speed. Accordingly, the storage unit 30 can be used to store the session state information of the target session.
[0048] In this embodiment, the forwarding device 10 can store the session state information in the form of key-value. To this end, the forwarding device 10 can configure the session key value session key for the target session and record the session state information under the session key. The session state information can be used to describe the attributes and configuration information of the session, and the session state information can include but is not limited to signaling state records, connection state records, encryption / decryption state records, media description information records or subscription information records. These exemplary session state information will be described below:
[0049] Signaling status record, used to record signaling interaction results;
[0050] Connection status record, used to record the last selected transmission path, for example, the ICE (interactive connectivity establishment) status can be recorded, mainly recording the last selected candidate pair;
[0051] Encryption / decryption status record, used to record the interaction information with the encryption / decryption unit 20, including but not limited to the identifier of the encryption / decryption task corresponding to the recording session, the task address identifier used in the encryption / decryption unit 20, etc.;
[0052] Media description information record, mainly records the negotiation results of media description information, such as the negotiation results of SDP (Session Description Protocol);
[0053] Subscription information record, used to record the subscription relationship between communication terminals.
[0054] It is worth noting that the above-mentioned session status information is only exemplary. In this embodiment, the forwarding device 10 may also record other types of information that can be used to support session recovery in the storage unit 30, and the present embodiment is not limited to this. In addition, the recorded content in the above-mentioned exemplary session status information is also only exemplary, and the present embodiment is not limited to this.
[0055] From the perspective of the target session, the forwarding device 10 may create a session key value and session state information for the target session when the target session is created, and delete the session key value and session state information corresponding to the target session in the storage unit 30 when the target session ends. Similarly, from the overall perspective, the forwarding device 10 may create a session key value and session state information for a new session in the storage unit 30 when a new session appears, and delete the session key value and session state information corresponding to the ended session in the storage unit 30 when the session ends. In actual applications, various session states may change in real time. In this embodiment, the forwarding device 10 may update the corresponding new session state information to the storage unit 30 when it is determined that the new conference state is successfully executed. Accordingly, the session state information stored in the storage unit 30 changes dynamically, so that the storage unit 30 can record the latest and most accurate session state information.
[0056] Accordingly, in this embodiment, the storage unit 30 can accurately and comprehensively record the session state information of the running session on the forwarding device 10, and provide an accurate and comprehensive basis for session recovery after the forwarding device 10 is restarted.
[0057] In addition, in this embodiment, the forwarding device 10 may also record the time information of the most recent startup in the storage unit 30. The time information may be used as a basis for determining whether there is a cyclic restart in a subsequent restart process.
[0058] In this embodiment, the forwarding device 10 may also initiate an encryption / decryption service request to the encryption / decryption unit 20 for the target session. For the encryption / decryption unit 20, the target session may be encrypted / decrypted according to the encryption / decryption service request to support the forwarding device 10 to encrypt and forward the target session. The encryption / decryption process performed by the encryption / decryption unit 20 will be described in detail later. Based on this, the forwarding device 10 no longer performs the encryption / decryption processing operation, so that the restart of the forwarding device 10 can be avoided from affecting the encryption / decryption service. After the forwarding device 10 is restarted, the encryption / decryption service can be automatically resumed.
[0059] It is worth noting that in this embodiment, the forwarding device 10, the encryption / decryption unit 20 and the storage unit 30 included in the communication system are not limited to Figure 1 Moreover, according to communication requirements, the deployment locations of the forwarding device 10, the encryption / decryption unit 20 and the storage unit 30 can be distributed in multiple areas, multiple computer rooms, etc., which are not limited in this embodiment.
[0060] In this embodiment, the encryption / decryption unit 20 is used to undertake the encryption / decryption service work, so that the encryption / decryption service can be separated from the forwarding device 10, which ensures that the encryption / decryption service in the encrypted communication process will not be affected by the restart of the forwarding device 10; the forwarding device 10 undertakes the forwarding service work, and during the forwarding process, the session state information of the running session is recorded in the storage unit 30. Based on this, after the forwarding device 10 is restarted, the session state information in the storage unit 30 can be used as a basis for session recovery, so that the session can be automatically restored after the restart and the encryption / decryption service can be restored. Accordingly, in the embodiment of the present application, the restart of the forwarding device 10 will no longer cause the session to be interrupted, and the user is basically unaware of the restart of the forwarding device 10, which can effectively improve the user experience.
[0061] In the above or below embodiments, the forwarding device 10 may be restarted in the event of a crash, upgrade, or expansion. Figure 2 A logical diagram of an automatic recovery solution after a forwarding device restarts provided by an exemplary embodiment of the present application. Figure 2 For the forwarding device 10, after restarting, the session state information corresponding to at least one session can be read from the storage unit 30; and at least one session can be restored according to the session state information corresponding to the at least one session.
[0062] Generally, a single session may contain at least one media stream within a generation cycle, and media streams may be divided into push streams, pull streams, etc., wherein push streams may refer to media streams provided by a communication terminal to the forwarding device 10, and pull streams may refer to push streams provided by other communication terminals to which a communication terminal subscribes. For example, communication terminal A subscribes to communication terminals B and C in the target session, then communication terminal A may provide the media streams collected by itself as push streams to the forwarding device 10, and the forwarding device 10 may use the media streams provided by communication terminals B and C as pull streams subscribed by communication terminal A, and provide the pull streams subscribed by communication terminal A to communication terminal A. Based on this, in this embodiment, the forwarding device 10 may first restore the session containing the push stream, and then restore the session containing the pull stream, to ensure that the session containing the pull stream can find the required push stream. Reference Figure 2 , the forwarding device 10 may first parse the session status information containing the push stream and restore the session containing the push stream, and then parse the session status information containing the pull stream and restore the session containing the pull stream. The forwarding device 10 may also determine whether there is a session containing the corresponding push stream on the local machine for the session containing the pull stream. If yes, the subscription relationship between the push stream and the pull stream may be restored. If not, a cascade connection may be established with other forwarding devices 10, and the corresponding push stream may be pulled from other forwarding devices 10.
[0063] In this embodiment, the forwarding device 10 can restore the instance corresponding to at least one session and set corresponding attributes and configuration parameters according to the session state information corresponding to at least one session read from the storage unit 30. The restoration operation performed by the forwarding device 10 on a single session adapted to the aforementioned session state information includes but is not limited to: signaling state restoration, connection state restoration, encryption / decryption state restoration, media description state restoration, subscription state restoration or cascade restoration, etc.
[0064] The following will take the encryption / decryption state recovery and cascade recovery operations as examples to illustrate the session recovery process.
[0065] During the encryption / decryption state recovery process, the forwarding device 10 can determine the identifier of the encryption / decryption task corresponding to at least one session and the task address identifier used in the encryption / decryption unit 20 according to the encryption / decryption state record; and restore the encryption / decryption task corresponding to at least one session according to the identifier of the encryption / decryption task corresponding to at least one session and the task address identifier used in the encryption / decryption unit 20. If the encryption / decryption unit 20 includes multiple encryption / decryption devices 22, the aforementioned task address identifier used in the encryption / decryption unit 20 can be the task address identifier of the encryption / decryption device 22 used. There are several encryption / decryption tasks running on the encryption / decryption device 22, and each encryption / decryption task occupies a different task address. The task address identifier can be a port identifier, etc. In this way, the forwarding device 10 can parse out the encryption / decryption task identifier corresponding to at least one session from the encryption / decryption status record, thereby finding the port identifier of the encryption / decryption device 22 that performs the encryption / decryption task. Based on this, the forwarding device 10 can re-establish the port mapping relationship between itself and the encryption / decryption device 22 under each encryption / decryption task, thereby restoring each encryption / decryption task, that is, restoring the encryption / decryption service.
[0066] During the cascade recovery process, the forwarding device 10 can use the recovered session containing the pull stream as a new session and perform cascade operations according to the standard cascade process, thereby restoring the cascade between the forwarding devices 10. Cascade recovery can effectively solve the capacity and coverage requirements of the forwarding device 10, and support the forwarding device 10 to pull the session containing the corresponding push stream from other forwarding devices 10 for the recovered session containing the pull stream.
[0067] In addition, as mentioned above, the forwarding device 10 may record the time information of the last startup in the storage unit 30. Figure 2 , after connecting to the storage unit 30, the forwarding device 10 can read the time information of the most recent startup and determine whether the interval time between the most recent restart and the current one exceeds a preset threshold, for example Figure 2If the time exceeds 30s, the subsequent automatic recovery operation can be performed; if it does not exceed 30s, it can be determined that the forwarding device 10 is in a cyclic restart state. If it is determined that the forwarding device 10 is in a cyclic restart state, the forwarding device 10 can clear the session state information stored in the storage unit 30 and no longer perform session recovery, thereby avoiding affecting the forwarding device 10 from performing normal forwarding services. Of course, in this case, the recovery can also be suspended, and after troubleshooting the cause of the cyclic restart, the storage unit 30 can be connected again and the session can be recovered without clearing the session state information in the storage unit 30. This embodiment is not limited to this.
[0068] After executing the above recovery process, the forwarding device 10 can enter the normal forwarding working state. During the entire recovery process, the session that was in operation before the restart is completely restored, and various attributes and configuration parameters remain basically unchanged. Therefore, the user is unaware of the recovery process, and there will be no problem of session interruption and need to be re-initiated. In this way, this embodiment can realize the automatic recovery function after the forwarding device 10 is restarted, which can not only realize the restart recovery of the forwarding device 10 after the crash, but also provide the prerequisites for the hot upgrade, hot migration, real-time expansion and other functions of the forwarding device 10, ensuring the rock-solid forwarding performance of the forwarding device 10.
[0069] In the above or below embodiments, the encryption / decryption unit 20 may provide encryption / decryption services for the target session. It is worth noting that the encryption / decryption unit 20 may provide encryption / decryption services when the forwarding device 10 is operating normally and when the forwarding device 10 is restarted. Therefore, in this embodiment, it is not necessary to distinguish in which of the above circumstances the encryption / decryption unit 20 provides encryption / decryption services.
[0070] In this embodiment, the encryption / decryption unit 20 can provide encryption / decryption services in units of media streams. Accordingly, for the forwarding device 10, in response to a forwarding request for a target media stream in a target session initiated by a communication end of the target session, an encryption / decryption service request can be initiated to the encryption / decryption unit 20; the encryption / decryption unit 20 can perform encryption / decryption processing on the target media stream to support the forwarding device 10 in forwarding the target media stream.
[0071] Figure 3 A schematic diagram of the structure of another communication system provided by an exemplary embodiment of the present application. Figure 3 The encryption / decryption unit 20 may include a control device 21 and at least one encryption / decryption device 22. In physical implementation, the control device 21 and the encryption / decryption device 22 may be server devices such as conventional servers, cloud servers, cloud hosts, virtual centers, etc. Of course, terminal devices such as computers may also be used, which is not limited in this embodiment.
[0072] Based on this, the forwarding device 10 can send a forwarding request for the target media stream to the control device 21 in the encryption / decryption unit 20; the control device 21 can determine the target encryption / decryption device 22 for providing encryption / decryption services from at least one encryption / decryption device 22 in response to the encryption / decryption service request for the target media stream, and provide the description information of the target encryption / decryption device 22 to the forwarding device 10; the target encryption / decryption device 22 can be used to perform encryption / decryption processing on the target media stream.
[0073] In this embodiment, the control device 21 can schedule at least one encryption / decryption device 22. The control device 21 can manage the device status information of at least one encryption / decryption device 22 by using the storage unit 30; accordingly, at least one encryption / decryption device 22 can record its own device status information in the storage unit 30. Based on this, when receiving a forwarding request for a target media stream, the control device 21 can read the device status information of at least one encryption / decryption device 22 from the storage unit 30; according to the device status information of at least one encryption / decryption device 22, select an encryption / decryption device 22 that meets a preset condition from at least one encryption / decryption device 22 as a target encryption / decryption device 22.
[0074] The device status information may include but is not limited to load information or deployment location information, etc. The aforementioned preset conditions may be in an idle state and / or the closest distance to the forwarding device 10, etc. For example, when the control device 21 schedules the encryption / decryption device 22, it may try to ensure that the encryption / decryption device 22 in the same machine room provides services for the forwarding device 10, which can effectively improve the speed of the encryption / decryption service and reduce the packet loss problem during the interaction between the forwarding device 10 and the encryption / decryption device 22.
[0075] In this embodiment, the forwarding request may include media description information, which is used to describe the attributes of the media stream and the session. For example, the media description information may describe the encoding format used by the media stream, the transmission protocol used by the session forwarding, etc., so that the communication end and the forwarding device 10 can both know the interaction capabilities of each other. This embodiment is not limited to this. For example, in the RTC scenario, the media description information may use SDP. In this embodiment, the forwarding device 10 may obtain the identity authentication information of the target encryption / decryption device 22; add the identity authentication information to the media description information to obtain the response information; return the response information to the communication end corresponding to the target session, so that the communication end can authenticate the target encryption / decryption device 22. In response to the above, the forwarding device 10 may record the media description information with the added identity authentication information in the storage unit 30 as a kind of session state information. Among them, the identity authentication information may be a summary of the identity certificate, such as a summary of the certificate issued by the CA. The identity authentication process may be integrated in the process of signaling interaction between the forwarding device 10 and the communication end corresponding to the target session, and the media description information may be used as one of the information of the signaling interaction. After the identity authentication is passed, the communication end corresponding to the target session can be triggered to perform subsequent handshake negotiation and media stream transmission and other operations.
[0076] On the basis of determining the target encryption / decryption device 22, the communication end corresponding to the target session can also shake hands with the forwarding device 10 and initiate a communication handshake message, and the forwarding device 10 can forward the communication handshake message initiated by the communication end corresponding to the target session to the target encryption / decryption device 22. The target encryption / decryption device 22 can receive the communication handshake message initiated by the communication end of the target session forwarded by the forwarding device 10; according to the communication handshake message, it can negotiate with the communication end corresponding to the target session to obtain the communication key; based on the communication key, it can encrypt / decrypt the target media stream. That is, the forwarding device 10, as an intermediate medium, supports the communication end corresponding to the target session to conduct a handshake negotiation with the target encryption / decryption device 22 for the target media stream to obtain the communication key used for encrypting / decrypting the target media stream.
[0077] In this embodiment, the forwarding request for the target media stream can be a push stream request or a pull stream request. There are slight differences in the encryption / decryption process triggered by the push stream request and the pull stream request as follows:
[0078] If the forwarding request for the target media stream in the target session is a push stream request, the forwarding device 10 may receive the encrypted target media stream sent by the communication end corresponding to the target session, and provide the encrypted target media stream to the target encryption / decryption device 22. The target encryption / decryption device 22 may decrypt the encrypted target media stream according to the communication key corresponding to the target media stream to obtain the target media stream, and send the target media stream back to the forwarding device 10 through a secure transmission path.
[0079] If the forwarding request for the target media stream in the target session is a pull stream request, the forwarding device 10 may send the target media stream to the target encryption / decryption device 22 through a secure transmission path. The target encryption / decryption device 22 may encrypt the target media stream according to the communication key corresponding to the target media stream to obtain an encrypted target media stream, and send the encrypted target media stream to the forwarding device 10, so that the forwarding device 10 can forward the encrypted target media stream to the communication end of the target session.
[0080] In actual applications, a secure transmission path, such as an intranet path, can be established between the forwarding device 10 and the target encryption / decryption device 22. In this way, data can be transmitted between the forwarding device 10 and the target encryption / decryption device 22 in the format of private information to ensure the security of the transmitted data.
[0081] Figure 4 A logical diagram of an encryption / decryption scheme provided for an exemplary embodiment of the present application, referring to Figure 4 , respectively showing the encryption scheme during the push stream by the communication end A and the decryption scheme during the pull stream by the communication end B.
[0082] During the streaming process at communication end A:
[0083] 1. Communication end A sends a streaming request carrying SDP to SFU.
[0084] 2. The SFU requests an idle encryption / decryption device from the control device and obtains the summary of the certificate of the target encryption / decryption device.
[0085] 3. SFU fills the certificate summary into the SDP of the response and returns it to communication end A.
[0086] 4. SFU applies for encryption / decryption services from the target encryption / decryption device.
[0087] 5. After receiving the SDP, communication terminal A shakes hands with SFU. SFU sends the handshake message to the target encryption / decryption device in a private message format, and the target encryption / decryption device actually performs handshake negotiation with communication terminal A.
[0088] 6. After the handshake is completed, both communication end A and the target encryption / decryption device generate corresponding communication keys.
[0089] 7. Communication terminal A sends the encrypted media stream to SFU, SFU encapsulates the encrypted media stream into a private format stream and sends it to the target encryption / decryption device, and the target encryption / decryption device decrypts and sends it back to SFU in a private format.
[0090] During the process of pulling the stream at communication end B:
[0091] 1. Communication end B sends a stream pull request carrying SDP to SFU. The stream pull request carries the identifier of communication end A to which communication end B subscribes.
[0092] 2. The SFU requests an idle encryption / decryption device from the control device and obtains the summary of the certificate of the target encryption / decryption device.
[0093] 3. SFU fills the certificate summary into the SDP of the response and returns it to communication end A.
[0094] 4. SFU applies for encryption / decryption services from the target encryption / decryption device.
[0095] 5. After receiving the SDP, communication terminal A shakes hands with SFU. SFU sends the handshake message to the target encryption / decryption device in a private message format, and the target encryption / decryption device actually performs handshake negotiation with communication terminal A.
[0096] 6. After the handshake is completed, both communication end A and the target encryption / decryption device generate corresponding communication keys.
[0097] 7. SFU sends the media stream of communication terminal A stored in the local machine and decrypted by the target encryption / decryption device to the target encryption / decryption device in a private encapsulated manner. The target encryption / decryption device encrypts it and then encapsulates it in a private format and sends it back to SFU. SFU sends the encrypted stream to communication terminal B, completing the function of communication terminal B pulling the media stream of communication terminal A.
[0098] It is worth mentioning that Figure 4 The encryption / decryption scheme shown is only exemplary, and the order of each link is not limited to this, and each link can be increased or decreased as needed. The encryption / decryption scheme provided in this embodiment is not limited to Figure 4 shown.
[0099] In the above or following embodiments, there may be multiple forwarding devices in the communication system, and the communication system may further include a management device, which is used to manage the multiple forwarding devices and is in communication connection with the multiple forwarding devices. The deployment locations of the multiple forwarding devices may be the same or different.
[0100] Based on this, in this embodiment, if the address of the communication end of the target session changes, load balancing is performed on at least one forwarding device to determine the target forwarding device; the target forwarding device is used to read the session status information of the target session from the storage unit to migrate the target session to the target forwarding device.
[0101] For example, if the communication end of the target session switches from a mobile network to a wireless network, its communication address will change. In this case, no matter which forwarding device the management device deploys the target session to, the deployed forwarding device can read the session state information corresponding to the target session from the storage unit, thereby restoring the target session, which can achieve hot migration of the target session. This can greatly improve the flexibility of the forwarding device in the communication system, and the user will not be aware of the hot migration process, ensuring the user experience.
[0102] Figure 5 A flow chart of a communication method provided by another exemplary embodiment of the present application is provided. The method can be executed by a forwarding device. The forwarding device can be implemented as a combination of software and / or hardware. The forwarding device can be integrated in a forwarding device. Figure 5 , the method comprising:
[0103] Step 500: During the process of encrypting and forwarding the target session, the session state information of the target session is recorded in a storage unit in the communication system as a basis for restoring the target session after the forwarding device is restarted;
[0104] Step 510: Initiate an encryption / decryption service request to the encryption / decryption unit for the target session, so that the encryption / decryption unit performs encryption / decryption processing on the target session according to the encryption / decryption service request to support the forwarding device to encrypt and forward the target session.
[0105] In an optional embodiment, the target session includes at least one media stream, and the step of initiating an encryption / decryption service request to the encryption / decryption unit for the target session includes:
[0106] In response to a forwarding request for a target media stream in a target session initiated by a communication end of a target session, an encryption / decryption service request is initiated to an encryption / decryption unit.
[0107] In an optional embodiment, the method further comprises:
[0108] If the forwarding request for the target media stream in the target session is a push stream request, receiving the encrypted target media stream sent by the communication end corresponding to the target session;
[0109] Providing the encrypted target media stream to the encryption / decryption unit so that the encryption / decryption unit decrypts the encrypted target media stream;
[0110] The receiving encryption / decryption unit decrypts and obtains the target media stream.
[0111] In an optional embodiment, the method further comprises:
[0112] If the forwarding request for the target media stream in the target session is a stream pull request, the target media stream is sent to the encryption / decryption unit through a secure transmission path, so that the encryption / decryption unit encrypts the target media stream;
[0113] Receiving the encrypted target media stream sent by the encryption / decryption unit;
[0114] Forward the encrypted target media stream to the communication end of the target session.
[0115] In an optional embodiment, the forwarding request for the target media stream in the target session includes media description information, and the method further includes:
[0116] Obtaining the identity authentication information of the target encryption / decryption unit;
[0117] Add the identity authentication information to the media description information to obtain the response information;
[0118] The response information is returned to the communication end corresponding to the target session so that the communication end can authenticate the target encryption / decryption unit.
[0119] In an optional embodiment, the method further comprises:
[0120] Receiving a communication handshake message initiated by a communication end of a target session with an encryption / decryption unit;
[0121] The communication handshake message is forwarded to the encryption / decryption unit for encryption / decryption. Danyang shakes hands with the communication end of the target session to negotiate the communication key according to the communication handshake message, and encrypts / decrypts the target media stream according to the communication key.
[0122] In an optional embodiment, the session state information includes one or more of a signaling state record, a connection state record, an encryption / decryption state record, a media description information record, and a subscription information record.
[0123] In an optional embodiment, the method further comprises:
[0124] After restarting, reading session state information corresponding to at least one session from the storage unit;
[0125] At least one session is restored according to the session state information corresponding to each of the at least one session.
[0126] In an optional embodiment, the session state information includes an encryption / decryption state record, and the method further includes:
[0127] Determine, according to the encryption / decryption state record, an identifier of an encryption / decryption task corresponding to at least one session and an identifier of a task address used in an encryption / decryption unit;
[0128] The encryption / decryption task corresponding to at least one session is restored according to the identifier of the encryption / decryption task corresponding to at least one session and the task address identifier used in the encryption / decryption unit.
[0129] It is worth noting that the technical details in the above-mentioned embodiments of the communication method can refer to the relevant description of the forwarding device in the aforementioned system embodiment. In order to save space, they will not be repeated here, but this should not cause a loss in the scope of protection of this application.
[0130] Figure 6 A flow chart of another communication method provided by another exemplary embodiment of the present application, the method can be executed by an encryption / decryption device, the encryption / decryption device can be implemented as a combination of software and / or hardware, and the encryption / decryption device can be integrated in an encryption / decryption device. Figure 6 , the method comprising:
[0131] Step 600: Receive a communication handshake message for a target media stream initiated by a communication end of a target session forwarded by a forwarding device in a communication system;
[0132] Step 601: According to the communication handshake message, perform communication negotiation with the communication end corresponding to the target session to obtain a communication key;
[0133] Step 602: Encrypt / decrypt the target media stream based on the communication key;
[0134] Step 603: Return the encrypted / decrypted media stream to the forwarding device so that the forwarding device can encrypt and forward the target session.
[0135] In an optional embodiment, the method further comprises:
[0136] Recording its own device status information in a storage unit in the communication system, so that when a control device in the communication system receives an encryption / decryption request initiated by a forwarding device, the control device determines a target encryption / decryption device for responding to the encryption / decryption request from at least one encryption / decryption device managed by the control device;
[0137] If the device itself is determined as the target encryption / decryption device, it executes the communication handshake message and subsequent operations for the target media stream initiated by the communication end of the target session forwarded by the forwarding device in the receiving communication system.
[0138] It is worth noting that the technical details in the above-mentioned embodiments of the communication method can refer to the relevant description of the encryption / decryption device in the aforementioned system embodiment. In order to save space, they will not be repeated here, but this should not cause a loss in the scope of protection of this application.
[0139] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 601 to 603 can be device A; for another example, the execution subject of steps 601 and 602 can be device A, and the execution subject of step 603 can be device B; and so on.
[0140] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as 601, 602, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.
[0141] Figure 7 A schematic diagram of the structure of a forwarding device provided by another exemplary embodiment of the present application. Figure 7 As shown, the forwarding device includes: a memory 70, a processor 71 and a communication component 72.
[0142] The processor 71 is coupled to the memory 70 and the communication component 72, and is used to execute the computer program in the memory 70, so as to:
[0143] In the process of encrypting and forwarding the target session, the session state information of the target session is recorded in a storage unit in the communication system through the communication component 72, which serves as a basis for restoring the target session after the forwarding device is restarted;
[0144] The communication component 72 initiates an encryption / decryption service request to the encryption / decryption unit for the target session, so that the encryption / decryption unit performs encryption / decryption processing on the target session according to the encryption / decryption service request to support the forwarding device to encrypt and forward the target session.
[0145] In an optional embodiment, the target session includes at least one media stream, and when the processor 71 initiates an encryption / decryption service request to the encryption / decryption unit for the target session, it is configured to:
[0146] In response to a forwarding request for a target media stream in a target session initiated by a communication end of a target session, an encryption / decryption service request is initiated to an encryption / decryption unit.
[0147] In an optional embodiment, the processor 71 is further configured to:
[0148] If the forwarding request for the target media stream in the target session is a push stream request, receiving the encrypted target media stream sent by the communication end corresponding to the target session;
[0149] Providing the encrypted target media stream to the encryption / decryption unit so that the encryption / decryption unit decrypts the encrypted target media stream;
[0150] The receiving encryption / decryption unit decrypts and obtains the target media stream.
[0151] In an optional embodiment, the processor 71 is further configured to:
[0152] If the forwarding request for the target media stream in the target session is a stream pull request, the target media stream is sent to the encryption / decryption unit through a secure transmission path, so that the encryption / decryption unit encrypts the target media stream;
[0153] Receiving the encrypted target media stream sent by the encryption / decryption unit;
[0154] Forward the encrypted target media stream to the communication end of the target session.
[0155] In an optional embodiment, the forwarding request for the target media stream in the target session includes media description information, and the processor 71 is further configured to:
[0156] Obtaining the identity authentication information of the target encryption / decryption unit;
[0157] Add the identity authentication information to the media description information to obtain the response information;
[0158] The response information is returned to the communication end corresponding to the target session so that the communication end can authenticate the target encryption / decryption unit.
[0159] In an optional embodiment, the processor 71 is further configured to:
[0160] Receiving a communication handshake message initiated by a communication end of a target session with an encryption / decryption unit;
[0161] The communication handshake message is forwarded to the encryption / decryption unit for encryption / decryption. Danyang shakes hands with the communication end of the target session to negotiate the communication key according to the communication handshake message, and encrypts / decrypts the target media stream according to the communication key.
[0162] In an optional embodiment, the session state information includes one or more of a signaling state record, a connection state record, an encryption / decryption state record, a media description information record, and a subscription information record.
[0163] In an optional embodiment, the processor 71 is further configured to:
[0164] After restarting, reading session state information corresponding to at least one session from the storage unit;
[0165] At least one session is restored according to the session state information corresponding to each of the at least one session.
[0166] In an optional embodiment, the session state information includes an encryption / decryption state record, and the processor 71 is further configured to:
[0167] Determine, according to the encryption / decryption state record, an identifier of an encryption / decryption task corresponding to at least one session and an identifier of a task address used in an encryption / decryption unit;
[0168] The encryption / decryption task corresponding to at least one session is restored according to the identifier of the encryption / decryption task corresponding to at least one session and the task address identifier used in the encryption / decryption unit.
[0169] Further, if Figure 7 As shown, the computing device also includes: a power supply component 73 and other components. Figure 7 Only some components are shown schematically, which does not mean that the forwarding device only includes Figure 7 Components shown.
[0170] It is worth noting that the technical details in the above-mentioned embodiments of the forwarding device can be referred to the relevant description in the aforementioned system embodiment. In order to save space, they will not be repeated here, but this should not cause loss of the protection scope of this application.
[0171] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be performed by the forwarding device in the above method embodiment.
[0172] Figure 8 A schematic diagram of the structure of an encryption / decryption device provided by another exemplary embodiment of the present application. Figure 8 As shown, the encryption / decryption device includes: a memory 80, a processor 81 and a communication component 82.
[0173] The processor 81 is coupled to the memory 80 and the communication component 82, and is used to execute the computer program in the memory 80, so as to:
[0174] Receiving, through the communication component 82, a communication handshake message for a target media stream initiated by a communication end of a target session and forwarded by a forwarding device in the communication system;
[0175] According to the communication handshake message, perform communication negotiation with the communication end corresponding to the target session to obtain a communication key;
[0176] Encrypt / decrypt the target media stream based on the communication key;
[0177] The encrypted / decrypted media stream is returned to the forwarding device through the communication component 82 so that the forwarding device can encrypt and forward the target session.
[0178] In an optional embodiment, the processor 81 is further configured to:
[0179] Recording its own device status information in a storage unit in the communication system, so that when a control device in the communication system receives an encryption / decryption request initiated by a forwarding device, the control device determines a target encryption / decryption device for responding to the encryption / decryption request from at least one encryption / decryption device managed by the control device;
[0180] If the device itself is determined as the target encryption / decryption device, it executes the communication handshake message and subsequent operations for the target media stream initiated by the communication end of the target session forwarded by the forwarding device in the receiving communication system.
[0181] Further, if Figure 8 As shown, the encryption / decryption device also includes: a power supply component 83 and other components. Figure 8 Only some components are shown schematically, which does not mean that the encryption / decryption device only includes Figure 8 Components shown.
[0182] It is worth noting that the technical details in the above-mentioned encryption / decryption device embodiments can be referred to the relevant description in the aforementioned system embodiments. In order to save space, they will not be repeated here, but this should not cause a loss in the scope of protection of this application.
[0183] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be performed by the encryption / decryption device in the above method embodiment.
[0184] Above Figure 7 and 8 The memory in the computer is used to store computer programs and can be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0185] Above Figure 7 and 8The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0186] Above Figure 7 and 8 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0187] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0188] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0189] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0190] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0191] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0192] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0193] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0194] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0195] The above is only the embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A communication system, characterized in that: It includes a forwarding device, an encryption / decryption unit and a storage unit, wherein the forwarding device is communicatively connected with the encryption / decryption unit and the storage unit; The forwarding device is configured to record the session state information of the target session in the storage unit during the process of encrypting and forwarding the target session, as a basis for restoring the target session after the forwarding device is restarted; and initiate an encryption / decryption service request to the encryption / decryption unit in response to a forwarding request for a target media stream in the target session initiated by a communication terminal corresponding to the target session; The encryption / decryption unit is used to perform communication negotiation with the communication end corresponding to the target session according to the encryption / decryption service request to obtain a communication key; Based on the communication key, encrypting / decrypting the target media stream in the target session to support the forwarding device to encrypt and forward the target media stream; The storage unit is used to store the session state information of the target session.
2. The system according to claim 1, characterized in that The encryption / decryption unit includes a control device and at least one encryption / decryption device; The control device is configured to determine, in response to the encryption / decryption service request for the target media stream, a target encryption / decryption device for providing encryption / decryption services from the at least one encryption / decryption device, and provide description information of the target encryption / decryption device to the forwarding device; The target encryption / decryption device is used to perform encryption / decryption processing on the target media stream.
3. The system according to claim 2, characterized in that The forwarding device is also used for: If the forwarding request for the target media stream in the target session is a streaming request, receiving the encrypted target media stream sent by the communication end corresponding to the target session; Providing the encrypted target media stream to the target encryption / decryption device; When the target encryption / decryption device performs encryption / decryption processing on the target media stream, the target encryption / decryption device is used to: Decrypting the encrypted target media stream to obtain the target media stream; The target media stream is sent back to the forwarding device through a secure transmission path.
4. The system according to claim 2, characterized in that The forwarding device is also used for: If the forwarding request for the target media stream in the target session is a stream pull request, sending the target media stream to the target encryption / decryption device through a secure transmission path; When the target encryption / decryption device performs encryption / decryption processing on the target media stream, the target encryption / decryption device is used to: Encrypting the target media stream to obtain an encrypted target media stream; The encrypted target media stream is sent to the forwarding device, so that the forwarding device forwards the encrypted target media stream to the communication end of the target session.
5. The system according to claim 2, characterized in that The target encryption / decryption device is also used for: Receiving a communication handshake message initiated by the communication end of the target session forwarded by the forwarding device; According to the communication handshake message, communication negotiation is performed with the communication end corresponding to the target session to obtain a communication key.
6. The system according to claim 2, characterized in that The forwarding request for the target media stream in the target session includes media description information, and the forwarding device is further used to: Obtaining identity authentication information of the target encryption / decryption device; Adding the identity authentication information to the media description information to obtain response information; The response information is returned to the communication end corresponding to the target session so that the communication end can authenticate the target encryption / decryption device.
7. The system according to claim 2, characterized in that The storage unit is also used for: storing device status information of the at least one encryption / decryption device; When the control device determines a target encryption / decryption device for providing an encryption / decryption service from the at least one encryption / decryption device, the control device is configured to: Reading device status information of the at least one encryption / decryption device from the storage unit; According to the device status information of the at least one encryption / decryption device, an encryption / decryption device that meets a preset condition is selected from the at least one encryption / decryption device as the target encryption / decryption device.
8. The system according to claim 7, characterized in that The device status information includes one or more of load information or deployment location information, and the preset conditions include being in an idle state and / or being at the shortest distance to the forwarding device.
9. The system according to claim 1, characterized in that The session state information includes one or more of a signaling state record, a connection state record, an encryption / decryption state record, a media description information record, and a subscription information record.
10. The system according to claim 1, characterized in that The forwarding device is further used for: After restarting, reading session state information corresponding to at least one session from the storage unit; The at least one session is restored according to the session state information corresponding to each of the at least one session.
11. The system according to claim 10, characterized in that The session state information includes an encryption / decryption state record, and the forwarding device is further used for: Determining, according to the encryption / decryption status record, an identifier of the encryption / decryption task corresponding to each of the at least one session and a task address identifier used in the encryption / decryption unit; The encryption / decryption task corresponding to each of the at least one session is restored according to the identifier of the encryption / decryption task corresponding to each of the at least one session and the task address identifier used in the encryption / decryption unit.
12. The system according to claim 1, characterized in that The number of the forwarding devices is multiple, and the system further includes a management device, the management device is communicatively connected to at least one forwarding device, and the management device is used to: If the address of the communication end of the target session changes, load balancing is performed on the at least one forwarding device to determine the target forwarding device; The target forwarding device is used to read the session state information of the target session from the storage unit to migrate the target session to the target forwarding device.
13. A communication method, applicable to a forwarding device in a communication system, characterized in that: include: In the process of encrypting and forwarding the target session, recording the session state information of the target session in a storage unit in the communication system as a basis for restoring the target session after the forwarding device is restarted; In response to a forwarding request for a target media stream in the target session initiated by the communication end corresponding to the target session, an encryption / decryption service request is initiated to an encryption / decryption unit, so that the encryption / decryption unit can communicate and negotiate with the communication end corresponding to the target session according to the encryption / decryption service request, obtain a communication key, and perform encryption / decryption processing on the target media stream in the target session based on the communication key, so as to support the forwarding device to encrypt and forward the target media stream.
14. The method according to claim 13, characterized in that Also includes: If the forwarding request for the target media stream in the target session is a streaming request, receiving the encrypted target media stream sent by the communication end corresponding to the target session; Providing the encrypted target media stream to the encryption / decryption unit so that the encryption / decryption unit decrypts the encrypted target media stream; The target media stream obtained by decryption by the encryption / decryption unit is received.
15. The method according to claim 13, characterized in that Also includes: If the forwarding request for the target media stream in the target session is a stream pull request, the target media stream is sent to the encryption / decryption unit through a secure transmission path, so that the encryption / decryption unit encrypts the target media stream; Receiving the encrypted target media stream sent by the encryption / decryption unit; The encrypted target media stream is forwarded to the communication end of the target session.
16. The method according to claim 13, characterized in that The forwarding request for the target media stream in the target session includes media description information, and the method further includes: Obtaining identity authentication information of the target encryption / decryption unit; Adding the identity authentication information to the media description information to obtain response information; The response information is returned to the communication end corresponding to the target session so that the communication end can authenticate the target encryption / decryption unit.
17. The method according to claim 13, characterized in that Also includes: Receiving a communication handshake message initiated by the communication end of the target session with the encryption / decryption unit; The communication handshake message is forwarded to the encryption / decryption unit, so that the encryption / decryption unit shakes hands with the communication end of the target session to negotiate a communication key according to the communication handshake message.
18. The method according to claim 13, characterized in that The session state information includes one or more of a signaling state record, a connection state record, an encryption / decryption state record, a media description information record, and a subscription information record.
19. The method according to claim 13, characterized in that Also includes: After restarting, reading session state information corresponding to at least one session from the storage unit; The at least one session is restored according to the session state information corresponding to each of the at least one session.
20. The method according to claim 19, characterized in that The session state information includes an encryption / decryption state record, and the method further includes: Determining, according to the encryption / decryption status record, an identifier of the encryption / decryption task corresponding to each of the at least one session and a task address identifier used in the encryption / decryption unit; The encryption / decryption task corresponding to each of the at least one session is restored according to the identifier of the encryption / decryption task corresponding to each of the at least one session and the task address identifier used in the encryption / decryption unit.
21. A communication method, applicable to an encryption / decryption device in a communication system, characterized in that: include: Receiving a communication handshake message for a target media stream initiated by a communication end of a target session forwarded by a forwarding device in the communication system; According to the communication handshake message, perform communication negotiation with the communication end corresponding to the target session to obtain a communication key; Based on the communication key, encrypting / decrypting the target media stream; The encrypted / decrypted media stream is returned to the forwarding device so that the forwarding device can encrypt and forward the target session.
22. A forwarding device, characterized in that: Includes memory, processor, and communication components; The memory is used to store one or more computer instructions; The processor is coupled to the memory and the communication component and is configured to execute the one or more computer instructions for: In the process of encrypting and forwarding the target session, the communication component records the session state information of the target session in a storage unit in the communication system as a basis for restoring the target session after the forwarding device is restarted; In response to a forwarding request for a target media stream in the target session initiated by the communication end corresponding to the target session, an encryption / decryption service request is initiated to an encryption / decryption unit, so that the encryption / decryption unit can communicate and negotiate with the communication end corresponding to the target session according to the encryption / decryption service request, obtain a communication key, and perform encryption / decryption processing on the target media stream in the target session based on the communication key, so as to support the forwarding device to encrypt and forward the target media stream.
23. An encryption / decryption device, characterized in that: Includes memory, processor, and communication components; The memory is used to store one or more computer instructions; The processor is coupled to the memory and the communication component and is configured to execute the one or more computer instructions for: Receiving a communication handshake message for a target media stream initiated by a communication end of a target session forwarded by a forwarding device in the communication system; According to the communication handshake message, perform communication negotiation with the communication end corresponding to the target session to obtain a communication key; Based on the communication key, encrypting / decrypting the target media stream; The encrypted / decrypted media stream is returned to the forwarding device so that the forwarding device can encrypt and forward the target session.
24. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the communication method according to any one of claims 13 to 21.
Citation Information
Patent Citations
Media stream transmission method
CN101102463A
Information processing method, system and device and computer readable storage medium
CN110489244A
