Audio and video transmission method and device, equipment, storage medium and program product

Through the combination of public key encryption algorithm and session key, the problem of low security of audio and video transmission is solved, and the confidentiality and integrity protection of audio and video data during the transmission process are achieved.

CN118677628APending Publication Date: 2024-09-20TENCENT CLOUD COMPUTING (BEIJING) CO LTD

Patent Information

Application Number
CN202310268085.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-15
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

The security of existing audio and video transmission technology is low, and it is difficult to effectively protect the confidentiality and integrity of audio and video data during transmission.

Method used

Using a combination of public key encryption algorithm and session key, the encrypted audio and video data is transmitted after verification by the server to ensure the confidentiality and integrity of the data during transmission. Specific steps include obtaining the session creation request and public key, generating the session key, performing encryption and decryption operations, and transmitting audio and video data in the target session.

Benefits of technology

It improves the security of audio and video transmission, prevents data leakage and tampering, and ensures data confidentiality and integrity during the transmission process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118677628A
    Figure CN118677628A
Patent Text Reader

Abstract

The embodiment of the invention discloses an audio and video transmission method and device, equipment, a storage medium and a program product. In the embodiment, a session creation request and a first public key generated according to a first cryptographic algorithm are acquired, and the session creation request and the first public key are sent to a server; receiving a digital envelope returned by the server based on the session creation request, wherein the digital envelope comprises session configuration encrypted by using a session key generated according to a second cryptographic algorithm and a session key encrypted by using a first public key; decrypting the encrypted session key by using a first private key corresponding to the first public key to obtain the session key, and decrypting the encrypted session configuration according to the session key to obtain the session configuration; and encrypting the audio and video in the target session corresponding to the session configuration by adopting the session key to obtain the encrypted audio and video, and transmitting the encrypted audio and video in the client of the target session. According to the embodiment, the security of audio and video transmission can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of multimedia transmission technology, and in particular to an audio and video transmission method, device, equipment, storage medium and program product. Background Art

[0002] With the development of Internet technology, the application scenarios of audio and video technology (Real-Time Communication, RTC) are increasing. For example, audio and video technology is applied to online meetings, online classes, and live broadcasts.

[0003] Audio and video technology refers to the technology that enables users in different places to transmit sound and images to each other through transmission lines and multimedia devices, so that users in different places can interact with each other in real time. However, the current audio and video technology has a low security for the audio and video transmission method. Summary of the invention

[0004] The embodiments of the present application provide an audio and video transmission method, device, equipment, storage medium and program product, which can solve the technical problem of low security of the method for transmitting audio and video.

[0005] The present application provides an audio and video transmission method, including:

[0006] Obtain a session creation request and a first public key generated according to a first national encryption algorithm, and send the session creation request and the first public key to the server;

[0007] Receiving a digital envelope returned by the server based on the session creation request, wherein the digital envelope includes a session configuration encrypted by a session key generated according to a second national encryption algorithm and a session key encrypted by the first public key;

[0008] Decrypting the encrypted session key using the first private key corresponding to the first public key to obtain the session key, and decrypting the encrypted session configuration according to the session key to obtain the session configuration;

[0009] The session key is used to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and the encrypted audio and video is transmitted in the client of the target session.

[0010] Accordingly, an embodiment of the present application provides another audio and video transmission method, including:

[0011] Receiving a session creation request sent by a terminal and a first public key generated according to a first national encryption algorithm;

[0012] Based on the session creation request, generate a session configuration corresponding to the session creation request, and generate a session key according to the second national secret algorithm;

[0013] Encrypting the session configuration using the session key to obtain an encrypted session configuration, and encrypting the session key using the first public key to obtain an encrypted session key;

[0014] Generate a digital envelope according to the encrypted session configuration and the encrypted session key;

[0015] Returning the digital envelope to the terminal, so that the terminal uses the first private key corresponding to the first public key to decrypt the encrypted session key to obtain the session key, decrypts the encrypted session configuration according to the session key to obtain the session configuration, and uses the session key to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video;

[0016] Receive the encrypted audio and video sent by the terminal, and transmit the encrypted audio and video in the client of the target session.

[0017] Accordingly, an embodiment of the present application provides an audio and video transmission device, including:

[0018] An acquisition module, used to acquire a session creation request and a first public key generated according to a first national encryption algorithm, and send the session creation request and the first public key to a server;

[0019] A receiving module, configured to receive a digital envelope returned by the server based on the session creation request, wherein the digital envelope includes a session configuration encrypted by a session key generated according to a second national encryption algorithm and a session key encrypted by the first public key;

[0020] a decryption module, configured to decrypt the encrypted session key using the first private key corresponding to the first public key to obtain the session key, and decrypt the encrypted session configuration according to the session key to obtain the session configuration;

[0021] The transmission module is used to use the above session key to encrypt the audio and video in the target session corresponding to the above session configuration to obtain the encrypted audio and video, and transmit the encrypted audio and video in the client of the above target session.

[0022] Optionally, the above session configuration includes a target token and a session identifier. Accordingly, the transmission module is specifically used to execute:

[0023] Using the session key, encrypt the audio and video in the target session corresponding to the session identifier to obtain encrypted audio and video;

[0024] The encrypted audio and video and the target token are sent to the server, so that when the server passes the verification of the target token, the audio and video in the target session are transmitted in the client of the target session.

[0025] Optionally, the digital envelope further includes a session summary obtained by performing a summary operation on the session configuration. Accordingly, the transmission module is specifically configured to execute:

[0026] Performing a digest operation on the above session configuration to obtain a target session digest corresponding to the above session configuration;

[0027] If the target session digest matches the session digest, the session key is used to encrypt the audio and video in the target session corresponding to the session configuration.

[0028] Optionally, the digital envelope further includes encrypted signaling data obtained by encrypting the session key. Accordingly, the transmission module is specifically configured to execute:

[0029] Decrypting the encrypted signaling data using the session key to obtain decrypted signaling data;

[0030] According to the decrypted signaling data, the encrypted audio and video are transmitted in the client of the target session.

[0031] Optionally, the transmission module is specifically used to execute:

[0032] Performing a hash operation on the audio and video in the target session according to a third-country cryptographic algorithm to obtain a hash value corresponding to the audio and video in the target session;

[0033] The encrypted audio and video and the hash value are transmitted in the client of the target session, so that the client of the target session verifies the integrity of the audio and video in the target session according to the hash value.

[0034] Optionally, the acquisition module is specifically used to execute:

[0035] Obtain a first character string, and use the first private key to sign the first character string to obtain a first digital signature;

[0036] Sending the first digital signature to the server, so that when the server verifies the first digital signature successfully using the first public key, the server signs the second character string using the second private key of the server to obtain a second digital signature;

[0037] Receiving the second digital signature returned by the server based on the first digital signature;

[0038] If the second digital signature is successfully verified using the second public key corresponding to the second private key, the session creation request is sent to the server.

[0039] Optionally, the acquisition module is specifically used to execute:

[0040] Performing a digest operation on the first character string to obtain a first digest corresponding to the first character string;

[0041] Using the first private key, sign the first summary to obtain a first digital signature;

[0042] The first digital signature and the first character string are sent to the server, so that when the server verifies the first digital signature using the first public key to obtain the first summary and the second summary obtained by performing a summary operation on the first character string matches the first summary, the server uses the second private key of the server to sign the second character string to obtain a second digital signature.

[0043] Optionally, the above-mentioned audio and video transmission device further includes:

[0044] Download module for execution:

[0045] Sending an audio and video recording request to the server, so that the server records the audio and video in the target session according to the audio and video recording request to obtain the recorded audio and video;

[0046] Receive the recorded audio and video returned by the server.

[0047] Optionally, the download module is specifically used to execute:

[0048] Sending an audio and video download request to the server, so that the server uses the first public key to encrypt the recorded audio and video to obtain the first audio and video;

[0049] Receiving the first audio and video returned by the server according to the audio and video request;

[0050] The first audio and video are decrypted according to the first private key to obtain the recorded audio and video.

[0051] Optionally, the acquisition module is also used to perform:

[0052] Sending a key acquisition request to the server, so that the server generates the target key according to the key acquisition request by using the second national secret algorithm, and encrypts the target key by using the first public key;

[0053] Receiving the encrypted target key returned by the server based on the key acquisition request;

[0054] The encrypted target key is decrypted using the first private key to obtain the target key.

[0055] Accordingly, the download module is specifically used to execute:

[0056] Sending an audio and video recording request to the server, so that the server records the audio and video in the target session according to the audio and video recording request to obtain the recorded audio and video, and encrypts the recorded audio and video with the target key to obtain the second audio and video;

[0057] Receiving the second audio and video returned by the server based on the audio and video recording request;

[0058] The second audio and video is decrypted according to the target key to obtain the recorded audio and video.

[0059] Optionally, the transmission module is specifically used to execute:

[0060] Extract key audio and video frames and non-key audio and video frames from the audio and video in the target session corresponding to the above session configuration;

[0061] Using the session key, encrypt the key audio and video frame to obtain an encrypted key audio and video frame;

[0062] The encrypted key audio and video frames and the non-key audio and video frames are transmitted in the client of the target session.

[0063] Accordingly, an embodiment of the present application provides another audio and video transmission device, comprising:

[0064] A first receiving module, used to receive a session creation request sent by a terminal and a first public key generated according to a first national encryption algorithm;

[0065] A first generating module, configured to generate a session configuration corresponding to the session creation request based on the session creation request, and to generate a session key according to a second national secret algorithm;

[0066] An encryption module, used to encrypt the session configuration using the session key to obtain an encrypted session configuration, and to encrypt the session key using the first public key to obtain an encrypted session key;

[0067] A second generating module, used for generating a digital envelope according to the encrypted session configuration and the encrypted session key;

[0068] a return module, configured to return the digital envelope to the terminal, so that the terminal uses the first private key corresponding to the first public key to decrypt the encrypted session key to obtain the session key, decrypt the encrypted session configuration according to the session key to obtain the session configuration, and use the session key to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video;

[0069] The second receiving module is used to receive the encrypted audio and video sent by the terminal, and transmit the encrypted audio and video in the client of the target session.

[0070] Optionally, the above-mentioned audio and video transmission module also includes:

