A method and device for data encryption and decryption

By parsing audio and video data in video networking devices and generating key stream data for encryption and decryption, the problem of slow encryption and decryption speeds in traditional video networking devices is solved, and high-speed parallel processing and encryption and decryption capabilities of multi-channel devices are achieved.

CN111885397BActive Publication Date: 2024-08-30VISIONVERA INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010556596.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-17
Publication Date
2024-08-30
Estimated Expiration
2040-06-17

AI Technical Summary

Technical Problem

Traditional video networking equipment has a low communication rate during the audio and video data encryption and decryption process, and a single encryption and decryption method, which cannot meet the high-speed encryption and decryption requirements of single or multi-channel audio and video data.

Method used

By parsing the received audio and video data, the key stream data is generated, and encryption and decryption are performed on the basis of caching the audio and video data and the key stream data to achieve parallel processing of audio and video data, supporting audio and video data up to 300Mbit/S. processing power and simultaneous encryption and decryption of multiple video network devices.

Benefits of technology

It realizes high-speed video and audio data encryption and decryption, meets the simultaneous encryption and decryption requirements of multiple devices, and supports full encryption in OFB mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111885397B
    Figure CN111885397B
Patent Text Reader

Abstract

The embodiment of the present invention provides a data encryption and decryption method and device, the method comprising: parsing received audio and video data to obtain a target instruction; generating key stream data when the target instruction includes an update key instruction and an encryption and decryption data cache instruction, and caching the audio and video data to obtain cached audio and video data; encrypting and decrypting data based on the cached audio and video data and the key stream data to obtain encrypted and decrypted audio and video data. The embodiment of the present invention can meet the requirements of OFB mode full encryption of data and simultaneous encryption and decryption functions of multi-channel video networking devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a data encryption and decryption method and device. Background Art

[0002] Since visual networking technology can achieve real-time transmission of high-definition audio and video over the entire network, it is increasingly being used in various large-scale conferences, and has won unanimous praise from users for its excellent high-definition video interaction technology, security, and high reliability. When visual networking equipment is conducting live broadcasts such as video conferencing and video calls, the transmitted audio and video data needs to go through a complex encryption and decryption method before being transmitted to the external network to ensure that the audio and video data meets the security requirements of full or partial encryption and decryption.

[0003] At present, traditional visual networking can encrypt and decrypt audio and video data through an encryption and decryption core module, usually using a Universal Serial Bus (USB) interface communication encryption and decryption method (encryption and decryption dongle).

[0004] However, the communication rate of using an encryption dongle to encrypt and decrypt audio and video data is very low, and the encryption and decryption method is single, which cannot meet the technical requirements of all encryption and decryption of single-channel audio and video data, let alone the encryption and decryption requirements of multiple channels of high-speed audio and video data. Summary of the invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a method and device for data encryption and decryption that overcomes the above problems or at least partially solves the above problems.

[0006] In order to solve the above problem, an embodiment of the present invention provides a data encryption and decryption method, the method comprising:

[0007] Parse the received audio and video data to obtain the target instructions;

[0008] In the case where the target instruction includes an instruction to update a secret key and an instruction to cache encryption and decryption data, generating secret key stream data, and caching the audio and video data to obtain cached audio and video data;

[0009] Data encryption and decryption are performed based on the cached audio and video data and the key stream data to obtain encrypted and decrypted audio and video data.

[0010] Optionally, the performing data encryption and decryption based on the cached audio and video data and the key stream data to obtain the encrypted and decrypted audio and video data includes:

[0011] In the case where the cached audio and video data is located in a first data cache area, the format of the cached audio and video data is converted into a target format corresponding to the key stream data to obtain target cached audio and video data; the first data cache area is a cache area where data follows the principle of first-in-data-first-out cache area;

[0012] The key stream data is combined with the target cached audio and video data to perform the data encryption and decryption to obtain the encrypted and decrypted audio and video data.

[0013] Optionally, the generating the key stream data and caching the audio and video data to obtain the cached audio and video data includes:

[0014] Generate key stream data in combination with random numbers;

[0015] The key stream data is saved, and the audio and video data is cached to obtain cached audio and video data.

[0016] Optionally, after encrypting and decrypting data based on the cached audio and video data and the key stream data to obtain the encrypted and decrypted audio and video data, the method further includes:

[0017] The encrypted and decrypted audio and video data are sent to a data receiving end.

[0018] In order to solve the above problem, an embodiment of the present invention provides a data encryption and decryption device, the device comprising:

[0019] The parsing module is used to parse the received audio and video data to obtain the target instruction;

[0020] A generating module, configured to generate key stream data and cache the audio and video data to obtain cached audio and video data when the target instruction includes an update key instruction and an encryption and decryption data cache instruction;

