Content processing method and electronic equipment

By configuring the labels or vectors of negative elements in the database and updating them in real time, the terminal device can effectively identify and filter content containing negative elements, solving the problem that the existing technology cannot identify new negative elements and improving the user experience.

CN120144840AActive Publication Date: 2025-06-13HONOR DEVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202311665343.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-05
Publication Date
2025-06-13
Estimated Expiration
2043-12-05

AI Technical Summary

Technical Problem

The prior art cannot effectively identify and filter content containing negative elements, especially in the case of temporary new negative elements, which may lead to poor user experience.

Method used

By configuring the labels or vectors of negative elements in each region in the database and updating the negative indication information in real time, the terminal device can determine whether the content to be selected contains negative elements through content analysis and matching processing after obtaining the negative indication information, thereby filtering out the content containing negative elements.

Benefits of technology

It realizes effective identification and filtering of temporary negative elements, ensuring that the content provided to users does not contain negative elements, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144840A_ABST
    Figure CN120144840A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a content processing method and electronic equipment, and is applied to the technical field of terminals. The method comprises the following steps: in response to a content acquisition request of a user or a content providing instruction of terminal equipment, generating a content processing command; in response to a content processing command, negative indication information of the target area is obtained from the first database, the content processing command is used for indicating that the first content is returned in the multiple pieces of to-be-selected content, and the negative indication information in the first database supports real-time configuration. And for any to-be-selected content, judging whether the to-be-selected content contains a negative element or not according to the negative indication information. If yes, the to-be-selected content is filtered out, and if not, the to-be-selected content is determined as the first content. Thus, by configuring the negative indication information in the first database in real time, it can be ensured that the temporarily added negative elements are effectively prevented from appearing in the content provided by the terminal equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technologies, and in particular, to a content processing method and an electronic device. Background Art

[0002] In some application scenarios that provide content such as images or texts, it should be ensured that the provided content does not contain negative elements in a specified region to avoid bringing a bad experience to users.

[0003] Currently, in related technologies, an identification model is usually pre-trained, and the identification model is used to identify whether negative elements are included in content such as images or texts. However, this implementation method cannot cope with some emergencies. For example, due to some special circumstances, a new negative element temporarily appears in a certain region, and the identification model does not have the ability to identify this negative element in the short term. Then, it may result in the content provided to users containing negative elements, bringing a bad user experience. Summary of the Invention

[0004] Embodiments of this application provide a content processing method and an electronic device, which are applied to the field of terminal technologies.

[0005] In a first aspect, an embodiment of this application proposes a content processing method. Applied to a terminal device, the method includes:

[0006] In response to a user's content acquisition request or a content providing instruction of the terminal device, generate a content processing command;

[0007] In response to the content processing command, obtain negative indication information of a target region from a first database, where the content processing command is used to indicate to return first content among a plurality of candidate contents, and the negative indication information in the first database supports real-time configuration;

[0008] For any candidate content, determine whether the candidate content contains negative elements according to the negative indication information;

[0009] If so, filter out the candidate content; if not, determine the candidate content as the first content.

[0010] In some implementation manners, obtaining negative indication information of a target region from a first database in response to the content processing command includes:

[0011] In response to the content processing command, generate a first acquisition request;

[0012] Send the first acquisition request to a cloud device, where the first acquisition request is used to request to obtain negative indication information of a target region from a first database in the cloud device.

[0013] In some implementations, determining whether the candidate content contains negative elements according to the negative indication information includes:

[0014] Performing content analysis on the candidate content to obtain first indication information of the candidate content;

[0015] Matching the first indication information with the negative indication information to obtain a matching result;

[0016] Determining whether the candidate content contains negative elements according to the matching result.

[0017] In some implementations, the negative indication information includes at least one first negative tag;

[0018] Performing content analysis on the candidate content to obtain first indication information of the candidate content, including:

[0019] Inputting the candidate content into a classification model to obtain first indication information output by the classification model, where the first indication information includes at least one second negative tag, and the second negative tag is used to indicate negative elements included in the candidate content.

[0020] In some implementations, matching the first indication information with the negative indication information to obtain a matching result includes:

[0021] For any one first negative tag in the negative indication information, if there is a second negative tag in the first indication information that is the same as the first negative tag, determining that the matching result is a successful match; or,

[0022] If there is no second negative tag in the first indication information that is the same as the first negative tag, determining that the matching result is a failed match.

[0023] In some implementations, the negative indication information includes at least one negative text;

[0024] The method further includes:

[0025] For any one negative text, processing the negative text into a corresponding negative vector according to an encoder;

[0026] Performing content analysis on the candidate content to obtain first indication information of the candidate content, including:

[0027] Inputting the candidate content into an analysis model to obtain first indication information output by the analysis model, where the first indication information includes at least one content vector, and the content vector is used to indicate elements included in the candidate content.

[0028] In some implementations, matching the first indication information with the negative indication information to obtain a matching result includes:

[0029] Determine the vector similarity between each negative vector and each content vector in the first indication information;

[0030] For any negative vector, if there is a content vector in the first indication information whose vector similarity with the negative vector is greater than a preset threshold, determine that the matching result is a successful match; or,

[0031] If there is no content vector in the first indication information whose vector similarity with the negative vector is greater than the preset threshold, determine that the matching result is a failed match.

[0032] In some implementation manners, the content processing command is used to indicate the generation of second content, and the method further includes:

[0033] Provide negative indication information to the generation model so that the second content generated by the generation model does not include negative elements.

[0034] In a second aspect, an embodiment of the present application proposes a content processing method. Applied to a cloud device, the method includes:

[0035] Receive a first acquisition request sent by a terminal device;

[0036] According to the first acquisition request, obtain the negative indication information of the target area from the first database. The first database includes the negative indication information corresponding to each of multiple areas, and the negative indication information in the first database supports real-time configuration;

[0037] Send the negative indication information to the terminal device, and the negative indication information is used to indicate that the content provided by the terminal device does not include the negative elements corresponding to the negative indication information.

[0038] In some implementation manners, the method further includes:

[0039] In response to an update instruction for the first area, add new negative indication information for the first area in the first database.

[0040] In some implementation manners, the method further includes:

[0041] Obtain the target news information of the first area from the first interface;

[0042] Perform semantic analysis on the target news information to obtain new negative elements in the first area, and determine the new negative indication information corresponding to the new negative elements;

[0043] Generate an update instruction according to the area identifier of the first area and the new negative indication information.

[0044] In some implementation manners, obtaining the target news information of the first area from the first interface includes:

[0045] When there is new news information in the first region, receive the new news information sent by the first interface, where the target news information is the new news information; or,

[0046] Send a second acquisition request to the first interface, where the second acquisition request is used to request to acquire the news information corresponding to the first region within a historical period, and the target news information is the news information corresponding to the first region within the historical period.

[0047] In some implementation manners, the method further includes:

[0048] Receive the feedback information sent by the terminal device, where the feedback information includes the region identifier of the first region, the feedback text, and the target content associated with the feedback information;

[0049] Extract the to-be-processed negative elements according to the feedback text, and detect whether the target content contains the to-be-processed negative elements;

[0050] If so, generate the to-be-processed negative indication information corresponding to the to-be-processed negative elements;

[0051] If the to-be-processed negative indication information is not stored in the first database for the first region, determine the to-be-processed negative indication information as the newly added negative indication information, and generate an update instruction.

[0052] In a third aspect, an embodiment of the present application provides a content processing device, including:

[0053] A processing module, configured to generate a content processing command in response to a content acquisition request of a user or a content providing instruction of a terminal device;

[0054] An acquisition module, configured to acquire the negative indication information of the target region from the first database in response to the content processing command, where the content processing command is used to indicate to return the first content among multiple candidate contents, and the negative indication information in the first database supports real-time configuration;

[0055] The processing module is further configured to, for any one of the candidate contents, determine whether the candidate content contains negative elements according to the negative indication information;