[0071] Authentication module, which performs:

[0072] Receiving a first digital signature sent by the terminal, where the first digital signature is a signature obtained by signing the first character string using the first private key;

[0073] Using the first public key to verify the first digital signature;

[0074] If the verification of the first digital signature is passed, a second character string is obtained, and the second character string is signed with a second private key to obtain a second digital signature;

[0075] The second digital signature is returned to the terminal, so that the terminal verifies the second digital signature using the second public key corresponding to the second private key.

[0076] Optionally, the above-mentioned audio and video transmission module also includes:

[0077] Recording module, used to perform:

[0078] Receiving an audio or video recording request sent by the above terminal;

[0079] According to the audio and video recording request, the audio and video in the target session are recorded to obtain the recorded audio and video;

[0080] The recorded audio and video are sent to the terminal.

[0081] Optionally, the first receiving module is further configured to execute:

[0082] Receiving the key acquisition request sent by the terminal, and generating the target key according to the key acquisition request by using the second national secret algorithm;

[0083] Encrypting the target key using the first public key to obtain an encrypted target key;

[0084] The encrypted target key is sent to the terminal, so that the terminal uses the first private key to decrypt the encrypted target key to obtain the target key.

[0085] Accordingly, the recording module is specifically used to perform:

[0086] Encrypting the recorded audio and video using the target key to obtain a second audio and video;

[0087] The second audio and video are sent to the terminal, so that the terminal uses the target key to decrypt the second audio and video to obtain the recorded audio and video.

[0088] In addition, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the audio and video transmission method provided in the embodiment of the present application.

[0089] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for loading by a processor to execute any audio and video transmission method provided in the embodiment of the present application.

[0090] In addition, an embodiment of the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, any audio and video transmission method provided in the embodiment of the present application is implemented.

[0091] In an embodiment of the present application, a session creation request and a first public key generated according to a first national secret algorithm are obtained, and the session creation request and the first public key are sent to a server; a digital envelope returned by the server based on the session creation request is received, the digital envelope including a session configuration encrypted by a session key generated according to a second national secret algorithm and a session key encrypted by the first public key; the encrypted session key is decrypted by a first private key corresponding to the first public key to obtain the session key, and the encrypted session configuration is decrypted according to the session key to obtain the session configuration; the session key is used to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and the encrypted audio and video are transmitted in the client of the target session, so as to realize the transmission of audio and video by the first national secret algorithm and the second national secret algorithm, and improve the security of the transmitted audio and video. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0093] Figure 1 It is a scene diagram of the audio and video transmission process provided by the embodiment of the present application;

[0094] Figure 2 It is a flowchart of the audio and video transmission method provided in the embodiment of the present application;

[0095] Figure 3 It is a flowchart of another audio and video transmission method provided in an embodiment of the present application;

[0096] Figure 4 It is a flowchart of another audio and video transmission method provided in an embodiment of the present application;

[0097] Figure 5 It is a schematic diagram of the key distribution process provided by an embodiment of the present application;

[0098] Figure 6 is a schematic diagram of a process for creating or joining a session provided in an embodiment of the present application;

[0099] Figure 7 is a schematic diagram of a process for acquiring signaling data provided in an embodiment of the present application;

[0100] Figure 8 It is a schematic diagram of the transmission process of audio and video of an online conference provided in an embodiment of the present application;

[0101] Fig. 9 is a schematic diagram of an audio and video transmission system provided in an embodiment of the present application;

[0102] Fig.10 It is a schematic diagram of downloading recorded audio and video provided in an embodiment of the present application;

[0103] Fig.11 is a schematic diagram of the key system structure provided in an embodiment of the present application;

[0104] Fig.12 It is a structural schematic diagram of an audio and video transmission device provided in an embodiment of the present application;

[0105] Fig.13 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0106] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. 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 those skilled in the art without creative work are within the scope of protection of this application.

[0107] The embodiments of the present application provide an audio and video transmission method, device, equipment, storage medium and program product, wherein the equipment may be an electronic device, the storage medium may be a computer storage medium, and the program product may be a computer program product. The audio and video transmission device may be integrated in an electronic device, and the electronic device may be a server, a terminal or other device.

[0108] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.

[0109] Furthermore, multiple servers may form a blockchain, and the servers are nodes on the blockchain.

[0110] The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0111] For example, Figure 1 As shown, the terminal obtains a session creation request and a first public key generated according to the first national secret algorithm, and sends the session creation request and the first public key to the server. Based on the session creation request, the server generates a session configuration corresponding to the session creation request, and generates a session key according to the second national secret algorithm, uses the session key to encrypt the session configuration to obtain the encrypted session configuration, and uses the first public key to encrypt the session key to obtain the encrypted session key, generates a digital envelope according to the encrypted session configuration and the encrypted session key, and returns the digital envelope to the terminal. The terminal uses the first private key corresponding to the first public key to decrypt the encrypted session key to obtain the session key, and decrypts the encrypted session configuration according to the session key to obtain the session configuration; uses the session key to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and transmits the encrypted audio and video in the client of the target session.

[0112] In addition, the term "plurality" in the embodiments of the present application refers to two or more than two. The terms "first" and "second" in the embodiments of the present application are used to distinguish descriptions and should not be understood as implying relative importance.

[0113] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.

[0114] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.

[0115] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, allowing various application systems to obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". From the user's perspective, the resources in the "cloud" are infinitely scalable and can be obtained at any time, used on demand, expanded at any time, and paid for by use.

[0116] As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.

[0117] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.

[0118] Cloud Computing Education (CCEDU for short) refers to an education platform service based on the cloud computing business model. On the cloud platform, all educational institutions, training institutions, enrollment service institutions, publicity institutions, industry associations, management institutions, industry media, legal structures, etc. are integrated into a resource pool. Each resource is displayed and interacted with each other, and communication is carried out on demand to reach an agreement, thereby reducing education costs and improving efficiency.

[0119] Cloud conferencing is an efficient, convenient and low-cost conferencing format based on cloud computing technology. Users only need to use the Internet interface and perform simple and easy-to-use operations to quickly and efficiently share voice, data files and videos with teams and customers around the world. The cloud conferencing service provider helps users operate complex technologies such as data transmission and processing during the meeting.

[0120] At present, domestic cloud conferences are mainly concentrated on service content based on the SaaS (Software as a Service) model, including telephone, network, video and other service forms. Video conferencing based on cloud computing is called cloud conferencing.

[0121] In the era of cloud conferencing, data transmission, processing, and storage are all handled by the computer resources of video conferencing manufacturers. Users no longer need to purchase expensive hardware or install cumbersome software. They only need to open a browser and log in to the corresponding interface to conduct efficient remote meetings.

[0122] The cloud conference system supports dynamic cluster deployment of multiple servers and provides multiple high-performance servers, which greatly improves the stability, security and availability of conferences. In recent years, video conferencing has been welcomed by many users because it can greatly improve communication efficiency, continuously reduce communication costs, and upgrade internal management levels. It has been widely used in various fields such as government, transportation, finance, operators, education, and enterprises. There is no doubt that after the use of cloud computing, video conferencing has a stronger appeal in terms of convenience, speed, and ease of use, which will surely stimulate the arrival of a new wave of video conferencing applications.

[0123] The embodiments of the present application can be applied to real-time audio and video scenarios, such as cloud education, cloud conferencing, live broadcast, online collaboration, and remote office.

[0124] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0125] In this embodiment, the description will be made from the perspective of an audio and video transmission device, which can be specifically integrated in a server or terminal and other equipment. To facilitate the description of the audio and video transmission method of the present application, the following will provide a detailed description of the audio and video transmission device integrated in a terminal, that is, a detailed description will be given with the terminal as the execution subject.

[0126] See also Figure 2 , Figure 2 : is a flowchart of an audio and video transmission method provided by an embodiment of the present application. The audio and video transmission method may include:

[0127] S201, obtaining a session creation request and a first public key generated according to a first national encryption algorithm, and sending the session creation request and the first public key to a server.

[0128] A session refers to the way different users interact through electronic devices. It can be understood as a virtual room that is established at a certain point in time and then ended at a later point in time. For example, a session can refer to an online class, an online meeting, or a live broadcast. A session creation request refers to information that you want to establish a target session.

[0129] National secret algorithms refer to domestically produced cryptographic algorithms recognized by the State Cryptography Administration, which include national secret algorithms that generate symmetric keys, national secret algorithms that generate asymmetric keys, and national secret algorithms that generate hash values.

[0130] The first national secret algorithm may be a national secret algorithm for generating an asymmetric key. For example, the first national secret algorithm may be an sm2 algorithm or an sm9 algorithm, which is not limited in the present embodiment of the present application.

[0131] When the first public key and the first private key are generated according to the SM2 algorithm, the process of generating the first public key and the second private key may be:

[0132] Generate a first random number and obtain a preset elliptic curve;

[0133] The first random number is used as a first private key, and a first public key is generated according to the first random number and a preset elliptic curve.

[0134] The terminal may first generate a first public key and a first private key according to the first national encryption algorithm, and store the first public key and the first private key in a preset storage space. Then, when the terminal obtains a session creation request, it obtains the first public key from the preset storage space, and then sends the session creation request and the first public key to the server.

[0135] Alternatively, after generating the first public key and the first private key, the terminal may first send the first public key to the server, and then when the terminal obtains the session creation request, the terminal may send the session creation request to the server.

[0136] Alternatively, after obtaining the session creation request, the terminal may generate a first public key and a second private key according to the first national encryption algorithm, and then send the first public key and the session creation request to the server.

[0137] The manner in which the terminal sends the session creation request and the first public key may be selected according to actual circumstances, and this application does not limit this.

[0138] In order to further improve the security of audio and video transmission, in some embodiments, sending a session creation request to the server includes:

[0139] Obtaining a first character string, and signing the first character string using a first private key to obtain a first digital signature;

[0140] Sending the first digital signature to the server, so that when the server verifies the first digital signature successfully using the first public key, the server signs the second character string using the second private key of the server to obtain the second digital signature;

[0141] Receiving a second digital signature returned by the server based on the first digital signature;

[0142] If the second digital signature is verified successfully using the second public key corresponding to the second private key, the session creation request is sent to the server.