[0021] The encryption and decryption module is used to perform data encryption and decryption based on the cached audio and video data and the key stream data to obtain encrypted and decrypted audio and video data.

[0022] Optionally, the encryption and decryption module includes:

[0023] a format conversion submodule, configured to convert the format of the cached audio and video data into a target format corresponding to the key stream data to obtain target cached audio and video data when the cached audio and video data is located in a first data cache area; the first data cache area is a cache area where data follows the principle of first-in-data-first-out cache area;

[0024] The encryption and decryption submodule is used to combine the key stream data with the target cache audio and video data to perform data encryption and decryption to obtain the encrypted and decrypted audio and video data.

[0025] Optionally, the generating module includes:

[0026] A generating submodule, for generating key stream data in combination with a random number when the target instruction includes an update key instruction and an encryption and decryption data cache instruction;

[0027] The saving submodule is used to save the key stream data and cache the audio and video data to obtain cached audio and video data.

[0028] Optionally, the device further comprises:

[0029] The sending module is used to send the encrypted and decrypted audio and video data to a data receiving end.

[0030] In order to solve the above problem, an embodiment of the present invention provides an electronic device, characterized in that it includes:

[0031] one or more processors; and

[0032] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the device to perform the above-mentioned data encryption and decryption method.

[0033] In order to solve the above problem, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program that enables a processor to execute the above data encryption and decryption method.

[0034] The embodiments of the present invention include the following advantages:

[0035] In an embodiment of the present invention, the visual network server can parse the received audio and video data to obtain the target instruction, and generate key stream data when the target instruction includes an update key instruction and an encryption and decryption data cache instruction, and cache the audio and video data to obtain cached audio and video data, and encrypt and decrypt the data based on the cached audio and video data and the key stream data to obtain encrypted and decrypted audio and video data. Since the audio and video data are cached while the key stream data is generated, that is, parallel processing of the audio and video data can be achieved, high-speed encryption and decryption of the audio and video data of the visual network can be achieved, and a maximum audio and video data processing capability of 300Mbit / S can be achieved. The OFB mode full encryption of the data can be achieved, and the simultaneous encryption and decryption functions of multiple visual network devices can be required. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A flowchart of a data encryption and decryption method provided in Embodiment 1 of the present invention is shown;

[0037] Figure 2 A schematic diagram of an encryption and decryption system provided by an embodiment of the present invention is shown;

[0038] Figure 3 A flowchart of a method for data encryption and decryption provided by Embodiment 2 of the present invention is shown;

[0039] Figure 4 A structural block diagram of a data encryption and decryption device provided in Embodiment 3 of the present invention is shown;

[0040] Figure 5 A schematic diagram of a visual network of the present invention is shown;

[0041] Figure 6 A schematic diagram of the hardware structure of a node server of the present invention is shown;

[0042] Figure 7 A schematic diagram of the hardware structure of an access switch of the present invention is shown;

[0043] Figure 8 A schematic diagram of the hardware structure of an Ethernet protocol conversion gateway of the present invention is shown. DETAILED DESCRIPTION

[0044] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0045] Reference Figure 1 , shows a flowchart of a data encryption and decryption method provided in Embodiment 1 of the present invention, which may specifically include the following steps:

[0046] Step 501, parse the received audio and video data to obtain the target instruction.

[0047] In the embodiment of the present invention, it can be combined with Figure 2 The technical solution of the embodiment of the present invention is described in detail.

[0048] Reference Figure 2 , which shows a schematic diagram of an encryption and decryption system provided by an embodiment of the present invention, such as Figure 2 As shown, the encryption and decryption system may include an Ethernet (eth) transceiver module 10, a protocol packet parsing module 20, a data cache module 30, a seed storage module 40, a secret key storage module 50, a secret key stream storage module 60, an encryption and decryption processing module 70 and a sending control module 80 connected in sequence. The encryption and decryption system may be set in a visual network server.

[0049] Among them, the Ethernet transceiver module 10 can be a data transceiver function module from the visual network port, which is mainly responsible for receiving and sending audio and video data of the visual network. The received audio and video data can be first parsed by the protocol packet parsing module 20 to obtain the corresponding target instructions.

[0050] After parsing the received audio and video data and obtaining the target instruction, step 502 is executed.

[0051] Step 502, when the target instruction includes an instruction to update a secret key and an instruction to cache encryption and decryption data, key stream data is generated, and audio and video data are cached to obtain cached audio and video data.