[0056] The processing module is further configured to, if so, filter out the candidate content, and if not, determine the candidate content as the first content.

[0057] In some implementation manners, the acquisition module is specifically configured to:

[0058] Generate a first acquisition request in response to the content processing command;

[0059] Send the first acquisition request to the cloud device, where the first acquisition request is used to request to acquire the negative indication information of the target region from the first database in the cloud device.

[0060] In some implementations, the processing module is specifically configured to:

[0061] Perform content analysis on the candidate content to obtain first indication information of the candidate content;

[0062] Match the first indication information with negative indication information to obtain a matching result;

[0063] Based on the matching result, determine whether the candidate content contains negative elements.

[0064] In some implementations, the negative indication information includes at least one first negative tag;

[0065] The processing module is specifically configured to:

[0066] Input the candidate content into a classification model to obtain first indication information output by the classification model, where the first indication information includes at least one second negative tag, and the second negative tag is used to indicate the negative elements included in the candidate content.

[0067] In some implementations, the processing module is specifically configured to:

[0068] For any one of the first negative tags in the negative indication information, if there is a second negative tag in the first indication information that is the same as the first negative tag, determine that the matching result is a successful match; or,

[0069] If there is no second negative tag in the first indication information that is the same as the first negative tag, determine that the matching result is a failed match.

[0070] In some implementations, the negative indication information includes at least one negative text;

[0071] The processing module is further configured to:

[0072] For any one of the negative texts, process the negative text into a corresponding negative vector according to an encoder;

[0073] The processing module is specifically configured to:

[0074] Input the candidate content into an analysis model to obtain first indication information output by the analysis model, where the first indication information includes at least one content vector, and the content vector is used to indicate the elements included in the candidate content.

[0075] In some implementations, the processing module is specifically configured to:

[0076] Determine the vector similarity between each negative vector and each content vector in the first indication information;

[0077] For any negative vector, if there is a content vector in the first indication information whose vector similarity to the negative vector is greater than a preset threshold, determine that the matching result is a successful match; or,

[0078] If there is no content vector in the first indication information whose vector similarity to the negative vector is greater than a preset threshold, determine that the matching result is a failed match.

[0079] In some implementation manners, the content processing command is used to indicate the generation of second content, and the processing module is further used for:

[0080] Providing negative indication information to the generation model so that the second content generated by the generation model does not contain negative elements.

[0081] In a fourth aspect, an embodiment of the present application provides a content processing device, including:

[0082] A transceiver module, configured to receive a first acquisition request sent by a terminal device;

[0083] A processing module, configured to obtain negative indication information of a target area from a first database according to the first acquisition request, where the first database includes negative indication information corresponding to multiple areas respectively, and the negative indication information in the first database supports real-time configuration;

[0084] The transceiver module is further configured to send negative indication information to the terminal device, and the negative indication information is used to indicate that the content provided by the terminal device does not contain negative elements corresponding to the negative indication information.

[0085] In some implementation manners, the processing module is further used for:

[0086] In response to an update instruction for a first area, adding new negative indication information for the first area in the first database.

[0087] In some implementation manners, the processing module is further used for:

[0088] Obtaining target news information of a first area from a first interface;

[0089] Performing semantic analysis on the target news information to obtain new negative elements of the first area, and determining new negative indication information corresponding to the new negative elements;

[0090] Generating an update instruction according to the area identifier of the first area and the new negative indication information.

[0091] In some implementation manners, the processing module is further used for:

[0092] When there is new news information in the first area, receiving the new news information sent by the first interface, where the target news information is the new news information; or,

[0093] Send a second acquisition request to the first interface, where the second acquisition request is used to request the acquisition of news information corresponding to the first region within a historical period, and the target news information is the news information corresponding to the first region within the historical period.

[0094] In some implementation manners, the transceiver module is further configured to:

[0095] Receive feedback information sent by the terminal device, where the feedback information includes the region identifier of the first region, the feedback text, and the target content associated with the feedback information;

[0096] The processing module is further configured to:

[0097] Extract the to-be-processed negative elements according to the feedback text, and detect whether the target content contains the to-be-processed negative elements;

[0098] If so, generate to-be-processed negative indication information corresponding to the to-be-processed negative elements;

[0099] If the to-be-processed negative indication information is not stored in the first database for the first region, determine the to-be-processed negative indication information as newly added negative indication information, and generate an update instruction.

[0100] In a fifth aspect, an embodiment of the present application provides an electronic device, which may be a terminal device or a cloud device. The terminal device may also be referred to as a terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The terminal device may be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, and so on.

[0101] The cloud device may be a cloud server, a cloud server cluster, etc.

[0102] The electronic device includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the method according to the first aspect or the second aspect.

[0103] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method according to the first aspect or the second aspect is implemented.

[0104] In a seventh aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is run, the computer is enabled to execute the method according to the first aspect or the second aspect.

[0105] In an eighth aspect, an embodiment of the present application provides a chip, which includes a processor. The processor is used to call a computer program in a memory to execute the method according to the first aspect or the second aspect.

[0106] It should be understood that the second aspect to the eighth aspect of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar, and will not be elaborated herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0107] Figure 1 It is a schematic diagram of the scenario of the content provided by the embodiment of the present application Figure 1 ;

[0108] Figure 2 It is a schematic diagram of the scenario of the content provided by the embodiment of the present application Figure 2 ;

[0109] Figure 3 It is a schematic diagram of the software structure of a terminal device provided by the embodiment of the present application;

[0110] Figure 4 It is a schematic diagram of the implementation of the first database provided by the embodiment of the present application;

[0111] Figure 5 It is a schematic diagram of the implementation of generating an update instruction provided by the embodiment of the present application;

[0112] Figure 6 It is a schematic diagram of opinion feedback provided by the embodiment of the present application;

[0113] Figure 7 It is a schematic diagram of the processing flow of the content processing method provided by the embodiment of the present application;

[0114] Figure 8 It is a schematic diagram of the implementation of vector matching provided by the embodiment of the present application;

[0115] Figure 9 Structural schematic of the content processing device provided by an embodiment of the present application Figure 1 ;

[0116] Figure 10 Structural schematic of the content processing device provided by an embodiment of the present application Figure 2 ;

[0117] Figure 11 Hardware structure schematic diagram of the electronic device provided by an embodiment of the present application. Detailed implementation manners

[0118] For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.

[0119] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B may be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple.

[0120] It should be noted that "when... " in the embodiments of the present application may be at the instant when a certain situation occurs, or within a period of time after a certain situation occurs. The embodiments of the present application do not make specific limitations on this. In addition, the display interface provided by the embodiments of the present application is only an example, and the display interface may also include more or less content.

[0121] To better understand the technical solutions of the present application, the related technologies involved in the present application are further introduced below.

[0122] Currently, there are many application scenarios where terminal devices provide content for users, and the content may include one or more of text, images, audio, and video. Exemplarily, the following scenarios may be included:

[0123] 1. The user inputs a search keyword in a graphics application (such as a gallery), and then the graphics application returns images that match the search keyword to the user.

[0124] 2. Recommended wallpapers are displayed on the lock screen interface, or the desktop interface, or in the graphics application of the terminal device.

[0125] 3. The graphics application selects multiple images from multiple images in the terminal device according to certain rules, and displays the selected images in the application or on the widget on the desktop. For example, functions such as selected images and recommended images in the gallery application can be referred to.

[0126] 4. The graphics application selects multiple images from multiple images in the terminal device according to certain rules, and automatically generates a short video based on the selected multiple images. For example, a short video can be generated based on the images taken by the user during a tour in a certain area, or a short video can also be generated based on the images within a certain historical period, etc.

[0127] 5. Some applications automatically generate intelligent captions based on the images provided by the user, and the results of the intelligent captions include text content associated with the images selected by the user. Further, a video can also be generated based on the images and captions.

[0128] 6. Some applications automatically generate intelligent illustrations based on the text input by the user, and the results of the intelligent illustrations include image content associated with the text input by the user. Further, a video can also be generated based on the text and illustrations.

