Video association method and device, equipment, storage medium and program product
By extracting and decrypting the device identifier from the video to be published uploaded by the client, and hash mapping comparison, the association relationship between video and device identifier is constructed, and the problems of identity system connectivity and user information transmission between different video applications are solved, and efficient video correlation processing is achieved.
Patent Information
- Application Number
- CN202510119410.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-23
AI Technical Summary
The existing technology requires connecting the identity system between different video applications or transmitting user-related information separately, which affects the original data transmission process, which is more complex and has less processing efficiency.
By receiving the video to be published uploaded by the client, the target data unit that meets the predefined unit type is determined from the video, the encrypted content data is extracted for decryption, the reference verification value and device identification are obtained, and the hash mapping process is compared to construct the association relationship between the video and device identification.
It realizes video association only by receiving videos to be published uploaded by the receiving client, and completes video association produced by multiple video applications on the same device, without the need to receive other user information separately, maintains the original data transmission process, reduces the correlation complexity, and improves processing efficiency.
Smart Images

Figure CN120034672A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a video association method, apparatus, device, storage medium, and program product. Background Art
[0002] With the development of computer technology and smart terminals, various video applications have enriched users' lives, work and entertainment. Among them, video applications can provide rich creative materials and flexible editing functions to meet users' creative needs in different scenarios. Users can distribute their created videos to major social media platforms, share their personal life experiences, and enhance communication between people.
[0003] In order to meet business needs such as building user portraits and video recommendations, it is necessary to associate different videos produced by users. However, in related technologies, in order to associate videos produced by users through different video applications, it is necessary to connect the identity systems between different video applications or transmit user-related information separately, which affects the original data transmission process, has high association complexity, and low processing efficiency. Summary of the invention
[0004] The embodiments of the present application provide a video association method, apparatus and device, which solve the problem that related technologies need to connect identity systems between different video applications or transmit user-related information separately, which affects the original data transmission process, has high complexity and low processing efficiency. It realizes video association only by receiving the to-be-published videos uploaded by the client, and completes the association of videos produced on multiple video applications on the same device, without the need to receive other user information separately, maintaining the data transmission process of the original video application, reducing the association complexity and improving the processing efficiency.
[0005] In a first aspect, an embodiment of the present application provides a video association method, which is applied to a server, and the method includes:
[0006] Acquire a video to be published uploaded by a client, wherein the video to be published is obtained by the client inserting a pre-built target data unit that conforms to a predefined unit type into an original video, and determine the target data unit that conforms to the predefined unit type from a plurality of data units that have been divided into the video to be published;
[0007] Extracting the encrypted content data from the target data unit, decrypting the encrypted content data, and obtaining a reference check value and a device identification of the client;
[0008] Performing hash mapping processing on other data units of the multiple data units excluding the target data unit to obtain a current check value, and comparing the current check value with the reference check value;
[0009] When the current check value is consistent with the reference check value, a first association relationship is established between the video to be published and the associated video corresponding to the device identifier.
[0010] In a second aspect, an embodiment of the present application provides a video association method, which is applied to a client, and the method includes:
[0011] Obtaining an original video and a device identifier, and performing hash mapping processing on a plurality of data units into which the original video has been divided to obtain a reference check value;
[0012] Encrypting the device identification and the reference check value to obtain encrypted content data;
[0013] Constructing a target data unit that conforms to a predefined unit type, and filling the encrypted content data into the target data unit;
[0014] The target data unit is inserted into a preset unit position of the original video to obtain a video to be published, and the video to be published is uploaded to a server, so that the server can build a first association relationship between the video to be published and an associated video corresponding to the device identifier.
[0015] In a third aspect, an embodiment of the present application further provides a video association device, the device comprising:
[0016] A video acquisition module is configured to acquire a to-be-published video uploaded by a client, wherein the to-be-published video is obtained by inserting a pre-built target data unit conforming to a predefined unit type into an original video by the client;
[0017] A target data unit determination module, configured to determine the target data unit that meets the predefined unit type from the multiple data units into which the to-be-published video has been divided;
[0018] A data extraction and decryption module is configured to extract the encrypted content data from the target data unit, decrypt the encrypted content data, and obtain a reference check value and a device identification of the client;
[0019] A check and comparison module, configured to perform hash mapping processing on other data units of the multiple data units excluding the target data unit to obtain a current check value, and compare the current check value with the reference check value;
[0020] The association relationship building module is configured to build a first association relationship between the video to be released and the associated video corresponding to the device identifier when the current check value is consistent with the reference check value.
[0021] In a fourth aspect, an embodiment of the present application further provides a video association device, the device comprising:
[0022] An acquisition module configured to acquire original video and device identification;
[0023] A check value generation module is configured to perform hash mapping processing on the multiple data units into which the original video has been divided to obtain a reference check value;
[0024] A data encryption module, configured to encrypt the device identification and the reference check value to obtain encrypted content data;
[0025] a target data unit generation module, configured to construct a target data unit conforming to a predefined unit type, and fill the encrypted content data into the target data unit;
[0026] The video uploading module is configured to insert the target data unit into the preset unit position of the original video to obtain the video to be released, and upload the video to be released to the server, so that the server can build a first association relationship between the video to be released and the associated video corresponding to the device identifier.
[0027] In a fifth aspect, an embodiment of the present application further provides a video association device, the device comprising:
[0028] one or more processors;
[0029] a storage device configured to store one or more programs,
[0030] When the one or more programs are executed by the one or more processors, the one or more processors implement the video association method described in the embodiment of the present application.
[0031] In a sixth aspect, an embodiment of the present application further provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are configured to execute the video association method described in the embodiment of the present application.
[0032] In the seventh aspect, an embodiment of the present application also provides a computer program product, which includes a computer program, which is stored in a computer-readable storage medium, and at least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device executes the video association method described in the embodiment of the present application.
[0033] In an embodiment of the present application, by obtaining a video to be published uploaded by a client, a target data unit that meets a predefined unit type is determined from multiple data units into which the video to be published has been divided; encrypted content data is extracted from the target data unit, and the encrypted content data is decrypted to obtain a reference verification value and a device identification of the client; hash mapping is performed on other data units in the multiple data units excluding the target data unit to obtain a current verification value, and the current verification value is compared with the reference verification value; when the current verification value is consistent with the reference verification value, a first association relationship between the video to be published and the associated video corresponding to the device identification is established. In the above scheme, by determining the target data unit that meets the predefined unit type from the multiple data units that the video to be released has been divided into, the target data unit containing the device identification that the client additionally constructs can be effectively identified. By decrypting the encrypted content data, the reference check value and the device identification of the client can be obtained to ensure the security and reliability of the data source. By comparing the current check value with the reference check value, it is possible to effectively check whether the video data has problems such as illegal tampering or abnormal missing, ensure the integrity and authenticity of the video to be released that needs to be associated, and when the current check value is consistent with the reference check value, construct a first association relationship between the video to be released and the associated video corresponding to the device identification. Video association can be completed by only receiving the video to be released uploaded by the client, and the videos produced on the same device on multiple video applications can be associated without receiving other user information separately. The data transmission process of the original video application is maintained, the association complexity is reduced, and the processing efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flowchart of a video association method provided in an embodiment of the present application;
[0035] Figure 2 A flowchart of a video association method including a process of determining a target data unit that conforms to a predefined unit type provided in an embodiment of the present application;
[0036] Figure 3 A flowchart of a video association method including a process of performing hash mapping processing to obtain a current check value provided in an embodiment of the present application;
[0037] Figure 4 A flowchart of a video association method including a process of determining a second association relationship provided in an embodiment of the present application;
[0038] Figure 5 A flowchart of another video association method provided in an embodiment of the present application;
[0039] Figure 6A flowchart of another video association method including a process of performing hash mapping processing to obtain a reference check value provided in an embodiment of the present application;
[0040] Figure 7 A flowchart of another video association method including a process of constructing a target data unit that conforms to a predefined unit type provided in an embodiment of the present application;
[0041] Figure 8 A structural block diagram of a video association device provided in an embodiment of the present application;
[0042] Fig. 9 A structural block diagram of another video association device provided in an embodiment of the present application;
[0043] Fig.10 A schematic diagram of the structure of a video association device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, rather than to limit the embodiments of the present application. It should also be noted that, for ease of description, only parts related to the embodiments of the present application are shown in the accompanying drawings, rather than all structures.
[0045] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0046] The video association method provided in the embodiment of the present application can determine the target data unit that meets the predefined unit type from the video to be released uploaded by the client, and extract the device identification from the target data unit to perform video association, without the need to receive other user information in addition. Related application scenarios may include: user portrait construction, video association recommendation, application data analysis, etc. The several application scenarios listed above are only exemplary and explanatory. In actual applications, the video association method can also be used in video association in other scenarios, and the embodiment of the present application does not limit this. The video association method, device, equipment, storage medium and program product provided in the embodiment of the present application are intended to solve the problem that the related technology needs to connect the identity system between different video applications or transmit user-related information separately, which affects the original data transmission process, has high complexity and low processing efficiency.
[0047] In the video association method provided in the embodiment of the present application, the executor of each step can be a computer device, which refers to any electronic device with data calculation, processing and storage capabilities, such as PC (Personal Computer), tablet computer and other terminal devices, and can also be servers and other devices, which are not limited in the embodiment of the present application.
[0048] Figure 1 A flowchart of a video association method provided in an embodiment of the present application. The video association method is applied to the server, such as Figure 1 As shown, the following steps are included:
[0049] Step S101: obtaining a video to be published uploaded by a client, and determining a target data unit that meets a predefined unit type from a plurality of data units into which the video to be published has been divided.
[0050] Among them, the video to be released can be obtained by inserting a pre-built target data unit that conforms to a predefined unit type into the original video by the client. The original video can be produced by different video applications according to their own established production processes, and the original video is composed of multiple data units with specific functions and structures. For example, for the original video in MP4 format, the corresponding data unit is a box unit, and for the original video in MOV format, the corresponding data unit is an atom unit. Of course, there can also be original videos in other video file formats, which are not limited in this application. Taking the original video in MP4 format as an example, it can include multiple box units of different unit types. For example, a box unit of moov type can store the overall information of media data, such as track information, time information, etc., and a box unit of trak type can store media data and its metadata. Different from the data unit of the original unit type in the original video, the target data unit is a predefined unit type, which is used to store encrypted content data containing a reference check value and a device identifier of the client. As a result, the multiple data units into which the video to be released has been divided contain both the original data unit of the original unit type and the target data unit of the predefined unit type. In one embodiment, the video file format of the received video to be published is a fixed format, and the preset field value corresponding to the predefined unit type can be directly compared with the field value of the unit type field corresponding to multiple data units to filter out the target data unit whose field value is the same as the preset field value. For example, for the video to be published in MP4 format, the unit type field box type of its data unit is 4 bytes in size, which is different from the original moov, trak and other field values. The preset field value can be customized to be xxxx. If the data unit with the field value of xxxx is determined through traversal, then the data unit can be regarded as the target data unit. In one embodiment, the video file format of the received video to be published can be different, and the customization methods and byte sizes of different video file formats and the corresponding unit type fields may be different. Therefore, the field values of the predefined unit type settings corresponding to different video file formats may be different. Therefore, the target field value of the associated unit type field can be determined by querying according to the video file format, and then the multiple data units currently divided by the video to be published are traversed based on the target field value to filter out the target data unit whose field value of the unit type field is the target field value.
[0051] Step S102: extract the encrypted content data from the target data unit, decrypt the encrypted content data, and obtain a reference check value and a device identifier of the client.
[0052] Among them, the encrypted content data can be obtained by the client encrypting the reference check value and the device identification. The encryption process can be a symmetric encryption algorithm or an asymmetric encryption algorithm, for example, AES (Advanced Encryption Standard) algorithm, DSA (Digital Signature Algorithm), etc., which is not limited in this application. The encryption process can be used to prevent data theft. Accordingly, the server needs to deploy a decryption process that matches the encryption process performed by the client. The reference check value can be obtained by the client performing hash mapping processing on multiple data units that have been divided into the original video, which is used to detect whether the video to be released has been illegally tampered with or abnormally missing during the transmission process. The device identification can be a unique identifier of the terminal device to which the client belongs, specifically a 128-bit digital sequence. The device identification is generated when the device is initialized and can be used to distinguish it from other terminal devices.
[0053] Step S103: Perform hash mapping processing on other data units in the multiple data units excluding the target data unit to obtain a current check value, and compare the current check value with the reference check value.
[0054] Among them, the hash mapping process can be to use a specific hash function to calculate the hash value, for example, MD5 (Message-Digest Algorithm 5), SHA-1 (Secure Hash Algorithm-1), SHA-256 (Secure Hash Algorithm-256), etc. The specific calculation process needs to be consistent with the hash mapping process performed by the client on the multiple data units into which the original video has been divided. In one embodiment, the client can group the multiple data units into which the original video has been divided to calculate the hash values and accumulate them to obtain a reference check value. Referring to the hash mapping process performed by the client, the server can group the other data units excluding the target data unit in the multiple data units according to a preset number threshold, and perform hash calculation on the data units in each group to obtain the corresponding hash value, and finally accumulate the corresponding hash values of each group to obtain the total hash value, which can be used as the current check value. In one embodiment, the client can calculate the hash values of the multiple data units that the original video has been divided into one by one and accumulate them to obtain a reference check value. Referring to the hash mapping process performed by the client, the server can calculate the corresponding hash values of the other data units excluding the target data unit in the multiple data units, and accumulate the hash values corresponding to each data unit to obtain a total hash value, which can be used as the current check value. By comparing the current check value with the reference check value, it can be effectively determined whether the other data units excluding the target data unit in the video to be released are consistent with the content of the multiple data units that the original video has been divided into, and then determine whether the video data has been illegally tampered with or abnormally missing.
[0055] Step S104: when the current check value is consistent with the reference check value, a first association relationship is established between the video to be released and the associated video corresponding to the device identifier.
[0056] Among them, if the current check value is inconsistent with the reference check value, it can be regarded that the video content of the video to be released may have been illegally tampered with or abnormally missing, and the video abnormality information needs to be fed back to the client. If the current check value is consistent with the reference check value, it can be regarded that the video content of the video to be released is consistent with the original video, and the device identifier is valid. A first association relationship between the video to be released and the associated video corresponding to the device identifier can be established. Specifically, the basic information of the video to be released, the device identifier, and multiple basic information of the associated videos corresponding to the device identifier can be associated and stored through lists, mapping tables, etc. The basic information may include video identifier, video size, video file format, creation time, video content description, etc., which is not limited in this application.
[0057] In the above, by obtaining the video to be released uploaded by the client, a target data unit that meets the predefined unit type is determined from the multiple data units into which the video to be released has been divided; the encrypted content data is extracted from the target data unit, and the encrypted content data is decrypted to obtain a reference verification value and a device identification of the client; other data units excluding the target data unit in the multiple data units are hash mapped to obtain a current verification value, and the current verification value is compared with the reference verification value; when the current verification value is consistent with the reference verification value, a first association relationship between the video to be released and the associated video corresponding to the device identification is established. In the above scheme, by determining the target data unit that meets the predefined unit type from the multiple data units that the video to be released has been divided into, the target data unit containing the device identification that the client additionally constructs can be effectively identified. By decrypting the encrypted content data, the reference check value and the client's device identification can be obtained to ensure the security and reliability of the data source. By comparing the current check value with the reference check value, it is possible to effectively check whether the video data has problems such as illegal tampering or abnormal missing, ensure the integrity and authenticity of the video to be released that needs to be associated, and when the current check value is consistent with the reference check value, construct a first association relationship between the video to be released and the associated video corresponding to the device identification. Video association can be completed by only receiving the video to be released uploaded by the client, and the videos produced on the same device on multiple video applications can be associated without receiving other user information separately. The data transmission process of the original video application is maintained, the association complexity is reduced, and the processing efficiency is improved.
[0058] Figure 2 A flowchart of a video association method including a process of determining a target data unit that conforms to a predefined unit type is provided in an embodiment of the present application. Figure 2 As shown, the following steps are included:
[0059] Step S201: Obtain the video to be published uploaded by the client.
[0060] Step S202: querying according to the video file format of the video to be released to determine the target field value of the associated unit type field.
[0061] The target field value is used to characterize the predefined unit type. In order to meet the video file format requirements of different application scenarios, the video file formats of different videos to be published uploaded by the same client may be different, and the field values of the unit type fields set for the corresponding predefined unit types may be different. Therefore, it is necessary to query the relevant lists or mapping tables according to the video file format of each video to be published, so as to determine the target field value of the associated unit type field. For example, for a video to be published in MP4 format, the corresponding unit type field is box-type, and the corresponding field value can be xxxx.1 For a video to be released in MOV format, the corresponding unit type field is atom-type, and the corresponding field value can be xxxx 2 Specifically, the developer can set the field value of the corresponding predefined unit type according to different video file formats, and this application does not limit this.
[0062] Step S203: Filter out target data units whose field values satisfy the unit type field as target field values from the multiple data units currently divided into the to-be-published video.
[0063] Among them, if the field value of the unit type field of a data unit among the multiple data units currently divided into which the video to be released is consistent with the target field value, the data unit can be regarded as a target data unit autonomously constructed by the client, and the target data unit stores encrypted content data including a reference verification value and the client's device identification.
[0064] Step S204: extract the encrypted content data from the target data unit, decrypt the encrypted content data, and obtain a reference check value and a device identifier of the client.
[0065] Step S205: Perform hash mapping processing on other data units in the multiple data units excluding the target data unit to obtain a current check value, and compare the current check value with the reference check value.
[0066] Step S206: When the current check value is consistent with the reference check value, a first association relationship is established between the video to be released and the associated video corresponding to the device identifier.
[0067] As described above, by querying according to the video file format of the video to be released to determine the target field value of the associated unit type field, the field value of the predefined unit type corresponding to different video file formats can be effectively matched and determined, and the target data unit whose field value satisfies the unit type field as the target field value is screened out, the client's device identifier can be accurately extracted from the videos to be released in different video file formats, and video association can be effectively adapted to different video file formats.
[0068] Figure 3 A flowchart of a video association method including a process of performing hash mapping processing to obtain a current check value is provided in an embodiment of the present application. Figure 3 As shown, the following steps are included:
[0069] Step S301: Obtain a video to be published uploaded by a client, and determine a target data unit that meets a predefined unit type from a plurality of data units into which the video to be published has been divided.
[0070] Step S302: extract the encrypted content data from the target data unit, decrypt the encrypted content data, and obtain a reference check value and a device identifier of the client.
[0071] Step S303: respectively calculate the hash values of other data units excluding the target data unit in the multiple data units, and accumulate the multiple hash values corresponding to the other data units to obtain the current check value.
[0072] Among them, if the client calculates the hash values of the multiple data units into which the original video has been divided one by one and accumulates them to obtain a reference verification value, referring to the hash mapping processing process performed by the client, in this embodiment, the same hash algorithm as the client can be used to calculate the hash values of other data units in the multiple data units excluding the target data unit. The hash algorithm can be MD5, SHA-1, SHA-256 and other methods, which are not limited in this application, and the multiple hash values corresponding to the other data units are accumulated to obtain the current verification value, which can be used to compare with the reference verification value to check whether the video to be released has any illegal tampering or abnormal missing during the data transmission process.
[0073] Step S304: compare the current check value with the reference check value, and when the current check value is consistent with the reference check value, establish a first association relationship between the video to be released and the associated video corresponding to the device identifier.
[0074] As mentioned above, by respectively calculating the hash values of other data units excluding the target data unit in multiple data units, and accumulating multiple hash values corresponding to other data units to obtain the current verification value, the current verification value that is compatible with the process of the client generating the reference verification value can be effectively determined, which is used for subsequent comparison to determine whether the video to be released has any abnormal video content problems.
[0075] Figure 4 A flowchart of a video association method including a process of determining a second association relationship is provided in an embodiment of the present application. Figure 4 As shown, the following steps are included:
[0076] Step S401: Obtain a video to be published uploaded by a client, and determine a target data unit that meets a predefined unit type from a plurality of data units into which the video to be published has been divided.
[0077] Step S402: extract the encrypted content data from the target data unit, decrypt the encrypted content data, and obtain a reference check value and a device identifier of the client.
[0078] Step S403: Perform hash mapping processing on other data units in the multiple data units excluding the target data unit to obtain a current check value, and compare the current check value with the reference check value.
[0079] Step S404: when the current check value is consistent with the reference check value, a first association relationship is established between the video to be released and the associated video corresponding to the device identifier.
[0080] Step S405: query the set database according to the device identification to obtain multiple currently associated videos.
[0081] Among them, after steps S401-S404 complete the construction of the first association relationship between one or more videos to be published uploaded by the client and the associated videos corresponding to the device identifier, the set database can be queried according to the device identifier to determine the latest associated multiple videos for classification association of subsequent videos.
[0082] Step S406: Perform content recognition on each video to obtain key content information, and determine at least one target video corresponding to the set classification label from multiple videos according to the key content information.
[0083] Among them, content recognition for each video can be performed by using a set multimodal large model to process the video to obtain key content information, or it can be performed by identifying and extracting semantic information from the audio content of the video to obtain key content information. The key content information may include one or more of character description information, scene description information, high-frequency vocabulary information, etc., which are not limited in this application. The classification label can be an identifier for classifying videos set in advance by the developer according to the actual application scenario, for example, science and technology, teaching, entertainment, etc. By matching the key content information of each video with the classification label for semantic similarity, at least one target video that meets the preset similarity corresponding to each classification label can be determined, so as to classify multiple videos associated with the device identifier into different preset categories.
[0084] Step S407: construct a second association relationship between the classification label and the corresponding at least one target video.
[0085] Among them, a second association relationship between a classification label and at least one corresponding target video is constructed. Specifically, the basic information of at least one target video and the classification label can be associated and stored in a list, a mapping table, etc. The basic information may include video ID, video size, video file format, creation time, video content description, etc., which is not limited in this application.
[0086] As described above, by constructing a second association relationship between a classification tag and at least one corresponding target video, multiple videos associated with the device identifier can be further classified to establish content connections between the videos.
[0087] Figure 5Flow chart of another video association method provided in an embodiment of the present application. The video association method is applied to a client, such as Figure 5 As shown, the following steps are included:
[0088] Step S501: obtain the original video and the device identification, and perform hash mapping processing on the multiple data units into which the original video has been divided to obtain a reference check value.
[0089] Among them, the original video can be created by the user according to the content materials and editing functions provided by different video applications, and produced by different video applications according to their own established production processes. The original video is composed of multiple data units with specific functions and structures. For example, for the original video in MP4 format, the corresponding data unit is a box unit, and for the original video in MOV format, the corresponding data unit is an atom unit. Of course, there can also be original videos in other video file formats, which are not limited in this application. The device identifier can be a unique identifier of the terminal device to which the client belongs, and can specifically be a 128-bit digital sequence. The device identifier is generated when the device is initialized and can be used to distinguish it from other terminal devices. The hash mapping process can be a hash value calculation using a specific hash function, such as MD5, SHA-1, SHA-256 and other methods. In one embodiment, the client can group the multiple data units into which the original video has been divided to calculate the hash value and accumulate it to obtain a reference check value. In one embodiment, the client can calculate the hash value of the multiple data units into which the original video has been divided one by one and accumulate it to obtain a reference check value. The reference check value can be provided to the server to determine whether the video data has been illegally tampered with or abnormally missing during the data transmission process, so as to ensure the security and effectiveness of the video content and device identification.
[0090] Step S502: encrypt the device identification and the reference check value to obtain encrypted content data.
[0091] The encryption process may be performed by using a symmetric encryption algorithm or an asymmetric encryption algorithm, such as AES, DSA and other algorithms, which are not limited in this application.
[0092] Step S503: construct a target data unit that conforms to the predefined unit type, and fill the encrypted content data into the target data unit.
[0093] Among them, taking the original video in MP4 format as an example, it can include multiple box units of different unit types. For example, the moov type box unit can store the overall information of the media data, such as track information, time information, etc., and the trak type box unit can store the stored media data and its metadata. Different from the data unit of the original unit type in the original video, a target data unit of a predefined unit type can be constructed to store encrypted content data, which can carry the device identification and reference check value without affecting the content playback of the original video.
[0094] Step S504: insert the target data unit into the preset unit position of the original video to obtain the video to be published, and upload the video to be published to the server, so that the server can build a first association relationship between the video to be published and the associated video corresponding to the device identifier.
[0095] Taking the original video in MP4 format as an example, the preset unit position can be the end position of the moov type box unit, so that the insertion of the target data unit does not affect the content playback of the original video. Uploading the video to be published to the server can enable the server to build a first association relationship between the video to be published and the associated video corresponding to the device identifier, thereby realizing video association of the same device.
[0096] In the above, by obtaining the original video and the device identification, the multiple data units into which the original video has been divided are hash mapped to obtain a reference check value; the device identification and the reference check value are encrypted to obtain encrypted content data; a target data unit that conforms to a predefined unit type is constructed, and the encrypted content data is filled into the target data unit; the target data unit is inserted into a preset unit position of the original video to obtain a video to be published, and the video to be published is uploaded to a server, so that the server can construct a first association relationship between the video to be published and an associated video corresponding to the device identification. In the above scheme, by performing hash mapping processing on multiple data units into which the original video has been divided to obtain a reference check value, the server can be provided with reference information for verifying whether the video data has been illegally tampered with or abnormally missing, so as to ensure the integrity and authenticity of the video to be published that needs to be associated. By encrypting the device identification and the reference check value to obtain encrypted content data, it can be ensured that the device identification and the reference check value are not stolen or tampered with during the video transmission process. By constructing a target data unit that conforms to a predefined unit type, and filling the encrypted content data into the target data unit, and inserting the target data unit into the preset unit position of the original video to obtain the video to be published, the encrypted content data for video association can be reasonably inserted without affecting the content playback of the original video, without affecting the original production process and data transmission process of the original video, reducing the complexity of association and improving processing efficiency.
[0097] Figure 6 A flowchart of another video association method including a process of performing hash mapping processing to obtain a reference check value is provided in an embodiment of the present application. Figure 6 As shown, the following steps are included:
[0098] Step S601: Obtain original video and device identification.
[0099] Step S602: respectively calculate hash values of the multiple data units into which the original video has been divided, and accumulate the multiple hash values corresponding to the multiple data units to obtain a reference check value.
[0100] Among them, hash algorithms such as MD5, SHA-1, SHA-256, etc. can be used to calculate the hash values of multiple data units into which the original video has been divided, respectively, and this application does not limit this.
[0101] Step S603: encrypt the device identification and the reference check value to obtain encrypted content data.
[0102] Step S604: construct a target data unit that conforms to the predefined unit type, and fill the encrypted content data into the target data unit.
[0103] Step S605: insert the target data unit into the preset unit position of the original video to obtain the video to be published, and upload the video to be published to the server, so that the server can build a first association relationship between the video to be published and the associated video corresponding to the device identifier.
[0104] As mentioned above, by respectively calculating the hash values of the multiple data units into which the original video has been divided, and accumulating the multiple hash values corresponding to the multiple data units to obtain a reference verification value, the server can be provided with reference information for verifying whether the video to be released has been illegally tampered with or abnormally missing during the data transmission process, and whether the device identification is valid, thereby ensuring the integrity and authenticity of the video to be released.
[0105] Figure 7 A flowchart of another video association method including a process of constructing a target data unit that conforms to a predefined unit type is provided in an embodiment of the present application. Figure 7 As shown, the following steps are included:
[0106] Step S701: obtain the original video and the device identification, and perform hash mapping processing on the multiple data units into which the original video has been divided to obtain a reference check value.
[0107] Step S702: encrypt the device identification and the reference check value to obtain encrypted content data.
[0108] Step S703: query according to the video file format of the original video to determine the target field value of the associated unit type field.
[0109] In order to meet the video file format requirements of different application scenarios, the video file formats of the original videos produced by different video applications may be different, and the field values of the unit type fields corresponding to the predefined unit type settings may be different. Therefore, it is necessary to query the relevant lists or mapping tables according to the video file format of the original video to determine the target field value of the associated unit type field. For example, for the original video in MP4 format, the corresponding unit type field is box-type, and the corresponding field value can be xxxx 1 For the original video in MOV format, the corresponding unit type field is atom-type, and the corresponding field value can be xxxx 2 Specifically, the developer can set the field value of the corresponding predefined unit type according to different video file formats, and this application does not limit this.
[0110] Step S704: construct a target data unit whose field value satisfies the unit type field and is the target field value according to the data size of the encrypted content data, and fill the encrypted content data into the target data unit.
[0111] Among them, the target data unit can include three parts: unit size, unit type and unit data. The unit size is the data size of the encrypted content data, the field value of the unit type field corresponding to the unit type is the target field value, and the unit data is the encrypted content data filled in.
[0112] Step S705: insert the target data unit into the preset unit position of the original video to obtain the video to be published, and upload the video to be published to the server, so that the server can build a first association relationship between the video to be published and the associated video corresponding to the device identifier.
[0113] As described above, by querying according to the video file format of the original video to determine the target field value of the associated unit type field, the field value of the predefined unit type corresponding to different video file formats can be effectively matched and determined, and by constructing a target data unit whose field value satisfies the unit type field as the target field value according to the data size of the encrypted content data, a custom data unit that matches the original video can be effectively constructed, and the encrypted content data for video association can be reasonably inserted without affecting the video content structure of the original video.
[0114] Figure 8This is a structural block diagram of a video association device provided in an embodiment of the present application. The device is configured to execute the video association method provided in the above embodiment and has the corresponding functional modules and beneficial effects of the execution method. Figure 8 As shown, the device comprises:
[0115] The video acquisition module 101 is configured to acquire a to-be-published video uploaded by a client, wherein the to-be-published video is obtained by inserting a pre-built target data unit conforming to a predefined unit type into an original video by the client;
[0116] The target data unit determination module 102 is configured to determine a target data unit that meets a predefined unit type from a plurality of data units into which the video to be published has been divided;
[0117] The data extraction and decryption module 103 is configured to extract the encrypted content data from the target data unit, decrypt the encrypted content data, and obtain a reference check value and a device identification of the client;
[0118] The check and comparison module 104 is configured to perform hash mapping processing on other data units in the plurality of data units excluding the target data unit to obtain a current check value, and compare the current check value with a reference check value;
[0119] The association relationship building module 105 is configured to build a first association relationship between the video to be released and the associated video corresponding to the device identifier when the current check value is consistent with the reference check value.
[0120] In the above, by obtaining the video to be released uploaded by the client, a target data unit that meets the predefined unit type is determined from the multiple data units into which the video to be released has been divided; the encrypted content data is extracted from the target data unit, and the encrypted content data is decrypted to obtain a reference verification value and a device identification of the client; other data units excluding the target data unit in the multiple data units are hash mapped to obtain a current verification value, and the current verification value is compared with the reference verification value; when the current verification value is consistent with the reference verification value, a first association relationship between the video to be released and the associated video corresponding to the device identification is established. In the above scheme, by determining the target data unit that meets the predefined unit type from the multiple data units that the video to be released has been divided into, the target data unit containing the device identification that the client additionally constructs can be effectively identified. By decrypting the encrypted content data, the reference check value and the client's device identification can be obtained to ensure the security and reliability of the data source. By comparing the current check value with the reference check value, it is possible to effectively check whether the video data has problems such as illegal tampering or abnormal missing, ensure the integrity and authenticity of the video to be released that needs to be associated, and when the current check value is consistent with the reference check value, construct a first association relationship between the video to be released and the associated video corresponding to the device identification. Video association can be completed by only receiving the video to be released uploaded by the client, and the videos produced on the same device on multiple video applications can be associated without receiving other user information separately. The data transmission process of the original video application is maintained, the association complexity is reduced, and the processing efficiency is improved.
[0121] In a possible embodiment, the target data unit determination module 102 is further configured to:
[0122] A query is performed according to the video file format of the video to be released to determine a target field value of an associated unit type field, where the target field value is used to represent a predefined unit type;
[0123] From the multiple data units currently divided into which the video to be released is to be released, a target data unit whose field value satisfies the unit type field and is the target field value is screened out.
[0124] In a possible embodiment, the verification and comparison module 104 is further configured to:
[0125] Calculate hash values of other data units excluding the target data unit in the multiple data units respectively;
[0126] The multiple hash values corresponding to other data units are accumulated to obtain the current check value.
[0127] In a possible embodiment, a second association relationship building module is further included, configured to:
[0128] According to the device identification, a set database is queried to obtain multiple currently associated videos;
[0129] Performing content recognition on each video to obtain key content information, and determining at least one target video corresponding to a set classification label from multiple videos according to the key content information;
[0130] A second association relationship between the classification label and the corresponding at least one target video is constructed.
[0131] Fig. 9 This is a structural block diagram of another video association device provided in an embodiment of the present application. The device is configured to execute the video association method provided in the above embodiment and has the corresponding functional modules and beneficial effects of the execution method. Fig. 9 As shown, the device comprises:
[0132] An acquisition module 201 is configured to acquire an original video and a device identification;
[0133] The check value generating module 202 is configured to perform hash mapping processing on the multiple data units into which the original video has been divided to obtain a reference check value;
[0134] The data encryption module 203 is configured to encrypt the device identification and the reference check value to obtain encrypted content data;
[0135] The target data unit generation module 204 is configured to construct a target data unit that conforms to a predefined unit type and fill the encrypted content data into the target data unit;
[0136] The video uploading module 205 is configured to insert the target data unit into the preset unit position of the original video to obtain the video to be released, and upload the video to be released to the server, so that the server can build a first association relationship between the video to be released and the associated video corresponding to the device identifier.
[0137] In a possible embodiment, the check value generating module 201 is further configured to:
[0138] Calculate hash values of multiple data units into which the original video has been divided respectively;
[0139] Multiple hash values corresponding to multiple data units are accumulated to obtain a reference check value.
[0140] In a possible embodiment, the target data unit generation module 204 is further configured to:
[0141] A query is performed according to the video file format of the original video to determine a target field value of an associated unit type field, where the target field value is used to represent a predefined unit type;
[0142] According to the data size of the encrypted content data, a target data unit is constructed whose field value satisfies the unit type field and is the target field value.
[0143] Fig.10 A schematic diagram of the structure of a video association device provided in an embodiment of the present application, such as Fig.10 As shown, the device includes a processor 301, a memory 302, an input device 303 and an output device 304; the number of processors 301 in the device can be one or more. Fig.10 A processor 301 is taken as an example; the processor 301, memory 302, input device 303 and output device 304 in the device can be connected by a bus or other means. Fig.10 The example of connecting via a bus is taken. The memory 302, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the video association method in the embodiment of the present application. The processor 301 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 302, that is, implements the above-mentioned video association method. The input device 303 can be configured to receive input digital or character information, and generate key signal input related to user settings and function control of the device. The output device 304 may include a display device such as a display screen.
[0144] An embodiment of the present application also provides a non-volatile storage medium containing computer executable instructions, which, when executed by a computer processor, is configured to execute a video association method described in the above embodiment, which includes: obtaining a video to be published uploaded by a client, wherein the video to be published is obtained by the client inserting a pre-built target data unit that conforms to a predefined unit type into an original video, and determining the target data unit that conforms to the predefined unit type from multiple data units into which the video to be published has been divided; extracting encrypted content data from the target data unit, decrypting the encrypted content data, and obtaining a reference check value and a device identification of the client; performing hash mapping on other data units in the multiple data units excluding the target data unit to obtain a current check value, and comparing the current check value with the reference check value; when the current check value is consistent with the reference check value, constructing a first association relationship between the video to be published and the associated video corresponding to the device identification.
[0145] It is worth noting that in the embodiment of the above-mentioned video association device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not configured to limit the protection scope of the embodiments of the present application.
[0146] In some possible implementations, various aspects of the method provided by the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is configured to enable the computer device to execute the steps of the method according to various exemplary implementations of the present application described above in this specification. For example, the computer device may execute the video association method described in the embodiment of the present application. The program product may be implemented in any combination of one or more readable media.
Claims
1. A video association method, applied to a server, characterized in that: include: Acquire a video to be published uploaded by a client, wherein the video to be published is obtained by the client inserting a pre-built target data unit that conforms to a predefined unit type into an original video, and determine the target data unit that conforms to the predefined unit type from a plurality of data units that have been divided into the video to be published; Extracting the encrypted content data from the target data unit, decrypting the encrypted content data, and obtaining a reference check value and a device identification of the client; Performing hash mapping processing on other data units of the multiple data units excluding the target data unit to obtain a current check value, and comparing the current check value with the reference check value; When the current check value is consistent with the reference check value, a first association relationship is established between the video to be published and the associated video corresponding to the device identifier.
2. The video association method according to claim 1, characterized in that: The step of determining the target data unit that conforms to a predefined unit type from the plurality of data units into which the to-be-published video has been divided comprises: Performing a query according to the video file format of the video to be published to determine a target field value of an associated unit type field, wherein the target field value is used to represent a predefined unit type; From the multiple data units currently divided into the to-be-published video, a target data unit whose field value satisfies the unit type field and is the target field value is screened out.
3. The video association method according to claim 1, characterized in that: The step of performing hash mapping processing on other data units of the multiple data units excluding the target data unit to obtain a current check value includes: Respectively calculating hash values of other data units in the multiple data units excluding the target data unit; The multiple hash values corresponding to the other data units are accumulated to obtain the current check value.
4. The video association method according to claim 1, characterized in that: After the first association relationship between the to-be-published video and the associated video corresponding to the device identifier is constructed, the method further includes: Querying a set database according to the device identifier to obtain multiple currently associated videos; Performing content recognition on each of the videos to obtain key content information, and determining at least one target video corresponding to the set classification label from the multiple videos according to the key content information; A second association relationship between the classification label and the corresponding at least one target video is constructed.
5. A video association method, applied to a client, characterized in that: include: Obtaining an original video and a device identifier, and performing hash mapping processing on a plurality of data units into which the original video has been divided to obtain a reference check value; Encrypting the device identification and the reference check value to obtain encrypted content data; Constructing a target data unit that conforms to a predefined unit type, and filling the encrypted content data into the target data unit; The target data unit is inserted into a preset unit position of the original video to obtain a video to be published, and the video to be published is uploaded to a server, so that the server can build a first association relationship between the video to be published and an associated video corresponding to the device identifier.
6. The video association method according to claim 5, characterized in that: The step of performing hash mapping processing on the multiple data units into which the original video has been divided to obtain a reference check value includes: Calculating hash values of the multiple data units into which the original video has been divided respectively; The multiple hash values corresponding to the multiple data units are accumulated to obtain a reference check value.
7. The video association method according to claim 5, characterized in that: The constructing of a target data unit conforming to a predefined unit type comprises: Performing a query according to the video file format of the original video to determine a target field value of an associated unit type field, wherein the target field value is used to represent a predefined unit type; According to the data size of the encrypted content data, a target data unit is constructed whose field value of the unit type field is the target field value.
8. A video association device, characterized in that: include: A video acquisition module is configured to acquire a to-be-published video uploaded by a client, wherein the to-be-published video is obtained by inserting a pre-built target data unit conforming to a predefined unit type into an original video by the client; A target data unit determination module, configured to determine the target data unit that meets the predefined unit type from the multiple data units into which the to-be-published video has been divided; A data extraction and decryption module is configured to extract the encrypted content data from the target data unit, decrypt the encrypted content data, and obtain a reference check value and a device identification of the client; A check and comparison module, configured to perform hash mapping processing on other data units of the multiple data units excluding the target data unit to obtain a current check value, and compare the current check value with the reference check value; The association relationship building module is configured to build a first association relationship between the video to be released and the associated video corresponding to the device identifier when the current check value is consistent with the reference check value.
9. A video association device, characterized in that: include: An acquisition module configured to acquire original video and device identification; A check value generation module is configured to perform hash mapping processing on the multiple data units into which the original video has been divided to obtain a reference check value; A data encryption module, configured to encrypt the device identification and the reference check value to obtain encrypted content data; a target data unit generation module, configured to construct a target data unit conforming to a predefined unit type, and fill the encrypted content data into the target data unit; The video uploading module is configured to insert the target data unit into the preset unit position of the original video to obtain the video to be released, and upload the video to be released to the server, so that the server can build a first association relationship between the video to be released and the associated video corresponding to the device identifier.
10. A video association device, comprising: one or more processors; A storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the video association method described in any one of claims 1-7.
11. A non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are configured to perform the video association method according to any one of claims 1 to 7 when executed by a computer processor.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the video association method according to any one of claims 1 to 7 is implemented.