[0052] In the present invention, when the target instruction includes an update key instruction and an encryption and decryption data cache instruction, the audio and video data can be cached through the data cache module 30, and the parallel seed storage module 40 and the key storage module 50 will generate key stream data according to the update key instruction while caching the audio and video data, and store the key stream data through the key stream storage module 60. Specifically, the key stream data can be stored in the block random access memory (BRAM) in the key stream storage module 60.

[0053] When the target instruction includes an instruction to update the secret key and an instruction to cache the encryption and decryption data, the secret key stream data is generated, and the audio and video data are cached at the same time. After the cached audio and video data is obtained, step 503 is executed.

[0054] Step 503: encrypt and decrypt the data based on the cached audio and video data and the key stream data to obtain encrypted and decrypted audio and video data.

[0055] In the present invention, the audio and video data can be cached by the data cache module 30 , and the cached audio and video data can be transmitted to the encryption and decryption processing module 70 .

[0056] The parallel seed storage module 40 and key storage module 50 will generate key stream data according to the key update instruction while caching the audio and video data, and store the key stream data through the key stream storage module 60. Specifically, the key stream data can be stored in the block memory (Block Random Access Memory, BRAM) in the key stream storage module 60, and the key stream data can be transmitted to the encryption and decryption processing module.

[0057] The encryption and decryption processing module can perform encryption and decryption processing in the output feedback (OFB) mode of the data according to the cached audio and video data and the key stream data to obtain the encrypted and decrypted audio and video data, and can send the encrypted and decrypted audio and video data to the data cache area, and at the same time start the sending control module to send it, and send the encrypted and decrypted audio and video data through the Ethernet transceiver module 10 to realize the sending of the encrypted and decrypted audio and video data, and can achieve a maximum audio and video data processing capability of 300Mbit / S, and can realize the OFB mode full encryption of the data and the simultaneous encryption and decryption function requirements of multiple visual networking devices.

[0058] In an embodiment of the present invention, the visual network server can parse the received audio and video data to obtain the target instruction, and generate key stream data when the target instruction includes an update key instruction and an encryption and decryption data cache instruction, and cache the audio and video data to obtain cached audio and video data, and encrypt and decrypt the data based on the cached audio and video data and the key stream data to obtain encrypted and decrypted audio and video data. Since the audio and video data are cached while the key stream data is generated, that is, parallel processing of the audio and video data can be achieved, high-speed encryption and decryption of the audio and video data of the visual network can be achieved, and a maximum audio and video data processing capability of 300Mbit / S can be achieved. The OFB mode full encryption of the data can be achieved, and the simultaneous encryption and decryption functions of multiple visual network devices can be required.

[0059] Reference Figure 3 , shows a flowchart of a data encryption and decryption method provided by Embodiment 2 of the present invention, which may specifically include the following steps:

[0060] Step 601, parse the received audio and video data to obtain target instructions.

[0061] In the embodiment of the present invention, it can be combined with Figure 2 The technical solution of the embodiment of the present invention is described in detail.

[0062] Reference Figure 2 , which shows a schematic diagram of an encryption and decryption system provided by an embodiment of the present invention, such as Figure 2 As shown, the encryption and decryption system may include an Ethernet (eth) transceiver module 10, a protocol packet parsing module 20, a data cache module 30, a seed storage module 40, a secret key storage module 50, a secret key stream storage module 60, an encryption and decryption processing module 70 and a sending control module 80 connected in sequence. The encryption and decryption system may be set in a visual network server.

[0063] Among them, the Ethernet transceiver module 10 can be a data transceiver function module from the visual network port, which is mainly responsible for receiving and sending audio and video data of the visual network. The received audio and video data can be first parsed by the protocol packet parsing module 20 to obtain the corresponding target instructions.

[0064] The audio and video data format received and sent by the Ethernet transceiver module 10 is 8-byte (Bit) data. The counter inside the Field Programmable Gate Array (FPGA) can always record the amount of audio and video data received. According to the internal protocol of the visual network, the target instructions of the received audio and video data can be determined.

[0065] After parsing the received audio and video data and obtaining the target instruction, step 602 is executed.

[0066] Step 602, when the target instruction includes an instruction to update a secret key and an instruction to cache encryption and decryption data, generate secret key stream data in combination with a random number.

[0067] In the present invention, when the target instruction includes an instruction to update the secret key and an instruction to cache the encryption and decryption data, the audio and video data can be cached through the data cache module 30, and the parallel seed storage module 40 and the secret key storage module 50 will generate the secret key stream data according to the instruction to update the secret key and in combination with random numbers while caching the audio and video data.

[0068] Specifically, the random number (randomly taken seed) is 128-bit data as the data input of the encryption and decryption processing module, and the 128-bit secret key updated by the key storage module jointly outputs the first result of 128-bit encryption. This result is used as the data input of the next encryption and decryption processing module, and is encrypted with the 128-bit secret key to output the second result of 128-bit encryption. In this way, 1500 encrypted key stream data are generated and stored in the block random access memory (BRAM) for storage and standby.