[0143] The first character string may be an identifier of a user using the terminal, or may be a random character string, which may include at least one character.

[0144] The generation method of the second private key and the second public key can refer to the generation method of the first private key and the first public key, and the embodiments of the present application will not be repeated here.

[0145] In an embodiment of the present application, a first character string is obtained, and the first character string is signed with a first private key to obtain a first digital signature; the first digital signature is sent to a server, so that when the server successfully verifies the first digital signature with the first public key, the server uses the second private key of the server to sign the second character string to obtain a second digital signature; the second digital signature returned by the server based on the first digital signature is received; if the second digital signature is successfully verified with the second public key corresponding to the second private key, a session creation request is sent to the server, so that the terminal verifies the identity of the server, and the server verifies the identity of the terminal, thereby improving the security of subsequent audio and video transmission.

[0146] Optionally, the first character string is signed with the first private key, and a process of obtaining the first digital signature may be:

[0147] Performing a hash operation on the first character string to obtain a first hash value;

[0148] Generate a signature random number, and generate a first elliptic curve point according to the signature random number and a base point of a preset elliptic curve;

[0149] Performing an addition fusion process on the first hash value and the first elliptic curve point to obtain a first fused value, and performing a modulo operation on the first fused value and the order of a base point of a preset elliptic curve to obtain a first target value;

[0150] The first private key, the signature random number, and the first target value are merged to obtain a second merged value, and a modulo operation is performed on the second merged value and the order of the base point of the preset elliptic curve to obtain a second target value;

[0151] A first digital signature is generated according to the first target value and the second target value.

[0152] The process of fusing the first private key, the signature random number and the first target value to obtain the second fused value may be:

[0153] The first target value and the first private key are multiplied and fused to obtain a candidate value, and the signature random number and the first candidate value are subtracted and fused to obtain a first difference value;

[0154] Performing an addition fusion process on the first private key and the first value (the first value may be set according to actual conditions, for example, the first value may be 1) to obtain a first added value;

[0155] The first difference value and the first added value are divided and fused to obtain a second fused value.

[0156] The process of using the second private key of the server to sign the second character string can refer to the process of using the first private key to sign the first character string, and the embodiments of the present application will not be repeated here.

[0157] Optionally, the process of verifying the first digital signature using the first public key may be:

[0158] Performing an additive fusion process on the first target value and the second target value in the first digital signature to obtain a first candidate verification value;

[0159] Performing a modulo operation on the first candidate verification value and the order of the base point of the preset elliptic curve to obtain a second candidate verification value;

[0160] Determine a second elliptic curve point according to the second target value, a base point of the preset elliptic curve, the second candidate verification value, and the first public key;

[0161] Performing a hash operation on the first character string to obtain a second hash value, and performing addition fusion processing on the second hash value and the second elliptic curve point to obtain a second addition value;

[0162] Perform a modulo operation on the second added value and the order of the base point of the preset elliptic curve to obtain a verification value;

[0163] If the verification value is the same as the first target value, the verification of the first digital signature succeeds.

[0164] The process of verifying the second digital signature using the second public key can refer to the process of verifying the first digital signature using the first public key, and the embodiments of the present application will not be repeated here.

[0165] In some other embodiments, the first character string is signed using the first private key to obtain a first digital signature, including:

[0166] Performing a digest operation on the first string to obtain a first digest corresponding to the first string;

[0167] Using the first private key, signing the first summary to obtain a first digital signature;

[0168] The first digital signature is sent to the server, so that when the server verifies the first digital signature successfully using the first public key, the server uses the second private key of the server to sign the second character string to obtain the second digital signature, including:

[0169] The first digital signature and the first character string are sent to the server, so that when the server verifies the first digital signature using the first public key to obtain the first digest and the second digest obtained by performing a digest operation on the first character string matches the first digest, the server uses the second private key to sign the second character string to obtain the second digital signature.

[0170] In an embodiment of the present application, a digest operation is first performed on the first string to obtain a first digest corresponding to the first string, and then the first private key is used to sign the first digest to obtain a first digital signature. The first digital signature and the first string are then sent to the server, so that when the server verifies the first digital signature using the first public key to obtain the first digest and the second digest obtained by performing a digest operation on the first string matches the first digest, it means that the first string has not been tampered with, and the second private key of the server can be used to sign the second string to obtain a second digital signature.

[0171] Among them, the method of performing digest operation on the first character string can be selected according to actual conditions. For example, a message digest algorithm (Message Digest, MD) or a secure hash algorithm (Secure Hash Algorithm, SHA) can be used, which is not limited in the embodiment of the present application.

[0172] At this time, after obtaining the second character string, the server can also perform a summary operation on the second character string to obtain a second summary, and then use the second private key to sign the second summary to obtain a second digital signature, and return the second character string and the second digital signature to the terminal.

[0173] S202. Receive a digital envelope returned by the server based on the session creation request, where the digital envelope includes a session configuration encrypted by a session key generated according to a second national encryption algorithm and a session key encrypted by a first public key.

[0174] The session configuration refers to the attribute information of the target session corresponding to the session configuration. The attribute information of the target session may include at least one of the session identifier, session address, time, and user who established the target session.

[0175] After receiving the session creation request, the server generates a session configuration corresponding to the session creation request according to the session creation request, and generates a session key according to the second national encryption algorithm, and then uses the session key to encrypt the session configuration to obtain the encrypted session configuration, and uses the first public key to encrypt the session key to obtain the encrypted session key, and then generates a digital envelope according to the encrypted session configuration and the encrypted session key, and returns the digital envelope to the terminal, so that the terminal obtains the digital envelope.

[0176] The second national secret algorithm may be a national secret algorithm for generating a symmetric key. For example, the second national secret algorithm may be an sm1 algorithm or an sm4 algorithm.

[0177] When the second national encryption algorithm is the SM4 algorithm, the process of the server using the session key to encrypt the session configuration can be:

[0178] Generate multiple round keys according to the session key, and group the session configuration into multiple sub-session configurations;

[0179] Selecting a candidate round key from multiple round keys, and using a round function to generate a candidate encryption result according to the candidate round key and the subsession configuration;

[0180] If there is an unscreened round key among the multiple round keys, the subsession configuration is updated according to the candidate encryption result to obtain an updated subsession configuration, the updated subsession configuration is used as the subsession configuration, and the step of screening the candidate round keys from the multiple round keys is returned to be executed;

[0181] If multiple round keys have been screened, a target encryption result is screened out from multiple candidate encryption results, and the target encryption result is reversely transformed to obtain an encrypted session configuration.

[0182] When the first public key is an asymmetric key generated by using the SM2 algorithm, the process of using the first public key to encrypt the session key may be:

[0183] Generate an encrypted random number, and determine a third elliptic curve point according to the encrypted random number and a base point of a preset elliptic curve;

[0184] Determine a fourth elliptic curve point according to the encrypted random number and the first public key;

[0185] Determine an adjustment factor corresponding to the session key according to the fourth elliptic curve point and the length of the session key through a key derivation function (KDF);

[0186] According to the adjustment coefficient, the session key is adjusted to obtain a candidate ciphertext corresponding to the session key;

[0187] Performing a hash operation on the fourth elliptic curve point and the session key to obtain a hash value corresponding to the session key;

[0188] An encrypted session key is generated according to the third elliptic curve point, the candidate ciphertext, and the hash value corresponding to the session key.

[0189] In an embodiment of the present application, the digital envelope includes a session configuration encrypted with a session key and a session key encrypted with a first public key, thereby preventing the session configuration and the session key from being leaked, improving the security of the session configuration and the session key, and thereby improving the security of subsequent transmission of audio and video based on the session configuration and the session key.

[0190] S203: Decrypt the encrypted session key using the first private key corresponding to the first public key to obtain the session key, and decrypt the encrypted session configuration according to the session key to obtain the session configuration.

[0191] When the first public key and the first private key are asymmetric keys generated according to the SM2 algorithm, the process of decrypting the encrypted session key using the first private key may be:

[0192] Extracting a third elliptic curve point from the encrypted session key, and verifying whether the third elliptic curve point satisfies a preset elliptic curve;

[0193] If the third elliptic curve point satisfies the preset elliptic curve, determining a fifth elliptic curve point according to the first private key and the third elliptic curve point;

[0194] determining, by a key derivation function, an adjustment factor of the candidate ciphertext according to the fifth elliptic curve point and the length of the session key;

[0195] According to the adjustment coefficient of the candidate ciphertext, the candidate ciphertext is adjusted to obtain the candidate decryption information;

[0196] Performing a hash operation on the fifth elliptic curve point and the candidate decryption information to obtain a decrypted hash value;

[0197] If the decrypted hash value is the same as the hash value corresponding to the session key, the candidate decryption information is used as the session key.

[0198] When the session key is a symmetric key generated according to the SM4 algorithm, the process of decrypting the encrypted session configuration using the session key can be:

[0199] Generate multiple round keys according to the session key, and group the encrypted session configuration into multiple sub-encrypted session configurations;

[0200] A target round key is selected from multiple round keys, and a round function is used to generate a candidate decryption result according to the target round key and the sub-encrypted session configuration;

[0201] If there is an unscreened round key among the multiple round keys, the sub-encrypted session configuration is updated according to the candidate decryption result to obtain an updated sub-encrypted session configuration, the updated sub-encrypted session configuration is used as the sub-encrypted session configuration, and the step of screening out a target round key from the multiple round keys is returned;

[0202] If multiple round keys have been screened, a target decryption result is screened out from multiple candidate decryption results, and the target decryption result is reversely transformed to obtain a session configuration.

[0203] The order of selecting the target round key from the multiple round keys is opposite to the order of selecting the candidate round keys from the multiple round keys.

[0204] S204: Use the session key to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and transmit the encrypted audio and video in the client of the target session.

[0205] The client of the target session refers to a client participating in the target session except the client of the terminal. For the convenience of description, the terminal is referred to as the first terminal and the terminal where the client of the target session is located is referred to as the second terminal.

[0206] The session key is used to encrypt the audio and video in the target session corresponding to the session configuration. The session key can be used to encrypt each frame of audio and video in the target session corresponding to the session configuration separately, that is, to encrypt in units of audio and video frames, or the session key can be used to encrypt multiple frames of audio and video in the target session corresponding to the session configuration together.