[0129] 7. The graphics application provides the function of generating portrait photos for the user.

[0130] The various scenarios described above can be classified into the scenario where the terminal device actively provides content to the user, and the scenario where the terminal device returns content in response to the user's request. It can be understood that in the actual implementation process, the application scenarios of the technical solution of this application are not limited to the several described above. Any scenario that can be classified as the terminal device providing content to the user can adopt the technical solution provided by this application.

[0131] In the scenario where the terminal device provides content to the user, based on the culture and customs of different regions, etc., the terminal device should try to avoid the content provided to the user containing negative elements of the user's location, so as to avoid bringing an unpleasant user experience to the user. The negative elements here can be, for example, certain flags, or certain animals, or certain body parts, etc., which depend on the specific situation of each region, and this embodiment does not limit this.

[0132] Also, for each service provided by the terminal device, the content provided by the service should be as accurate as possible, and inappropriate elements in the provided content should be avoided. Exemplarily, for the "Wonderful Moments" service, assuming the function of this service is to screen some high-quality images and generate videos based on these images.

[0133] For example, for an image of an employee ID card taken casually by a user, since this image does not meet the purpose of setting of the "Wonderful Moments" service, this image should be avoided from appearing in the generated video as much as possible. Then it can be understood that there is a rule: the employee ID card element is a negative element corresponding to the "Wonderful Moments" service.

[0134] In the actual implementation process, each service has its own corresponding actual requirements. Therefore, according to the actual situation of each service, the negative elements corresponding to each service can be set.

[0135] Below, taking the first scenario introduced above as an example, combined with Figure 1 for illustration, Figure 1 is a schematic diagram of the scenario of providing content provided by an embodiment of the present application Figure 1 .

[0136] As Figure 1 shown, it shows an image search interface in a graphic application. The user can enter a search keyword in the search box in the image search interface. Referring to Figure 1 , assuming the search keyword entered by the user in the search box 101 is "flower", the graphic application can display at least one image matching the search keyword "flower". Exemplarily, assuming the search results include Figure 1 the 12 images, i.e., Image 1 to Image 12, shown.

[0137] And assuming that in the area where the current user is located, element A is a negative element. Then, if Image 6 and Image 11 include element A and the current search results display Image 6 and Image 11, it may have an adverse impact on the user experience. For example, it may make the user feel offended or disrespected and other bad experiences.

[0138] Secondly, combined with Figure 2 to illustrate the third and fourth scenarios introduced above, Figure 2 is a schematic diagram of the scenario of providing content provided by an embodiment of the present application Figure 2 .

[0139] As Figure 2 shown, assuming that the "Moments" function in the graphic application is used to implement the display of the selected images according to certain rules and the short films composed of the selected images according to certain rules introduced above, then it can be referred toFigure 2 It is understood that in a graphic application, an image recommendation interface corresponding to the "moment" function can be displayed. In the image recommendation interface, for example, a recommended image can be displayed at the position shown in 201, and a short video formed by the recommended images can be displayed at the position shown in 202, for example.

[0140] For example, in Figure 2 In the example of, a recommended image 1 is displayed at the position shown in 201, and a cover image 2 of short video one is displayed at the position shown in 202. This short video can be, for example, a short video formed by multiple images taken on November 23, 2023. And a cover image 3 of short video two is displayed at the position shown in 203. This short video can be, for example, a short video formed by multiple images taken on the weekend of August 26, 2023.

[0141] Suppose that the recommended image 1, or short video one, or short video two contains negative elements in the user's location. Then it will also have an adverse impact on the user experience. For example, it may make the user feel offended or disrespected and other bad experiences.

[0142] Therefore, processing negative elements in the content provided by the terminal device is a very important link. Currently, in the related technology when identifying negative elements, usually an identification model is pre-trained, and the identification model is used to identify whether the content such as images or texts contains negative elements.

[0143] However, this implementation method cannot cope with some emergencies. For example, due to some special circumstances (such as changes in culture or customs) in a certain area, a new type of negative element appears temporarily. The identification model cannot have the ability to identify this negative element in the short term. It needs a large amount of training data and a long training process to be able to identify the newly added negative element. Therefore, the current implementation method may cause the content provided to the user to contain negative elements, thus bringing a bad user experience. In some serious cases, it may trigger some public opinions.

[0144] In view of the above-described technical problems, the present application proposes the following technical concept: Configure tags or vectors of negative elements for each region in the database, and then based on the tags or vectors of negative elements, avoid the content provided from containing negative elements. The tags or vectors in the database can be configured in real time, so it can effectively identify and avoid the content from containing newly added negative elements temporarily.

[0145] The technical solution of the present application is applied to a terminal device. Exemplarily, Figure 3 This is a schematic diagram of the software structure of a terminal device provided by an embodiment of the present application.