[0069] When the target instruction includes an instruction to update the secret key and an instruction to cache encryption and decryption data, after generating the secret key stream data in combination with the random number, step 603 is executed.

[0070] Step 603, save the key stream data, and cache the audio and video data to obtain cached audio and video data.

[0071] In the present invention, when the target instruction includes an update key instruction and an encryption and decryption data cache instruction, the key stream data is stored through the key stream storage module 60. Specifically, the key stream data can be generated in combination with a random number, and the key stream data is stored in a block memory (Block Random Access Memory, BRAM) in the key stream storage module 60 for standby use. The audio and video data can be cached by the parallel data cache module 30 to obtain cached audio and video data.

[0072] Step 604, when the cached audio and video data is located in the first data cache area, convert the format of the cached audio and video data into a target format corresponding to the key stream data to obtain the target cached audio and video data.

[0073] The first data cache area is a cache area where data follows the principle of first-in data-first-out of the cache area.

[0074] In the present invention, the cached audio and video data storage location can be identified by the encryption and decryption processing module. The cached audio and video data storage location is at the encryption and decryption location corresponding to the encryption grouping standard. The encryption and decryption location can be in a first-in-first-out data cache area. The encryption and decryption processing module can convert the format of the cached audio and video data into a target format corresponding to the key stream data. In the present invention, the target format can be 128Bit, that is, when the cached audio and video data is 8Bit data, it needs to be converted into 128Bit data to obtain the target cached audio and video data.

[0075] Step 605, encrypt and decrypt the key stream data in combination with the target cached audio and video data to obtain encrypted and decrypted audio and video data.

[0076] In the present invention, the audio and video data can be cached by the data cache module 30, and the cached audio and video data can be transmitted to the encryption and decryption processing module 70, and the target cached audio and video data can be obtained in the encryption and decryption processing module.

[0077] The parallel seed storage module 40 and key storage module 50 will generate key stream data according to the key update instruction while caching the audio and video data, and store the key stream data through the key stream storage module 60. Specifically, the key stream data can be stored in the block memory (Block Random Access Memory, BRAM) in the key stream storage module 60, and the key stream data can be transmitted to the encryption and decryption processing module.

[0078] The encryption and decryption processing module can perform encryption and decryption processing in the output feedback (OFB) mode according to the target cache audio and video data and the key stream data to obtain encrypted and decrypted audio and video data. The audio and video data in the target format after encryption and decryption needs to be converted into the data format corresponding to the Ethernet transceiver module. For example, 128-bit audio and video data can be converted into 8-bit audio and video data.

[0079] Step 606, sending the encrypted and decrypted audio and video data to the data receiving end.

[0080] In the present invention, the encrypted and decrypted audio and video data can be sent to the data buffer area, and the sending control module can be started to send it at the same time, and the encrypted and decrypted audio and video data can be sent out through the Ethernet transceiver module 10 to the data receiving end to realize the sending of the encrypted and decrypted audio and video data.

[0081] In an embodiment of the present invention, the visual network server can parse the received audio and video data to obtain target instructions. When the target instructions include key update instructions and encryption and decryption data cache instructions, the key stream data is generated in combination with random numbers, the key stream data is stored, and the audio and video data are cached at the same time to obtain cached audio and video data. When the cached audio and video data storage location is in a first-in-first-out data cache area, the format of the cached audio and video data is converted into a target format corresponding to the key stream data to obtain target cached audio and video data, the key stream data is combined with the target cached audio and video data to perform data encryption and decryption to obtain encrypted and decrypted audio and video data, and the encrypted and decrypted audio and video data is sent. Since the audio and video data is cached while the key stream data is generated, that is, parallel processing of the audio and video data can be achieved, high-speed encryption and decryption of audio and video data of the visual network can be achieved, a maximum audio and video data processing capability of 300Mbit / S can be achieved, OFB mode full encryption of the data can be achieved, and the simultaneous encryption and decryption functions of multiple visual network devices can be met.

[0082] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0083] Reference Figure 4 , shows a structural block diagram of a data encryption and decryption device provided in Embodiment 3 of the present invention, the data encryption and decryption device 700 specifically includes:

[0084] The parsing module 701 is used to parse the received audio and video data to obtain the target instruction;

[0085] A generating module 702, configured to generate key stream data and cache the audio and video data to obtain cached audio and video data when the target instruction includes an update key instruction and an encryption and decryption data cache instruction;

[0086] The encryption and decryption module 703 is used to perform data encryption and decryption based on the cached audio and video data and the key stream data to obtain encrypted and decrypted audio and video data.