[0207] The process of encrypting the audio and video in the target session according to the session key can specifically refer to the process of encrypting the session configuration using the session key, and the embodiments of the present application will not be repeated here.

[0208] After obtaining the session key and session configuration, the first terminal can send the session key and session configuration to the second terminal, or the first terminal can also send an acquisition command to the second terminal, and then the second terminal obtains the session key and session configuration from the server. At this time, the server can also encrypt the session key according to the public key of the second terminal and encrypt the session configuration with the session key before sending it to the second terminal. This process can refer to the process of the server sending the session key and session configuration to the first terminal, and the embodiments of the present application will not be repeated here.

[0209] After obtaining the session configuration, the first terminal and the second terminal can enter the target session corresponding to the session configuration according to the session configuration, and then the first terminal uses the session key to encrypt the audio and video collected by the first terminal to obtain the encrypted audio and video, and transmit the encrypted audio to the second terminal. The second terminal then decrypts the encrypted audio and video according to the session key to obtain the audio and video collected by the first terminal, or the second terminal uses the session key to encrypt the audio and video collected by the second terminal to obtain the first encrypted audio and video, and transmits the first encrypted audio and video to the first terminal, and the first terminal then uses the session key to decrypt the first encrypted audio and video to obtain the audio and video collected by the second terminal, thereby realizing real-time audio and video transmission between the first terminal and the second terminal.

[0210] In the embodiment of the present application, since the session key is a key generated according to the second national secret algorithm, the encryption process of the key generated according to the second national secret algorithm is relatively complex and difficult to crack. Therefore, when the session key is used to encrypt the audio and video in the target session corresponding to the session configuration, the encrypted audio and video is obtained, and the encrypted audio and video is transmitted in the client of the target session, the encrypted audio and video is difficult to be cracked, thereby improving the security and stability of the audio and video in the target session. In addition, the session is realized through audio and video, which has the characteristics of strong resistance to packet loss and network fluctuations.

[0211] In some embodiments, the session configuration includes a target token and a session identifier, and the session key is used to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and the encrypted audio and video is transmitted in the client of the target session, including:

[0212] Using the session key, encrypt the audio and video in the target session corresponding to the session identifier to obtain the encrypted audio and video;

[0213] The encrypted audio and video and the target token are sent to the server, so that when the server verifies the target token, the audio and video in the target session are transmitted in the client of the target session.

[0214] Among them, after entering the target session, the first terminal can use the session key to encrypt the audio and video in the target session corresponding to the session identifier to obtain the encrypted audio and video, and then send the encrypted audio and video and the target token to the server, so that when the server verifies the target token, it can transmit the audio and video in the target session to the client of the target session.

[0215] Alternatively, before entering the target session, the first terminal sends the target token to the server, so that the server agrees to allow the first terminal to enter the target session when the target token is verified. Then, the first terminal uses the session key to encrypt the audio and video in the target session corresponding to the session identifier to obtain the encrypted audio and video, and finally sends the encrypted audio and video to the server, so that the server transmits the audio and video in the target session in the client of the target session.

[0216] In some other embodiments, the digital envelope further includes a session digest obtained by performing a digest operation on the session configuration; and using the session key to encrypt the audio and video in the target session corresponding to the session configuration includes:

[0217] Perform a digest operation on the session configuration to obtain a target session digest corresponding to the session configuration;

[0218] If the target session digest matches the session digest, the session key is used to encrypt the audio and video in the target session corresponding to the session configuration.

[0219] In an embodiment of the present application, the digital envelope also includes a session summary obtained by performing a summary operation on the session configuration. Then, after decrypting the digital envelope, the first terminal performs a summary operation on the session configuration to obtain a target session summary. If the target session summary and the session summary match, it means that the session configuration has not been tampered with, that is, the session configuration is complete. The session key can then be used to encrypt the audio and video in the target session corresponding to the session configuration.

[0220] In other embodiments, the digital envelope further includes encrypted signaling data encrypted using the session key;

[0221] Transmit the encrypted audio and video in the client of the target session, including:

[0222] Decrypting the encrypted signaling data using the session key to obtain decrypted signaling data;

[0223] According to the decrypted signaling data, the encrypted audio and video are transmitted in the client of the target session.

[0224] The decrypted signaling data refers to the data for controlling the transmission of audio and video. In the embodiment of the present application, the signaling data is encrypted before transmission, which reduces the risk of signaling data leakage, improves the security of signaling data, and further improves the security of audio and video transmission.

[0225] Optionally, the server may also perform a hash operation on the signaling data according to a third-country secret algorithm to obtain a signaling hash value, and then send the signaling hash value and the encrypted signaling data together to the first terminal. After the first terminal decrypts the encrypted signaling data to obtain the decrypted signaling data, it performs a hash operation on the decrypted signaling data according to the third-country secret algorithm to obtain a target signaling hash value. If the target signaling hash value and the signaling hash value are the same, it indicates that the decrypted signaling data has not been tampered with and the decrypted signaling data is complete. Then, the encrypted audio and video can be transmitted in the client of the target session according to the decrypted signaling data.

[0226] The third national secret algorithm is a national secret algorithm that generates a hash value, which may be an SM3 algorithm or other national secret algorithms that generate a hash value.

[0227] In some other embodiments, transmitting the encrypted audio and video in the client of the target session includes:

[0228] Perform hash operation on the audio and video in the target session according to the third-party encryption algorithm to obtain the hash value corresponding to the audio and video in the target session;

[0229] The encrypted audio and video and the hash value are transmitted in the client of the target session, so that the client of the target session verifies the integrity of the audio and video in the target session according to the hash value.

[0230] The terminal where the client of the target session is located is the second terminal. After the second terminal receives the encrypted audio and video and hash value through the client of the target session, the second terminal uses the session key to decrypt the encrypted audio and video to obtain the audio and video in the target session, and performs a hash operation on the audio and video in the target session according to a third-party secret algorithm to obtain a target hash value corresponding to the audio and video in the target session. If the target hash value and the hash value are the same, it indicates that the audio and video in the target session have not been tampered with and are complete.

[0231] Optionally, in order to further improve security and make the hash value non-repudiable, the first terminal may use the first private key to sign the hash value to obtain a hash signature, and then transmit the encrypted audio and video and the hash signature to the client of the target session.

[0232] After the second terminal receives the encrypted audio and video and the hash signature through the client of the target session, the second terminal uses the session key to decrypt the encrypted audio and video to obtain the audio and video in the target session, and uses the first public key to verify the hash signature. If the verification of the hash signature is successful, the hash value can be obtained, and then the audio and video in the target session are hashed according to the third national secret algorithm to obtain the target hash value corresponding to the audio and video in the target session. If the target hash value and the hash value are the same, it indicates that the audio and video in the target session have not been tampered with and are complete.

[0233] In some other embodiments, the audio and video transmission method further includes:

[0234] Send an audio and video recording request to the server, so that the server records the audio and video in the target session according to the audio and video recording request to obtain the recorded audio and video;

[0235] Receive the recorded audio and video returned by the server.

[0236] The first terminal may send an audio or video recording request to the server upon detecting entry into the target session, or the first terminal may send an audio or video recording request to the server after transmitting the encrypted audio or video in the client of the target session, which is not limited in the embodiments of the present application.

[0237] In an embodiment of the present application, the audio and video in the target session can be recorded by the server, realizing the fusion of dual recording security technology to record audio and video on the server, so that the second terminal or the first terminal can download the recorded audio and video from the server.

[0238] In other embodiments, in order to ensure the security of the recorded audio and video, the recorded audio and video returned by the server is received, including:

[0239] Sending an audio and video download request to the server, so that the server uses the first public key to encrypt the recorded audio and video to obtain the first audio and video;

[0240] Receiving the first audio and video returned by the server according to the audio and video request;

[0241] After receiving the first audio and video returned by the server according to the audio and video request, the method further includes:

[0242] The first audio and video are decrypted according to the first private key to obtain the recorded audio and video.

[0243] In an embodiment of the present application, the server uses a first public key to encrypt the recorded audio and video to obtain the first audio and video, and then transmits the first audio and video to the first terminal. The first terminal then uses a first private key to decrypt the first audio and video to obtain the recorded audio and video, thereby preventing the recorded audio and video from being leaked.

[0244] In other embodiments, in order to ensure the security of the recorded audio and video, before sending the audio and video recording request to the server, the following steps are included:

[0245] Sending a key acquisition request to the server, so that the server generates a target key according to the key acquisition request by using the second national secret algorithm, and encrypts the target key by using the first public key;

[0246] Receiving the encrypted target key returned by the server based on the key acquisition request;

[0247] Decrypting the encrypted target key using the first private key to obtain the target key;

[0248] Sending an audio and video recording request to the server so that the server records the audio and video in the target session according to the audio and video recording request, obtaining the recorded audio and video, and receiving the recorded audio and video returned by the server, including:

[0249] Sending an audio and video recording request to the server, so that the server records the audio and video in the target session according to the audio and video recording request to obtain the recorded audio and video, and encrypts the recorded audio and video with the target key to obtain the second audio and video;

[0250] Receiving the second audio and video returned by the server based on the audio and video recording request;

[0251] After receiving the second audio and video returned by the server based on the audio and video recording request, the method further includes:

[0252] The second audio and video are decrypted according to the target key to obtain the recorded audio and video.

[0253] Among them, the key acquisition request can be a request generated by the first terminal alone, or the key acquisition request can also be the first public key. At this time, after receiving the first public key, the server generates a target key through the second national secret algorithm and uses the first public key to encrypt the target key.

[0254] After obtaining the second audio and video, the server can directly return the second audio and video to the first terminal, or can first store the second audio and video, and then when obtaining the download request sent by the first terminal, return the second audio and video to the first terminal based on the download request.

[0255] In an embodiment of the present application, the server first uses the first public key to encrypt the target key, and then returns the encrypted target key to the first terminal. The first terminal then uses the first private key to decrypt the encrypted target key to obtain the target key, thereby avoiding leakage of the target key and improving the security of the target key. As a result, when the server uses the target key to encrypt the recorded audio and video and obtains the second audio and video, the first terminal can decrypt the second audio and video according to the target key, thereby avoiding direct transmission of the recorded audio and video and improving the security of the recorded audio and video.