[0146] Such asFigure 3 As shown, the layered architecture divides software into several layers, and each layer has clear roles and divisions of labor. The layers communicate with each other through interfaces. In some embodiments, the system may include an application layer, an application framework layer, an algorithm engine, an Android runtime, system libraries, a hardware abstraction layer (HAL), and a kernel layer. It should be noted that the embodiments of this application take the Android system as an example for illustration. In other operating systems (such as the HarmonyOS, iOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of this application, the solution of this application can also be implemented.

[0147] Among them, the application layer may include a series of application packages.

[0148] Such as Figure 3 As shown, the application packages may include applications such as cameras, text messages, notes, and document editing. Of course, the application layer may also include other application packages, such as third-party applications such as payment applications, shopping applications, banking applications, and social applications, which are not limited in this application.

[0149] In this application, the application layer may also include a first service and a prompt project. Among them, the first service may include one or more of services such as image recommendation, image generation, and video generation.

[0150] Exemplarily, for example, Scenario 2 or Scenario 3 introduced above can be understood as the image recommendation service here. In some terminal devices, Figure 3 the image recommendation service in can be called "Wonderful Moments" or "This Day in History". This embodiment does not limit the specific service type and service name.

[0151] And, Scenario 4, Scenario 5, or Scenario 6 introduced above can be understood as the video generation service here. In some terminal devices, Figure 3 the video generation service in can be called "One-Click Video Editing". This embodiment also does not limit the specific service type and service name.

[0152] And, Scenario 7 introduced above can be understood as the image generation service here.

[0153] In the actual implementation process, the first service can be understood as a service for providing content to users. The specific functions included in the first service are not limited to the various scenarios introduced in the above embodiments and can be extended according to actual needs.

[0154] Moreover, prompt engineering is used to provide prompt information for the processing model of content generation. The prompt information here can include positive prompt information and can also include negative prompt information, so that the processing model of content generation can output the content required by the system.

[0155] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. For example, it can include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, and a camera server unit, etc. The embodiments of the present application do not make any restrictions on this.

[0156] The algorithm engine layer can include a first model and a second model for implementing content classification, and a generation model for generating content. Among them, content classification is to identify whether the content contains negative elements. Exemplarily, the first model can identify whether the content contains negative elements from the dimension of tags, and the second model can identify whether the content contains negative elements from the dimension of vectors. And the generation model is used to generate specified content according to the prompt information provided by prompt engineering and ensure that the generated content does not contain negative elements.

[0157] The system library can include multiple functional modules. For example: OpenCV, a surface manager, media libraries, a 3D graphics processing library (e.g., OpenGL ES), a 2D graphics engine (e.g., SGL), a camera service, etc.

[0158] The Android runtime includes a core library and a virtual machine, and is responsible for the scheduling and management of the Android system.

[0159] The HAL layer is an encapsulation of the Linux kernel driver, providing an interface upward and shielding the implementation details of the lower-layer hardware.

[0160] The HAL layer can include a Wi-Fi HAL, an audio HAL, a Camera HAL Server unit of the HAL layer, a sensors HAL, and a software code library, etc.

[0161] The kernel layer is the layer between the hardware and the software. The kernel layer includes a driver layer and a power management. Among them, the driver layer at least includes a display driver, a camera driver, an audio driver, a sensor driver, a charging driver, etc.

[0162] The following will, in conjunction with the accompanying drawings, use specific embodiments to elaborate in detail on the technical solutions of the embodiments of the present application and how the technical solutions of the embodiments of the present application solve the above technical problems. These several specific embodiments below can be implemented independently or in combination with each other. For the same or similar concepts or processes, they may not be elaborated in some embodiments.

[0163] First, in conjunction with Figure 4 describe the first database in the cloud device. Figure 4 It is a schematic diagram of the implementation of the first database provided by the embodiments of the present application.

[0164] As Figure 4 shown, in the first database, negative indication information of each region can be stored, where the negative indication information is used to indicate negative elements.

[0165] Exemplarily, in the first database, negative indication information common to each region can be stored, where the negative indication information common to each region is indication information for negative elements in each region. In addition, in the first database, negative indication information unique to each region is also stored, for example, negative indication information of region A, negative indication information of region B, negative indication information of region C, and so on.

[0166] Based on the above introduction, it can be determined that for each region, the terminal device can provide at least one service. Here, the services can include, for example, the image recommendation service, image generation service, video generation service, etc. introduced above. Therefore, further, in the negative indication information of each region, it can further include the negative indication information of the general type of the region, and the negative indication information corresponding to at least one service provided by the terminal device for the region. It can be understood that.

[0167] Among them, the negative indication information of the general type is the negative indication information common to each service provided by the terminal device for the region. Exemplarily, assume that there is a negative indication information 1 of a certain general type in region A, then the elements indicated by the negative indication information 1 should not appear in the output content of each service provided by the terminal device for region A.

[0168] And, the negative indication information corresponding to service n is the negative indication information corresponding to service n provided by the terminal device for the region, where n can be understood as a service identifier. Exemplarily, assume that the negative indication information corresponding to service 1 in region A includes negative indication information 2, then the elements indicated by the negative indication information 2 should not appear in the output content of service 1 provided by the terminal device for region A.

[0169] Meanwhile, assuming that the negative indication information corresponding to Service 1 in Region A does not include Negative Indication Information 2, then the output content of Service 2 provided by the terminal device for Region A may include the element indicated by Negative Indication Information 2.

[0170] In Figure 4 Region A is taken as an example to introduce the configuration of negative indication information. The configuration of negative indication information for the remaining regions is similar and will not be elaborated here and in Figure 4 either.

[0171] By configuring general - type negative indication information for each region in the first database, it is possible to uniformly configure the negative elements that are not suitable to appear in the content provided by each service. Also, by configuring the negative indication information corresponding to each service for each region separately in the first database, it is possible to configure negative indication information for each service in a personalized manner, thereby improving the accuracy of the output content corresponding to each service.

[0172] Among them, the negative indication information can be the label corresponding to the negative element, or the negative indication information can also be the vector corresponding to the negative element. Further, the implementation form of the label corresponding to the negative element can be a number, a letter, a string, etc., and this embodiment does not limit this.

[0173] Taking the label in the form of a number as the negative indication information as an example, the negative indication information in the first database can be represented as the following content:

[0174] {

[0175] "General": [1053, 1379, 1380, 1324, 1325, 1326, 55, 1017, 1367, 1368, 1369, 45, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1336, 1331],

[0176] "A": [345, 346, 347, 348],

[0177] "B":

[412] ,

[0178] "C": [408, 397, 392, 412, 1378, 841, 833, 834, 835]

[0179] }

[0180] Among them, "General", "A", "B", and "C" can be understood as regional codes, and the negative tags in the form of numbers after each regional code are used to indicate the corresponding negative elements in each region. For example, the negative tag "345" corresponding to Region A can be used to indicate a specific negative element (such as a specific flag or a specific animal, etc.). Exemplarily, each negative indication information can be associated with its corresponding service information. For example, for the general type of negative indication information introduced above, the associated service information can be "General". And, for the negative indication information of Service n introduced above, the associated service information can be "Service n".

[0181] In addition to the above-introduced tag form, the negative indication information stored in the first database can also directly store the negative indication information in text form in the first database. For example, in a certain region, "black cat" is a negative element, then for example, the text of "black cat" can be directly associated and stored in the first database for this region, and then the negative indication information of this region includes the text of "black cat". This embodiment does not limit the specific form of the negative indication information stored in the first database.

[0182] In this embodiment, in addition to including the negative indication information corresponding to multiple pre-configured regions, the negative indication information in the first database also supports real-time configuration.

[0183] In a possible implementation manner, the cloud device can receive an update instruction for the first region, where the update instruction includes the region identifier of the first region and the newly added negative indication information corresponding to the first region. The first region in this embodiment can be understood as the region that needs to update the negative indication information, and it can be any one of multiple regions, depending on the actual implementation.

[0184] After that, the cloud device can respond to the update instruction and add the newly added negative indication information for the first region in the first database. When a newly added negative element appears in the first region due to some unexpected situations, by adding the corresponding newly added negative indication information in the first database in a timely manner, it can quickly provide a basis for processing negative elements for content processing.

[0185] Furthermore, in addition to indicating to add the newly added negative indication information for the first region in the first database, the update instruction can also be used to indicate deleting some negative indication information corresponding to the first region in the first database, and can also be used to indicate modifying some negative indication information corresponding to the first region in the first database to ensure the simplicity and correctness of the negative indication information in the first database. The processing method is similar to the implementation manner of adding negative indication information.

[0186] Based on the above introduction, for the cloud device to generate the first database in response to an update instruction, the cloud device must first generate the update instruction. Next, several possible situations for generating the update instruction will be introduced.

[0187] Situation 1: Generate an update instruction based on news information

[0188] Generally, when the culture or customs in a certain region change, resulting in some elements becoming negative elements in this region, there are usually corresponding news reports. Therefore, a first interface for obtaining news information can be set in the cloud device, and the data source accessed by the first interface can be, for example, a specified news website.

[0189] It can be understood with reference to Figure 5 for Figure 5 the schematic diagram of implementing the generation of the update instruction provided by the embodiment of the present application.

[0190] As Figure 5 shown, a first interface is set in the cloud device. Exemplarily, the cloud device can obtain news information in news website A through the first interface. The news information can be in the form of text and pictures, or it can also be in the form of audio and video. This embodiment does not limit this.

[0191] Specifically, the cloud device can obtain the target news information of the first region from the first interface. The target information can be the newly added news information in the first region in real time, or it can also be the news information in the first region during a historical period.

[0192] In a possible implementation manner, when there is newly added news information in the first region, the news website can, for example, actively push the newly added news information to the cloud device through the first interface. In this case, the first interface actively provides the newly added news information to the cloud device, and the target news information is the newly added news information introduced here. By obtaining the newly added news information in the first region, negative elements that appear due to the development of the situation can be added to the first database.

[0193] Alternatively, the cloud device can also send a second acquisition request to the first interface at a preset time interval regularly. The second acquisition request is used to request to obtain the news information corresponding to the first region during a historical period. The historical period can be all periods before the current moment, or the historical period can also be a period of a certain duration before the current moment. In this case, the cloud device actively obtains the news information during the historical period, and the target news information is the news information during the historical period introduced here. By obtaining the news information in the first region during the historical period, missing negative elements can be added to the first database, thereby ensuring the completeness of the negative elements in the first database.

[0194] Regardless of which implementation method of the target news information is introduced above, after the cloud device obtains the target news information, it can perform semantic analysis on the target news information to obtain at least one alternative negative element indicated by the target news information, and can determine the corresponding negative indication information for each alternative negative element.

[0195] Furthermore, it can be determined whether the corresponding negative indication information for each alternative negative element is stored in the first database for the first region. For the alternative negative elements whose negative indication information is not stored in the first database, they can be determined as newly added negative elements, and their corresponding negative indication information can be determined as newly added negative indication information.

[0196] After that, an update instruction can be generated according to the region identifier of the first region and the newly added negative indication information of the first region. The corresponding update instruction is used to indicate adding the newly added negative indication information for the first region in the first database, so as to add the indication information of the newly added negative elements or the missing negative elements in real time to the first database, and further provide a relatively complete processing basis for negative elements for subsequent data content processing.

[0197] Case 2: Generating an update instruction according to user feedback

[0198] In some abnormal situations, although there is the blessing of the content processing mechanism, negative elements in the user's location still appear in the content provided to the user. Then the user can also give feedback through the terminal device, and in this application, the first database can be updated according to the feedback from the user.

[0199] For example, it can be understood with reference to Figure 6 which is Figure 6 the schematic diagram of feedback provided in the embodiment of this application.

[0200] As Figure 6 shown, assuming in the scenario of wallpaper recommendation, the first application program in the terminal device can display a wallpaper recommendation interface as shown in (a) of Figure 6 The wallpaper recommendation interface includes at least one wallpaper image recommended to the user. Exemplarily, the user can perform a sliding operation in the wallpaper recommendation interface to browse multiple recommended wallpaper images.

[0201] Assume that the currently recommended wallpaper image includes Image 1, and assume that Image 1 contains Element A, where Element A is a negative element in the user's location. Then the user can trigger the display of the function controls "View Details" and "Feedback" as shown in (a) of Figure 6 by operating the operation control 601 in the wallpaper recommendation interface.

[0202] Furthermore, the first application may display a Figure 6 The feedback interface shown in (b) is shown in Figure 6 As shown, the feedback object can be displayed in the feedback interface so that the user can determine what content the feedback is currently being provided for, and an input box can also be displayed in the feedback interface so that the user can input specific feedback.

[0203] In the actual implementation process, other controls can be set in the feedback interface according to actual needs. Figure 6 The introduction in does not constitute a limitation on the feedback interface.

[0204] After completing the feedback, the user can, for example, click the submit control in the feedback interface to send feedback information to the cloud device. The feedback information may include the region identifier of the first region where the user is located, feedback text, and target content associated with the current feedback information. The feedback text may be, for example, the text entered by the user in the input box described above, or the feedback text may also be a description text generated based on the user's selection operation on the selection control in the feedback interface. And the content for which the current feedback information is initiated is the target content associated with the current feedback information.

[0205] After receiving the feedback information, the cloud device can extract the negative elements to be processed according to the feedback text, and the cloud device can further detect whether the target content contains the negative elements to be processed to ensure that the user's current feedback is valid feedback.

[0206] If it is determined that the target content contains a negative element to be processed, the negative indication information to be processed corresponding to the negative element to be processed can be further generated, and then it is further determined whether the negative indication information to be processed is stored in the first database for the first region. If it is stored, then no special processing is required for the negative indication information to be processed here. If it is not stored in the first database, then the negative indication information to be processed here can be used as the newly added negative indication information, so as to generate an update instruction according to the newly added negative indication information and the region identifier of the first region.

[0207] In this implementation, the negative indication information in the first database can be improved based on user feedback. Since the user base is relatively large, the completeness of the negative improvement information in the first database can be effectively improved.

[0208] Case 3: Manually generate update instructions

[0209] In this case, the staff can manually send an update instruction to add negative prompt information to the first database in response to the addition of negative elements or the omission of negative elements.

[0210] Based on the relevant implementation of the first database introduced above, the content processing process in the terminal device will be introduced in detail below in combination with Figure 7 the following. Figure 7 It is a schematic diagram of the processing flow of the content processing method provided by the embodiments of the present application.

[0211] As Figure 7 shown, the terminal device can generate a content processing command in response to a user's content acquisition request or a content providing instruction of the terminal device.

[0212] Among them, the content acquisition request is initiated by the user and is used to trigger a corresponding content processing request. For example, in the scenarios of the search content and the generation of profile photos introduced above, the content acquisition request is initiated by the user. And, the content providing instruction is initiated by the terminal device and is used to trigger a corresponding content processing request. For example, in the scenarios of wallpaper recommendation, short video generation, etc. introduced above, the content providing instruction is initiated by the terminal device.

[0213] Whether it is the content acquisition request introduced above or the content providing instruction, their functions are to perform corresponding content processing. Therefore, a content processing command can be generated in response to the content acquisition request or the content providing instruction.

[0214] There are two implementation methods for the content processing command. In the first implementation method, the content processing command can instruct to return the first content among multiple candidate contents. For example, in the scenario of image search introduced above, it is to return the first image among multiple candidate images. Another example is the scenario of wallpaper recommendation introduced above, which is to return the first wallpaper among multiple candidate wallpapers in the wallpaper library.

[0215] In the second implementation method, the content processing command can instruct to generate the second content. For example, in the cases of profile photo generation, intelligent captioning, and intelligent image matching introduced above, the terminal device generates a brand-new second content.

[0216] Regardless of which content processing command, the terminal device can obtain the negative indication information of the target area from the first database in response to the content processing command.

[0217] For example, it can refer to Figure 7The terminal device may generate a first acquisition request in response to the content processing instruction, and the first acquisition request is used to request to obtain negative indication information of the target region from the first database in the cloud device. Exemplarily, the region identifier of the target region may be included in both the content processing instruction and the first acquisition request, so the cloud device may send the negative indication information of the target region to the terminal device in response to the first acquisition request.

[0218] After the negative indication information is obtained, there are certain differences in the subsequent processing between the implementation method 1 and the implementation method 2 introduced above, so these two situations are described separately below.

[0219] First, in the first implementation, the content processing command is used to instruct to return the first content among multiple selected contents, so it is necessary to ensure that the returned first content does not contain negative elements of the first region.

[0220] Reference Figure 7 , the content to be selected can be analyzed according to the processing model, so as to obtain the first indication information corresponding to the content to be selected, and the first indication information is used to indicate the elements contained in the content to be selected. Then, the first indication information corresponding to the content to be selected can be matched with the negative indication information of the target area, so as to determine whether the content to be selected includes negative elements.

[0221] Based on the above introduction, it can be determined that the negative indication information in this embodiment can be in the form of a label, so it can be understood that at least one first negative label is included in the negative indication information, and then matching processing can be performed based on the label. Alternatively, the negative indication information in this embodiment can also be in the form of a text, so it can be understood that at least one negative text is included in the negative indication information, and then the text can be converted into a corresponding vector, and then matching processing can be performed based on the vector.

[0222] The following describes the implementation of the matching process corresponding to the two implementation forms of the negative indication information introduced here:

[0223] In one implementation, if the negative indication information is in the form of a label, it can be understood that the negative indication information includes at least one first negative label. Figure 7 The processing model illustrated in the figure may be, for example, a classification model (that is, the first processing model introduced above). The classification model may convert element information in the content into corresponding label representations.

[0224] In a possible implementation, the classification model can output the label representation of all elements in the content, that is, output the corresponding label representation for both positive elements and negative elements. Alternatively, the classification model can also only output the label representation of negative elements in the content to reduce the amount of data for subsequent matching and improve processing efficiency.

[0225] Taking the case where the classification model only outputs the labels of negative elements as an example, specifically, the content to be selected can be input into the classification model to obtain the first indication information output by the classification model, and at least one second negative label is included in the first indication information. The second negative label is used to indicate the negative elements included in the content to be selected.

[0226] After that, when performing the matching process, for any first negative label in the negative indication information, it is determined whether there is a second negative label in the first indication information that is the same as the first negative label. If there is, the matching result is determined to be a successful match; or, if not, the matching result is determined to be a failed match.

[0227] It should be noted that the second negative labels output by the classification model and the negative labels in the first database are in the same label system. For example, when the first negative label is "345", the negative element indicated by it in the first database is negative element 1, and when the second negative label output by the classification model is "345", the negative element in the content to be selected indicated by it is also negative element 1.

[0228] Exemplarily, the classification model introduced in this embodiment can be understood as a traditional model. That is to say, the premise for the classification model to be able to output a certain negative label is that during the model training stage, the classification model has pre-learned the relevant features of the negative label, so as to be able to recognize the negative label and output the negative label.

[0229] Then when a new negative label is added to the target area in the first database, the classification model needs to be updated so that the classification model has the ability to recognize the newly added negative label.

[0230] Exemplarily, assuming that the classification model at a certain moment has the ability to recognize negative label 1, negative label 2, and negative label 3, then when the content to be selected contains the negative elements indicated by any one of negative label 1, negative label 2, and negative label 3, the classification model can recognize the corresponding negative elements and output the corresponding negative labels.

[0231] However, assuming that a new negative label 4 is added to the target area in the first database, and the terminal device obtains the negative label 4 from the cloud device. But because the classification model has not been trained to learn the negative label 4 during the model training stage, the current classification model does not have the ability to recognize the negative label 4. Then, even if the content to be selected contains the negative elements indicated by the negative label 4, the classification model cannot output the negative label 4.

[0232] If you want the classification model to have the ability to recognize the negative elements corresponding to the negative label 4, then the classification model needs to be updated. Among them, the implementation methods for updating the classification model can include the following two:

[0233] In the first implementation method, the classification model can be retrained on the cloud device side based on the training data containing the newly added negative label to obtain an updated classification model, where the updated classification model has the ability to recognize the newly added negative label. Then the cloud device can send the updated classification model to the terminal device to deploy the updated classification model in the terminal device to improve the recognition ability of the classification model in the terminal device for negative elements.

[0234] In the second implementation method, when the terminal device determines that there is a newly added negative label, the terminal device can obtain the training data containing the newly added negative label and retrain the classification model by itself based on this training data to obtain an updated classification model. Since in the current implementation method, the updated training of the classification model is completed by the terminal device, the updated classification model is directly deployed in the terminal device, and the updated classification model can recognize the newly added negative elements, so its recognition ability is also more perfect.

[0235] In another implementation method, if the negative indication information is in text form, it can be understood that at least one negative text is included in the negative indication information. Further, after the terminal device obtains at least one negative text from the cloud device, for each negative text, the negative text can be processed into a corresponding negative vector according to the encoder. The encoder can be, for example, a text encoder, or any encoder that can encode to obtain output data in vector form.

[0236] After the encoder processes, at least one negative text in the negative indication information can obtain its corresponding negative vector respectively. At this time Figure 7 The processing model shown in, for example, can be an analysis model (that is, the second processing model introduced above). Among them, the analysis model can convert the element information in the content into a corresponding vector representation, and the analysis model can also be understood as an encoder.

[0237] Specifically, the candidate content can be input into the analysis model to obtain the first indication information output by the analysis model. The first indication information includes at least one content vector, and the content vector is used to indicate the elements included in the candidate content. Exemplarily, the analysis model can output a corresponding content vector for each element in the candidate content, that is, one content vector corresponds to one element in the candidate content. Therefore, the first indication information in this embodiment includes at least one content vector.

[0238] In a possible implementation, when the cloud device provides negative indication information to the terminal device, it can first perform structured processing on each negative text, and then provide the structured negative text to the terminal device, so that the terminal device can more efficiently and conveniently obtain the negative vector corresponding to the negative text based on the encoder.

[0239] After that, when performing the matching process, the vector similarity between each negative vector and each content vector in the first indication information can be determined. Then, for any negative vector, it is judged whether there is a content vector in the first indication information whose vector similarity with the negative vector is greater than a preset threshold. If so, the matching result is determined to be a successful match; or, if not, the matching result is determined to be a failed match.

[0240] Among them, the negative indication information in text form is stored in the first database, and then the negative indication information in text form is converted into the corresponding negative vector, and then the matching of negative elements is realized based on the vector. There are the following two advantages:

[0241] The first aspect is that the vector form has better semantic extensibility than the text form. For example, there is a negative element "black cat" in a certain area. At the text level, the two expressions "black cat" and "completely black cat" may result in a failed match because they are not exactly the same. However, at the vector level, since the vector similarity between the two expressions "black cat" and "completely black cat" is compared, the match is achieved. That is to say, performing the matching process based on the negative indication information in vector form can achieve approximate semantic matching, and it has better semantic coverage for both the current introduced matching process and the subsequent introduced content generation process.

[0242] The second aspect is that the analysis model in this embodiment is a model responsible for converting the element information in the content into the corresponding vector representation. Among them, the content vector output by the analysis model mainly depends on what elements are included in the content to be selected, rather than what negative elements are stored in the first database.

[0243] Exemplarily, the analysis model in this embodiment can be understood as a large model, where the large model refers to a neural network model containing a huge number of parameters, and has the characteristics of large scale, multi-task learning, powerful computing resources, and rich data. It should be noted that the "huge scale" introduced here can be understood as the number of parameters of the model exceeding one billion, but in the actual implementation process, the threshold for measuring the number of parameters of the large model can be selected according to actual needs, and this embodiment does not limit this.

[0244] Based on the understanding that the analysis model in this embodiment is based on a large model, it can be understood that the knowledge learned by the analysis model itself in this embodiment is very extensive. Generally, the knowledge learned by the analysis model can cover the elements included in the candidate content. Therefore, the elements included in the candidate content can be directly converted into corresponding vector representations.

[0245] Furthermore, since the analysis model itself can convert all the elements included in the candidate content into corresponding vector representations and then output a content vector. Then, when a certain negative element is newly added to the first database for a target region, there is no need to perform additional updates and training on the analysis model. As long as the candidate content includes this negative element, the analysis model can output the content vector corresponding to this negative element.

[0246] Therefore, when a new negative element appears, only the negative text corresponding to this negative element needs to be added to the first database for this region. After that, in the matching stage, the matching between the negative vector corresponding to the newly added negative text and the content vector can be achieved, so as to realize the determination of the negative elements included in the candidate content.

[0247] In summary, based on the implementation of vector matching, when a new negative element appears, only the corresponding negative text needs to be added to the first database for the region. Because the analysis model itself can output the content vector corresponding to this negative element, and based on vector matching, it can also achieve matching for expressions with similar semantics but not exactly the same words. Therefore, it can quickly and effectively identify whether the candidate content contains newly added negative elements.

[0248] Exemplarily, when determining whether the candidate content contains negative elements based on the matching result, reference can be made to Figure 7 , when the matching result is a successful match, it can be determined that the candidate content contains negative elements, and correspondingly, the candidate content can be filtered out to avoid the output of content containing negative elements. And when the matching result is a failed match, it can be determined that the candidate content does not contain negative elements. Therefore, the candidate content can be provided to the user as the first content.

[0249] Next, the processing of implementation method two will be described. In implementation method two, the content processing command can instruct to generate the second content. Then, it is necessary to ensure that the generated second content does not contain negative elements of the first region.

[0250] Refer to Figure 7, the negative indication information obtained from the first database can be provided to the generation model, so that the negative indication information is used as a negative prompt, so that the generated content output by the generation model does not contain negative elements in the user's location area.

[0251] For the two different processing methods of negative indication information introduced above, there are also two different implementations in this embodiment. In one implementation, for example, the negative indication information in the form of tags (that is, at least one first negative tag) can be provided to the generation model. In another implementation, for example, at least one negative vector after processing the negative indication information can be provided to the generation model. The implementation of the negative vector can refer to the introduction in the above embodiment and will not be elaborated here.

[0252] In this embodiment, by obtaining the negative indication information of the target area where the user is located from the first database, and then guiding the generation model not to include the corresponding negative elements according to the negative indication information, or matching the negative indication information with the first indication information of the candidate content to determine whether to filter out the candidate content, it is possible to effectively ensure that the content provided by the terminal device does not contain negative elements in the user's location based on the implementation method of storing negative indication information in the database.

[0253] Based on the above introduction, the following will further introduce the implementation method of determining the vector similarity between the negative vector and the content vector when processing the negative indication information into a vector form in combination with Figure 8 Figure 5 is a schematic diagram of the implementation of vector matching provided by the embodiment of the present application. Figure 8 Figure 5 is a schematic diagram of the implementation of vector matching provided by the embodiment of the present application.

[0254] As Figure 8 shown, assuming that there are currently multiple literal expressions of negative elements, such as "element 1", "element 2", "element 3", and "element 4", etc., the cloud device can store the negative indication information in text form of these negative elements.

[0255] After that, when the cloud device provides negative indication information to the terminal device, referring to Figure 8 , for example, the negative indication information can be first structurally processed to obtain the structural expression of these negative indication information.

[0256] Taking the content as a picture as an example, the structured expression can be, for example, "a photo of a(object)". Here, the object can be, for example, the negative indication information in the text form of the negative element. For example, if the negative element is a black cat, the negative indication information in its text form is, for example, "black cat", then the corresponding object can be black cat. In the actual implementation process, the specific text expression of the negative indication information of the negative element can be selected according to actual needs.

[0257] After that, in the terminal device, based on the text encoder, text encoding is performed on the structured expression of the negative indication information, so as to obtain the negative vector corresponding to the negative indication information. Refer to Figure 8 , assuming that the negative vector corresponding to the negative indication information for "Element 1" is determined to be T1, and the negative vector corresponding to the negative indication information for "Element 2" is determined to be T2, and so on.

[0258] And, assuming that there is currently an image A as the content to be selected, and referring to Figure 8 , assuming that image A contains Element 3, then the image A can be encoded based on the above-introduced analysis model, so as to obtain the content vector I1 of image A, where the content vector I1 is used to indicate Element 3.

[0259] After that, the vector similarity between the content vector I1 and each negative vector can be confirmed in turn. For example, the vector similarity between the content vector I1 and the negative vector T1 is expressed as I1·T1 in Figure 8 , and the vector similarity between the content vector I1 and the negative vector T2 is expressed as I1·T2 in Figure 8 , and so on. Among them, "·" is used to represent the dot product calculation of vectors.

[0260] After that, each vector similarity is compared with a preset threshold. If there is a negative vector whose vector similarity is greater than the preset threshold, it can be determined that the match is successful. For example, in the Figure 8 example, assuming that the vector similarity I1·T3 between the content vector I1 and the negative vector T3 is greater than the preset threshold, it can be determined that the negative element 3 is included in the image A. Therefore, it can be determined that the matching result is a successful match, and accordingly, the image A can be filtered.

[0261] In this embodiment, by determining the vector similarity to perform the matching of negative elements, better semantic coverage and semantic extensibility can be achieved.

[0262] The content processing method of the embodiments of the present application has been described above. Next, the apparatus for executing the above content processing method provided by the embodiments of the present application will be described. Those skilled in the art can understand that the method and the apparatus can be combined and referenced with each other, and the related apparatus provided by the embodiments of the present application can execute the steps in the above content processing method.

[0263] Figure 9 Structural schematic of the content processing apparatus provided by the embodiments of the present application Figure 1 As Figure 9 shown, the apparatus 90 includes: a processing module 901 and an acquisition module 902;

[0264] The processing module 901 is configured to generate a content processing command in response to a content acquisition request of a user or a content providing instruction of a terminal device;

[0265] The acquisition module 902 is configured to acquire negative indication information of a target area from a first database in response to the content processing command, where the content processing command is used to indicate to return a first content among a plurality of candidate contents, and the negative indication information in the first database supports real-time configuration;

[0266] The processing module 901 is further configured to, for any one of the candidate contents, determine whether the candidate content contains a negative element according to the negative indication information;

[0267] The processing module 901 is further configured to, if so, filter out the candidate content, and if not, determine the candidate content as the first content.

[0268] In some implementation manners, the acquisition module 902 is specifically configured to:

[0269] Generate a first acquisition request in response to the content processing command;

[0270] Send the first acquisition request to a cloud device, where the first acquisition request is used to request to acquire the negative indication information of the target area from the first database in the cloud device.

[0271] In some implementation manners, the processing module 901 is specifically configured to:

[0272] Perform content analysis on the candidate content to obtain first indication information of the candidate content;

[0273] Match the first indication information with the negative indication information to obtain a matching result;

[0274] Determine whether the candidate content contains a negative element according to the matching result.

[0275] In some implementations, the negative indication information includes at least one first negative tag;

[0276] The processing module 901 is specifically configured to:

[0277] Input the candidate content into a classification model to obtain first indication information output by the classification model, where the first indication information includes at least one second negative tag, and the second negative tag is used to indicate negative elements included in the candidate content.

[0278] In some implementations, the processing module 901 is specifically configured to:

[0279] For any one of the first negative tags in the negative indication information, if there is a second negative tag in the first indication information that is the same as the first negative tag, determine that the matching result is a successful match; or,

[0280] If there is no second negative tag in the first indication information that is the same as the first negative tag, determine that the matching result is a failed match.

[0281] In some implementations, the negative indication information includes at least one negative text;

[0282] The processing module 901 is further configured to:

[0283] For any one of the negative texts, process the negative text into a corresponding negative vector according to an encoder;

[0284] The processing module 901 is specifically configured to:

[0285] Input the candidate content into an analysis model to obtain first indication information output by the analysis model, where the first indication information includes at least one content vector, and the content vector is used to indicate elements included in the candidate content.

[0286] In some implementations, the processing module 901 is specifically configured to:

[0287] Determine the vector similarity between each of the negative vectors and each of the content vectors in the first indication information;

[0288] For any one of the negative vectors, if there is a content vector in the first indication information whose vector similarity to the negative vector is greater than a preset threshold, determine that the matching result is a successful match; or,

[0289] If there is no content vector in the first indication information whose vector similarity to the negative vector is greater than a preset threshold, determine that the matching result is a failed match.

[0290] In some implementations, the content processing command is used to instruct the generation of second content, and the processing module 901 is further configured to:

[0291] Provide the negative indication information to the generation model so that the second content generated by the generation model does not contain negative elements.

[0292] The device provided in this embodiment can be used to execute the technical solutions of the above method embodiments, and its implementation principle and technical effects are similar, which will not be elaborated in this embodiment.

[0293] Figure 10 This is a schematic structural diagram of the content processing device provided in the embodiments of the present application Figure 2 As Figure 10 shown, the device 100 includes: a transceiver module 1001 and a processing module 1002;

[0294] The transceiver module 1001 is configured to receive a first acquisition request sent by a terminal device;

[0295] The processing module 1002 is configured to obtain negative indication information of a target area from a first database according to the first acquisition request. The first database includes negative indication information corresponding to multiple areas respectively, and the negative indication information in the first database supports real-time configuration;

[0296] The transceiver module 1001 is further configured to send the negative indication information to the terminal device, and the negative indication information is used to indicate that the content provided by the terminal device does not contain negative elements corresponding to the negative indication information.

[0297] In some implementations, the processing module 1002 is further configured to:

[0298] In response to an update instruction for a first area, add new negative indication information for the first area in the first database.

[0299] In some implementations, the processing module 1002 is further configured to:

[0300] Obtain target news information of the first area from a first interface;

[0301] Perform semantic analysis on the target news information to obtain new negative elements of the first area, and determine new negative indication information corresponding to the new negative elements;

[0302] Generate the update instruction according to the area identifier of the first area and the new negative indication information.

[0303] In some implementations, the processing module 1002 is further configured to:

[0304] When there is new news information in the first region, receive the new news information sent by the first interface, where the target news information is the new news information; or,

[0305] Send a second acquisition request to the first interface, where the second acquisition request is used to request to acquire the news information corresponding to the first region within a historical period, and the target news information is the news information corresponding to the first region within the historical period.

[0306] In some implementation manners, the transceiver module 1001 is further configured to:

[0307] Receive feedback information sent by the terminal device, where the feedback information includes the region identifier of the first region, the feedback text, and the target content associated with the feedback information;

[0308] The processing module 1002 is further configured to:

[0309] Extract the to-be-processed negative elements according to the feedback text, and detect whether the target content includes the to-be-processed negative elements;

[0310] If so, generate to-be-processed negative indication information corresponding to the to-be-processed negative elements;

[0311] If the to-be-processed negative indication information is not stored in the first database for the first region, determine the to-be-processed negative indication information as the newly added negative indication information, and generate the update instruction.

[0312] The device provided in this embodiment can be used to execute the technical solutions of the above method embodiments, and its implementation principles and technical effects are similar, which will not be elaborated in this embodiment.

[0313] The content processing method provided in the embodiments of the present application can be applied to an electronic device with a communication function. The electronic device includes a terminal device and a cloud device. The specific device form of the terminal device and the like can refer to the above relevant descriptions, which will not be elaborated here.

[0314] Figure 11 It is a schematic hardware structure diagram of the electronic device provided in the embodiments of the present application.

[0315] As Figure 11 shown, the terminal device 110 includes: a processor 1101 and a memory 1102; the memory 1102 stores computer execution instructions; the processor 1101 executes the computer execution instructions stored in the memory 1102, so that the terminal device 110 executes the above method.

[0316] When the memory 1102 is independently provided, the terminal device further includes a bus 1103 for connecting the memory 1102 and the processor 1101.

[0317] An embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in the memory to execute the technical solutions in the above embodiments. The implementation principle and technical effects are similar to those in the above related embodiments, and will not be elaborated here.

[0318] An embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the above method is implemented. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted over a computer-readable medium as one or more instructions or code. The computer-readable medium can include a computer storage medium and a communication medium, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.

[0319] In a possible implementation, the computer-readable medium may include RAM, ROM, a compact disc read-only memory (CD-ROM), or other optical disc memories, magnetic disk memories, or other magnetic storage devices, or any other medium targeted to carry or store the required program code in the form of instructions or data structures and accessible by a computer. Moreover, any connection is properly referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. As used herein, disk and optical disc include optical disc, laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks typically reproduce data magnetically, while optical discs use lasers to optically reproduce data. The above combinations should also be included within the scope of the computer-readable medium.

[0320] An embodiment of the present application provides a computer program product. The computer program product includes a computer program, and when the computer program is run, it causes the computer to execute the above method.

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

[0322] In the above specific embodiments, the objectives, technical solutions, and beneficial effects of the present invention have been further described in detail. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the present invention shall be included in the protection scope of the present invention.

Claims

1. A content processing method, characterized in that, applied to a terminal device, the method comprising: responding to a user's content acquisition request or a content providing instruction of the terminal device to generate a content processing command; responding to the content processing command, obtaining negative indication information of a target area from a first database, the content processing command being used to indicate returning a first content among a plurality of candidate contents, wherein the negative indication information in the first database supports real-time configuration; for any one of the candidate contents, judging whether the candidate content contains a negative element according to the negative indication information; if so, filtering out the candidate content, if not, determining the candidate content as the first content.

2. The method according to claim 1, characterized in that, the responding to the content processing command and obtaining negative indication information of a target area from a first database includes: responding to the content processing command to generate a first acquisition request; sending the first acquisition request to a cloud device, the first acquisition request being used to request to obtain the negative indication information of the target area from the first database in the cloud device.

3. The method according to claim 1 or 2, characterized in that, the judging whether the candidate content contains a negative element according to the negative indication information includes: performing content analysis on the candidate content to obtain first indication information of the candidate content; matching the first indication information with the negative indication information to obtain a matching result; judging whether the candidate content contains a negative element according to the matching result.

4. The method according to claim 3, characterized in that, the negative indication information includes at least one first negative label; the performing content analysis on the candidate content to obtain first indication information of the candidate content includes: inputting the candidate content into a classification model to obtain first indication information output by the classification model, the first indication information including at least one second negative label, the second negative label being used to indicate the negative element included in the candidate content.

5. The method according to claim 4, characterized in that, the matching the first indication information with the negative indication information to obtain a matching result includes: for any one first negative label in the negative indication information, if there is a second negative label in the first indication information that is the same as the first negative label, determining that the matching result is a successful match; or, if there is no second negative label in the first indication information that is the same as the first negative label, determining that the matching result is a failed match.

6. The method according to claim 3, characterized in that, the negative indication information includes at least one negative text; the method further includes: for any one of the negative texts, processing the negative text into a corresponding negative vector according to an encoder; the performing content analysis on the candidate content to obtain first indication information of the candidate content includes: Input the to-be-selected content into an analysis model to obtain first indication information output by the analysis model, where the first indication information includes at least one content vector, and the content vector is used to indicate elements included in the to-be-selected content.

7. The method according to claim 6, wherein, matching the first indication information with the negative indication information to obtain a matching result includes: determining a vector similarity between each of the negative vectors and each of the content vectors in the first indication information; for any one of the negative vectors, if there is a content vector in the first indication information whose vector similarity with the negative vector is greater than a preset threshold, determining that the matching result is a successful match; or, if there is no content vector in the first indication information whose vector similarity with the negative vector is greater than the preset threshold, determining that the matching result is a failed match.

8. The method according to any one of claims 1-7, wherein, the content processing command is used to indicate the generation of second content, and the method further includes: providing the negative indication information to a generation model so that the second content generated by the generation model does not include negative elements.

9. A content processing method, wherein, applied to a cloud device, the method includes: receiving a first acquisition request sent by a terminal device; acquiring negative indication information of a target region from a first database according to the first acquisition request, where the first database includes negative indication information corresponding to multiple regions respectively, and the negative indication information in the first database supports real-time configuration; sending the negative indication information to the terminal device, where the negative indication information is used to indicate that the content provided by the terminal device does not include negative elements corresponding to the negative indication information.

10. The method according to claim 9, wherein, the method further includes: responding to an update instruction for a first region, adding new negative indication information for the first region in the first database.

11. The method according to claim 10, wherein, the method further includes: acquiring target news information of the first region from a first interface; performing semantic analysis on the target news information to obtain new negative elements of the first region, and determining new negative indication information corresponding to the new negative elements; generating the update instruction according to the region identifier of the first region and the new negative indication information.

12. The method according to claim 11, wherein, acquiring target news information of the first region from the first interface includes: when there is new news information in the first region, receiving the new news information sent by the first interface, where the target news information is the new news information; or, sending a second acquisition request to the first interface, where the second acquisition request is used to request to acquire news information corresponding to the first region within a historical period, and the target news information is the news information corresponding to the first region within the historical period.

13. The method according to claim 10, It is characterized in that The method further includes: Receiving feedback information sent by the terminal device, where the feedback information includes a regional identifier of the first region, feedback text, and target content associated with the feedback information; Extracting to-be-processed negative elements according to the feedback text, and detecting whether the target content contains the to-be-processed negative elements; If so, generating to-be-processed negative indication information corresponding to the to-be-processed negative elements; If the to-be-processed negative indication information is not stored in the first database for the first region, determining the to-be-processed negative indication information as the newly added negative indication information, and generating the update instruction.

14. An electronic device It is characterized in that Including: A processor and a memory; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the electronic device executes the method described in any one of claims 1-8 or claims 9-13.

15. A computer-readable storage medium storing a computer program It is characterized in that The computer program, when executed by a processor, implements the method described in any one of claims 1-8 or claims 9-13.

16. A computer program product It is characterized in that Including a computer program, when the computer program is run, it causes a computer to execute the method described in any one of claims 1-8 or claims 9-13.

Citation Information

Patent Citations

  • Information processing method and device, electronic equipment and storage medium

    CN111460285A

  • Information retrieval method, device and electronic equipment

    CN112084441A

  • Content recommendation method and device, storage medium and server

    CN113032686A

  • Information processing method, device, electronic equipment and storage medium

    CN113239257A

  • Searching for ideograms in an online social network

    US20160179967A1