[0087] Optionally, the encryption and decryption module includes:

[0088] A format conversion submodule, for converting the format of the cached audio and video data into a target format corresponding to the key stream data when the cached audio and video data is located in a first data cache area, so as to obtain target cached audio and video data; the first data cache area is a cache area where data follows the principle of first-in-data-first-out cache area;

[0089] The encryption and decryption submodule is used to encrypt and decrypt the key stream data in combination with the target cached audio and video data to obtain encrypted and decrypted audio and video data.

[0090] Optionally, when the target instruction includes an instruction to update a secret key and an instruction to cache encryption and decryption data, the generating module includes:

[0091] A generation submodule, for generating key stream data in combination with a random number when the target instruction includes an update key instruction and an encryption and decryption data cache instruction;

[0092] The saving submodule is used to save the secret key stream data and cache the audio and video data to obtain cached audio and video data.

[0093] Optionally, the device further comprises:

[0094] The sending module is used to send the encrypted and decrypted audio and video data to the data receiving end.

[0095] In an embodiment of the present invention, the visual network server can parse the received audio and video data through the parsing module to obtain the target instruction, and generate key stream data through the generating module when the target instruction includes the update key instruction and the encryption and decryption data cache instruction, and cache the audio and video data at the same time to obtain the cached audio and video data, and encrypt and decrypt the data based on the cached audio and video data and the key stream data through the encryption and decryption module to obtain the encrypted and decrypted audio and video data. Since the audio and video data are cached while the key stream data is generated, that is, parallel processing of the audio and video data can be achieved, high-speed encryption and decryption of the audio and video data of the visual network can be achieved, and a maximum audio and video data processing capability of 300Mbit / S can be achieved. The OFB mode full encryption of the data can be achieved, and the simultaneous encryption and decryption functions of multiple visual network devices can be required.

[0096] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0097] An embodiment of the present invention further provides an electronic device, including:

[0098] one or more processors; and

[0099] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the device to perform the data encryption and decryption method as described above.

[0100] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program that enables a processor to execute the above-mentioned data encryption and decryption method.

[0101] The visual Internet is an important milestone in the development of the Internet. It is a real-time network that can realize real-time transmission of high-definition video and push many Internet applications towards high-definition video and high-definition face-to-face communication.

[0102] The visual network adopts real-time high-definition video exchange technology. It can integrate the required services such as high-definition video conferencing, video monitoring, intelligent monitoring analysis, emergency command, digital radio and television, delayed TV, online teaching, live broadcast, VOD on demand, TV mail, personalized recording (PVR), intranet (self-operated) channels, intelligent video broadcast control, information release and dozens of other video, voice, picture, text, communication, data and other services on a single system platform, and realize high-definition quality video playback through TV or computer.

[0103] In order to enable those skilled in the art to better understand the embodiments of the present invention, the visual network is introduced as follows:

[0104] Some of the technologies used in the visual Internet of Things are as follows:

[0105] Network Technology

[0106] The network technology innovation of visual networking improves the traditional Ethernet to cope with the huge potential video traffic on the network. Different from simple network packet switching or network circuit switching, visual networking technology uses packet switching to meet streaming needs. Visual networking technology has the flexibility, simplicity and low price of packet switching, and the quality and security guarantee of circuit switching, realizing the seamless connection of the whole network switching virtual circuit and data format.

[0107] Switching Technology

[0108] Visual networking uses the two advantages of Ethernet: asynchronism and packet switching. It eliminates Ethernet defects under the premise of full compatibility, and has seamless end-to-end connection across the entire network, directly connects to user terminals, and directly carries IP data packets. User data does not require any format conversion within the entire network. Visual networking is a more advanced form of Ethernet and a real-time switching platform that can achieve large-scale real-time transmission of high-definition video across the entire network, which is currently unattainable on the Internet, and pushes many network video applications towards high definition and unification.

[0109] Server Technology

[0110] The server technology on the visual network and unified video platform is different from the traditional server. Its streaming media transmission is based on connection-oriented. Its data processing capability is independent of traffic and communication time. A single network layer can include signaling and data transmission. For voice and video services, the complexity of streaming media processing on the visual network and unified video platform is much simpler than data processing, and its efficiency is more than 100 times higher than that of traditional servers.

[0111] Storage Technology

[0112] The ultra-high-speed storage technology of the unified video platform adopts the most advanced real-time operating system to adapt to the media content with ultra-large capacity and ultra-large flow, mapping the program information in the server command to the specific hard disk space. The media content no longer passes through the server, but is directly delivered to the user terminal in an instant. The user generally waits for less than 0.2 seconds. The optimized sector distribution greatly reduces the mechanical movement of the hard disk head seeking, and the resource consumption accounts for only 20% of the same level of IP Internet, but it generates 3 times more concurrent traffic than the traditional hard disk array, and the overall efficiency is improved by more than 10 times.