[0256] In other embodiments, the session key is used to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and the encrypted audio and video is transmitted in the client of the target session, including:

[0257] Extracting key audio and video frames and non-key audio and video frames from the audio and video in the target session corresponding to the session configuration;

[0258] Using the session key, encrypting the key audio and video frame to obtain the encrypted key audio and video frame;

[0259] The encrypted key audio and video frames and non-key audio and video frames are transmitted in the client of the target session.

[0260] Key audio and video frames can also be called I frames, which are independent frames with all information and can be decoded independently without referring to other frames. Non-key audio and video frames are audio and video frames that need to refer to other frames for decoding.

[0261] Among them, extracting key audio and video frames and non-key audio and video frames from the audio and video in the target session corresponding to the session configuration can be understood as extracting key audio and video frames and non-key audio and video frames from the audio and video in the target session corresponding to the session configuration at the same time. At this time, the audio and video in the target session can generate multiple audio and video frames before transmitting them.

[0262] Alternatively, extracting key audio and video frames and non-key audio and video frames from the audio and video in the target session corresponding to the session configuration can be understood as extracting key audio and video frames and non-key audio and video frames from the audio and video in the target session corresponding to the session configuration in sequence. For example, key audio and video frames can be first obtained from the audio and video in the target session, and then non-key audio and video frames can be obtained from the audio and video in the target session. For another example, non-key audio and video frames can be first obtained from the audio and video in the target session, and then key audio and video frames can be obtained from the audio and video in the target session. At this time, the audio and video in the target session can be transmitted immediately after generating a frame of audio and video frames, and the audio and video frame can be a key audio and video frame or a non-key audio and video frame.

[0263] Since session keys are used, it takes time to encrypt the audio and video in the target session, and the audio and video scenarios have high requirements for the transmission delay of audio and video. If all audio and video frames in the target session are encrypted, it may cause a large delay in the transmission of audio and video in the target session. Therefore, in the implementation of the present application, key audio and video frames and non-key audio and video frames are extracted from the audio and video in the target session corresponding to the session configuration; the key audio and video frames are encrypted using session keys to obtain encrypted key audio and video frames; the encrypted key audio and video frames and non-key audio and video frames are transmitted in the client of the target session, so that the security of the audio and video in the target session can be improved while reducing the transmission delay of the audio and video in the target session.

[0264] As can be seen from the above, in an embodiment of the present application, a session creation request is obtained and a first public key generated according to a first national secret algorithm is obtained, and the session creation request and the first public key are sent to a server; a digital envelope returned by the server based on the session creation request is received, the digital envelope including a session configuration encrypted by a session key generated according to a second national secret algorithm and a session key encrypted by a first public key; the encrypted session key is decrypted by a first private key corresponding to the first public key to obtain the session key, and the encrypted session configuration is decrypted according to the session key to obtain the session configuration; the session key is used to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and the encrypted audio and video is transmitted in the client of the target session, so as to realize the transmission of audio and video through the first national secret algorithm and the second national secret algorithm, and improve the security of the transmitted audio and video.

[0265] According to the method described in the above embodiment, the method is described again below with the server as the execution subject.

[0266] See also Figure 3 , Figure 3 : is a flowchart of an audio and video transmission method provided by an embodiment of the present application. The audio and video transmission method may include:

[0267] S301. Receive a session creation request sent by a terminal and a first public key generated according to a first national encryption algorithm.

[0268] The terminal in the embodiment of the present application is the first terminal. The server may receive the session creation request and the first public key at the same time, or the server may first receive the first public key and then receive the session creation request, or the server may first receive the session creation request and then receive the first public key.

[0269] The manner in which the server receives the session creation request and the first public key may be selected according to actual circumstances and is not limited in the embodiments of the present application.

[0270] In some embodiments, in order to further improve security, before receiving the session creation request sent by the terminal, the method further includes:

[0271] A first digital signature sent by the receiving terminal, where the first digital signature is a signature obtained by signing the first character string with the first private key;

[0272] Verifying the first digital signature using the first public key;

[0273] If the verification of the first digital signature is successful, a second character string is obtained, and the second character string is signed using a second private key to obtain a second digital signature;

[0274] The second digital signature is returned to the terminal, so that the terminal verifies the second digital signature using the second public key corresponding to the second private key.

[0275] In an embodiment of the present application, before receiving a session creation request sent by a terminal, the server receives a first digital signature sent by the terminal, where the first digital signature is a signature obtained by signing a first character string with a first private key. The first public key is used to verify the first digital signature to verify the identity of the terminal. If the verification of the first digital signature is successful, a second character string is obtained, and the second character string is signed with a second private key to obtain a second digital signature. The second digital signature is returned to the terminal so that the terminal uses a second public key corresponding to the second private key to verify the second digital signature, thereby verifying the identity of the server, improving the security of subsequent transmission of session keys and session configurations, and further improving the security of audio and video in the target session corresponding to the session configuration transmitted according to the session key.

[0276] S302: Based on the session creation request, generate a session configuration corresponding to the session creation request, and generate a session key according to a second national encryption algorithm.

[0277] S303: Use the session key to encrypt the session configuration to obtain the encrypted session configuration, and use the first public key to encrypt the session key to obtain the encrypted session key.

[0278] S304: Generate a digital envelope according to the encrypted session configuration and the encrypted session key.

[0279] After obtaining the encrypted session configuration and the encrypted session key, the server uses the encrypted session configuration and the encrypted session key as a digital envelope.

[0280] S305. Return the digital envelope to the terminal, so that the terminal uses the first private key corresponding to the first public key to decrypt the encrypted session key to obtain the session key, and decrypts the encrypted session configuration according to the session key to obtain the session configuration, and uses the session key to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video.

[0281] S306: receiving the encrypted audio and video sent by the terminal, and transmitting the encrypted audio and video in the client of the target session.

[0282] In an embodiment of the present application, a session creation request sent by a receiving terminal and a first public key generated according to a first national secret algorithm are generated; based on the session creation request, a session configuration corresponding to the session creation request is generated; and according to a second national secret algorithm, a session key is generated; the session configuration is encrypted using the session key to obtain an encrypted session configuration; and the session key is encrypted using the first public key to obtain an encrypted session key; a digital envelope is generated according to the encrypted session configuration and the encrypted session key, and the digital envelope is returned to the terminal, so that the terminal uses a first private key corresponding to the first public key to decrypt the encrypted session key to obtain the session key, and decrypts the encrypted session configuration according to the session key to obtain the session configuration; and the session key is used to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, the encrypted audio and video sent by the receiving terminal is received, and the encrypted audio and video is transmitted in the client of the target session, so as to realize the transmission of audio and video through the first national secret algorithm and the second national secret algorithm, and improve the security of the transmitted audio and video.

[0283] In some embodiments, the audio and video transmission method further includes:

[0284] Receive audio and video recording requests sent by the terminal;

[0285] According to the audio and video recording request, the audio and video in the target session are recorded to obtain the recorded audio and video;

[0286] Send the recorded audio and video to the terminal.

[0287] After obtaining the recorded audio and video, the server can immediately send the recorded audio and video to the terminal, or after receiving the download request from the terminal, the server can return the recorded audio and video to the terminal based on the download request.

[0288] In an embodiment of the present application, after receiving an audio or video recording request, the audio or video in the target session can be recorded by the server, realizing the fusion of dual recording security technology to record audio and video on the server, so that the second terminal or the first terminal can download the recorded audio and video from the server.

[0289] In order to improve the security of the recorded audio and video, in other embodiments, before receiving the audio and video recording request sent by the terminal, the following is further included:

[0290] The key acquisition request sent by the receiving terminal is used to generate a target key according to the key acquisition request by using the second national secret algorithm;

[0291] Encrypting the target key using the first public key to obtain an encrypted target key;

[0292] Sending the encrypted target key to the terminal so that the terminal uses the first private key to decrypt the encrypted target key to obtain the target key;

[0293] Send recorded audio and video to the terminal, including:

[0294] The recorded audio and video are encrypted using the target key to obtain a second audio and video;

[0295] The second audio and video are sent to the terminal, so that the terminal uses the target key to decrypt the second audio and video to obtain the recorded audio and video.

[0296] In an embodiment of the present application, the server first generates a target key through a second national secret algorithm, and uses a first public key to encrypt the target key to obtain an encrypted target key; the encrypted target key is sent to the terminal, so that the terminal uses the first private key to decrypt the encrypted target key to obtain the target key; then the server uses the target key to encrypt the recorded audio and video to obtain a second audio and video; the second audio and video is sent to the terminal, so that the terminal uses the target key to decrypt the second audio and video to obtain the recorded audio and video, thereby avoiding direct transmission of the recorded audio and video and improving the security of the recorded audio and video.

[0297] The specific implementation method and corresponding beneficial effects in the embodiments of the present application can be specifically referred to the above-mentioned audio and video transmission method, and the embodiments of the present application will not be repeated here.

[0298] According to the method described in the above embodiment, the following will be further described in detail with examples. In this embodiment, the audio and video transmission method is described by taking the target session as an online meeting as an example, the sm2 algorithm as the first national secret algorithm as an example, the sm4 algorithm as the second national secret algorithm as an example, the sm2 algorithm as the third national secret algorithm as an example, the first character string as the first verification random number as an example, and the second character string as the second verification random number as an example.

[0299] See also Figure 4 , Figure 4 A schematic diagram of a flow chart of an audio and video transmission method provided in an embodiment of the present application. The flow chart of the audio and video transmission method may include:

[0300] S401. The server generates a second public key and a second private key according to the sm2 algorithm.

[0301] S402: The first terminal generates a first public key and a first private key according to the SM2 algorithm, and sends the first public key to the server.

[0302] S403. The server generates a target key through the SM4 algorithm, encrypts the target key with the first public key, and encrypts the second public key with the target key to obtain a first digital envelope.

[0303] S404. The first terminal receives the first digital envelope returned by the server, and uses the first private key to decrypt the encrypted target key in the first digital envelope to obtain the target key, and uses the target key to decrypt the encrypted second public key in the first digital envelope to obtain the second public key.

