Media data processing method and apparatus, and electronic device and storage medium
By displaying the target control and eliminating the startup control in media data processing, identifying candidate areas and eliminating the target objects, the error elimination problem caused by mistaken touch is solved, and the accuracy and effect of elimination is improved.
Patent Information
- Application Number
- PCT/CN2024/138412
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-18
- Filing Date
- 2024-12-11
- Publication Date
- 2025-07-24
AI Technical Summary
The prior art is prone to accidentally eliminating when eliminating target objects in media data, which affects the elimination effect.
By displaying the first interactive page, including the target control and the cancellation start control, determining the candidate area and displaying the marking information, determining and eliminating the target object in response to the trigger event of the cancellation start control, displaying the target media data.
Improve the accuracy of target elimination, improve the elimination effect, and avoid the error elimination problems caused by mistaken touch.
Smart Images

Figure CN2024138412_24072025_PF_FP_ABST
Abstract
Description
Media data processing method, device, electronic device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202410077593.5, filed on January 18, 2024, entitled “A media data processing method, device, electronic device and storage medium”. The entire contents of the application are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to computer technology, and more particularly to a method, apparatus, electronic device, and storage medium for processing media data. Background Art
[0004] In the scenario of media data processing, there may be a need to eliminate certain target objects in the media data.
[0005] Currently, object removal can be achieved by specifying the target object to be removed in the media data and removing the target object in the media data in real time. However, this object removal method may result in accidental removal due to accidental touch, thereby affecting the removal effect. Summary of the Invention
[0006] The present disclosure provides a media data processing method, device, electronic device and storage medium.
[0007] In a first aspect, an embodiment of the present disclosure provides a method for processing media data, including:
[0008] Displaying a first interactive page, wherein the first interactive page includes original media data and a candidate control set, wherein the candidate control set includes a target control and an elimination start control;
[0009] In response to an interaction event for the target control, determining at least one candidate region in the original media data, determining first tag information of the original media data based on the at least one candidate region, and displaying the first tag information in the first interaction page;
[0010] In response to a trigger event for eliminating the start control, a target object is determined according to the first tag information, the target object in the original media data is eliminated to obtain target media data, and a second interactive page is displayed, wherein the second interactive page includes the target media data.
[0011] In a second aspect, an embodiment of the present disclosure further provides a media data processing device, the device comprising:
[0012] A page display module, configured to display a first interactive page, wherein the first interactive page includes original media data and a candidate control set, wherein the candidate control set includes a target control and an elimination start control;
[0013] a candidate region determining module, configured to determine, in response to an interaction event for the target control, at least one candidate region in the original media data, determine first tag information of the original media data based on the at least one candidate region, and display the first tag information in the first interaction page;
[0014] An object elimination module is used to respond to a trigger event for the elimination start control, determine a target object according to the first tag information, eliminate the target object in the original media data to obtain target media data, and display a second interactive page, which includes the target media data.
[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0016] one or more processors;
[0017] a storage device for storing one or more programs,
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the media data processing method as described in any embodiment of the present disclosure.
[0019] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the media data processing method as described in any embodiment of the present disclosure.
[0020] The embodiments of the present disclosure provide a media data processing method, apparatus, electronic device, and storage medium, which display a target control and original media data through a first interactive page, then determine at least one candidate area based on an interactive event corresponding to the target control in the original media data, determine first tag information corresponding to the original media data based on the at least one candidate area, and in response to a trigger event for eliminating a start control, eliminate the target object determined based on the first tag information in the original media data to obtain target media data, and display the target media data through a second interactive page. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0022] FIG1 is a flow chart of a method for processing media data according to an embodiment of the present disclosure;
[0023] FIG2 is a schematic diagram of a target object elimination process provided by an embodiment of the present disclosure;
[0024] FIG3 is a flow chart of another method for processing media data provided by an embodiment of the present disclosure;
[0025] FIG4 is a flow chart of another method for processing media data provided by an embodiment of the present disclosure;
[0026] FIG5 is a flow chart of another method for processing media data provided by an embodiment of the present disclosure;
[0027] FIG6 is a schematic structural diagram of a media data processing device provided by an embodiment of the present disclosure;
[0028] FIG7 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0032] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0036] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0037] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0038] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0039] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0040] Figure 1 is a flow chart of a media data processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to situations where selected objects in media data are eliminated. The method can be executed by a media data processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC, or a server.
[0041] As shown in FIG1 , the method includes:
[0042] S110. Display a first interactive page, wherein the first interactive page includes original media data and a candidate control set, and the candidate control set includes a target control and an elimination start control.
[0043] Among them, the first interactive page can be an interactive page corresponding to the preset elimination function. The first interactive page includes a canvas area and a drawing board area, etc. Among them, the canvas area is used to display the media data screen, and the media data screen can represent the original media data or the target media data, etc. The drawing board area is used to display the candidate control set, etc. If there are smear marks and / or box selection marks in the media data screen, the undo control, rollback control, elimination start control and close control, etc. are displayed, and the elimination start control is converted to a triggerable state. If the close control is clicked, the smear mark and / or box selection mark in the media data screen is recorded, so that the mark information can be displayed in the media data screen when the first interactive page is opened next time. If there is no mark information in the media data screen, the elimination start control is converted to a non-triggerable state.
[0044] The preset removal function may be an intelligent removal function implemented by object recognition and object removal capabilities based on a media data generation model. The media data generation model may be a deep learning model trained on an image set, which recognizes and removes target objects from the original media data.
[0045] The original media data may be an image or video on which a preset erasure operation is to be performed. For example, the original media data may be an image or video on which an erasure operation has not been performed. Alternatively, the original media data may be an image or video on which a real-time erasure operation has been performed. Real-time erasure may represent the real-time erasure of objects corresponding to the smeared area in the media data screen based on the smearing of the erasure pen in the media data screen. Alternatively, the original media data may also be an image or video on which a preset erasure operation has been performed. It should be noted that the embodiments of the present disclosure do not specifically limit the meaning of the original media data.
[0046] The candidate control set may be a collection of controls in the first interactive page. For example, the candidate control set includes a combination of multiple items including a target control, an elimination start control, an undo control, a rollback control, a slider control, a close control, and a save control. The target control is used to trigger an area selection event of the original media data in the first interactive page. For example, the target control includes at least one of a smear control, a box selection control, and a stroke control. The elimination start control is used to trigger a start event of a preset elimination operation. The undo control is used to trigger an undo event of an elimination operation. The rollback control is used to trigger a rollback event of an elimination operation. The elimination operation may include marking an elimination area or eliminating a target object, etc. The undo event may represent the undoing of a step elimination operation, or the undoing of the elimination operation as a whole. The rollback event may represent the rolling back of a step undo operation, or the rolling back of the undo operation as a whole. The slider control is used to adjust the brush size state corresponding to the smear control.
[0047] FIG2 is a schematic diagram of a target object elimination process provided by an embodiment of the present disclosure. As shown in FIG2 , an original image 220 is displayed through a first interactive page 210. The original image 220 includes a cartoon character with hair accessories. The first interactive page 210 also displays a target control 230 and an elimination start control 240. The target control 230 includes a smear control and a selection control, etc. The elimination start control 240 is used to start the elimination operation. If no interaction is performed on the original image 220 based on the target control 230, the elimination start control 240 is in an untriggerable state.
[0048] In some embodiments, displaying the first interactive page includes: displaying a target elimination control on a third interactive page; and displaying the first interactive page in response to a triggering operation on the target elimination control. The target elimination control is used to trigger a display event for the first interactive page. For example, the target elimination control may be a control representing a preset elimination function. The third interactive page may represent the homepage of the media data processing client. Alternatively, the third interactive page may also represent an interactive page corresponding to a preset tag item in the media data processing client.
[0049] In other embodiments, displaying the first interactive page includes: if the interaction information of the preset control in the second interactive page meets the preset prompt condition, displaying the preset prompt information; in response to a confirmation event for the preset prompt information, displaying the first interactive page, the first interactive page includes second marking information of the original media data, wherein the second marking information is used to represent at least one pixel area corresponding to the interaction event of eliminating the control in real time.
[0050] In an embodiment of the present disclosure, the preset control includes a real-time elimination control. If an object to be eliminated is selected in a smearing manner in the media data screen based on the real-time elimination control, the second marking information is determined based on the smearing strokes, and the subject corresponding to the second marking information in the data screen is eliminated in real time. Wherein, the strokes generally refer to the traces of the pen. Then, after the result of the real-time elimination operation is displayed on the second interactive page, if a trigger event for closing the control in the second interactive page is detected, it is determined whether the preset elimination operation has been performed on the media data screen. If not, it is determined that the interactive information of closing the control in the second interactive page meets the preset prompt condition, and the preset prompt information is displayed through the preset interactive window. Wherein, the preset prompt information is used to trigger the display event of the first interactive page. Then, a confirmation event for the preset prompt information is detected, the preset interactive window is closed and the first interactive page is displayed, and the original media data with the second marking information is displayed through the first interactive page.
[0051] The results of the real-time removal operation are displayed on the second interactive page, representing the effect of the cartoon character removing the headdress. If the close control in the second interactive page is clicked and the preset removal operation has not been performed on the cartoon character, a preset interactive window is displayed on the second interactive page. The preset interactive window includes preset prompt information, a cancel control, and a confirmation control. In response to a click event on the confirmation control in the preset interactive window, the preset interactive window is closed and the first interactive page is displayed. The cartoon character in the first interactive page is restored to the media data state before the real-time removal operation, and the headdress area has the second marking information from the real-time removal operation.
[0052] In an embodiment of the present disclosure, the preset controls include an undo control. For a real-time elimination operation scenario, the number of times the undo control is triggered in the second interactive page is recorded. If the number of times the undo control is triggered exceeds a preset threshold, it is determined that the interaction information of the undo control in the second interactive page meets the preset prompt condition, and the preset prompt information is displayed through a bubble control at the corresponding position of the target elimination control. The bubble control is centered with the target elimination control. When a click event on the target elimination control is detected, the first interactive page is displayed, and the original media data with the second tag information is displayed through the first interactive page.
[0053] The results of the real-time removal operation are displayed on the second interactive page, representing the effect of the cartoon character removing the headdress. If the number of times the undo control on the second interactive page is triggered exceeds a preset threshold, a bubble control is displayed at the corresponding position of the target removal control, and a preset prompt message is displayed through the bubble control. When a click event on the target removal control is detected, the first interactive page is displayed, in which the cartoon character on the first interactive page is restored to the media data state before the real-time removal operation, and the headdress area has the second marking information from the real-time removal operation.
[0054] S120. In response to an interaction event for the target control, determine at least one candidate area in the original media data, determine first tag information of the original media data based on the at least one candidate area, and display the first tag information in the first interaction page.
[0055] Among them, the candidate area can be determined by the pixels corresponding to the interaction events of the target control in the original media data. For example, if the smudge control is triggered, the candidate area is determined based on the pixels covered by the interaction track in the original media data. An interaction event of the smudge control represents the process from the brush touching the canvas area to lifting it. If there are multiple interaction events for the smudge control, the pixels covered by each interaction track are recorded separately, and the candidate areas corresponding to each interaction event are determined based on the pixels covered by each interaction track, and the identification information of the candidate area is determined based on the order of the interaction events.
[0056] 2 , if the smudge control is detected to be triggered, the candidate area generated by the smudge control on the original image 220 is obtained, and the first marking information 250 corresponding to the candidate area is displayed on the first interactive page 210. In addition, the elimination start control 240 is switched from a non-triggerable state to a triggerable state.
[0057] Alternatively, if the selection control is triggered, the candidate area is determined based on the pixels corresponding to the selection box in the original media data. The selection control allows for quick area selection, improving area selection efficiency. A selection event for the selection control represents the process from the start of dragging the selection box to its release. If there are multiple selection events for the selection control, the pixels within each selection box are recorded separately, and the candidate areas corresponding to each selection event are determined based on the pixels within each selection box. The identification information of the candidate areas is determined based on the order of the selection events.
[0058] The first marking information is determined based on the pixels corresponding to the candidate area in the original media data. For example, the first marking information may be a pixel area corresponding to the original media data covered by a preset mask.
[0059] In some embodiments, determining at least one candidate region in the original media data in response to an interaction event with the target control includes:
[0060] In response to at least one selection event corresponding to the selection control in the original media data, at least one selection box is displayed in the first interactive page. At least one candidate region is determined based on pixels in the original media data corresponding to the at least one selection box, where identification information of the candidate region is determined based on the order of the selection events.
[0061] In the disclosed embodiment, if a selection control is detected as selected and a selection operation is detected in the original media data, a selection box is displayed on the first interactive page and its size is adjusted in real time based on the dragged selection range. When the drag stops, the selection box is fixed in size and a preset mask is applied to cover the pixels within the selection box. For each selection event, a candidate region is determined based on the pixels of the original media data within the selection box.
[0062] In some other embodiments, determining at least one candidate region in the original media data in response to an interaction event for the target control includes: displaying an interaction trajectory on the first interactive page in response to at least one interaction event corresponding to the scribble control in the original media data, wherein the interaction event includes a click event or a scribble event. Determining at least one candidate region based on pixels in the original media data corresponding to the interaction trajectory, where identification information of the candidate region is determined based on the order of the interaction events.
[0063] The interaction trajectory may represent brushstrokes of a brush corresponding to a smudge control on the original media data. The pixels in the original media data corresponding to the interaction trajectory may include pixels corresponding to smudge marks or click marks on the original media data. In response to an interaction event corresponding to a smudge control in the original media data, a candidate region is determined based on the pixels corresponding to the smudge mark or click mark.
[0064] In some embodiments, if the original media data does not include the second marking information, the first marking information of the original media data is determined based on the at least one candidate region. Since the original media data does not include marking information corresponding to the interactive event of the real-time elimination of the control, the pixel range that needs to be marked in the original media data, i.e., the first marking information, can be determined based on the candidate region corresponding to the interactive event of the target control. A list of target regions is generated based on the correlation between the order of the selection events and the first marking information.
[0065] In other embodiments, if the original media data contains second marking information, the first marking information of the original media data is determined based on the at least one candidate area, including: combining at least one pixel area corresponding to the second marking information and at least one candidate area to determine the first marking information of the original media data. Since the original media data contains pixel areas marked based on the real-time elimination control, the pixel area corresponding to the brush stroke of the real-time elimination control and at least one candidate area are combined to determine the pixel range that needs to be marked in the original media data, i.e., the first marking information. A target area list is generated based on the association between the interaction event order of the real-time elimination control and the second marking information, and the association between the interaction event order of the target control and the first marking information.
[0066] S130. In response to a trigger event for eliminating the start control, determining a target object according to the first tag information, eliminating the target object in the original media data to obtain target media data, and displaying a second interactive page, wherein the second interactive page includes the target media data.
[0067] The target object may represent a subject to be removed from the original media data. Since the first tag information represents a pixel range that needs to be marked in the original media data, the target object may be determined based on the pixel range represented by the first tag information. Accordingly, the target object includes the pixel range in the original media data corresponding to the candidate region. Alternatively, the target object includes the pixel ranges in the original media data corresponding to both the candidate region and the pixel region.
[0068] The target media data represents the media data removal result after the target object is removed. The second interactive page may represent a media data removal result display page.
[0069] 2 , if the triggering of the removal activation control is detected, the target object, i.e., the headdress of the cartoon character, is identified based on the area covered by the first tag information 250. The headdress of the cartoon character in the original image is removed to obtain a target image 260. The target image 260 is displayed on the second interactive page 270.
[0070] Exemplarily, in response to a trigger event for the elimination initiation control, a target mask is determined based on the first tag information. The target mask and the original media data are input into a preset media data generation model. The preset media data generation model identifies a target object based on the target mask, and the target object is eliminated from the original media data to obtain target media data.
[0071] The target mask represents the pixel range of the object to be eliminated. Optionally, the target mask can be the union of the regions in the target region list. The target mask and the original media data are input into a preset media data generation model, and the target object is identified based on the target mask and the original media data by the preset media data generation model, and the target object is removed from the original media data. Then, based on the pixel region with similar semantic attributes to the target object, the filling pixels after the target object is eliminated are determined. The region after the target object is eliminated in the original media data is filled with the filling pixels to obtain the target media data, and the target media data is displayed on the second interactive page. For example, if the target object is a hair accessory in the hair region, the filling pixels are determined using the pixels in the hair region after the hair accessory is eliminated.
[0072] The technical solution of the embodiment of the present disclosure is to display the target control and the original media data through a first interactive page, then determine at least one candidate area based on the interactive event corresponding to the target control in the original media data, determine the first tag information corresponding to the original media data based on the at least one candidate area, and in response to the trigger event for the elimination start control, perform elimination on the target object determined based on the first tag information in the original media data to obtain the target media data, and display the target media data through a second interactive page. The present disclosure determines the target object to be eliminated based on the first tag information and performs elimination on the target object only after the elimination start control is triggered, thereby solving the problem of erroneous elimination caused by accidental touches during real-time elimination, improving the accuracy of target elimination, and enhancing the elimination effect.
[0073] FIG3 is a flow chart of another media data processing method provided by an embodiment of the present disclosure. Based on the above embodiments, the present disclosure embodiment additionally defines the undo operation in the first interactive page. As shown in FIG3, the method includes:
[0074] S310: Display a first interactive page, wherein the first interactive page includes original media data and a candidate control set, and the candidate control set includes a target control and an elimination start control.
[0075] For example, if a display event for the first interactive page is detected, a duplicate layer is generated based on the original media data and displayed in the canvas area of the first interactive page. For example, the original media data is used as layer a, and in response to the display event for the first interactive page, layer b is set as the duplicate layer, with the same position and size as the original media data.
[0076] S320. In response to an interaction event for the target control, determine at least one candidate area in the original media data, determine first tag information of the original media data based on the at least one candidate area, and display the first tag information in the first interaction page.
[0077] Optionally, the target control includes a selection control. In response to at least one selection event corresponding to the selection control in the original media data, at least one selection box is displayed on the first interactive page. At least one candidate region is determined based on pixels in the original media data corresponding to the at least one selection box, and identification information of the candidate region is determined based on the order of the selection events. First tag information for the original media data is determined based on the at least one candidate region, and the first tag information is displayed on the first interactive page.
[0078] For example, if the selection control in the first interactive page is selected, a candidate area is selected in the original media data in the copy layer through the selection box. If there are multiple selection events and the original media data does not include the second marking information, the order of each selection event and the candidate area composed of the pixels in the selection box corresponding to each selection event are recorded separately. A target area list is generated based on the order and candidate area corresponding to each selection event. If there are multiple selection events and the original media data includes the second marking information, the target area list includes the association between the order of the interactive events of the real-time elimination of the control and the pixel area of the second marking information, as well as the association between the order of the selection events and the candidate area.
[0079] Optionally, the target control includes a smudge control, and in response to at least one interaction event corresponding to the smudge control in the original media data, an interaction trajectory is displayed on the first interaction page, wherein the interaction event includes a click event or a smudge event. At least one candidate region is determined based on pixels in the original media data corresponding to the interaction trajectory, and identification information of the candidate region is determined based on the order of the interaction events. First tag information of the original media data is determined based on the at least one candidate region, and the first tag information is displayed on the first interaction page.
[0080] For example, if the smudge control in the first interactive page is selected, a candidate area is selected in the original media data in the copy layer by smudge operation. The target area list is determined in a similar manner to the box selection control, which will not be repeated here.
[0081] S330: In response to a trigger event for the cancel control, determine a candidate area to be canceled according to the identification information.
[0082] The identification information represents the order in the target area list.
[0083] For example, upon detecting a click on the undo control, candidate regions to be undoed are determined based on the order and regions in the target region list. For example, the target region list includes the following interaction operations to be performed in order: 1. First marked region, 2. Second marked region, 3. Third marked region, 4. Fourth marked region, 5. Fifth marked region. If the undo control is detected to have been clicked, the fifth marked region is determined as a candidate region to be undoed.
[0084] S340: Delete the candidate area to be revoked from the at least one candidate area, delete the first marking information corresponding to the candidate area to be revoked in the first interactive page, and update the first marking information in the first interactive page according to the deleted first marking information.
[0085] For example, the target area list is restored to its state before the fifth interaction operation. Specifically, the fifth marked area is deleted from the target area list, and the first marking information corresponding to the fifth marked area on the first interaction page is deleted. Then, based on the order of smudges in the target area list, the marked areas are combined to obtain the first marking information after deletion. The deleted first marking information is then used to update the original first marking information on the first interaction page.
[0086] S350. In response to a trigger event for eliminating the start control, determining a target object according to the first tag information, eliminating the target object in the original media data to obtain target media data, and displaying a second interactive page, wherein the second interactive page includes the target media data.
[0087] Exemplarily, it is detected that the elimination start control is clicked, the target mask image is determined based on the first marking information, the target mask image and the original media data are input into a preset media data generation model, the preset model generation model is used to identify the target object based on the target mask image and the original media data, the target object in the original media data is eliminated, and the filling pixels are determined based on the pixel area similar to the target object, the filling pixels are used to fill the area after the target object is deducted, and the target media data is obtained, and the target media data is displayed through the second interactive page.
[0088] Optionally, after detecting that the erasure start control has been clicked, a preset erasure prompt message and an erasure cancel control are displayed. The preset erasure prompt message prompts the user that the erasure operation is in progress. If the erasure cancel control is detected, the erasure operation is aborted.
[0089] The technical solution of the embodiment of the present disclosure is that after the first marking information is displayed in the first interactive page, the candidate area to be revoked is determined based on the order of the candidate areas through the trigger event of the undo control, and the first marking information is restored to the state before the candidate area to be revoked is selected. The wrongly selected area or the erroneous selected area can be restored in time to avoid the elimination effect being affected by the wrong or erroneous selection.
[0090] FIG4 is a flow chart of another media data processing method provided by an embodiment of the present disclosure. Based on the above embodiments, the embodiment of the present disclosure adds a limited reset operation after displaying the first marking information in the first interactive page.
[0091] As shown in FIG4 , the method includes:
[0092] S410: Display a first interactive page, wherein the first interactive page includes original media data and a candidate control set, and the candidate control set includes a target control and an elimination start control.
[0093] The original media data is the result of the real-time deletion operation. For example, in response to the interactive event of the real-time deletion control, the subject corresponding to the interactive event of the real-time deletion control in the media data is deleted in real time to obtain the original media data.
[0094] S420. In response to an interaction event for the target control, determine at least one candidate area in the original media data, determine first tag information of the original media data based on the at least one candidate area, and display the first tag information in the first interaction page.
[0095] S430. In response to the triggering operation of resetting the control in the first interactive page, delete the first marking information corresponding to the candidate area in the first interactive page to display the original media data in the first interactive page, and convert the elimination start control into an untriggerable state.
[0096] For example, if a real-time elimination operation is performed in response to an interactive event of a real-time elimination control, the original media data is obtained. Then, in response to an interactive event of a target control, at least one candidate area in the original media data is determined, and the first tag information of the original media data is determined based on the union of at least one candidate area, and the first tag information is displayed in the first interactive page. If it is detected that the reset control is clicked, the first tag information is reset as a whole, that is, the first tag information in the first interactive page is deleted to display the original media data in the first interactive page. Since the smear or box selection in the original media data has been reset, it is necessary to convert the elimination start control to a non-triggerable state at this time. It should be noted that the undo control in the first interactive page is still in a triggerable state.
[0097] S440: In response to a triggering event of an undo control in the first interactive page, restore the original media data to a media data state before the real-time deletion operation.
[0098] Exemplarily, if a triggering event of an undo control in the first interactive page is detected, the real-time elimination operation in the original media data is undone to restore the original media data to the media data state before the real-time elimination operation.
[0099] The technical solution of the embodiment of the present disclosure realizes the overall reset of the first marking information in the first interactive page through the reset control, which facilitates the overall reset of the previously selected area when modifying the object to be eliminated, thereby improving the reset efficiency.
[0100] FIG5 is a flow chart of another media data processing method provided by an embodiment of the present disclosure. Based on the above embodiments, the embodiment of the present disclosure additionally defines an undo operation after switching the elimination mode after displaying the second interactive page.
[0101] As shown in FIG5 , the method includes:
[0102] S510: Display a first interactive page, wherein the first interactive page includes original media data and a candidate control set, and the candidate control set includes a target control and an elimination start control.
[0103] S520. In response to an interaction event for the target control, determine at least one candidate area in the original media data, determine first tag information of the original media data based on the at least one candidate area, and display the first tag information in the first interaction page.
[0104] S530. In response to a trigger event for eliminating the start control, determining a target object according to the first tag information, eliminating the target object in the original media data to obtain target media data, and displaying a second interactive page, wherein the second interactive page includes the target media data.
[0105] S540: In response to a triggering operation for eliminating a control in real time in the second interactive page, display a first interactive page, where the first interactive page includes the target media data.
[0106] Exemplarily, if the real-time elimination control in the second interactive page is clicked, the first interactive page is displayed, and the first interactive page includes the target media data and the undo control obtained after the elimination start control is triggered.
[0107] S550: In response to a triggering event for undoing a control in the first interactive page, restore the target media data to original media data, and display the original media data in the first interactive page.
[0108] Exemplarily, if the undo control in the first interactive page is clicked, the elimination effect in the target media data is restored as a whole to obtain the original media data, and the original media data is displayed in the first interactive page.
[0109] Optionally, if the rollback control in the first interactive page is clicked, the undo operation is restored as a whole to obtain the target media data.
[0110] Optionally, if the real-time deletion control is first clicked to execute deletion, then the target deletion control is clicked, and the real-time deletion result, undo control, and rollback control are displayed on the first interactive page. If the undo control is clicked, the real-time deletion result is fully restored to obtain the state of the media data before the real-time deletion operation. If the rollback control is clicked, the undo operation is fully restored to obtain the real-time deletion result.
[0111] The technical solution of the embodiment of the present disclosure merges the elimination effects of the previous elimination method after switching the elimination method, and uses the undo control to completely undo the elimination effects of the previous elimination method, which is convenient for completely undoing the previously selected area when modifying the object to be eliminated, thereby improving the undo efficiency.
[0112] Figure 6 is a schematic diagram of the structure of a media data processing device provided in an embodiment of the present disclosure. The device can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, PC or server, etc.
[0113] As shown in FIG. 6 , the apparatus includes: a page display module 610 , a candidate region determination module 620 , and an object elimination module 630 .
[0114] A page display module 610 is configured to display a first interactive page, wherein the first interactive page includes original media data and a candidate control set, wherein the candidate control set includes a target control and an elimination start control;
[0115] a candidate region determining module 620, configured to determine, in response to an interaction event with respect to the target control, at least one candidate region in the original media data, determine first tag information of the original media data based on the at least one candidate region, and display the first tag information in the first interaction page;
[0116] The object elimination module 630 is used to respond to the trigger event for the elimination start control, determine the target object according to the first marking information, eliminate the target object in the original media data to obtain the target media data, and display a second interactive page, which includes the target media data.
[0117] Optionally, the page display module 610 is specifically configured to:
[0118] A target elimination control is displayed in the third interactive page, and in response to a triggering operation on the target elimination control, the first interactive page is displayed.
[0119] Optionally, the page display module 610:
[0120] If the interaction information of the preset control in the second interaction page meets the preset prompt condition, the preset prompt information is displayed;
[0121] In response to a confirmation event for the preset prompt information, a first interactive page is displayed, wherein the first interactive page includes second marking information of the original media data, wherein the second marking information is used to represent at least one pixel area corresponding to an interactive event of eliminating the control in real time.
[0122] Furthermore, the candidate region determination module 620 is specifically configured to:
[0123] The first marking information of the original media data is determined by combining at least one pixel region and at least one candidate region corresponding to the second marking information.
[0124] Optionally, the target control includes a frame selection control, and the candidate area determination module 620 is further configured to:
[0125] In response to at least one selection event corresponding to the selection control in the original media data, displaying at least one selection box in the first interactive page;
[0126] At least one candidate region is determined based on pixels of the original media data corresponding to the at least one selection frame, and identification information of the candidate region is determined based on an order of the frame selection events.
[0127] Optionally, the target control includes a smudge control, and the candidate area determination module 620 is further configured to:
[0128] In response to at least one interaction event corresponding to the smudge control in the original media data, displaying an interaction track on the first interaction page, wherein the interaction event includes a click event or a smudge event;
[0129] At least one candidate region is determined according to the original media data and pixels corresponding to the interaction trajectory, where identification information of the candidate region is determined based on the order of the interaction events.
[0130] Optionally, the device further comprises:
[0131] a revocation region determining module, configured to determine a candidate region to be revoked based on the identification information in response to a trigger event for the revocation control after the first marking information is displayed on the first interactive page, when the candidate control set further includes a revocation control;
[0132] The area revocation module is used to delete the candidate area to be revoked from the at least one candidate area, delete the first marking information corresponding to the candidate area to be revoked in the first interactive page, and update the first marking information in the first interactive page according to the deleted first marking information.
[0133] Optionally, the object elimination module 630 is specifically configured to:
[0134] determining a target mask image according to the first marking information, wherein the target mask image represents a pixel range of the object to be eliminated;
[0135] The target mask image and the original media data are input into a preset media data generation model, the preset media data generation model identifies the target object based on the target mask image, and the target object in the original media data is eliminated to obtain the target media data.
[0136] Optionally, the device further comprises:
[0137] a reset module configured to, if the original media data is the result of a real-time deletion operation, after displaying the first marking information on the first interactive page, delete the first marking information corresponding to the candidate area on the first interactive page in response to a triggering operation of a reset control on the first interactive page, so as to display the original media data on the first interactive page and convert the deletion initiation control to a non-triggerable state;
[0138] The first undo module is configured to restore the original media data to a media data state before the real-time deletion operation in response to a triggering event of an undo control in the first interactive page.
[0139] Optionally, the device further comprises:
[0140] a control switching module, configured to, after displaying the second interactive page, display the first interactive page in response to a triggering operation of eliminating the control in real time on the second interactive page, wherein the first interactive page includes the target media data;
[0141] The second undo module is configured to restore the target media data to the original media data in response to a triggering event for an undo control in the first interactive page, and display the original media data in the first interactive page.
[0142] The media data processing device provided by the embodiments of the present disclosure can execute the media data processing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0143] It is worth noting that the various units and modules included in the above-mentioned device 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 used to limit the protection scope of the embodiments of the present disclosure.
[0144] FIG7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG7 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG7 ) 700 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG7 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0145] As shown in FIG7 , the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An edit / output (I / O) interface 705 is also connected to the bus 704.
[0146] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 7 shows the electronic device 700 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may be implemented or present instead.
[0147] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0148] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0149] The electronic device provided by the embodiment of the present disclosure and the media data processing method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0150] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the media data processing method provided in the above embodiment is implemented.
[0151] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0152] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with 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"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0153] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0154] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0155] Displaying a first interactive page, wherein the first interactive page includes original media data and a candidate control set, wherein the candidate control set includes a target control and an elimination start control;
[0156] In response to an interaction event for the target control, determining at least one candidate region in the original media data, determining first tag information of the original media data based on the at least one candidate region, and displaying the first tag information in the first interaction page;
[0157] In response to a trigger event for eliminating the start control, a target object is determined according to the first tag information, the target object in the original media data is eliminated to obtain target media data, and a second interactive page is displayed, wherein the second interactive page includes the target media data.
[0158] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0159] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0160] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.
[0161] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0162] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can 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 can 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.
[0163] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0164] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0165] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A method for processing media data, comprising: Displaying a first interaction page, wherein the first interaction page includes original media data and a candidate control set, and the candidate control set includes a target control and an elimination start control; In response to an interaction event for the target control, determining at least one candidate region in the original media data, determining first marking information of the original media data according to the at least one candidate region, and displaying the first marking information in the first interaction page; In response to a trigger event for the elimination start control, determining a target object according to the first marking information, eliminating the target object in the original media data to obtain target media data, and displaying a second interaction page, where the second interaction page includes the target media data.
2. The method according to claim 1, wherein, The displaying the first interaction page includes: Displaying a target elimination control in a third interaction page, and in response to a trigger operation for the target elimination control, displaying the first interaction page.
3. The method according to claim 1, wherein, The displaying the first interaction page includes: If the interaction information of a preset control in the second interaction page meets a preset prompt condition, then displaying a preset prompt information; In response to a confirmation event for the preset prompt information, displaying the first interaction page, where the first interaction page includes second marking information of the original media data, and the second marking information is used to characterize at least one pixel region corresponding to an interaction event with a real-time elimination control.
4. The method according to claim 3, wherein, The determining the first marking information of the original media data according to the at least one candidate region includes: Combining at least one pixel region corresponding to the second marking information and the at least one candidate region to determine the first marking information of the original media data.
5. The method according to claim 1, wherein The target control includes a selection control, and the responding to an interaction event for the target control and determining at least one candidate region in the original media data includes: In response to at least one selection event corresponding to the selection control in the original media data, displaying at least one selection box in the first interaction page; Determining at least one candidate region according to pixels of the original media data corresponding to the at least one selection box, where the identification information of the candidate region is determined based on the order of the selection events.
6. The method according to claim 1, wherein, The target control includes a smearing control, and the responding to an interaction event for the target control and determining at least one candidate region in the original media data includes: In response to at least one interaction event corresponding to the smearing control in the original media data, displaying an interaction track in the first interaction page, where the interaction event includes a click event or a smearing event; Determining at least one candidate region according to pixels of the original media data corresponding to the interaction track, where the identification information of the candidate region is determined based on the order of the interaction events.
7. The method according to claim 5 or 6, wherein The candidate control set further includes an undo control, and after displaying the first marking information in the first interaction page, it further includes: In response to a trigger event for the undo control, determining a candidate region to be undone according to the identification information; Delete the candidate region to be revoked from the at least one candidate region, delete the first marking information corresponding to the candidate region to be revoked in the first interaction page, and update the first marking information in the first interaction page according to the deleted first marking information.
8. The method according to claim 1, wherein, The determining a target object according to the first marking information and eliminating the target object in the original media data to obtain target media data includes: Determining a target mask image according to the first marking information, where the target mask image represents the pixel range of the object to be eliminated; Inputting the target mask image and the original media data into a preset media data generation model, and through the preset media data generation model, identifying the target object based on the target mask image, and eliminating the target object in the original media data to obtain target media data.
9. The method according to claim 1, wherein If the original media data is the result of a real-time elimination operation, after displaying the first marking information in the first interaction page, it further includes: In response to a trigger operation on a reset control in the first interaction page, deleting the first marking information corresponding to the candidate region in the first interaction page, so as to display the original media data in the first interaction page, and converting the elimination start control into a non-triggerable state; In response to a trigger event on an undo control in the first interaction page, restoring the original media data to the media data state before the real-time elimination operation.
10. The method according to claim 1, wherein, After displaying the second interaction page, it further includes: In response to a trigger operation on a real-time elimination control in the second interaction page, displaying a first interaction page, where the first interaction page includes the target media data; In response to a trigger event on an undo control in the first interaction page, restoring the target media data to the original media data, and displaying the original media data in the first interaction page.
11. A media data processing device, including: A page display module, configured to display a first interaction page, where the first interaction page includes original media data and a candidate control set, and the candidate control set includes a target control and an elimination start control; A candidate region determination module, configured to, in response to an interaction event on the target control, determine at least one candidate region in the original media data, determine first marking information of the original media data according to the at least one candidate region, and display the first marking information in the first interaction page; An object elimination module, configured to, in response to a trigger event on the elimination start control, determine a target object according to the first marking information, eliminate the target object in the original media data to obtain target media data, and display a second interaction page, where the second interaction page includes the target media data.
12. An electronic device, the electronic device includes: 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, enabling the one or more processors to implement the media data processing method according to any one of claims 1-10.
13. A storage medium containing computer-executable instructions, which are used to execute the media data processing method described in any one of claims 1-10 when executed by a computer processor.
Citation Information
Patent Citations
Multimedia object arrangement method and device, electronic equipment and storage medium
CN112099709A
Video generation method and device, electronic equipment and storage medium
CN112866796A
Image processing method and device, equipment, storage medium and program product
CN116578226A
Method and system for intelligently removing convergence media video target and filling background
CN117041619A
Media data processing method and device, electronic equipment and storage medium
CN117908743A