[0113] Network Security Technology

[0114] The structural design of the visual network completely eradicates the network security issues that plague the Internet through separate licensing for each service and complete isolation of equipment and user data. Generally, anti-virus programs and firewalls are not required, and attacks by hackers and viruses are eliminated, providing users with a structurally worry-free and secure network.

[0115] Service Innovation Technology

[0116] The unified video platform integrates services and transmission. Whether it is a single user, a private network user or a network, it is just an automatic connection. User terminals, set-top boxes or PCs are directly connected to the unified video platform to obtain rich and colorful multimedia video services in various forms. The unified video platform uses a "recipe-style" table configuration mode to replace traditional complex application programming. Complex applications can be implemented with very little code, realizing "unlimited" new business innovation.

[0117] The networking of the visual network is as follows:

[0118] Visual networking is a centrally controlled network structure. The network can be a tree network, star network, ring network, etc., but on this basis, there needs to be a centralized control node in the network to control the entire network.

[0119] like Figure 5 As shown in the figure, the visual network is divided into two parts: access network and metropolitan area network.

[0120] The equipment in the access network can be divided into three categories: node server, access switch, and terminal (including various set-top boxes, encoding boards, storage, etc.). The node server is connected to the access switch, and the access switch can be connected to multiple terminals and can be connected to Ethernet.

[0121] The node server is a node in the access network that performs centralized control functions and can control access switches and terminals. The node server can be directly connected to the access switch or directly connected to the terminal.

[0122] Similarly, the devices in the metropolitan area network can also be divided into three categories: metropolitan area servers, node switches, and node servers. The metropolitan area servers are connected to the node switches, and the node switches can be connected to multiple node servers.

[0123] The node server is a node server of the access network part, that is, the node server belongs to both the access network part and the metropolitan area network part.

[0124] The metropolitan area server is a node with centralized control function in the metropolitan area network, which can control the node switch and node server. The metropolitan area server can be directly connected to the node switch or the node server.

[0125] It can be seen from this that the entire visual network is a hierarchical and centrally controlled network structure, and the network controlled by the node server and the metropolitan area server can be various structures such as tree, star, and ring.

[0126] Figuratively speaking, the access network part can form a unified video platform (the part in the dotted circle), and multiple unified video platforms can form a visual network; each unified video platform can be interconnected through the metropolitan area and wide area visual networks.

[0127] Visual networking equipment classification

[0128] 1.1 The devices in the visual network of the embodiment of the present invention can be mainly divided into three categories: servers, switches (including Ethernet gateways), terminals (including various set-top boxes, encoding boards, storage devices, etc.). The visual network as a whole can be divided into a metropolitan area network (or a national network, a global network, etc.) and an access network.

[0129] 1.2 The equipment in the access network can be mainly divided into three categories: node server, access switch (including Ethernet gateway), terminal (including various set-top boxes, encoding boards, storage, etc.).

[0130] The specific hardware structure of each access network device is as follows:

[0131] Node server:

[0132] like Figure 6 As shown, it mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;

[0133] Among them, the packets coming from the network interface module 201, the CPU module 203, and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of checking the address table 205 on the incoming packets, thereby obtaining the packet's guidance information; and according to the packet's guidance information, the packet is stored in the queue of the corresponding packet buffer 206; if the queue of the packet buffer 206 is close to full, it is discarded; the switching engine module 202 polls all packet buffer queues, and forwards if the following conditions are met: 1) the port sending buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 204 mainly implements the control of the hard disk, including the initialization, reading and writing of the hard disk; the CPU module 203 is mainly responsible for the protocol processing between the access switch and the terminal (not shown in the figure), the configuration of the address table 205 (including the downstream protocol packet address table, the upstream protocol packet address table, and the data packet address table), and the configuration of the disk array module 204.

[0134] Access switch:

[0135] like Figure 7 As shown, it mainly includes a network interface module (a downlink network interface module 301, an uplink network interface module 302), a switching engine module 303 and a CPU module 304;

[0136] Among them, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the destination address (DA), source address (SA), data packet type and packet length of the packet meet the requirements. If they meet the requirements, the corresponding stream identifier (stream-id) is allocated and enters the switching engine module 303, otherwise it is discarded; the packet (downlink data) coming from the uplink network interface module 302 enters the switching engine module 303; the data packet coming from the CPU module 304 enters the switching engine module 303; the switching engine module 303 processes the incoming packet The address table 306 is looked up to obtain the packet's guidance information; if the packet entering the switching engine module 303 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 307 in combination with the stream identifier (stream-id); if the queue of the packet buffer 307 is nearly full, it is discarded; if the packet entering the switching engine module 303 is not from the downstream network interface to the upstream network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the packet's guidance information; if the queue of the packet buffer 307 is nearly full, it is discarded.