[0304] The process in which the first terminal obtains the second public key and the target key and the server obtains the first public key can be called a key distribution process. The key distribution process can be, for example, as follows: Figure 5 As shown. The first terminal can send the first public key to the server through the client or the teller. The server can generate a target key according to the SM4 algorithm through the server application, and encrypt the target key with the first public key, and encrypt the second public key with the target key to obtain a first digital envelope, and then return the first digital envelope to the first terminal. After the first terminal obtains the first digital envelope, it returns the key distribution success information to the server.

[0305] Optionally, the process of the second terminal acquiring the target key from the server may refer to the process of the first terminal acquiring the target key from the server, which is not limited in the embodiment of the present application.

[0306] S405: The first terminal generates a first verification random number, and performs a digest operation on the first verification random number to obtain a first digest corresponding to the first verification random number.

[0307] S406: The first terminal signs the first summary using the first private key to obtain a first digital signature, and sends the first digital signature and a first verification random number to the server.

[0308] S407: The server uses the first public key to verify the first digital signature. If the verification succeeds, a first summary is obtained.

[0309] S408: The server performs a digest operation on the first verification random number to obtain a second digest, and matches the first digest with the second digest.

[0310] S409: If the first digest and the second digest match, the server generates a second verification random number, and performs a digest operation on the second verification random number to obtain a third digest.

[0311] S4010. The server signs the third summary using the second private key to obtain a second digital signature, and sends the second digital signature and the second verification random number to the first terminal.

[0312] S4011. The first terminal uses the second public key to verify the second digital signature. If the verification succeeds, a third summary is obtained.

[0313] S4012. The first terminal performs a digest operation on the second verification random number to obtain a fourth digest, and matches the third digest with the fourth digest.

[0314] S4013: If the third digest matches the fourth digest, the first terminal generates a session creation request and sends the session creation request to the server.

[0315] S4014. Based on the session creation request, the server generates a target token and a session identifier corresponding to the session creation request, and generates a session key according to the SM4 algorithm.

[0316] S4015. The server uses the session key to encrypt the target token to obtain the encrypted target token, uses the first public key to encrypt the session key and the session identifier to obtain the encrypted session key and the encrypted session identifier, and uses the session key to encrypt the signaling data to obtain the encrypted signaling data.

[0317] S4016. The server generates a digital envelope according to the encrypted target token, the encrypted session key, the encrypted session identifier and the encrypted signaling data, and returns the digital envelope to the first terminal upon receiving the session joining request sent by the first terminal.

[0318] S4017. The first terminal uses the first private key to decrypt the encrypted session key and the encrypted session identifier to obtain the session key and the session identifier, decrypts the encrypted target token according to the session key to obtain the target token, and uses the session key to decrypt the encrypted signaling data to obtain the decrypted signaling data.

[0319] The decrypted signaling data is the signaling data. The process in which the first terminal obtains the session key, the target token, the session identifier, and the decrypted signaling data can be called a process of creating or joining a session. The process of creating or joining a session can be, for example, as follows: Figure 6 shown.

[0320] The first terminal generates a first verification random number rC through a client or a teller, performs a summary operation on the first verification random number rC to obtain a first summary, and uses a first private key to sign the first summary to obtain a first digital signature, and then sends the first digital signature and the first verification random number rC to a server application in the server.

[0321] The server performs a digest operation on the first verification random number rC through the server application to obtain a second digest, and uses the first public key to verify the first digital signature. If the verification is successful, the first digest is obtained, and the first digest and the second digest are matched. If the first digest and the second digest match, the server generates a second verification random number rS through the server application, performs a digest operation on the second verification random number rS to obtain a third digest, and signs the third digest with the second private key to obtain a second digital signature. The server sends the second digital signature and the second verification random number rS to the first terminal through the server application.

[0322] The first terminal performs a digest operation on the second verification random number rS through the client to obtain a fourth digest, uses the second public key to verify the second digital signature, and if the verification is successful, obtains a third digest, and matches the third digest with the fourth digest. If the third digest matches the fourth digest, the first terminal generates a session creation request through the client, and sends the session creation request to the server application in the server.

[0323] The server obtains a session creation request from the server application, and based on the session creation request, generates a target token corresponding to the session creation request, performs a digest operation on the target token, obtains a target digest corresponding to the target token, and sends the target token and target digest to the server application.

[0324] The server generates a session identifier through a server application, generates a session key according to the SM4 algorithm, uses the session key to encrypt the target token to obtain an encrypted target token, uses the first public key to encrypt the session key and the session identifier to obtain an encrypted session key and an encrypted session identifier, and uses the session key to encrypt the signaling data to obtain encrypted signaling data. Finally, the server generates a digital envelope through the server application according to the encrypted target token, the encrypted session identifier, the encrypted session key, and the encrypted signaling data. When receiving a session joining request sent by the first terminal through the server application, the server returns the digital envelope and the target summary to the first terminal.

[0325] The first terminal uses the first private key to decrypt the encrypted session key and the encrypted session identifier through the client to obtain the session key and the session identifier, decrypts the encrypted target token according to the session key to obtain the target token, and uses the session key to decrypt the encrypted signaling data to obtain the decrypted signaling data. The first terminal performs a digest operation on the target token through the client to obtain a first target digest corresponding to the target token. If the first target digest matches the target digest, it is determined that the target token is complete.

[0326] Optionally, the process of acquiring signaling data can be as follows: Figure 7 The server performs a hash operation on the signaling data according to the SM3 algorithm through the server application to obtain a signaling hash value, encrypts the signaling data using the session key to obtain encrypted signaling data, and sends the encrypted signaling data and the signaling hash value to the first terminal.

[0327] The first terminal uses the session key to decrypt the encrypted signaling data through the client or teller terminal to obtain the decrypted signaling data. According to the SM3 algorithm, a hash operation is performed on the decrypted signaling data to obtain a target signaling hash value. If the target signaling hash value and the signaling hash value are the same, it indicates that the decrypted signaling data has not been tampered with and the decrypted signaling data is complete.

[0328] S4018. The first terminal sends an acquisition request to the second terminal, and the second terminal acquires the session key, the target token, the session identifier, and the decrypted signaling data from the server according to the acquisition request.

[0329] The process by which the second terminal obtains the session key, target token, session identifier and decrypted signaling data from the server based on the acquisition request can refer to the process by which the first terminal obtains the session key, target token, session identifier and decrypted signaling data from the server, and the embodiments of the present application will not be repeated here.

[0330] S4019. The first terminal and the second terminal enter the online conference corresponding to the session identifier and send an audio and video transmission request to the server, where the audio and video transmission request includes a target token.

[0331] S4020: The server verifies the target token. If the verification of the target token is successful, the server returns information indicating that the transmission is approved to the first terminal and the second terminal.

[0332] S4021. The first terminal extracts key audio and video frames and non-key audio and video frames from the collected audio and video of the online conference, and encrypts the key audio and video frames to obtain encrypted key audio and video frames.

[0333] S4022. The first terminal performs a hash operation on the key audio and video frames according to the SM3 algorithm to obtain a hash value corresponding to the key audio and video frames.

[0334] S4023. The first terminal sends the hash values ​​corresponding to the encrypted key audio and video frames, non-key audio and video frames, and key audio and video frames to the server, so that the server sends the hash values ​​corresponding to the encrypted key audio and video frames, non-key audio and video frames, and key audio and video frames to the second terminal.

[0335] S4024. The second terminal uses the session key to decrypt the encrypted key audio and video frame to obtain the key audio and video frame, and performs a hash operation on the key audio and video frame according to the SM3 algorithm to obtain a target hash value corresponding to the key audio and video frame. If the target hash value corresponding to the key audio and video frame is the same as the hash value corresponding to the key audio and video frame, the key audio and video frame and the non-key audio and video frame are played.

[0336] Optionally, after obtaining the hash value corresponding to the key audio and video frame, the first terminal can also use the first private key to sign the hash value corresponding to the key audio and video frame to obtain the hash signature corresponding to the key audio and video frame, and then send the encrypted key audio and video frame, non-critical audio and video frame and hash signature corresponding to the key audio and video frame to the second terminal.

[0337] After receiving the encrypted key audio and video frames, non-key audio and video frames and hash signatures corresponding to the key audio and video frames, the second terminal uses the session key to decrypt the encrypted key audio and video frames to obtain the key audio and video frames, and uses the first public key to verify the hash signatures corresponding to the key audio and video frames. If the verification of the hash signatures corresponding to the key audio and video frames is passed, the hash values ​​corresponding to the key audio and video frames can be obtained, and then the key audio and video frames are hashed according to the SM3 algorithm to obtain the target hash values ​​of the key audio and video frames. If the target hash value corresponding to the key audio and video frames is the same as the hash value corresponding to the key audio and video frames, it indicates that the key audio and video frames have not been tampered with and are complete.

[0338] S4025. The second terminal extracts a first key audio and video frame and a first non-key audio and video frame from the collected audio and video of the online conference, and encrypts the first key audio and video frame to obtain a first encrypted key audio and video frame.

[0339] S4026. The second terminal performs a hash operation on the first key audio and video frame according to the SM3 algorithm to obtain a first hash value corresponding to the key audio and video frame.

[0340] S4027. The second terminal sends the first encrypted key audio and video frame, the first non-key audio and video frame and the first hash value to the server, so that the server sends the first encrypted key audio and video frame, the first non-key audio and video frame and the first hash value to the first terminal.

[0341] S4028. The first terminal uses the session key to decrypt the first encrypted key audio and video frame to obtain the first key audio and video frame, and performs a hash operation on the first key audio and video frame according to the SM3 algorithm to obtain a first target hash value corresponding to the key audio and video frame. If the first target hash value is the same as the first hash value, the first key audio and video frame and the first non-key audio and video frame are played.

[0342] Optionally, after obtaining the first hash value, the second terminal may also use the private key of the second terminal to sign the first hash value and then send it. This process can refer to the process of the first terminal using the first private key to sign the hash value, and the embodiment of the present application will not be repeated here.

