Information positioning and model training method and device, equipment, medium and product
By extracting video and text features and adjusting model parameters, the problem that visual features are irrelevant to text in the existing technology is solved, and the accuracy and training efficiency of video event positioning are improved.
Patent Information
- Application Number
- CN202410781571.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-10-08
AI Technical Summary
In the existing technology, in text-driven video event positioning tasks, the extracted visual features have nothing to do with the text, resulting in low accuracy of the start and end times corresponding to the output text description events.
By obtaining training sample videos, multiple sample sentences and corresponding positioning information, visual features and text features are extracted, and model parameters are adjusted by strengthening features to improve the model's feature representation capabilities.
It greatly improves the feature representation ability and training efficiency of the model, enhances the correlation between visual features and text features, and improves the accuracy of video event location.
Smart Images

Figure CN118747231A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to technical fields such as deep learning, intelligent search, and multimodal content understanding, and specifically to information positioning and model training methods, devices, equipment, media, and products thereof. Background Art
[0002] The text-driven video event localization task is a labeled multimodal task. The input of this task is a long video and a text. The text describes an event in the video. The output of this task is the start and end time of the event described by the text in the long video.
[0003] In the prior art, this task is mostly performed by extracting visual features and text features separately, and then performing feature fusion to determine the corresponding start and end times. However, most of the extracted visual features are irrelevant to the text, resulting in low accuracy of the start and end times corresponding to the output text description events. Summary of the invention
[0004] The present invention provides a method, device, equipment, medium and product for information positioning and model training thereof.
[0005] According to a first aspect of the present disclosure, a method for training an information positioning model is provided, comprising the following steps:
[0006] Acquire a training sample, where the training sample includes a sample video, a plurality of sample sentences corresponding to the sample video, and sample location information corresponding to the sample sentences in the sample video;
[0007] Determining a sample enhancement feature of the sample video according to a sample visual feature of the sample video and sample text features of the plurality of sample sentences;
[0008] Based on the sample reinforcement features, sample text features of multiple sample sentences and sample positioning information, the model parameters are adjusted to obtain a trained information positioning model.
[0009] According to a second aspect of the present disclosure, there is provided an information positioning method, comprising the following steps:
[0010] The received video data and positioning sentence are input into the information positioning model provided in the first aspect to obtain the target positioning information corresponding to the positioning sentence in the video data.
[0011] According to a third aspect of the present disclosure, a training device for an information positioning model is provided, comprising a sample acquisition module, a feature determination module and a parameter adjustment module, wherein:
[0012] The sample acquisition module is configured to acquire a training sample, the training sample including a sample video, a plurality of sample sentences corresponding to the sample video, and sample location information corresponding to the sample sentences in the sample video;
[0013] The feature determination module is configured to determine a sample enhancement feature of the sample video based on a sample visual feature of the sample video and sample text features of a plurality of sample sentences;
[0014] The parameter adjustment module is configured to, in response to the data summary being consistent with the target summary, mark the state of the cloud terminal resource as releasable.
[0015] According to a fourth aspect of the present disclosure, an information positioning device is provided, comprising a target positioning module, wherein the target positioning module is configured to input received video data and positioning statements into an information positioning model such as that provided in the first aspect, and obtain target positioning information corresponding to the positioning statement in the video data.
[0016] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:
[0017] at least one processor; and
[0018] a memory communicatively connected to at least one processor; wherein,
[0019] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to perform the method provided by the first aspect or the second aspect.
[0020] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the method provided in the first aspect or the second aspect.
[0021] According to a seventh aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the method provided according to the first aspect or the second aspect.
[0022] According to the training method of the information localization model provided by the embodiment of the present disclosure, the model training is performed using training data of a sample video corresponding to multiple sample sentences, which can greatly reduce the training time and improve the training efficiency; during the model training process, the sample text features of the multiple sample sentences are used to enhance the sample visual features of the sample video to obtain the sample enhanced features, thereby improving the correlation between the sample visual features and the sample text features of the multiple sample sentences; the model parameters are adjusted using the sample enhanced features and the sample text features of the multiple sample sentences and their sample localization information, which can effectively improve the feature representation ability of the model.
[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0025] Figure 1 is an exemplary system architecture diagram to which the training of the information localization model and the information localization method disclosed herein can be applied;
[0026] Figure 2 is a schematic diagram of a first embodiment of a training method for an information localization model according to the present disclosure;
[0027] Figure 3 is a schematic diagram of a second embodiment of a training method for an information localization model according to the present disclosure;
[0028] Figure 4a is a structural schematic diagram of an embodiment of an information positioning model according to the present disclosure;
[0029] Figure 4b is based on Figure 4a A schematic structural diagram of an embodiment of a 3D adapter in the information positioning model shown;
[0030] Figure 5 is a schematic diagram of a first embodiment of the information positioning method according to the present disclosure;
[0031] Figure 6 is a schematic diagram of a second embodiment of the information positioning method according to the present disclosure;
[0032] Figure 7 is a schematic block diagram of an embodiment of a training device for an information localization model according to the present disclosure;
[0033] Figure 8 is a schematic block diagram of an embodiment of an information locating device according to the present disclosure;
[0034] Fig. 9 It is a block diagram of an electronic device used to implement the training method of the information localization model or the information localization method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0036] The text-driven video event localization task is a labeled multimodal task. The input of this task is a long video data and a text data. The text describes an event in the video, and the output of this task is the start and end time of the event described by the text in the long video. This task involves multiple modalities such as natural language, pictures, video clips, and speech. It requires the model to accurately understand the semantic information in the text and to model the temporal characteristics of the video well.
[0037] This type of task can be widely used in logistics scenarios. For example, cameras are installed in logistics warehouses, platforms, operations departments and many other environments. These cameras can record videos 24 hours a day and 7 days a week. In related technologies, when it is necessary to search for specific events from recorded videos, most of them are still manually searched with the naked eye, or manually searched after initial screening based on time and other conditions. Not only does visual fatigue lead to a decrease in accuracy, but the labor cost is also high, which does not conform to the concept of reducing costs and increasing efficiency.
[0038] It should be pointed out that in the technical solution of the present invention, the acquisition, storage and application of user personal information (such as video data, etc.) are all carried out with the explicit authorization of the user, and are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0039] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the method or apparatus for information localization and training of a model thereof disclosed in the present invention can be applied.
[0040] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The network 102 is used to provide a communication link between the terminal device 101 and the server 103, and may include various connection types, such as a wired communication link, a wireless communication link or an optical fiber cable.
[0041] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive, send or query information, etc. Various client applications can be installed on the terminal device 101, such as social applications, human-computer interaction applications, leisure or entertainment applications, video playback applications, information query or positioning applications, etc.
[0042] The terminal device 101 can be hardware or software. When the terminal device 101 is hardware, it can be various electronic devices, including but not limited to independent electronic devices such as smart phones, tablet computers, laptop computers and desktop computers. When the terminal device 101 is software, it can be installed in the above electronic devices. It can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0043] The server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server 103 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module. No specific limitation is made here.
[0044] The information positioning and model training method provided in the embodiments of the present disclosure are generally executed by the terminal device 101 or the server 103 . Accordingly, the information positioning and model training device are generally arranged in the terminal device 101 or the server 103 .
[0045] It should be noted that Figure 1 The number of terminal devices 101, networks 102 and servers 103 in the embodiment is only for illustration. Any number of terminal devices 101, networks 102 and servers 103 may be provided according to implementation requirements.
[0046] Figure 2 A process 200 of an embodiment of a method for training an information localization model according to the present disclosure is shown, referring to Figure 2 As shown, the training method of the information positioning model includes the following steps:
[0047] Step S201: obtaining a training sample, where the training sample includes a sample video, a plurality of sample sentences corresponding to the sample video, and sample location information corresponding to the sample sentences in the sample video.
[0048] In the embodiment of the present disclosure, the execution subject of the training method of the information positioning model, for example Figure 1 The terminal device 101 or the server 103 shown in the figure obtains training samples for training the model. The obtained training samples include at least one set of sample data, each set of sample data includes a sample video, multiple sample sentences corresponding to the sample video, and sample location information corresponding to each sample sentence in the sample video.
[0049] In a set of sample data, a sample video is video data with a certain duration, and the sample video records a variety of information in the form of images, voices, texts, etc., including event information that can be described from different angles. The multiple sample sentences corresponding to the sample video can be text data or voice data, wherein each sample sentence describes at least one event in the sample video. The sample location information corresponds to the sample sentence one by one, and the sample location information corresponding to the sample sentence represents the location information of the event described by the sample sentence in the sample video, for example, the start and end positions or start and end times of the event described by the sample sentence in the sample video.
[0050] For example, in a set of sample data, sample location information corresponding to different sample sentences may overlap. Taking the sample location information as the start and end time as an example, the sample location information corresponding to sample sentence A is 5.3s-18.6s, and the sample location information corresponding to sample sentence B may be 10.2s-19.8s.
[0051] In this scheme, a training sample of one sample video corresponding to multiple sample sentences is adopted. During the model training process, the model can simultaneously learn the visual features and text features corresponding to multiple sample sentences for one sample video, greatly improve the model's learning ability for sample videos and sample sentences, improve the model's feature representation ability, and greatly reduce the training time.
[0052] Step S202, determining sample enhancement features of the sample video according to sample visual features of the sample video and sample text features of multiple sample sentences.
[0053] In the embodiment of the present disclosure, the execution subject of the training method of the information positioning model, for example Figure 1 The terminal device 101 or the server 103 shown determines the sample enhancement feature of the sample video according to the sample visual feature of the sample video and the sample text features of a plurality of sample sentences corresponding to the sample video.
[0054] The execution subject obtains the sample visual features by extracting the visual features of the sample video; and extracts the sample text features by performing text analysis and processing on multiple sample sentences corresponding to the sample video.
[0055] Exemplarily, the sample text features of multiple sample sentences may be a feature set consisting of text features obtained by performing feature analysis and extraction on each sample sentence, or may be sample text features obtained by performing feature analysis and extraction on text data consisting of multiple sample sentences at the same time.
[0056] In some implementations, the execution entity performs image analysis and processing on the sample video, for example, using edge detection, corner detection, texture analysis and other methods to extract image features from the sample video frame by frame to obtain image features of each frame, and combines the time information of each frame in the sample video to determine the sample visual features of the sample video.
[0057] In some implementations, the execution subject inputs the sample video into a pre-trained visual feature model to obtain sample visual features of the sample video. The visual feature model used may be a deep learning neural network, such as a ResNet (Residual Network) or VGG (Visual Geometry Group) model pre-trained based on ImageNet (a large visual database for visual object recognition software research), or an action recognition model pre-trained based on a video dataset (such as the Sports-1M dataset).
[0058] In some implementations, the sample sentence includes text data, and the execution subject may determine the sample text features of the sample sentence by performing semantic recognition, keyword extraction, etc. through natural language processing methods.
[0059] In some implementations, the sample sentence includes audio data. The above-mentioned execution entity can convert the audio data in the sample sentence into text data through methods such as speech recognition, and then combine natural speech processing methods to perform semantic recognition, keyword extraction, etc. to determine the text features of the text data as sample text features of the sample sentence.
[0060] In some implementations, the execution subject may fuse the sample visual features extracted from a sample video with the sample text features of multiple sample sentences corresponding to the sample video, thereby enhancing the sample visual features to obtain sample enhanced features. For example, the sample text features are converted into features of the same dimension as the sample visual features, and then fused with corresponding elements of the sample visual features in the same dimension to obtain sample enhanced features.
[0061] In some implementations, the execution entity may also first convert the sample visual features corresponding to the sample video to the same dimension as the sample text features, fuse the two at this dimension, and then return them to the dimension corresponding to the original sample visual features, and fuse them again with the original sample visual features at their original dimension to obtain sample enhanced features.
[0062] In this scheme, the executor uses multiple sample sentences corresponding to the sample video to combine the visual features of the sample video with the sample features of each of its corresponding sample sentences, thereby strengthening the visual features of the sample video, strengthening the correlation between the visual features in the sample video and the text features of the sample sentences, and improving the model training accuracy.
[0063] Step S203, based on the sample reinforcement features, the sample text features of the plurality of sample sentences and the sample positioning information, the model parameters are adjusted to obtain a trained information positioning model.
[0064] In the embodiment of the present disclosure, the execution subject of the training method of the information positioning model, for example Figure 1 The server 103 shown adjusts the model parameters of the initial model based on the sample enhancement features of the sample video obtained in step S202, combined with the sample text features and sample positioning information of multiple sample sentences corresponding to the sample video, to obtain a trained information positioning model.
[0065] In some implementations, the execution subject inputs the sample enhancement features of the sample video and the sample text features of the multiple sample sentences in a set of sample data into the initial model to obtain an output result, and determines the loss value based on the output result and the sample positioning information of the multiple sample sentences and adjusts the model parameters of the initial model accordingly. The training process is performed using at least one set of sample data in the training sample until the loss value meets the preset training condition, thereby obtaining a trained information positioning model. Exemplarily, the preset training condition may be that the difference between the model output value and the sample positioning information is less than a preset loss threshold.
[0066] In some implementations, for a sample video and a corresponding plurality of sample sentences in a set of sample data, the execution subject may use the sample text features of the sample video and each sample sentence and their corresponding sample location information to obtain a loss value, and adjust the model parameters accordingly until the loss value meets the preset training condition. For example, after the obtained loss value meets the preset training condition, the next set of sample data may be used to verify the trained information location model.
[0067] In some implementations, for a sample video and corresponding multiple sample sentences in a set of sample data, the above-mentioned execution entity can use the sample text features of the sample video and each sample sentence and its corresponding sample positioning information to obtain a loss value respectively, and then sum the loss values corresponding to the multiple sample sentences to obtain the total loss value corresponding to the sample video, and then adjust the model parameters based on the total loss value, and then use the set of sample data or the next set of sample data to train the adjusted model until the total loss value corresponding to a sample video meets the preset training conditions, stop training, and obtain the trained information positioning model.
[0068] In some implementations, when the acquired training samples include multiple groups of sample data, the above-mentioned execution entity can use a group of sample data sequences and adjust the model parameters, and then use the next group of sample data to execute the above-mentioned training process for the model after the adjusted parameters, and adjust the model parameters again; until the difference between the output value obtained using the adjusted model parameters and the sample positioning information meets the preset training conditions.
[0069] In some implementations, the execution subject may also use the same set of sample data to train and adjust the model parameters multiple times. For example, the execution subject may first use a set of sample data to adjust the model parameters multiple times so that the loss value meets the preset training conditions; then use the next set of sample data to verify the adjusted model. If the loss value output by the model still meets the preset training conditions, the training process may be stopped. If the loss value output by the model does not meet the preset training conditions, the model parameters are adjusted and training is continued until the preset training conditions are met, and then a set of sample data is replaced for verification or training; until the loss value of the replaced sample data after being input into the model for the first time meets the preset training conditions, the training is stopped to obtain the trained information positioning model.
[0070] In some implementations, the execution subject inputs a sample video and a plurality of sample sentences corresponding to the sample video into an initial model to be trained, uses the initial model to extract sample visual features and sample text features, and uses the sample text features of a plurality of sample sentences to enhance the extracted sample visual features to obtain sample enhanced features, and further uses the sample enhanced features and sample text features in combination with sample positioning information to adjust the parameters of the initial model, trains the initial model, and obtains a trained information positioning model. In this implementation, the execution subject uses an end-to-end training method to directly use the original sample video and a plurality of sample sentences corresponding to the sample video for model training to obtain a trained information positioning model, which can effectively ensure the accuracy of model training and improve the feature representation capability of the model.
[0071] In the related art, for the execution of event location tasks in videos, it is mostly necessary to extract visual features and text features separately. Among them, the extracted visual features are mostly irrelevant to the input text. The visual features are extracted using a pre-trained neural network model, which often only focuses on the features of the preset types in its pre-training process, such as nouns or actions, and cannot be associated with the text features of the input text during the process of extracting visual features.
[0072] According to the training method of the information localization model provided by the embodiment of the present disclosure, the execution subject uses a sample video corresponding to multiple sample sentences for model training, and in the training process, the sample text features of the multiple sample sentences are combined with the sample visual features of the sample video to obtain the sample reinforcement features of the sample video, and then adjust the model parameters based on the sample reinforcement features, the sample text features of the multiple sample sentences and the sample positioning information to obtain the trained information localization model. The embodiment of the present disclosure uses a training sample of one sample video corresponding to multiple sample sentences, which can greatly reduce the training time and save training costs on the one hand, and on the other hand, the model can be trained to learn the semantic information of multiple sample sentences for one sample video, effectively improving the feature representation ability of the model.
[0073] It should be pointed out that in the technical solution of the present invention, the acquisition, storage and application of user personal information (such as video data, etc.) are all carried out with the explicit authorization of the user, and are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0074] Figure 3 The process 300 of the second embodiment of the training method of the information positioning model according to the present disclosure is shown, referring to Figure 3 As shown, the training method of the information positioning model includes the following steps:
[0075] Step S301: Obtain training samples, where the training samples include a sample video, a plurality of sample sentences corresponding to the sample video, and sample location information corresponding to the sample sentences in the sample video.
[0076] In the embodiment of the present disclosure, the execution subject of the training method of the information positioning model, for example Figure 1 The terminal device 101 or the server 103 shown in the figure obtains training samples for training the model. The obtained training samples include at least one set of sample data, each set of sample data includes a sample video, multiple sample sentences corresponding to the sample video, and sample location information corresponding to each sample sentence in the sample video.
[0077] Step S301 and Figure 2 Step S201 of the illustrated embodiment is basically the same, and the specific implementation method can refer to the above description of step S201, which will not be repeated here.
[0078] Step S302, determining a sample fusion feature of a first dimension according to the sample visual features of the sample video and the sample text features of the plurality of sample sentences.
[0079] In the embodiment of the present disclosure, the execution subject of the training method of the information positioning model, for example Figure 1The terminal device 101 or the server 103 shown fuses the visual features of the sample video and the sample text features of multiple sample sentences in a first dimension to obtain sample fusion features of the first dimension.
[0080] Exemplarily, the execution entity extracts sample visual features of a sample video and sample text features of each sample sentence for a set of sample data; then, the extracted sample visual features and sample text features of multiple sample sentences are fused within a first dimension to obtain sample fusion features of the first dimension.
[0081] In some implementations, the execution subject may use a preset algorithm or a neural network model to extract sample visual features of the sample video. Correspondingly, the execution subject may also use a preset algorithm or a neural network model to extract sample text features of each sample sentence. Among them, the preset algorithm and neural network model for extracting sample visual features, and the preset algorithm and neural network model for extracting sample text features, can refer to the feature extraction algorithm and feature extraction neural network model in the relevant technology, and will not be described in detail here.
[0082] In some implementations, the execution subject may train the information localization model using an end-to-end method. Therefore, the execution subject may also use the initial localization model before training to extract sample visual features of the sample video and sample text features of the sample sentence, and determine the sample fusion features of the first dimension accordingly.
[0083] In some implementations, the sample fusion features of the first dimension are visual features that incorporate sample text features.
[0084] In some implementations, the sample fusion features of the first dimension may also be text features integrated with sample visual features.
[0085] In some implementations of the embodiments of the present disclosure, sample fusion features of the first dimension are determined based on sample visual features of a sample video and sample text features of multiple sample sentences, including: determining transformed visual features of the first dimension based on the sample visual features of the sample video; determining transformed text features of the first dimension based on sample text features of multiple sample sentences; determining sample fusion features of the first dimension based on the transformed visual features and the transformed text features.
[0086] After extracting the sample visual features of the sample video, the above-mentioned execution entity converts the sample visual features to the first dimension to obtain the transformed visual features of the first dimension; after extracting the sample text features of each sample sentence, the extracted sample text features are converted to the first dimension to obtain the transformed text features of the first dimension; and then within the first dimension, the transformed visual features and the transformed text features of multiple sample sentences are fused to obtain the sample fusion features of the first dimension.
[0087] Exemplarily, the process of obtaining the transformed visual features of the first dimension based on the transformation of the sample visual features can be a dimensionality reduction transformation process for the sample visual features, that is, the initial dimension of the sample visual features is higher than the first dimension; it can also be a dimensionality increase transformation process for the sample visual features, that is, the initial dimension of the sample visual features is lower than the first dimension.
[0088] Exemplarily, the process of obtaining the transformed text features of the first dimension based on the transformation of the sample text features can be a dimensionality reduction transformation process for the sample text features, that is, the initial dimension of the sample text features is higher than the first dimension; it can also be a dimensionality increase transformation process for the sample text features, that is, the initial dimension of the sample text features is lower than the first dimension.
[0089] In some implementations, the execution subject may perform a linear transformation according to the sample visual features to obtain a transformed visual feature of the first dimension; and perform a linear transformation according to the sample text features to obtain a transformed text feature of the first dimension.
[0090] In some implementations, the sample fusion features of the first dimension are determined based on the transformed visual features and the transformed text features. The sample fusion features of the first dimension can be obtained by performing a preset operation on the transformed visual feature elements and the transformed text feature elements at the same position in the first dimension.
[0091] Exemplarily, the preset operation may include but is not limited to addition or multiplication.
[0092] In this scheme, the execution entity transforms the sample visual features into transformed visual features of the first dimension, and transforms the sample text features into transformed text features of the first dimension, and then fuses the transformed visual features and transformed text features within the first dimension to obtain sample fusion features of the first dimension, which can effectively ensure the matching degree of the transformed visual features and the transformed text features, thereby ensuring the fusion effect of the sample text features and the sample visual features, and improving the fusion accuracy of the sample text features and the sample visual features.
[0093] Step S303, determining the sample enhancement feature of the sample video according to the sample fusion feature and the sample visual feature of the sample video.
[0094] In the embodiment of the present disclosure, the execution subject of the training method of the information positioning model, for example Figure 1 The terminal device 101 or the server 103 shown determines the sample enhancement feature of the sample video based on the sample fusion feature determined in step S302 and the sample visual feature of the sample video.
[0095] Among them, the above-mentioned execution entity can fuse the sample fusion features and the sample visual features in the same dimension to obtain the sample enhancement features.
[0096] Exemplarily, the sample enhanced feature is a visual feature obtained by enhancing the sample visual feature.
[0097] In some implementations of the embodiments of the present disclosure, sample enhancement features of a sample video are determined based on sample fusion features and sample visual features of the sample video, including: determining a conversion fusion feature having the same dimension as the sample visual feature based on the sample fusion features; and determining a sample enhancement feature of the sample video based on the conversion fusion feature and the sample visual feature.
[0098] The execution subject converts the sample fusion feature of the first dimension to the same dimension as the sample visual feature to obtain the converted fusion feature, and then combines it with the sample visual feature to obtain the sample enhanced feature after enhancing the sample visual feature.
[0099] Exemplarily, if the first dimension is lower than the initial dimension of the sample visual feature, the execution subject upgrades the sample fusion feature to the same dimension as the sample visual feature to obtain the transformed fusion feature. For example, the execution subject may upgrade the sample fusion feature by linear transformation to obtain the transformed fusion feature.
[0100] Exemplarily, if the first dimension is higher than the initial dimension of the sample visual feature, the execution subject needs to reduce the dimension of the sample fusion feature to the same dimension as the sample visual feature to obtain the transformed fusion feature. For example, the execution subject can reduce the dimension of the sample fusion feature by linear transformation to obtain the transformed fusion feature.
[0101] Exemplarily, the execution subject may perform a fusion operation on the sample visual feature elements and the conversion fusion feature elements at the same position within the feature dimension of the sample visual feature to obtain an enhanced sample enhanced feature. The fusion operation may include but is not limited to adding or multiplying the sample visual feature elements and the conversion fusion feature elements at the same position.
[0102] In this scheme, the executor first converts the sample fusion features to the same dimension as the sample visual features, and then combines them with the sample visual features to enhance the sample visual features to obtain sample enhanced features. While ensuring that the dimension of the sample visual features remains unchanged, the sample visual features are enhanced based on the sample fusion features that are fused with the sample text features, effectively ensuring the accuracy of the sample visual features and improving the correlation between the sample visual features and the sample text features, thereby improving the feature representation ability of the trained model.
[0103] Step S304, taking the sample enhancement feature and the sample text features of the multiple sample sentences as input and the sample positioning information as the expected output, obtains the total sample loss value of the multiple sample sentences.
[0104] In the embodiment of the present disclosure, the execution subject of the training method of the information positioning model, for example Figure 1 The terminal device 101 or server 103 shown uses the sample enhancement features determined in step S303, combined with the sample text features of multiple sample sentences corresponding to the sample video, as the input of the model, and uses the sample positioning information corresponding to each sample sentence as the expected output of the model to obtain the total sample loss value corresponding to the multiple sample sentences.
[0105] Exemplarily, the execution entity takes the sample enhancement feature and the sample text feature of each sample sentence as input to obtain the sample loss value of each sample sentence, and then for a sample video, sums up the sample loss values of multiple sample sentences corresponding to it to obtain the total sample loss value of multiple sample sentences.
[0106] Step S305, adjusting the model parameters according to the total sample loss value of the multiple sample sentences to obtain a trained information positioning model.
[0107] In the embodiment of the present disclosure, the execution subject of the training method of the information positioning model, for example Figure 1 The terminal device 101 or server 103 shown adjusts the model parameters according to the total sample loss values of the multiple sample sentences obtained in step S304 to obtain a trained information positioning model.
[0108] Among them, the method of adjusting the model parameters according to the total loss value of multiple samples can refer to the solution of adjusting the model parameters based on the loss value in the prior art, which will not be elaborated here.
[0109] In some implementations, the execution entity adjusts the model parameters once using the total sample loss value of multiple sample sentences corresponding to a sample video, and then continues to perform model training with the sample video and the corresponding multiple sample sentences, or replaces a sample video and its corresponding multiple sample sentences for model training to obtain a new total sample loss value. If the new total sample loss value meets the preset training conditions, the training can be stopped; otherwise, continue to adjust the model parameters, and input a sample video and its corresponding multiple sample sentences again, and determine whether the total sample loss value meets the preset training conditions, and so on.
[0110] The preset training condition may include that the total sample loss value of multiple sample sentences is less than or equal to a preset loss threshold.
[0111] In some optional implementations, when the executing entity determines that the total sample loss value of multiple sample sentences meets the preset training conditions, it may continue to replace a group of sample videos and their corresponding multiple sample sentences, and verify the trained model accordingly. If the output total sample loss value also meets the preset training conditions, it can be determined that the model training method has been executed and the trained information positioning model is obtained.
[0112] According to the training method of the information localization model provided by the embodiment of the present disclosure, the execution subject determines the sample fusion feature under the first dimension according to the sample visual feature of the sample video and the sample text feature of the multiple sample sentences corresponding to the sample video, and strengthens the sample visual feature accordingly to obtain the sample strengthening feature of the sample video; then, according to the sample strengthening feature combined with the sample text feature of the multiple sample sentences and the sample positioning information, the total sample loss value of the multiple sample sentences is determined, and the model parameters are adjusted according to the total sample loss value of the multiple sample sentences to obtain the trained information localization model. In this scheme, model training is performed based on the sample video and the multiple sample sentences corresponding to it, which can greatly reduce the training time and improve the training efficiency; the sample fusion feature under the first dimension is determined based on the sample visual feature and the sample text feature of the multiple sample sentences, and the sample visual feature is strengthened accordingly to obtain the sample strengthening feature, which can effectively improve the correlation between the sample visual feature and the sample text feature; the model parameters are further adjusted based on the total sample loss value of the multiple sample sentences, taking into account the accuracy of the semantic information of the multiple sample sentences, thereby greatly improving the feature representation ability of the trained model.
[0113] It should be pointed out that in the technical solution of the present invention, the acquisition, storage and application of user personal information (such as video data, etc.) are all carried out with the explicit authorization of the user, and are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0114] Figure 4a FIG. 1 is a schematic diagram showing a structure of an embodiment of an information location model according to the present disclosure. Figure 4a As shown, in the embodiment of the present disclosure, in order to improve the efficiency of information positioning, an information positioning model 400 that can be trained end-to-end is proposed. Since the information positioning model needs to be used to find and locate the start and end time or start and end video frames of an event in the video data, and the video data is composed of a large number of pictures, if the video frames are downsampled, the model performance will be reduced. In order to ensure the performance of the model and take into account the computing power of the model, this embodiment uses a 3D adapter (3D-Adapter) 420 on the basis of the existing visual network framework (visual backbone) 410 to alleviate the aforementioned negative phenomena.
[0115] Among them, the visual network framework 410 can be used to extract sample visual features of sample videos and sample text features of sample sentences; then the 3D adapter 420 enhances the sample visual features based on the sample text features of multiple sample sentences to obtain sample enhanced features; then the parameters of the 3D adapter 420 are adjusted according to the sample enhanced features combined with the sample text features to obtain a trained information positioning model.
[0116] In this solution, sample visual features of sample videos, sample text features of multiple sample sentences corresponding to the sample videos, and sample positioning information are used to adjust the parameters of the 3D adapter 420 to complete the model training process and obtain a trained information positioning model.
[0117] Figure 4b Shows Figure 4a A schematic diagram of a structure of an embodiment of a 3D adapter 420 in FIG. Figure 4b As shown, in the embodiment of the present disclosure, the 3D adapter 420 includes two 3D convolution layers (Conv3D): a dimension transformation convolution layer 421 and a dimension restoration convolution layer 422.
[0118] Among them, the dimension transformation convolution layer 421 is used to transform and fuse the sample visual features and sample text features, and output the sample fusion features; the dimension restoration convolution layer 422 is used to restore the sample fusion features to the same dimension as the sample visual features, and enhance the sample visual features accordingly to obtain the sample enhanced features.
[0119] Exemplarily, the dimension transformation convolution layer 421 can be a dimension reduction fusion convolution layer, which includes reducing the dimension of both the sample visual features and the sample text features to the first dimension to obtain transformed visual features and transformed text features, and fusing the two to obtain sample fusion features.
[0120] For example, the initial dimension of the sample visual feature is 1024 dimensions, the sample sentence includes 10 words, and the initial dimension of each word is 300 dimensions. Then the initial dimension of the sample text feature of the sample sentence is 10×300 dimensions. The dimension transformation convolution layer 421 converts both the sample visual feature and the sample text feature to the first dimension of 512 dimensions, thereby aligning the sample visual feature and the sample text feature in the first dimension, and then adds or multiplies the visual feature elements and text feature elements at the same position to obtain the sample fusion feature of the first dimension (i.e., 512 dimensions), and outputs it to the dimension restoration convolution layer 422.
[0121] The dimension restoration convolution layer 422 restores the sample fusion features of the first dimension to the initial dimension (1024 dimensions) of the sample visual features, that is, restores the sample fusion features of 512 dimensions to 1024 dimensions to obtain conversion fusion features, and then fuses the conversion fusion features with the sample visual features in 1024 dimensions, and uses the conversion fusion features after dimension restoration to enhance the sample visual features to obtain sample enhanced features, so that the sample enhanced features fuse the sample visual features and the sample text features of multiple sample sentences, thereby improving the correlation between the visual features of the sample video and the text features of multiple sample sentences.
[0122] Then, based on the sample enhancement features combined with the sample text features of multiple sample sentences, the parameters of the 3D adapter 420 are adjusted, that is, the model parameters are adjusted to obtain the trained information positioning model.
[0123] Figure 5 The process 500 of the first embodiment of the information positioning method according to the present disclosure is shown, referring to Figure 5 As shown, the information positioning method includes the following steps:
[0124] Step S501: input the received video data and positioning sentence into the information positioning model to obtain the target positioning information corresponding to the positioning sentence in the video data.
[0125] In the embodiment of the present disclosure, the execution subject of the information positioning method, for example Figure 1 After receiving the video data and the positioning statement, the terminal device 101 or the server 103 shown inputs the received video data and the positioning statement into a pre-trained information positioning model to obtain the target positioning information corresponding to the positioning statement in the video data.
[0126] The video data is a video file of a certain length, which records a variety of information in the form of graphics, voice, action, etc., such as event information that can be described from different angles.
[0127] The positioning sentence is a description sentence describing at least one event in the video data.
[0128] Exemplarily, the positioning sentence may be sentence information in text form, sentence information in voice form, or sentence information in sign language form, which is not limited here.
[0129] The target positioning information is the start and end position information of the event described by the positioning sentence in the video data, such as the start and end time or the start and end video frames.
[0130] The information positioning model used in this solution may be an information positioning model trained by the training method of the embodiments shown in the above figures.
[0131] Exemplarily, the information localization model in this solution is an information localization model obtained by training using an end-to-end training method, using training data pairs of a sample video corresponding to multiple sample voices to adjust model parameters. For example, the information localization model can adopt the structure shown in FIG4 .
[0132] In some implementations, taking the start and end time of the event described by the positioning statement in the video data as the target positioning information, after the execution subject inputs the video data and the positioning statement into the information positioning model, the information positioning model analyzes and extracts features of the positioning statement to obtain the text features of the positioning statement, analyzes and extracts features of the video data frame by frame to obtain the visual features of each frame of video data, and then matches the visual features of each frame of video data with the text features of the positioning statement to obtain the first probability of the frame of video data being the start frame of the event described by the positioning statement and the second probability of being the end frame of the event described by the positioning statement. Wherein, the number of the first probability and the number of the second probability are both the same as the number of frames of the video data. Then the execution subject determines the start frame and the end frame of the event described by the positioning statement according to the extreme values of the first probability and the second probability (for example, the maximum value in the first probability and the maximum value in the second probability), and determines the start time and the end time of the event described by the positioning statement accordingly, thereby determining the target positioning information corresponding to the positioning statement in the video data.
[0133] According to the information positioning method provided by the embodiment of the present disclosure, based on the information positioning model trained by the end-to-end training method, it is possible to directly input the video data and the positioning sentence into the information positioning model without pre-processing the video data and the positioning sentence, and obtain the target positioning information corresponding to the positioning sentence in the video data, thereby ensuring the accuracy of the target positioning information and improving the efficiency of information positioning.
[0134] It should be pointed out that in the technical solution of the present invention, the acquisition, storage and application of user personal information (such as video data, etc.) are all carried out with the explicit authorization of the user, and are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0135] Figure 6 The process 600 of the second embodiment of the information positioning method according to the present disclosure is shown. Figure 6 As shown, the information positioning method includes the following steps:
[0136] Step S601: input the received video data and positioning sentence into the information positioning model to obtain the target positioning information corresponding to the positioning sentence in the video data.
[0137] In the embodiment of the present disclosure, the execution subject of the information positioning method, for example Figure 1After receiving the video data and the positioning statement, the terminal device 101 or the server 103 shown inputs the received video data and the positioning statement into a pre-trained information positioning model to obtain the target positioning information corresponding to the positioning statement in the video data.
[0138] Step S601 and Figure 5 Step S501 of the illustrated embodiment is basically the same, and the specific implementation method can refer to the above description of step S501, which will not be repeated here.
[0139] Step S602: Determine at least one synonymous sentence according to the located sentence.
[0140] In the embodiment of the present disclosure, the execution subject of the information positioning method, for example Figure 1 The terminal device 101 or the server 103 shown determines at least one synonymous statement of the positioning statement according to the received positioning statement.
[0141] Among them, a synonymous sentence is different from a positioning sentence in the wording, but the information described by the synonymous sentence and the positioning sentence is the same or similar, that is, relative to the positioning sentence, the synonymous sentence is a completely new sentence with the same meaning.
[0142] In some implementations, the execution subject determines at least one synonymous statement of the positioning statement by performing semantic analysis on the positioning statement, performing synonym replacement on keywords, using back translation technology, and the like.
[0143] Exemplarily, for a positioning statement, the execution subject determines through semantic analysis that there are three keywords in the positioning statement, and a synonymous statement of the positioning statement can be obtained by performing synonym replacement on at least one of the keywords.
[0144] In some implementations, the execution subject may obtain at least one synonymous sentence of the positioning sentence by using a preset synonym replacement algorithm or a pre-trained synonym replacement model. The preset synonym replacement algorithm or synonym replacement model may refer to an algorithm or a neural network model in the related art, which will not be described in detail here.
[0145] In some implementations, a positioning statement may determine one synonymous statement, or may determine multiple (eg, 10) synonymous statements.
[0146] Step S603: Update target location information according to synonymous sentences and video data.
[0147] In the embodiment of the present disclosure, the execution subject of the information positioning method, for example Figure 1The terminal device 101 or the server 103 shown updates the target positioning information determined in step S601 according to at least one synonymous sentence determined in step S602 and in combination with the video data corresponding to the positioning sentence.
[0148] In some implementations, the execution entity determines synonymous positioning information corresponding to each synonymous sentence of the positioning sentence in the video data, and then updates the target positioning information determined in step S601 based on the synonymous positioning information of at least one synonymous sentence.
[0149] In some implementations of the embodiments of the present disclosure, target positioning information is updated based on synonymous sentences and video data, including: inputting the synonymous sentences and video data into an information positioning model to obtain synonymous positioning information corresponding to the synonymous sentences in the video data; and updating the target positioning information based on the synonymous positioning information.
[0150] In the embodiment of the present disclosure, the execution entity can adopt the information location model adopted in step S601, input each synonymous sentence into the information location model in combination with the video data, and obtain the synonymous location information corresponding to the synonymous sentence in the video data, which can effectively improve the efficiency and accuracy of determining the synonymous location information.
[0151] The content and type of the synonymous positioning information are consistent with the content and type of the target positioning information. For example, if the target positioning information is the start and end time of the event described by the positioning sentence in the video data, the synonymous positioning information is the start and end time of the event described by the synonymous sentence in the video data.
[0152] Exemplarily, after the execution subject inputs the video data and the synonymous sentence into the information positioning model, the information positioning model analyzes and extracts the synonymous sentence to obtain the text features of the synonymous sentence, analyzes and extracts the features of the video data frame by frame, obtains the visual features of each frame of video data, and then matches the visual features of each frame of video data with the text features of the synonymous sentence to obtain the third probability that the frame of video data is the starting frame of the event described by the synonymous sentence and the fourth probability that the frame of video data is the ending frame of the event described by the synonymous sentence. Wherein, the number of the third probability and the number of the fourth probability are the same as the number of frames of the video data. Then the execution subject determines the starting frame and the ending frame of the event described by the synonymous sentence according to the extreme values of the third probability and the fourth probability (for example, the maximum value in the third probability and the maximum value in the fourth probability), and determines the starting time and the ending time of the event described by the synonymous sentence accordingly, thereby determining the synonymous positioning information corresponding to the synonymous sentence in the video data.
[0153] Then, the execution subject may perform a preset operation on the synonym location information and the target location information corresponding to at least one synonymous sentence, thereby updating the target location information.
[0154] In some implementations, the execution subject may calculate an average value of the synonym location information and the target location information of at least one synonymous sentence to obtain updated target location information.
[0155] In some implementations, the execution subject may perform a weighted sum or a weighted average on the synonym location information and the target location information of at least one synonymous sentence to obtain updated target location information.
[0156] In some implementations, the execution subject may configure a higher weight A1 for the target location information and a lower weight A2 for the synonym location information relative to the target location information. Exemplarily, if the preset operation is to perform a weighted sum of the target location information and the synonym location information, the sum of A1 and A2 is 1. If there are n synonymous statements, that is, there are correspondingly n synonymous location information, then the sum of A1 and n A2 is 1.
[0157] Exemplarily, the execution entity may preset the weight of the target positioning information to be 0.7, and the sum of the weights of at least one piece of synonymous positioning information to be 0.3.
[0158] According to the information positioning method provided by the embodiment of the present disclosure, after the target positioning information corresponding to the positioning sentence is determined from the video data using the information positioning model, the synonymous positioning information corresponding to each synonymous sentence is determined from the video data according to at least one synonymous sentence of the positioning sentence, and the target positioning information is updated using the synonymous positioning information. This solution uses at least one synonymous sentence of the positioning sentence to determine the synonymous positioning information corresponding to the synonymous sentence in the video data, and uses the synonymous positioning information to verify and update the target positioning information, effectively improving the positioning accuracy and reliability of the updated target positioning information.
[0159] It should be pointed out that in the technical solution of the present invention, the acquisition, storage and application of user personal information (such as video data, etc.) are all carried out with the explicit authorization of the user, and are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0160] As an implementation of the training method for the information localization model shown in the above figures, Figure 7 The structure diagram of an embodiment of a training device for an information positioning model according to the present disclosure is shown. Figure 2 Corresponding to the method embodiment shown, the device can be applied to various electronic devices.
[0161] Reference Figure 7 As shown, the training device 700 of the information localization model provided by the embodiment of the present disclosure includes: a sample acquisition module 701, a feature determination module 702 and a parameter adjustment module 703. The sample acquisition module 701 is configured to acquire a training sample, which includes a sample video, a plurality of sample sentences corresponding to the sample video, and sample location information corresponding to each sample sentence in the sample video; the feature determination module 702 is configured to determine the sample enhancement feature of the sample video according to the sample visual feature of the sample video and the sample text feature of the plurality of sample sentences; the parameter adjustment module 703 is configured to adjust the parameter model based on the sample enhancement feature, the sample text feature of the plurality of sample sentences and the sample location information to obtain the trained information localization model.
[0162] In the training device 700 of the information localization model of the embodiment of the present disclosure, the specific processing of the sample acquisition module 701, the feature determination module 702 and the parameter adjustment module 703 and the technical effects brought by them can be referred to respectively. Figure 2 The relevant descriptions of steps S201-S203 in the corresponding embodiment are not repeated here.
[0163] In some optional implementations of the embodiments of the present disclosure, the feature determination module includes a feature fusion unit and a feature enhancement unit, wherein the feature fusion unit is configured to determine a sample fusion feature of a first dimension based on sample visual features of a sample video and sample text features of multiple sample sentences, wherein the first dimension is different from an initial visual dimension of the sample visual features and an initial text dimension of the sample text features; and the feature enhancement unit is configured to determine a sample enhanced feature of a sample video based on the sample fusion feature and the sample visual features of the sample video.
[0164] In the training device of the information localization model of the embodiment of the present disclosure, the specific processing of the feature fusion unit and the feature enhancement unit and the technical effects brought by them can be referred to respectively. Figure 3 The relevant descriptions of steps S302-S303 in the corresponding embodiment are not repeated here.
[0165] In some optional implementations of the embodiments of the present disclosure, the feature fusion unit is configured to: determine the transformed visual features of the first dimension based on the sample visual features of the sample video; determine the transformed text features of the first dimension based on the sample text features of multiple sample sentences; determine the sample fusion features of the first dimension based on the transformed visual features and the transformed text features.
[0166] In some optional implementations of the embodiments of the present disclosure, the feature enhancement unit is configured to determine, based on the sample fusion features, a conversion fusion feature having the same dimension as the sample visual feature; and determine, based on the conversion fusion feature and the sample visual feature, a sample enhancement feature of the sample video.
[0167] In some optional implementations of the embodiments of the present disclosure, the parameter adjustment module is configured to: take sample enhancement features and sample text features of multiple sample sentences as input and sample positioning information as expected output to obtain the total sample loss value of multiple sample sentences; adjust the model parameters according to the total sample loss value of multiple sample sentences to obtain the trained information positioning model.
[0168] In the training device of the information positioning model of the embodiment of the present disclosure, the specific processing of the parameter adjustment module and the technical effect brought by it can be referred to Figure 3 The relevant descriptions of steps S304-S305 in the corresponding embodiment are not repeated here.
[0169] As an implementation of the information positioning method shown in the above figures, Figure 8 FIG. 8 is a schematic diagram showing a structure of an embodiment of an information locating device according to the present disclosure. Figure 5 Corresponding to the method embodiment shown, the device can be applied to various electronic devices.
[0170] Reference Figure 8 As shown, the information positioning device 800 provided in the embodiment of the present disclosure includes a target positioning module 801, which is configured to input the received video data and positioning sentence into the trained information positioning model to obtain the target positioning information corresponding to the positioning sentence in the video data.
[0171] In the information positioning device 800 of the embodiment of the present disclosure, the specific processing of the target positioning module 801 and the technical effects thereof can be referred to in Figure 5 The relevant description of step S501 in the corresponding embodiment will not be repeated here.
[0172] In some optional implementations of the embodiments of the present disclosure, the information locating device also includes a sentence determination module and an information updating module, wherein the sentence determination module is configured to determine at least one synonymous sentence based on the locating sentence; and the information updating module is configured to update the target locating information based on the synonymous sentences and the video data.
[0173] In the information locating device of the embodiment of the present disclosure, the specific processing of the sentence determination module and the information updating module and the technical effects thereof can be referred to in Figure 6 The relevant descriptions of steps S602-S603 in the corresponding embodiment are not repeated here.
[0174] In some optional implementations of the embodiments of the present disclosure, the information update module is configured to: input synonymous sentences and video data into a trained information positioning model to obtain synonymous positioning information corresponding to the synonymous sentences in the video data; and update the target positioning information according to the synonymous positioning information.
[0175] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0176] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0177] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0178] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0179] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as the training method of the information positioning model and the information positioning method. For example, in some embodiments, the training method of the information positioning model and the information positioning method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the training method of the information positioning model and the information positioning method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the information localization model training method and the information localization method in any other appropriate manner (eg, by means of firmware).
[0180] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0181] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0182] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0183] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0184] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0185] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0186] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0187] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A training method for an information positioning model, comprising: Acquire a training sample, wherein the training sample includes at least one sample video, a plurality of sample sentences corresponding to each of the sample videos, and sample location information corresponding to each of the sample sentences in the sample videos; Determining a sample enhancement feature of the sample video according to the sample visual feature of the sample video and the sample text features of the plurality of sample sentences; Based on the sample enhancement features, the sample text features of the multiple sample sentences and the sample positioning information, the model parameters are adjusted to obtain a trained information positioning model.
2. The method according to claim 1, wherein: The step of determining the sample enhancement feature of the sample video according to the sample visual feature of the sample video and the sample text features of the plurality of sample sentences includes: Determining a sample fusion feature of a first dimension according to the sample visual feature of the sample video and the sample text features of the plurality of sample sentences, wherein the first dimension is different from both an initial visual dimension of the sample visual feature and an initial text dimension of the sample text feature; The sample enhancement feature of the sample video is determined according to the sample fusion feature and the sample visual feature of the sample video.
3. The method according to claim 2, wherein: The determining of the sample fusion feature of the first dimension according to the sample visual feature of the sample video and the sample text features corresponding to the plurality of sample sentences includes: Determining a transformed visual feature of a first dimension according to the sample visual feature of the sample video; Determining the transformed text features of the first dimension according to the sample text features of the plurality of sample sentences; A sample fusion feature of a first dimension is determined according to the transformed visual feature and the transformed text feature.
4. The method according to claim 2, wherein: The step of determining the sample enhancement feature of the sample video according to the sample fusion feature and the sample visual feature of the sample video includes: Determining, based on the sample fusion feature, a conversion fusion feature having the same dimension as the sample visual feature; A sample enhancement feature of the sample video is determined according to the conversion fusion feature and the sample visual feature.
5. The method according to claim 1, wherein: The adjusting model parameters based on the sample reinforcement feature, the sample text features of the plurality of sample sentences and the sample positioning information to obtain a trained information positioning model includes: Taking the sample enhancement feature and the sample text features of the multiple sample sentences as input and the sample positioning information as expected output, obtaining the total sample loss value of the multiple sample sentences; The model parameters are adjusted according to the total sample loss values of the multiple sample sentences to obtain a trained information positioning model.
6. An information positioning method, comprising: The received video data and positioning sentence are input into the information positioning model as described in any one of claims 1 to 5 to obtain the target positioning information corresponding to the positioning sentence in the video data.
7. The method according to claim 6, further comprising: Determining at least one synonymous sentence according to the positioning sentence; The target positioning information is updated according to the synonymous sentence and the video data.
8. The method according to claim 7, wherein: The updating of the target positioning information according to the synonymous sentence and the video data includes: Inputting the synonymous sentence and the video data into the information location model to obtain synonym location information corresponding to the synonymous sentence in the video data; The target positioning information is updated according to the synonymous positioning information.
9. A training device for an information positioning model, comprising: A sample acquisition module is configured to acquire training samples, wherein the training samples include a sample video, a plurality of sample sentences corresponding to the sample video, and sample location information corresponding to the sample sentences in the sample video; a feature determination module configured to determine a sample enhancement feature of the sample video according to a sample visual feature of the sample video and sample text features of the plurality of sample sentences; The parameter adjustment module is configured to adjust the model parameters based on the sample enhancement features, the sample text features of the multiple sample sentences and the sample positioning information to obtain a trained information positioning model.
10. An information positioning device, comprising: The target positioning module is configured to input the received video data and positioning sentence into the information positioning model as described in any one of claims 1-5, and obtain the target positioning information corresponding to the positioning sentence in the video data.
11. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.
13. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Interaction method, model training method and device, equipment and medium
CN114925185A
Cross-modal time domain video positioning method under text segment question and answer framework
CN114925232A
Video text matching model training method and device and video text matching method and device
CN115204301A
Video positioning method and device
CN117453949A