[0137] The switching engine module 303 polls all packet buffer queues. In the embodiment of the present invention, there are two situations:

[0138] If the queue is from the downlink network interface to the uplink network interface, it is forwarded if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero; 3) a token generated by the bit rate control module is obtained;

[0139] If the queue is not going from the downstream network interface to the upstream network interface, it is forwarded if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.

[0140] The code rate control module 308 is configured by the CPU module 304 to generate tokens for all packet buffer queues from the downstream network interface to the upstream network interface within a programmable interval to control the code rate of the upstream forwarding.

[0141] The CPU module 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306 , and configuration of the bit rate control module 308 .

[0142] Ethernet protocol conversion gateway :

[0143] like Figure 8 As shown, it mainly includes a network interface module (a downlink network interface module 401, an uplink network interface module 402), a switching engine module 403, a CPU module 404, a packet detection module 405, a bit rate control module 408, an address table 406, a packet buffer 407 and a MAC adding module 409, and a MAC deleting module 410.

[0144] The data packet from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 detects whether the Ethernet MAC DA, Ethernet MAC SA, Ethernet length or frame type, visual network destination address DA, visual network source address SA, visual network data packet type and packet length of the data packet meet the requirements, and if they meet the requirements, a corresponding stream identifier (stream-id) is assigned; then, the MAC deletion module 410 subtracts the MAC DA, MAC SA, length or frame type (2 bytes) and enters the corresponding receiving buffer, otherwise it is discarded;

[0145] The downlink network interface module 401 detects the sending buffer of the port. If there is a packet, it obtains the Ethernet MAC DA of the corresponding terminal based on the visual network destination address DA of the packet, adds the Ethernet MAC DA of the terminal, the MACSA of the Ethernet protocol conversion gateway, and the Ethernet length or frame type, and sends it.

[0146] The functions of other modules in the Ethernet protocol conversion gateway are similar to those of the access switch.

[0147] terminal:

[0148] It mainly includes network interface module, business processing module and CPU module; for example, the set-top box mainly includes network interface module, audio and video encoding and decoding engine module, CPU module; the encoding board mainly includes network interface module, audio and video encoding engine module, CPU module; the memory mainly includes network interface module, CPU module and disk array module.

[0149] 1.3 The equipment in the metropolitan area network can be divided into two categories: node server, node switch, and metropolitan area server. Among them, the node switch mainly includes network interface module, switching engine module and CPU module; the metropolitan area server mainly includes network interface module, switching engine module and CPU module.

[0150] 2. Definition of Visual Network Data Packet

[0151] 2.1 Access Network Data Packet Definition

[0152] The data packet of the access network mainly includes the following parts: destination address (DA), source address (SA), reserved bytes, payload (PDU), and CRC.

[0153] As shown in the following table, the data packet of the access network mainly includes the following parts:

[0154] DA SA Reserved Payload CRC

[0155] in:

[0156] The destination address (DA) consists of 8 bytes. The first byte indicates the type of data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), with a maximum of 256 possibilities. The second to sixth bytes are the metropolitan area network address, and the seventh and eighth bytes are the access network address.

[0157] The source address (SA) is also composed of 8 bytes and has the same definition as the destination address (DA).

[0158] The reserved bytes consist of 2 bytes;

[0159] The payload part has different lengths depending on the type of datagram. If it is a protocol packet, it is 64 bytes. If it is a single multicast data packet, it is 32+1024=1056 bytes. Of course, it is not limited to the above two types.

[0160] CRC consists of 4 bytes and its calculation method follows the standard Ethernet CRC algorithm.

[0161] 2.2 Definition of Metropolitan Area Network Data Packet

[0162] The topology of the metropolitan area network is a graph. There may be two or more connections between two devices, that is, there may be more than two connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metropolitan area network address of a metropolitan area network device is unique. In order to accurately describe the connection relationship between metropolitan area network devices, a parameter: a label is introduced in the embodiment of the present invention to uniquely describe a metropolitan area network device.

[0163] The definition of labels in this manual is similar to the definition of labels in MPLS (Multi-Protocol Label Switch). Assuming that there are two connections between device A and device B, there are two labels for the data packet from device A to device B, and there are two labels for the data packet from device B to device A. Labels are divided into input labels and output labels. Assuming that the label of the data packet entering device A (input label) is 0x0000, the label of the data packet when leaving device A (output label) may become 0x0001. The access process of the metropolitan area network is a centralized access process, which means that the address allocation and label allocation of the metropolitan area network are dominated by the metropolitan area server, and the node switch and node server are only passively executed. This is different from the label allocation of MPLS, which is the result of mutual negotiation between the switch and the server.