[0343] Optionally, the transmission process of the audio and video of the online conference between the first terminal and the second terminal can be as follows: Figure 8 As shown. Among them, the first terminal and the second terminal can simultaneously transmit the encrypted key audio and video frame, the non-key audio and video frame and the hash value corresponding to the key audio and video frame, the first encrypted key audio and video frame, the first non-key audio and video frame and the first hash value, or the first terminal can first transmit the encrypted key audio and video frame, the non-key audio and video frame and the hash value corresponding to the key audio and video frame, and the second terminal can then transmit the first encrypted key audio and video frame, the first non-key audio and video frame and the first hash value, or the second terminal can first transmit the first encrypted key audio and video frame, the first non-key audio and video frame and the first hash value, and the first terminal can then transmit the encrypted key audio and video frame, the non-key audio and video frame and the hash value corresponding to the key audio and video frame.

[0344] Optionally, the audio and video transmission system of the embodiment of the present application can be as follows: Fig. 9 shown.

[0345] Optionally, the audio and video technology in the embodiment of the present application may be real-time audio and video (Tencent Real-time Communication, TRTC), which is a complete set of audio and video full-link technologies covering from the client to the server, from hardware devices to high-concurrency systems.

[0346] S4029. The first terminal sends an audio or video recording request to the server.

[0347] S4030. The server records the audio and video in the target session according to the audio and video recording request, obtains the recorded audio and video, and generates a candidate key.

[0348] Among them, the server can generate candidate keys according to the sm4 algorithm.

[0349] S4031. The server encrypts the recorded audio and video with a candidate key to obtain a candidate audio and video, encrypts the candidate key with a target key to obtain an encrypted candidate key, and stores the encrypted candidate key and the candidate audio and video as the second audio and video.

[0350] S4032. The second terminal sends a download request to the server, and receives the second audio and video returned by the server based on the download request.

[0351] Alternatively, the first terminal may also send a download request to the server, and receive the second audio and video returned by the server based on the download request.

[0352] S4033. The second terminal decrypts the encrypted candidate key in the second audio and video using the target key to obtain the candidate key, and uses the candidate key to decrypt the candidate audio and video to obtain the recorded audio and video.

[0353] The process of the first terminal decrypting the second audio and video can refer to step S4033, and the embodiment of the present application will not be repeated here.

[0354] The server may also perform summary operations on the recorded audio and video according to the SM3 algorithm to obtain a summary corresponding to the recorded audio and video, and then return the summary corresponding to the recorded audio and video together with the second audio and video to the second terminal.

[0355] At this time, after decrypting the second audio and video to obtain the recorded audio and video, the second terminal can perform a summary operation on the recorded audio and video to obtain an initial summary corresponding to the recorded audio and video. If the initial summary corresponding to the recorded audio and video is the same as the summary corresponding to the recorded audio and video, it is determined that the recorded audio and video is complete. Fig.10 shown.

[0356] That is, the key system structure in the embodiment of the present application can be as follows: Fig.11 As shown, the system key is used to protect the target key, the session key, the candidate key, and the public-private key pair (the first public key and the first private key, the second public key and the second private key).

[0357] The relevant information of each key can be shown in the following table.

[0358]

[0359] The specific implementation method and corresponding beneficial effects in the embodiments of the present application can refer to the above-mentioned audio and video transmission method, and the embodiments of the present application will not be repeated here.

[0360] In order to better implement the audio and video transmission method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above audio and video transmission method. The meanings of the terms are the same as those in the above audio and video transmission method, and the specific implementation details can refer to the description in the method embodiment.

[0361] For example, Fig.12 As shown, the audio and video transmission device may include:

[0362] The acquisition module 1201 is used to obtain a session creation request and a first public key generated according to a first national encryption algorithm, and send the session creation request and the first public key to the server.

[0363] The receiving module 1202 is used to receive a digital envelope returned by the server based on the session creation request, where the digital envelope includes a session configuration encrypted by a session key generated according to a second national encryption algorithm and a session key encrypted by a first public key.

[0364] The decryption module 1203 is used to decrypt the encrypted session key using the first private key corresponding to the first public key to obtain the session key, and decrypt the encrypted session configuration according to the session key to obtain the session configuration.

[0365] The transmission module 1204 is used to encrypt the audio and video in the target session corresponding to the session configuration by using the session key to obtain the encrypted audio and video, and transmit the encrypted audio and video in the client of the target session.

[0366] Optionally, the session configuration includes a target token and a session identifier. Accordingly, the transmission module 1204 is specifically used to execute:

[0367] Using the session key, encrypt the audio and video in the target session corresponding to the session identifier to obtain the encrypted audio and video;

[0368] The encrypted audio and video and the target token are sent to the server, so that when the server verifies the target token, the audio and video in the target session are transmitted in the client of the target session.

[0369] Optionally, the digital envelope also includes a session summary obtained by performing a summary operation on the session configuration. Accordingly, the transmission module 1204 is specifically configured to execute:

[0370] Perform a digest operation on the session configuration to obtain a target session digest corresponding to the session configuration;

[0371] If the target session digest matches the session digest, the session key is used to encrypt the audio and video in the target session corresponding to the session configuration.

[0372] Optionally, the digital envelope also includes encrypted signaling data obtained by encrypting with the session key. Accordingly, the transmission module 1204 is specifically used to execute:

[0373] Decrypting the encrypted signaling data using the session key to obtain decrypted signaling data;

[0374] According to the decrypted signaling data, the encrypted audio and video are transmitted in the client of the target session.

[0375] Optionally, the transmission module 1204 is specifically configured to execute:

[0376] Perform hash operation on the audio and video in the target session according to the third-party encryption algorithm to obtain the hash value corresponding to the audio and video in the target session;

[0377] The encrypted audio and video and the hash value are transmitted in the client of the target session, so that the client of the target session verifies the integrity of the audio and video in the target session according to the hash value.

[0378] Optionally, the acquisition module 1201 is specifically configured to execute:

[0379] Obtaining a first character string, and signing the first character string using a first private key to obtain a first digital signature;

[0380] Sending the first digital signature to the server, so that when the server verifies the first digital signature successfully using the first public key, the server signs the second character string using the second private key of the server to obtain the second digital signature;

[0381] Receiving a second digital signature returned by the server based on the first digital signature;

[0382] If the second digital signature is verified successfully using the second public key corresponding to the second private key, the session creation request is sent to the server.

[0383] Optionally, the acquisition module 1201 is specifically configured to execute:

[0384] Performing a digest operation on the first string to obtain a first digest corresponding to the first string;

[0385] Using the first private key, signing the first summary to obtain a first digital signature;

[0386] The first digital signature and the first character string are sent to the server, so that when the server verifies the first digital signature using the first public key to obtain the first digest and the second digest obtained by performing a digest operation on the first character string matches the first digest, the server uses the second private key to sign the second character string to obtain the second digital signature.

[0387] Optionally, the above-mentioned audio and video transmission device further includes:

[0388] Download module for execution:

[0389] Sending an audio and video recording request to the server, so that the server records the audio and video in the target session according to the audio and video recording request, and obtains the recorded audio and video;

[0390] Receive the recorded audio and video returned by the server.

[0391] Optionally, the download module is specifically used to execute:

[0392] Sending an audio and video download request to the server, so that the server uses the first public key to encrypt the recorded audio and video to obtain the first audio and video;

[0393] Receiving the first audio and video returned by the server according to the audio and video request;

[0394] The first audio and video are decrypted according to the first private key to obtain the recorded audio and video.

[0395] Optionally, the acquisition module 1201 is further configured to execute:

[0396] Sending a key acquisition request to the server, so that the server generates a target key according to the key acquisition request by using the second national secret algorithm, and encrypts the target key by using the first public key;

[0397] Receiving the encrypted target key returned by the server based on the key acquisition request;

[0398] The encrypted target key is decrypted using the first private key to obtain the target key.

[0399] Accordingly, the download module is specifically used to execute:

[0400] Sending an audio and video recording request to the server, so that the server records the audio and video in the target session according to the audio and video recording request to obtain the recorded audio and video, and encrypts the recorded audio and video with the target key to obtain the second audio and video;

[0401] Receiving the second audio and video returned by the server based on the audio and video recording request;

[0402] The second audio and video are decrypted according to the target key to obtain the recorded audio and video.

[0403] Optionally, the transmission module 1204 is specifically configured to execute:

[0404] Extracting key audio and video frames and non-key audio and video frames from the audio and video in the target session corresponding to the session configuration;

[0405] Using the session key, encrypting the key audio and video frame to obtain the encrypted key audio and video frame;

[0406] The encrypted key audio and video frames and non-key audio and video frames are transmitted in the client of the target session.

[0407] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation methods and corresponding beneficial effects of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0408] The present application also provides an electronic device, which may be a server or a terminal, etc. Fig.13 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0409] The electronic device may include components such as a processor 1301 with one or more processing cores, a memory 1302 with one or more computer-readable storage media, a power supply 1303, and an input unit 1304. Those skilled in the art will appreciate that Fig.13 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0410] The processor 1301 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing computer programs and / or modules stored in the memory 1302, and calling data stored in the memory 1302. Optionally, the processor 1301 may include one or more processing cores; preferably, the processor 1301 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1301.

[0411] The memory 1302 can be used to store computer programs and modules. The processor 1301 executes various functional applications and data processing by running the computer programs and modules stored in the memory 1302. The memory 1302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 1302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 1302 may also include a memory controller to provide the processor 1301 with access to the memory 1302.

[0412] The electronic device also includes a power supply 1303 for supplying power to each component. Preferably, the power supply 1303 can be logically connected to the processor 1301 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 1303 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0413] The electronic device may further include an input unit 1304, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0414] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 1301 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 1302 according to the following instructions, and the processor 1301 will run the computer programs stored in the memory 1302, thereby realizing various functions, such as:

[0415] Obtain a session creation request and a first public key generated according to a first national encryption algorithm, and send the session creation request and the first public key to the server;

[0416] Receiving a digital envelope returned by the server based on the session creation request, the digital envelope including a session configuration encrypted by a session key generated according to a second national encryption algorithm and a session key encrypted by a first public key;

[0417] Decrypting the encrypted session key using the first private key corresponding to the first public key to obtain the session key, and decrypting the encrypted session configuration according to the session key to obtain the session configuration;

[0418] The session key is used to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and the encrypted audio and video is transmitted in the client of the target session.