[0164] As shown in the following table, the data packets of the metropolitan area network mainly include the following parts:

[0165] DA SA Reserved Label Payload CRC

[0166] That is, destination address (DA), source address (SA), reserved byte (Reserved), label, payload (PDU), CRC. The label format can refer to the following definition: the label is 32 bits, of which the upper 16 bits are reserved and only the lower 16 bits are used. It is located between the reserved bytes and payload of the data packet.

[0167] Based on the above-mentioned characteristics of the visual network, one of the core concepts of an embodiment of the present invention is proposed. The visual network server can parse the received audio and video data to obtain the target instruction. When the target instruction includes an instruction to update the key and an instruction to cache the encryption and decryption data, the key stream data is generated. At the same time, the audio and video data is cached to obtain the cached audio and video data. The data is encrypted and decrypted based on the cached audio and video data and the key stream data to obtain the encrypted and decrypted audio and video data. Since the audio and video data are cached while the key stream data is generated, that is, parallel processing of the audio and video data can be achieved, high-speed encryption and decryption of the audio and video data of the visual network can be achieved, and a maximum audio and video data processing capability of 300Mbit / S can be achieved. The OFB mode full encryption of the data can be achieved, and the simultaneous encryption and decryption functions of multiple visual network devices can be met.

[0168] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0169] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0170] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0171] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0172] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0173] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0174] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0175] The data encryption and decryption method and device provided by the present invention are introduced in detail above. The principles and implementation methods of the present invention are explained in this article using specific examples. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A data encryption and decryption method, applied to a visual network server, It is characterized in that The method comprises: Parse the received audio and video data to obtain the target instructions; In the case where the target instruction includes an instruction to update a secret key and an instruction to cache encryption and decryption data, generating secret key stream data, and caching the audio and video data to obtain cached audio and video data; Perform data encryption and decryption based on the cached audio and video data and the key stream data to obtain encrypted and decrypted audio and video data; The generating of the key stream data and caching the audio and video data to obtain the cached audio and video data includes: Generate key stream data in combination with random numbers; The key stream data is saved, and the audio and video data is cached to obtain cached audio and video data; The step of performing data encryption and decryption based on the cached audio and video data and the key stream data to obtain encrypted and decrypted audio and video data includes: In the case where the cached audio and video data is located in a first data cache area, the format of the cached audio and video data is converted into a target format corresponding to the key stream data to obtain target cached audio and video data; the first data cache area is a cache area where data follows the principle of first-in-data-first-out cache area; The key stream data is combined with the target cached audio and video data to perform the data encryption and decryption to obtain the encrypted and decrypted audio and video data.

2. The method according to claim 1, It is characterized in that After the data is encrypted and decrypted based on the cached audio and video data and the key stream data to obtain the encrypted and decrypted audio and video data, the method further includes: The encrypted and decrypted audio and video data are sent to a data receiving end.

3. A data encryption and decryption device, provided in a video network server, It is characterized in that The device comprises: The parsing module is used to parse the received audio and video data to obtain the target instruction; A generating module, configured to generate key stream data and cache the audio and video data to obtain cached audio and video data when the target instruction includes an update key instruction and an encryption and decryption data cache instruction; An encryption and decryption module, used to perform data encryption and decryption based on the cached audio and video data and the key stream data to obtain encrypted and decrypted audio and video data; The encryption and decryption module includes: a format conversion submodule, configured to convert the format of the cached audio and video data into a target format corresponding to the key stream data to obtain target cached audio and video data when the cached audio and video data is located in a first data cache area; the first data cache area is a cache area where data follows the principle of first-in-data-first-out cache area; An encryption and decryption submodule, used to encrypt and decrypt the data by combining the key stream data with the target cached audio and video data to obtain the encrypted and decrypted audio and video data; The generation module comprises: A generating submodule, for generating key stream data in combination with a random number when the target instruction includes an update key instruction and an encryption and decryption data cache instruction; The saving submodule is used to save the key stream data and cache the audio and video data to obtain cached audio and video data.

4. The device according to claim 3, It is characterized in that The device also includes: The sending module is used to send the encrypted and decrypted audio and video data to a data receiving end.

5. An electronic device, It is characterized in that include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the electronic device to execute the data encryption and decryption method according to any one of claims 1 to 2.

6. A computer-readable storage medium, It is characterized in that The computer program stored therein enables the processor to execute the data encryption and decryption method described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Cryptographic equipment

    CN110912679A