[0419] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the detailed description of the audio and video transmission method above, which will not be elaborated here.

[0420] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0421] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any audio and video transmission method provided in the embodiment of the present application. For example, the computer program can execute the following steps:

[0422] Obtain a session creation request and a first public key generated according to a first national encryption algorithm, and send the session creation request and the first public key to the server;

[0423] Receiving a digital envelope returned by the server based on the session creation request, the digital envelope including a session configuration encrypted by a session key generated according to a second national encryption algorithm and a session key encrypted by a first public key;

[0424] Decrypting the encrypted session key using the first private key corresponding to the first public key to obtain the session key, and decrypting the encrypted session configuration according to the session key to obtain the session configuration;

[0425] The session key is used to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and the encrypted audio and video is transmitted in the client of the target session.

[0426] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0427] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0428] Since the computer program stored in the computer-readable storage medium can execute the steps in any audio and video transmission method provided in the embodiments of the present application, the beneficial effects that can be achieved by any audio and video transmission method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0429] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned audio and video transmission method.

[0430] The above is a detailed introduction to an audio and video transmission method, device, equipment, storage medium and program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An audio and video transmission method, characterized in that: include: Obtaining a session creation request and a first public key generated according to a first national encryption algorithm, and sending the session creation request and the first public key to a server; Receiving a digital envelope returned by the server based on the session creation request, wherein the digital envelope includes a session configuration encrypted by a session key generated according to a second national encryption algorithm and a session key encrypted by the first public key; Decrypting the encrypted session key using a first private key corresponding to the first public key to obtain the session key, and decrypting the encrypted session configuration according to the session key to obtain the session configuration; The session key is used to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and the encrypted audio and video is transmitted in the client of the target session.

2. The audio and video transmission method according to claim 1, characterized in that: The session configuration includes a target token and a session identifier; The step of using the session key to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and transmitting the encrypted audio and video in the client of the target session includes: Using the session key, encrypting the audio and video in the target session corresponding to the session identifier to obtain encrypted audio and video; The encrypted audio and video and the target token are sent to the server, so that when the server passes the verification of the target token, the audio and video in the target session are transmitted to the client of the target session.

3. The audio and video transmission method according to claim 1, characterized in that: The digital envelope also includes a session digest obtained by performing a digest operation on the session configuration; The using the session key to encrypt the audio and video in the target session corresponding to the session configuration includes: Performing a digest operation on the session configuration to obtain a target session digest corresponding to the session configuration; If the target session digest matches the session digest, the session key is used to encrypt the audio and video in the target session corresponding to the session configuration.

4. The audio and video transmission method according to claim 1, characterized in that: The digital envelope also includes encrypted signaling data obtained by encrypting with the session key; Transmitting the encrypted audio and video in the client of the target session includes: Decrypting the encrypted signaling data using the session key to obtain decrypted signaling data; According to the decrypted signaling data, the encrypted audio and video are transmitted in the client of the target session.

5. The audio and video transmission method according to claim 1, characterized in that: The step of transmitting the encrypted audio and video in the client of the target session includes: Performing a hash operation on the audio and video in the target session according to a third-country cryptographic algorithm to obtain a hash value corresponding to the audio and video in the target session; The encrypted audio and video and the hash value are transmitted to the client of the target session, so that the client of the target session verifies the integrity of the audio and video in the target session according to the hash value.

6. The audio and video transmission method according to claim 1, characterized in that: Sending the session creation request to the server includes: Obtaining a first character string, and signing the first character string using the first private key to obtain a first digital signature; Sending the first digital signature to the server, so that when the server successfully verifies the first digital signature using the first public key, the server uses the second private key of the server to sign the second character string to obtain a second digital signature; Receiving the second digital signature returned by the server based on the first digital signature; If the second digital signature is successfully verified using the second public key corresponding to the second private key, the session creation request is sent to the server.

7. The audio and video transmission method according to claim 6, characterized in that: The step of using the first private key to sign the first character string to obtain a first digital signature includes: Performing a digest operation on the first character string to obtain a first digest corresponding to the first character string; Using the first private key, signing the first summary to obtain a first digital signature; The sending of the first digital signature to the server so that when the server passes the verification of the first digital signature by using the first public key, the server signs the second character string by using the second private key of the server to obtain the second digital signature, comprises: The first digital signature and the first character string are sent to the server, so that when the server verifies the first digital signature by using the first public key to obtain the first digest and the second digest obtained by performing a digest operation on the first character string matches the first digest, the server signs the second character string by using the second private key of the server to obtain a second digital signature.

8. The audio and video transmission method according to claim 1, characterized in that: The method further comprises: Sending an audio and video recording request to the server, so that the server records the audio and video in the target session according to the audio and video recording request to obtain the recorded audio and video; Receive the recorded audio and video returned by the server.

9. The audio and video transmission method according to claim 8, characterized in that: The receiving the recorded audio and video returned by the server includes: Sending an audio and video download request to the server, so that the server uses the first public key to encrypt the recorded audio and video to obtain the first audio and video; Receiving the first audio and video returned by the server according to the audio and video request; After receiving the first audio and video returned by the server according to the audio and video request, the method further includes: The first audio and video are decrypted according to the first private key to obtain the recorded audio and video.

10. The audio and video transmission method according to claim 8, characterized in that: Before sending the audio and video recording request to the server, the method includes: Sending a key acquisition request to the server, so that the server generates a target key according to the key acquisition request by using the second national encryption algorithm, and encrypts the target key by using the first public key; Receiving the encrypted target key returned by the server based on the key acquisition request; Decrypting the encrypted target key using the first private key to obtain the target key; The sending of the audio and video recording request to the server so that the server records the audio and video in the target session according to the audio and video recording request to obtain the recorded audio and video, and receiving the recorded audio and video returned by the server includes: Sending an audio and video recording request to the server, so that the server records the audio and video in the target session according to the audio and video recording request to obtain recorded audio and video, and encrypting the recorded audio and video with the target key to obtain second audio and video; Receiving the second audio and video returned by the server based on the audio and video recording request; After receiving the second audio and video returned by the server based on the audio and video recording request, the method further includes: The second audio and video are decrypted according to the target key to obtain the recorded audio and video.

11. The audio and video transmission method according to claim 1, characterized in that: The step of using the session key to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and transmitting the encrypted audio and video in the client of the target session includes: Extracting key audio and video frames and non-key audio and video frames from the audio and video in the target session corresponding to the session configuration; Using the session key, encrypting the key audio and video frame to obtain an encrypted key audio and video frame; The encrypted critical audio and video frames and the non-critical audio and video frames are transmitted in the client of the target session.

12. An audio and video transmission method, characterized in that: include: Receiving a session creation request sent by a terminal and a first public key generated according to a first national encryption algorithm; Based on the session creation request, generate a session configuration corresponding to the session creation request, and generate a session key according to a second national secret algorithm; Encrypting the session configuration using the session key to obtain an encrypted session configuration, and encrypting the session key using the first public key to obtain an encrypted session key; generating a digital envelope according to the encrypted session configuration and the encrypted session key; Returning the digital envelope to the terminal, so that the terminal uses the first private key corresponding to the first public key to decrypt the encrypted session key to obtain the session key, decrypts the encrypted session configuration according to the session key to obtain the session configuration, and uses the session key to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video; The encrypted audio and video sent by the terminal is received, and the encrypted audio and video is transmitted in the client of the target session.

13. The audio and video transmission method according to claim 12, characterized in that: Before receiving the session creation request sent by the terminal, it also includes: Receiving a first digital signature sent by the terminal, where the first digital signature is a signature obtained by signing a first character string using the first private key; Verifying the first digital signature using the first public key; If the verification of the first digital signature is successful, a second character string is obtained, and the second character string is signed with a second private key to obtain a second digital signature; The second digital signature is returned to the terminal, so that the terminal verifies the second digital signature using a second public key corresponding to the second private key.

14. The audio and video transmission method according to claim 12, characterized in that: The method further comprises: Receiving an audio or video recording request sent by the terminal; According to the audio and video recording request, the audio and video in the target session are recorded to obtain the recorded audio and video; The recorded audio and video are sent to the terminal.

15. The audio and video transmission method according to claim 14, characterized in that: Before receiving the audio and video recording request sent by the terminal, the method further includes: receiving a key acquisition request sent by the terminal, and generating a target key according to the key acquisition request by using the second national secret algorithm; Encrypting the target key using the first public key to obtain an encrypted target key; Sending the encrypted target key to the terminal, so that the terminal uses the first private key to decrypt the encrypted target key to obtain the target key; The sending the recorded audio and video to the terminal includes: Encrypting the recorded audio and video using the target key to obtain a second audio and video; The second audio and video are sent to the terminal, so that the terminal uses the target key to decrypt the second audio and video to obtain the recorded audio and video.

16. An audio and video transmission device, characterized in that: include: An acquisition module, used to acquire a session creation request and a first public key generated according to a first national encryption algorithm, and send the session creation request and the first public key to a server; A receiving module, configured to receive a digital envelope returned by the server based on the session creation request, wherein the digital envelope includes a session configuration encrypted by a session key generated according to a second national encryption algorithm and a session key encrypted by the first public key; a decryption module, configured to decrypt the encrypted session key using a first private key corresponding to the first public key to obtain the session key, and decrypt the encrypted session configuration according to the session key to obtain the session configuration; The transmission module is used to use the session key to encrypt the audio and video in the target session corresponding to the session configuration to obtain the encrypted audio and video, and transmit the encrypted audio and video in the client of the target session.

17. An electronic device, characterized in that: It comprises a processor and a memory, the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the audio and video transmission method according to any one of claims 1 to 15.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the audio and video transmission method according to any one of claims 1 to 15.

19. A computer program product, characterized in that The computer program product stores a computer program, and the computer program is suitable for being loaded by a processor to execute the audio and video transmission method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • A data encryption transmission system and method based on an HTTP

    CN104394123A

  • VoIP safety meeting session key transmission method

    CN104618110A

  • Realization method for encryption voice conference

    CN106850520A

  • Video conference encryption method and system

    CN111355921A

  • Data security transmission method and system

    CN112543189A

Cited By

  • Power data transmission system and method of distributed power supply

    CN119629201A