Content processing method and electronic device

By configuring and updating negative element labels or vectors for each region in the database in real time, the problem of not being able to quickly identify sudden negative elements in existing technologies is solved, enabling accurate content filtering and improving user experience.

CN120144840BActive Publication Date: 2026-05-19HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2023-12-05
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies are unable to quickly identify and filter newly added negative elements in sudden areas, resulting in a poor user experience.

Method used

Configure negative element labels or vectors for each region in the database, and support real-time configuration. Identify and filter negative elements in the content through negative element labels or vectors.

Benefits of technology

Effectively identify and filter temporarily added negative elements to improve the accuracy of content delivery and avoid poor user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144840B_ABST
    Figure CN120144840B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a content processing method and an electronic device, which are applied to the technical field of terminals. The method comprises: in response to a content acquisition request of a user or a content providing instruction of a terminal device, generating a content processing command; in response to the content processing command, obtaining negative indication information of a target region from a first database, the content processing command being used to instruct returning a first content from a plurality of candidate contents, wherein the negative indication information in the first database supports real-time configuration; for any candidate content, judging whether the candidate content contains a negative element according to the negative indication information; if yes, filtering out the candidate content; and if no, determining the candidate content as the first content. In this way, by configuring the negative indication information in the first database in real time, the temporarily added negative element can be guaranteed, and the negative element appearing in the content provided by the terminal device can be effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to content processing methods and electronic devices. Background Technology

[0002] In applications that provide content such as images or text, it is essential to ensure that the content does not contain negative elements associated with a specific region in order to avoid creating a negative user experience.

[0003] Currently, related technologies typically involve pre-training recognition models to identify whether images or text contain negative elements. However, this approach cannot handle unforeseen circumstances. For example, if a new negative element suddenly appears in a region due to special circumstances, and the recognition model is unable to identify it in the short term, the content provided to users may contain negative elements, resulting in a poor user experience. Summary of the Invention

[0004] This application provides a content processing method and an electronic device, which are applied in the field of terminal technology.

[0005] Firstly, embodiments of this application propose a content processing method. Applied to a terminal device, the method includes:

[0006] In response to a user's content retrieval request or a content delivery instruction from the terminal device, generate content processing commands;

[0007] In response to a content processing command, negative indication information for the target region is obtained from a first database. The content processing command is used to indicate that the first content should be returned from multiple candidate contents. The negative indication information in the first database can be configured in real time.

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

[0009] If yes, then filter out the candidate content; otherwise, determine the candidate content as the first content.

[0010] In some implementations, in response to a content processing command, negative indication information for the target region is retrieved from a first database, including:

[0011] In response to the content processing command, a first fetch request is generated;

[0012] Send a first retrieval request to the cloud device. The first retrieval request is used to request the retrieval of negative indication information of the target region from the first database in the cloud device.

[0013] In some implementations, the determination of whether the candidate content contains negative elements is based on negative indication information, including:

[0014] The content to be selected is analyzed to obtain the first indication information of the content to be selected;

[0015] The matching result is obtained by matching the first indication information with the negative indication information;

[0016] Based on the matching results, determine whether the candidate content contains negative elements.

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

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

[0019] The candidate content is input into the classification model to obtain the first indication information output by the classification model. The first indication information includes at least one second negative label, which is used to indicate the negative elements included in the candidate content.

[0020] In some implementations, the first indication information is matched with the negative indication information to obtain the matching result, including:

[0021] For any first negative label in the negative indication information, if there is a second negative label in the first indication information that matches the first negative label, then the matching result is determined to be a successful match; or,

[0022] If there is no second negative label in the first indication information that matches the first negative label, then the matching result is determined to be a matching failure.

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

[0024] The method also includes:

[0025] For any negative text, the encoder processes the negative text into a corresponding negative vector;

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

[0027] The candidate content is 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, which is used to indicate the elements included in the candidate content.

[0028] In some implementations, the first indication information is matched with the negative indication information to obtain the matching result, including:

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

[0030] For any negative vector, if the first indication information contains a content vector with a vector similarity greater than a preset threshold to the negative vector, then the matching result is determined to be a successful match; or,

[0031] If there is no content vector in the first indication information that has a vector similarity greater than a preset threshold with the negative vector, then the matching result is determined to be a matching failure.

[0032] In some implementations, content processing commands are used to instruct the generation of second content; other methods include:

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

[0034] Secondly, embodiments of this application propose a content processing method. Applied to cloud devices, the method includes:

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

[0036] According to the first acquisition request, the negative indication information of the target region is obtained from the first database. The first database includes negative indication information corresponding to multiple regions. The negative indication information in the first database supports real-time configuration.

[0037] Send negative indication information to the terminal device. The negative indication information is used to indicate that the content provided by the terminal device does not contain the negative element corresponding to the negative indication information.

[0038] In some implementations, the method also includes:

[0039] In response to the update command for the first region, add new negative indication information for the first region in the first database.

[0040] In some implementations, the method also includes:

[0041] Obtain target news information for the first region from the first interface;

[0042] Semantic analysis is performed on the target news information to obtain newly added negative elements in the first region and to determine the newly added negative indication information corresponding to the newly added negative elements;

[0043] An update instruction is generated based on the region identifier of the first region and the newly added negative indication information.

[0044] In some implementations, target news information for a first region is obtained through a first interface, including:

[0045] When new news information exists 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 retrieval request to the first interface. The second retrieval request is used to request the news information corresponding to the first region within the historical time period, wherein the target news information is the news information corresponding to the first region within the historical time period.

[0047] In some implementations, the method also includes:

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

[0049] Extract the negative elements to be processed from the feedback text and detect whether the target content contains the negative elements to be processed.

[0050] If so, then generate the corresponding negative indication information to be processed for the negative element to be processed;

[0051] If the first database does not store any pending negative indication information for the first region, then the pending negative indication information will be identified as newly added negative indication information, and an update instruction will be generated.

[0052] Thirdly, embodiments of this application propose a content processing apparatus, including:

[0053] The processing module is used to generate content processing commands in response to user content retrieval requests or content provision instructions from terminal devices;

[0054] The acquisition module is used to retrieve negative indication information of the target region from the first database in response to the content processing command. The content processing command is used to instruct the first content to be returned from multiple candidate contents. The negative indication information in the first database can be configured in real time.

[0055] The processing module is also used to determine, based on the negative indication information, whether any candidate content contains a negative element for any candidate content.

[0056] The processing module is also used to filter out candidate content if the condition is met, and to determine candidate content as the first content if the condition is not met.

[0057] In some implementations, the acquisition module is specifically used for:

[0058] In response to the content processing command, a first fetch request is generated;

[0059] Send a first retrieval request to the cloud device. The first retrieval request is used to request the retrieval of negative indication information of the target region from the first database in the cloud device.

[0060] In some implementations, the processing module is specifically used for:

[0061] The content to be selected is analyzed to obtain the first indication information of the content to be selected;

[0062] The matching result is obtained by matching the first indication information with the negative indication information;

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

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

[0065] The processing module is specifically used for:

[0066] The candidate content is input into the classification model to obtain the first indication information output by the classification model. The first indication information includes at least one second negative label, which is used to indicate the negative elements included in the candidate content.

[0067] In some implementations, the processing module is specifically used for:

[0068] For any first negative label in the negative indication information, if there is a second negative label in the first indication information that matches the first negative label, then the matching result is determined to be a successful match; or,

[0069] If there is no second negative label in the first indication information that matches the first negative label, then the matching result is determined to be a matching failure.

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

[0071] The processing module is also used for:

[0072] For any negative text, the encoder processes the negative text into a corresponding negative vector;

[0073] The processing module is specifically used for:

[0074] The candidate content is 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, which is used to indicate the elements included in the candidate content.

[0075] In some implementations, the processing module is specifically used for:

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

[0077] For any negative vector, if the first indication information contains a content vector with a vector similarity greater than a preset threshold to the negative vector, then the matching result is determined to be a successful match; or,

[0078] If there is no content vector in the first indication information that has a vector similarity greater than a preset threshold with the negative vector, then the matching result is determined to be a matching failure.

[0079] In some implementations, content processing commands are used to instruct the generation of second content, and the processing module is also used for:

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

[0081] Fourthly, embodiments of this application provide a content processing apparatus, comprising:

[0082] The transceiver module is used to receive the first acquisition request sent by the terminal device;

[0083] The processing module is used to obtain negative indication information of the target region from the first database according to the first acquisition request. The first database includes negative indication information corresponding to multiple regions. The negative indication information in the first database supports real-time configuration.

[0084] The transceiver module is also used to send negative indication information to the terminal device. The negative indication information is used to indicate that the content provided by the terminal device does not contain the negative element corresponding to the negative indication information.

[0085] In some implementations, the processing module is also used for:

[0086] In response to the update command for the first region, add new negative indication information for the first region in the first database.

[0087] In some implementations, the processing module is also used for:

[0088] Obtain target news information for the first region from the first interface;

[0089] Semantic analysis is performed on the target news information to obtain newly added negative elements in the first region and to determine the newly added negative indication information corresponding to the newly added negative elements;

[0090] An update instruction is generated based on the region identifier of the first region and the newly added negative indication information.

[0091] In some implementations, the processing module is also used for:

[0092] When new news information exists 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,

[0093] Send a second retrieval request to the first interface. The second retrieval request is used to request the news information corresponding to the first region within the historical time period, wherein the target news information is the news information corresponding to the first region within the historical time period.

[0094] In some implementations, the send / receive module is also used for:

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

[0096] The processing module is also used for:

[0097] Extract the negative elements to be processed from the feedback text and detect whether the target content contains the negative elements to be processed.

[0098] If so, then generate the corresponding negative indication information to be processed for the negative element to be processed;

[0099] If the first database does not store any pending negative indication information for the first region, then the pending negative indication information will be identified as newly added negative indication information, and an update instruction will be generated.

[0100] Fifthly, embodiments of this application provide an electronic device, which can be a terminal device or a cloud device. The terminal device can also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. Terminal devices can be mobile phones, smart TVs, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and so on.

[0101] Cloud devices can include cloud servers, cloud server clusters, 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, causing the electronic device to perform the method as described in the first aspect or the second aspect.

[0103] Sixthly, embodiments of this application provide a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method as described in the first or second aspect.

[0104] In a seventh aspect, embodiments of this application provide a computer program product, which includes a computer program that, when run, causes a computer to perform the method as described in the first or second aspect.

[0105] Eighthly, embodiments of this application provide a chip, the chip including a processor, the processor being configured to invoke a computer program in memory to perform the methods as described in the first or second aspect.

[0106] It should be understood that the second to eighth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0107] Figure 1 Scenario illustration of the content provided in the embodiments of this application Figure 1 ;

[0108] Figure 2 Scenario illustration of the content provided in the embodiments of this application Figure 2 ;

[0109] Figure 3 This is a schematic diagram of the software structure of a terminal device provided in an embodiment of this application;

[0110] Figure 4 A schematic diagram illustrating the implementation of the first database provided in this application embodiment;

[0111] Figure 5 A schematic diagram illustrating the implementation of the generation and update instructions provided in this application embodiment;

[0112] Figure 6 This is a schematic diagram illustrating feedback provided for an embodiment of this application.

[0113] Figure 7 A schematic diagram of the processing flow of the content processing method provided in the embodiments of this application;

[0114] Figure 8 A schematic diagram illustrating the implementation of vector matching provided in an embodiment of this application;

[0115] Figure 9 Schematic diagram of the structure of the content processing apparatus provided in the embodiments of this application Figure 1 ;

[0116] Figure 10 Schematic diagram of the structure of the content processing apparatus provided in the embodiments of this application Figure 2 ;

[0117] Figure 11 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0118] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "exemplary" or "for example" are used in the embodiments of this application to indicate that they are examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0119] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0120] It should be noted that the phrase "at...time" in the embodiments of this application can refer to the instant at which a certain situation occurs, or to a period of time after the occurrence of a certain situation; the embodiments of this application do not specifically limit this. Furthermore, the display interface provided in the embodiments of this application is merely an example, and the display interface may include more or less content.

[0121] To better understand the technical solution of this application, the relevant technologies involved in this application will be further introduced below.

[0122] Currently, there are many application scenarios where terminal devices provide content to users, and this content can include one or more of text, images, audio, and video. Examples include the following scenarios:

[0123] 1. Users enter search keywords in a graphics application (such as a gallery), and the graphics application then returns images that match the search keywords.

[0124] 2. Display recommended wallpapers on the lock screen, desktop, or in graphical applications of the terminal device.

[0125] 3. Graphical applications select multiple images from a set of images on a terminal device according to certain rules and display the selected images within the application or on a widget on the desktop. For example, they can refer to the featured images or recommended images functions in a gallery application.

[0126] 4. Graphical applications select multiple images from a pool of images on a terminal device according to certain rules, and automatically generate a short video based on the selected images. For example, a short video can be generated based on images taken by a user while traveling in a certain area, or it can be generated based on images from a certain historical period.

[0127] 5. Some applications automatically generate smart captions based on user-provided images. The smart captions include text content associated with the user-selected image. Furthermore, videos can also be generated based on images and captions.

[0128] 6. Some applications automatically generate smart images based on user-input text. The resulting smart images include image content associated with the user's input text. Furthermore, videos can also be generated based on text and images.

[0129] 7. Graphical applications provide users with the function of generating portrait photos.

[0130] The scenarios described above can be categorized into scenarios where the terminal device proactively provides content to the user, and scenarios where the terminal device responds to the user's request and returns content to the user. It is understood that, in actual implementation, the application scenarios of the technical solution of this application are not limited to those described above; any scenario that can be categorized as the terminal device providing content to the user can adopt the technical solution provided in this application.

[0131] In scenarios where terminal devices provide content to users, based on the different cultures and customs of various regions, the terminal devices should try to avoid including negative elements related to the user's location in the content provided, thereby avoiding a poor user experience. These negative elements could be, for example, certain flags, animals, or body parts, depending on the specific circumstances of each region; this embodiment does not impose any limitations on this.

[0132] Furthermore, for each service provided by the terminal device, the content provided should be as accurate as possible, and inappropriate elements should be avoided. For example, for the "Highlights" service, suppose the function of this service is to select some high-quality images and generate videos based on these images.

[0133] For example, if a user casually takes a picture of an employee badge, this image should be avoided in the generated video because it doesn't align with the purpose of the "Highlights" feature. Therefore, it can be understood that a rule exists: employee badge elements are negative elements corresponding to the "Highlights" feature.

[0134] In actual implementation, each business has its own corresponding actual needs. Therefore, negative elements can be set for each business according to its actual situation.

[0135] The following example uses the first scenario described above, combined with... Figure 1 To explain, Figure 1 Scenario illustration of the content provided in the embodiments of this application Figure 1 .

[0136] like Figure 1 As shown, this illustrates the image search interface in a graphical application, where users can enter search keywords into the search box. (See reference...) Figure 1 Assuming the user enters the search keyword "flower" in search box 101, the graphics application can display at least one image that matches the search keyword "flower." For example, suppose the search results include... Figure 1 The images shown are 1 to 12.

[0137] Furthermore, assuming that element A is a negative element in the current user's location, if image 6 and image 11 contain element A, and the current search results display image 6 and image 11, it may have a negative impact on the user experience, such as making the user feel offended or disrespected.

[0138] Secondly, combine Figure 2 The third and fourth scenarios described above will be explained. Figure 2 Scenario illustration of the content provided in the embodiments of this application Figure 2 .

[0139] like Figure 2 As shown, assuming the "Moments" function in a graphics application is used to display images selected according to certain rules, and to display short videos composed of images selected according to certain rules, then it can be referred to... Figure 2 To understand this, in a graphical 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 position 201, and a short video formed by the recommended image can be displayed at position 202.

[0140] For example in Figure 2 In the example, recommended image 1 is displayed at position 201, and cover image 2 of short film 1 is displayed at position 202. This short film could be, for example, a short film composed of multiple images taken on November 23, 2023. Cover image 3 of short film 2 is displayed at position 203. This short film could be, for example, a short film composed of multiple images taken on the weekend of August 26, 2023.

[0141] If the recommended image 1, or short video 1, or short video 2 contains negative elements related to the user's location, it will also have a negative impact on the user experience, such as making the user feel offended or disrespected.

[0142] Therefore, processing negative elements in the content provided by terminal devices is a crucial step. Currently, related technologies typically involve pre-training a recognition model to identify whether images or text contain negative elements.

[0143] However, this implementation method cannot handle some unexpected situations. For example, if a new negative element temporarily appears in a region due to special circumstances (such as changes in culture or customs), the recognition model cannot acquire the ability to identify this negative element in the short term. It requires a large amount of training data and a long training process to be able to identify the new negative element. Therefore, the current implementation method may result in the content provided to users containing negative elements, leading to a poor user experience, and in some serious cases, it may trigger public opinion.

[0144] To address the aforementioned technical issues, this application proposes the following technical concept: Configuring labels or vectors for negative elements from various regions in a database, and then using these labels or vectors to prevent the provided content from containing negative elements. The labels or vectors in the database can be configured in real-time, thus effectively identifying and preventing the content from containing temporarily added negative elements.

[0145] The technical solution of this application is applied to terminal devices, for example, Figure 3 This is a schematic diagram of the software structure of a terminal device provided in an embodiment of this application.

[0146] like Figure 3 As shown, the layered architecture divides the software into several layers, each with a clear role and division of labor. 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 and system libraries, a hardware abstraction layer (HAL), and a kernel layer. It should be noted that this application uses the Android system as an example; however, the solution can also be implemented in other operating systems (such as HarmonyOS, iOS, etc.) as long as the functions implemented by each module are similar to those in the embodiments of this application.

[0147] The application layer can include a series of application packages.

[0148] like Figure 3 As shown, the application package may include applications such as camera, SMS, note-taking, and document editing. Of course, the application layer may also include other application packages, such as third-party applications like payment apps, shopping apps, banking apps, and social apps; this application does not limit this.

[0149] In this application, the application layer may further include a first service and a prompt service. The first service may include one or more of the following: image recommendation, image generation, video generation, etc.

[0150] For example, scenarios 2 or 3 described above can be understood as the image recommendation service described here. In some terminal devices, Figure 3 The image recommendation service in this example can be called "Highlights" or "This Day in the Past". This example does not limit the specific service type or name.

[0151] Furthermore, scenarios 4, 5, or 6 described above can be understood as the video generation service described here. On some terminal devices, Figure 3 The video generation service in this example can be called "one-click video creation". This example does not limit the specific service type or service name.

[0152] Furthermore, scenario 7 described above can be understood as the image generation service described here.

[0153] In actual implementation, the first service can be understood as a service used to provide content to users. The specific functions included in the first service are not limited to the various scenarios described in the above embodiments, and can be expanded according to actual needs.

[0154] Additionally, the prompting engineering is used to provide prompting information to the content generation processing model. This prompting information can include both positive and negative prompting information, so that the content generation processing model can output the content required by the system.

[0155] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions. For example, it may include an activity manager, window manager, content provider, view system, resource manager, notification manager, and camera server unit, etc., but this application embodiment does not impose any limitations on these.

[0156] The algorithm engine layer can include a first model and a second model for content classification, as well as a generative model for generating content. Content classification involves identifying whether the content contains negative elements. For example, 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. The generative model generates specified content based on the prompts provided by the prompting system, ensuring that the generated content does not contain negative elements.

[0157] System libraries can include multiple functional modules. For example: OpenCV, surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), camera services, etc.

[0158] The Android runtime consists of core libraries and a virtual machine, which is responsible for scheduling and managing the Android system.

[0159] The HAL layer is a wrapper around Linux kernel drivers, providing interfaces to the upper layers and shielding them from the implementation details of the lower-level hardware.

[0160] The HAL layer can include Wi-Fi HAL, audio HAL, camera service (Camera HALServer) unit, sensor HAL, and software code library, etc.

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

[0162] The technical solutions of the embodiments of this application and how the technical solutions of the embodiments of this application solve the above-mentioned technical problems will be described in detail below with reference to the accompanying drawings and specific examples. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0163] First, combine Figure 4 The first database in the cloud device will be described. Figure 4 This is a schematic diagram illustrating the implementation of the first database provided in an embodiment of this application.

[0164] like Figure 4 As shown, the first database can store negative indication information for multiple regions, where the negative indication information is used to indicate negative elements.

[0165] For example, the first database may store negative indication information that is universal across regions, where universal negative indication information refers to indication information that is negative in all regions. In addition, the first database may also store negative indication information specific to each region, such as negative indication information for region A, negative indication information for region B, negative indication information for region C, and so on.

[0166] Based on the above description, it can be determined that for each region, the terminal device can provide at least one service. These services may include, for example, the image recommendation service, image generation service, video generation service, etc., as described above. Therefore, furthermore, the negative indication information for each region can include general negative indication information for that region, as well as negative indication information corresponding to each of the at least one service provided by the terminal device for that region. This is understandable.

[0167] Among them, the general type of negative indication information is negative indication information that is applicable to all services provided by the terminal device for this region. For example, assuming that a certain general type of negative indication information 1 exists in region A, then the element indicated by negative indication information 1 should not appear in the output content of all services provided by the terminal device for region A.

[0168] Furthermore, the negative indication information corresponding to service n is the negative indication information corresponding to service n provided by the terminal device for this region, where n can be understood as a service identifier. For example, assuming that the negative indication information corresponding to service 1 in region A includes negative indication information 2, then the element indicated by 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 elements indicated by negative indication information 2 can appear in the output content of service 2 provided by the terminal device to region A.

[0170] exist Figure 4 The example provided uses region A to illustrate the configuration of negative indicator information. The configuration of negative indicator information for other regions is similar. Figure 4 Neither of these points will be elaborated upon here.

[0171] By configuring general-type negative indication information for each region in the first database, negative elements that are unsuitable for appearing in the content provided by various services can be uniformly configured. Furthermore, by configuring individual negative indication information for each service in each region separately in the first database, personalized negative indication information can be configured for each service, thereby improving the accuracy of each corresponding output content.

[0172] The negative indication information can be a label corresponding to the negative element, or it can be a vector corresponding to the negative element. Furthermore, the label corresponding to the negative element can be implemented as a number, letter, string, etc., and this embodiment does not impose any restrictions on this.

[0173] Taking a label where the negative indication information is in numerical form as an example, the negative indication information in the first database can be represented as follows:

[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] Here, "General," "A," "B," and "C" can be understood as region codes, and the negative labels in numerical form following each region code are used to indicate the corresponding negative element for each region. For example, the negative label "345" corresponding to region A can be used to indicate a specific negative element (such as a specific flag or a specific animal). For instance, each negative indication can be associated with its corresponding business information. For example, for the general type of negative indication described above, the associated business information could be "General." And for the negative indication of business n described above, the associated business information could be "Business n."

[0181] In addition to the tag format described above, the negative indication information stored in the first database can also be in text format. For example, if "black cat" is a negative element in a certain region, then the text associated with "black cat" can be stored directly in the first database for that region, and the negative indication information for that region would include the text of "black cat". This embodiment does not limit the specific format of the negative indication information stored in the first database.

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

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

[0184] The cloud device can then respond to the update command and add new negative indication information for the first region in the first database. When new negative elements appear in the first region due to unforeseen circumstances, timely addition of the corresponding new negative indication information to the first database can quickly provide a basis for handling negative elements in content processing.

[0185] Furthermore, in addition to instructing the addition of new negative indication information for the first region in the first database, the update command can also be used to instruct the deletion of certain negative indication information corresponding to the first region in the first database, and can also be used to instruct the modification of certain negative indication information corresponding to the first region in the first database, so as to ensure the simplicity and correctness of the negative indication information in the first database. Its processing method is similar to the implementation method of adding negative indication information.

[0186] Based on the above introduction, the prerequisite for a cloud device to generate the first database in response to an update command is that the cloud device must first generate an update command. The following section will introduce several possible scenarios for generating update commands.

[0187] Scenario 1: Generate update instructions based on news information

[0188] Generally, when changes occur in a region's culture or customs, causing certain elements to become negative for that region, news reports usually follow. Therefore, a primary interface for retrieving news information can be set up in a cloud device, where the data source accessed by this primary interface can be, for example, a designated news website.

[0189] You can refer to Figure 5 To understand, Figure 5 This is a schematic diagram illustrating the implementation of the generation and update instructions provided in an embodiment of this application.

[0190] like Figure 5 As shown, a first interface is provided in the cloud device. For example, the cloud device can obtain news information from news website A through the first interface. The news information can be in the form of text and images, 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 target news information for the first region from the first interface. The target information can be newly added news information in the first region in real time, or it can be news information for the first region in historical time periods.

[0192] In one possible implementation, when new news information emerges in the first region in real time, the news website can proactively push the new news information to the cloud device through a first interface. In this case, the first interface proactively provides the new news information to the cloud device; the target news information is the new news information described here. By obtaining the new news information from the first region, negative elements arising from the development of events can be added to the first database.

[0193] Alternatively, the cloud device can periodically send a second retrieval request to the first interface at a preset interval. This second retrieval request requests news information corresponding to the first region within a historical time period. The historical time period can be all time periods before the current moment, or it can be a period of a certain duration before the current moment. In this case, the cloud device actively retrieves news information within the historical time period, and the target news information is precisely the news information within this historical time period. By retrieving news information for the first region within the historical time period, any missing negative elements can be added to the first database, thus ensuring the completeness of the negative elements in the first database.

[0194] Regardless of which of the above-described implementation methods the target news information is used in, after obtaining the target news information, the cloud device 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 first database stores the corresponding negative indication information for each candidate negative element for the first region. For candidate negative elements whose negative indication information is not stored in the first database, they can be identified as newly added negative elements, and their corresponding negative indication information can be identified as newly added negative indication information.

[0196] Then, based on the region identifier of the first region and the newly added negative indication information of the first region, an update instruction can be generated. The corresponding update instruction is used to instruct the addition of new negative indication information for the first region in the first database, thereby adding the indication information of newly added or missed negative elements to the first database, and thus providing a relatively complete basis for processing negative elements for subsequent data content processing.

[0197] Scenario 2: Generate update instructions based on user feedback

[0198] In some abnormal situations, even with the support of content processing mechanisms, negative elements related to the user's location may still appear in the content provided to the user. In such cases, the user can provide feedback through their terminal device, and the application can update the first database based on the user's feedback.

[0199] For example, you can refer to Figure 6 To understand, Figure 6 This is a schematic diagram illustrating feedback provided for an embodiment of this application.

[0200] like Figure 6 As shown, assuming a wallpaper recommendation scenario, the first application on the terminal device can display something like this: Figure 6 The wallpaper recommendation interface shown in (a) includes at least one wallpaper image recommended to the user. For example, the user can swipe on the wallpaper recommendation interface to browse multiple recommended wallpaper images.

[0201] Assuming the currently recommended wallpaper image includes image 1, and assuming image 1 contains element A, where element A is a negative element representing the user's location, the user can trigger the display by manipulating the operation control 601 in the wallpaper recommendation interface. Figure 6 The “View Details” and “Feedback” function controls are shown in (a) above.

[0202] Furthermore, the first application can respond to user actions on the "feedback" function controls and display... Figure 6 The feedback interface is shown in (b) above. Figure 6 As shown, the feedback interface can display the object of feedback so that users can determine what specific content they are providing feedback on. The feedback interface can also display an input box so that users can enter specific feedback opinions.

[0203] In actual implementation, additional controls can be added to the feedback interface according to specific needs. Figure 6 The description provided does not constitute a limitation on the feedback interface.

[0204] After completing the feedback form, users can click the submit button on the feedback interface to send feedback information to the cloud device. The feedback information can include the user's location (region identifier), the feedback text, and the target content associated with the feedback. The feedback text can be, for example, the text entered by the user in the input box described above, or it can be descriptive text generated based on the user's selection of the control on the feedback interface. The target content is the specific content that the feedback was initiated for.

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

[0206] If the target content is determined to contain a negative element to be processed, then the corresponding negative indication information to be processed can be generated. Next, it is determined whether 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 needed for this negative indication information. If it is not stored in the first database, then this negative indication information can be used as newly added negative indication information, and an update instruction can be generated based on 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] Scenario 3: Manually generate update commands

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

[0210] Based on the implementation of the first database described above, the following section combines... Figure 7 A detailed introduction to the content processing process in terminal devices is provided. Figure 7 This is a schematic diagram of the processing flow of the content processing method provided in the embodiments of this application.

[0211] like Figure 7 As shown, the terminal device can generate content processing commands in response to a user's content retrieval request or a content provision instruction from the terminal device.

[0212] Content retrieval requests are initiated by users to trigger corresponding content processing. Examples include the search content and portrait generation scenarios mentioned above, where users initiate content retrieval requests. Conversely, content provision instructions are initiated by terminal devices to trigger corresponding content processing. Examples include wallpaper recommendations and short video generation scenarios mentioned above, where terminal devices initiate content provision instructions.

[0213] Whether it's a content retrieval request or a content provision instruction, the purpose is to perform corresponding content processing. Therefore, in response to a content retrieval request or a content provision instruction, a content processing command can be generated.

[0214] There are two ways to implement the content processing command. In the first method, the content processing command can instruct the user to return the first content among multiple candidate content. For example, in the image search scenario described above, it would return the first image among multiple candidate images. Similarly, in the wallpaper recommendation scenario described above, it would return the first wallpaper among multiple candidate wallpapers in the wallpaper library.

[0215] In the second implementation method, the content processing command can instruct the generation of second content. For example, in the cases of image generation, intelligent captioning, and intelligent image matching mentioned above, the terminal device generates entirely new second content.

[0216] Regardless of the type of content processing command, the terminal device can respond to the content processing command and obtain negative indication information of the target region from the first database.

[0217] For example, you can refer to Figure 7The terminal device can respond to a content processing instruction by generating a first acquisition request. This first acquisition request requests negative indication information of the target region from a first database in the cloud device. For example, both the content processing instruction and the first acquisition request can include a region identifier for the target region; therefore, the cloud device can respond to the first acquisition request by sending the negative indication information of the target region to the terminal device.

[0218] After obtaining the negative indication information, there are some differences in the subsequent processing for the first and second implementation methods described above. Therefore, the following will explain these two cases separately.

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

[0220] Reference Figure 7 The processing model can perform content analysis on the candidate content to obtain the first indication information corresponding to the candidate content. The first indication information is used to indicate the elements contained in the candidate content. Then, the first indication information corresponding to the candidate content can be matched with the negative indication information of the target area to determine whether the candidate content includes negative elements.

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

[0222] The following section describes the matching processes for the two implementations of the negative indication information presented here:

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

[0224] In one possible implementation, the classification model can output label representations for all elements in the content, that is, outputting corresponding label representations for both positive and negative elements. Alternatively, the classification model can output only the label representations for negative elements in the content, thereby reducing the amount of data for subsequent matching and improving processing efficiency.

[0225] The following example illustrates how a classification model outputs only negative element labels. Specifically, the candidate content can be input into the classification model to obtain the first indication information output by the classification model. The first indication information includes at least one second negative label, which is used to indicate the negative elements included in the candidate content.

[0226] During 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 matches the first negative label. If it exists, the matching result is determined to be a successful match; otherwise, the matching result is determined to be a failed match.

[0227] It should be noted that the second negative label 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 corresponding negative element in the first database is negative element 1. Similarly, when the second negative label output by the classification model is "345", the negative element in the candidate content it indicates is also negative element 1.

[0228] For example, the classification model described in this embodiment can be understood as a traditional model. That is, the prerequisite for the classification model to output a negative label is that the classification model has learned the relevant features of the negative label in advance during the model training phase, so that it can have the ability to recognize the negative label and output the negative label.

[0229] Therefore, when a new negative label is added to the target region in the first database, the classification model needs to be updated so that it can recognize the new negative label.

[0230] For example, suppose that at a certain moment the classification model has the ability to recognize negative label 1, negative label 2 and negative label 3. Then when the candidate content contains any of the negative elements indicated by negative label 1, negative label 2 and negative label 3, the classification model can recognize the corresponding negative element and output the corresponding negative label.

[0231] However, suppose a negative label 4 is added to the target region in the first database, and the terminal device obtains this negative label 4 from the cloud device. But because the classification model was not trained on the negative label 4 during the model training phase, the current classification model does not have the ability to recognize the negative label 4. Therefore, even if the candidate content contains the negative element indicated by the negative label 4, the classification model cannot output the negative label 4.

[0232] To enable the classification model to recognize the negative element corresponding to the negative label 4, the classification model needs to be updated. There are two main ways to update the classification model:

[0233] In the first implementation, the classification model can be retrained on the cloud device side based on training data containing the newly added negative labels to obtain an updated classification model. This updated model has the ability to recognize the new negative labels. The cloud device can then distribute the updated classification model to the terminal device, thereby deploying the updated model on the terminal device and improving its ability to recognize negative elements.

[0234] In implementation method two, when the terminal device determines that a new negative label exists, it can obtain training data containing the new negative label and retrain the classification model based on this training data to obtain an updated classification model. Because the current implementation method involves the terminal device updating and training the classification model, the updated classification model is directly deployed on the terminal device. Furthermore, the updated classification model can recognize the new negative element, thus its recognition capability is more complete.

[0235] In another implementation, if the negative indication information is in text form, it can be understood that the negative indication information includes at least one negative text. Furthermore, after the terminal device obtains at least one negative text from the cloud device, it can process each negative text into a corresponding negative vector using an encoder. The encoder can be, for example, a text encoder, or any encoder capable of encoding output data in vector form.

[0236] After the encoder processes the data, the negative vector corresponding to at least one negative text in the negative indication information can be obtained. Figure 7 The processing model illustrated can be, for example, an analysis model (i.e., the second processing model described above). The analysis model can convert element information in the content into corresponding vector representations; it 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, which is used to indicate the elements included in the candidate content. For example, 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 one possible implementation, when the cloud device provides negative indication information to the terminal device, it can first perform structured processing on each negative text separately, and then provide the structured negative text to the terminal device so that the terminal device can obtain the negative vector corresponding to the negative text more efficiently and conveniently based on the encoder.

[0239] During 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 determined whether there is a content vector in the first indication information whose vector similarity to the negative vector is greater than a preset threshold. If there is, the matching result is determined to be a successful match; otherwise, the matching result is determined to be a failed match.

[0240] The first database stores negative indication information in text form. This textual negative indication information is then converted into corresponding negative vectors, and finally, negative element matching is performed based on these vectors. This approach offers the following two advantages:

[0241] Firstly, vector representation offers better semantic extensibility compared to text representation. For example, consider a region where a negative element is "black cat." At the text level, the expressions "black cat" and "all-black cat" are not entirely identical, potentially leading to a matching failure. However, at the vector level, since the comparison focuses on the vector similarity between "black cat" and "all-black cat," a match is achieved. In other words, matching based on negative indicative information in vector form can achieve near-semantic matching, and it offers better semantic coverage for both the current matching process and subsequent content generation.

[0242] Secondly, the analysis model in this embodiment is responsible for converting the element information in the content into corresponding vector representations. The content vector output by the analysis model mainly depends on what elements are included in the candidate content, rather than on what negative elements are stored in the first database.

[0243] For example, the analysis model in this embodiment can be understood as a large model, where a large model refers to a neural network model containing a very large number of parameters, characterized by its massive scale, multi-task learning, powerful computing resources, and abundant data. It should be noted that "very large scale" as described here can be understood as the number of parameters in the model exceeding one billion. However, in actual implementation, the threshold used to measure the number of parameters in a large model can be selected according to actual needs, and this embodiment does not impose any restrictions on this.

[0244] Based on the large-scale analysis model in this embodiment, it can be understood that the analysis model itself has learned a very broad range of knowledge. Generally, the knowledge learned by the analysis model can cover all the elements included in the candidate content, so the elements included in the candidate content can be directly converted into corresponding vector representations.

[0245] Furthermore, because the analysis model itself can convert all elements included in the candidate content into corresponding vector representations and then output a content vector, when a negative element is added to the first database for a target region, no additional updates or training are needed for the analysis model. As long as the candidate content includes that negative element, the analysis model can output the content vector corresponding to that negative element.

[0246] Therefore, when a new negative element appears, it is only necessary to add the corresponding negative text for that negative element to the first database for that region. Then, in the matching stage, the negative vector corresponding to the newly added negative text can be matched with the content vector, thereby enabling the determination of the negative elements included in the selected content.

[0247] In summary, the implementation of vector-based matching allows for the addition of corresponding negative text to the first database when a new negative element appears. This is because the analysis model itself can output the content vector corresponding to the negative element, and vector-based matching can also match semantically similar but not entirely identical textual expressions. Therefore, it can quickly and effectively identify whether the candidate content contains a new negative element.

[0248] For example, when determining whether the candidate content contains negative elements based on the matching results, one can refer to... Figure 7 When the matching result is successful, it can be determined that the candidate content contains negative elements, and the candidate content can be filtered out accordingly to avoid outputting content containing negative elements. Conversely, when the matching result is unsuccessful, it can be determined that the candidate content does not contain negative elements, and therefore the candidate content can be presented to the user as the first content.

[0249] Next, we will explain the processing of the second implementation method. In the second implementation method, the content processing command can instruct the generation of second content. Therefore, it is necessary to ensure that the generated second content does not contain negative elements of the first region.

[0250] Reference Figure 7The negative indication information obtained from the first database can be provided to the generative model, thereby using the negative indication information as a negative prompt, so that the generated content output by the generative model does not contain negative elements of the user's region.

[0251] Regarding the two different processing methods for negative indication information described above, this embodiment also has two different implementations. In one implementation, for example, negative indication information in the form of labels (i.e., at least one first negative label) 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 be referred to the description in the above embodiments, and will not be repeated here.

[0252] In this embodiment, by obtaining negative indication information of the user's target region from the first database, and then guiding the generation model to not contain 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 of 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 combine... Figure 8 This paper further introduces the implementation method for determining the vector similarity between the negative vector and the content vector when processing negative indication information into vector form. Figure 8 This is a schematic diagram illustrating the implementation of vector matching provided in an embodiment of this application.

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

[0255] Subsequently, when the cloud device provides negative indication information to the terminal device, it refers to... Figure 8 For example, the negative indication information can be structured first to obtain a structured expression of this negative indication information.

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

[0257] Subsequently, the structured representation of the negative indication information is text-encoded using a text encoder in the terminal device to obtain the negative vector corresponding to the negative indication information. (See reference...) Figure 8 Suppose that the negative vector corresponding to the negative indication information of "element 1" is determined as T1, the negative vector corresponding to the negative indication information of "element 2" is determined as T2, and so on.

[0258] And, assuming there is an image A as the candidate content, and referring to... Figure 8 Assuming that image A contains element 3, we can perform image encoding on image A based on the analysis model described above, thereby obtaining the content vector I1 of image A, where the content vector I1 is used to indicate element 3.

[0259] Next, the vector similarity between the content vector I1 and each negative vector can be confirmed sequentially. For example, the vector similarity between the content vector I1 and the negative vector T1 is... Figure 8 The similarity between the content vector I1 and the negative vector T2 is denoted as I1·T1. Figure 8 In this context, it is represented as I1·T2, etc. The "·" symbol is used to represent the dot product of vectors.

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

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

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

[0263] Figure 9 Schematic diagram of the structure of the content processing apparatus provided in the embodiments of this application Figure 1 .like Figure 9 As shown, the device 90 includes: a processing module 901 and an acquisition module 902;

[0264] Processing module 901 is used to generate content processing commands in response to a user's content retrieval request or a content provision instruction from a terminal device;

[0265] The acquisition module 902 is used to acquire negative indication information of the target region from the first database in response to a content processing command. The content processing command is used to instruct the return of the first content among multiple candidate content, wherein 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 contents contain a negative element based on the negative indication information;

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

[0268] In some implementations, the acquisition module 902 is specifically used for:

[0269] In response to the content processing command, a first fetch request is generated;

[0270] Send the first acquisition request to the cloud device. The first acquisition request is used to request the acquisition of negative indication information of the target region from the first database in the cloud device.

[0271] In some implementations, the processing module 901 is specifically used for:

[0272] The candidate content is analyzed to obtain the first indication information of the candidate content;

[0273] The first indication information is matched with the negative indication information to obtain a matching result;

[0274] Based on the matching results, determine whether the candidate content contains negative elements.

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

[0276] The processing module 901 is specifically used for:

[0277] The candidate content is input into a classification model to obtain first indication information output by the classification model. The first indication information includes at least one second negative label, which is used to indicate the negative elements included in the candidate content.

[0278] In some implementations, the processing module 901 is specifically used for:

[0279] For any first negative label in the negative indication information, if there is a second negative label in the first indication information that matches the first negative label, then the matching result is determined to be a successful match; or,

[0280] If there is no second negative label in the first indication information that matches the first negative label, then the matching result is determined to be a matching failure.

[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 given negative text, the encoder processes the negative text into a corresponding negative vector;

[0284] The processing module 901 is specifically used for:

[0285] The candidate content is 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, which is used to indicate the elements included in the candidate content.

[0286] In some implementations, the processing module 901 is specifically used for:

[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 of the negative vectors, if the first indication information contains a content vector with a vector similarity greater than a preset threshold to the negative vector, then the matching result is determined to be a successful match; or,

[0289] If there is no content vector in the first indication information that has a vector similarity greater than a preset threshold with the negative vector, then the matching result is determined to be a matching failure.

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

[0291] The negative indication information is provided to the generative model so that the second content generated by the generative model does not contain negative elements.

[0292] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again in this embodiment.

[0293] Figure 10 Schematic diagram of the structure of the content processing apparatus provided in the embodiments of this application Figure 2 .like Figure 10 As shown, the device 100 includes: a transceiver module 1001 and a processing module 1002;

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

[0295] Processing module 1002 is used to obtain negative indication information of a target region from a first database according to the first acquisition request. The first database includes negative indication information corresponding to multiple regions. 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, wherein the negative indication information is used to indicate that the content provided by the terminal device does not contain the negative element corresponding to the negative indication information.

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

[0298] In response to the update command for the first region, new negative indication information is added to the first database for the first region.

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

[0300] Obtain target news information for the first region from the first interface;

[0301] Semantic analysis is performed on the target news information to obtain newly added negative elements in the first region, and the newly added negative indication information corresponding to the newly added negative elements is determined.

[0302] The update instruction is generated based on the region identifier of the first region and the newly added negative indication information.

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

[0304] When new news information exists in the first region, the system receives the new news information sent by the first interface, wherein the target news information is the new news information; or,

[0305] A second acquisition request is sent to the first interface. The second acquisition request is used to request the acquisition of news information corresponding to the first region within a historical period, wherein the target news information is the news information corresponding to the first region within the historical period.

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

[0307] The system receives feedback information sent by the terminal device, the feedback information including 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 negative elements to be processed from the feedback text, and detect whether the target content contains the negative elements to be processed;

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

[0311] If the first database does not store the pending negative indication information for the first region, then the pending negative indication information is determined as the newly added negative indication information, and the update instruction is generated.

[0312] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again in this embodiment.

[0313] The content processing method provided in this application can be applied to electronic devices with communication functions. Electronic devices include terminal devices and cloud devices. The specific device form of the terminal device can be referred to the above-mentioned descriptions, and will not be repeated here.

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

[0315] like Figure 11 As 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, causing the terminal device 110 to perform the above-described method.

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

[0317] This application provides a chip. The chip includes a processor, which is used to call a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.

[0318] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, 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 one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately 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, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0320] This application provides a computer program product, which includes a computer program that, when run, causes a computer to perform the above-described method.

[0321] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0322] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A content processing method, characterized in that, Applied to a terminal device, the method includes: In response to a user's content retrieval request or a content delivery instruction from the terminal device, generate content processing commands; In response to a content processing command, negative indication information for a target region is retrieved from a first database. The content processing command instructs the return of the first content among multiple candidate contents. The first database includes negative indication information corresponding to multiple regions, and the negative indication information in the first database supports real-time configuration. The negative indication information in the first database includes newly added negative indication information for the first region, based on an update instruction for the first region. The update instruction for the first region is generated based on the region identifier of the first region and the newly added negative indication information corresponding to the newly added negative element. The newly added negative element is obtained based on the target news of the first region. For any of the candidate contents, determine whether the candidate contents contain negative elements based on the negative indication information; If yes, then the candidate content is filtered out; if no, then the candidate content is determined as the first content.

2. The method according to claim 1, characterized in that, The step of retrieving negative indication information of the target region from the first database in response to the content processing command includes: In response to the content processing command, a first fetch request is generated; Send the first acquisition request to the cloud device. The first acquisition request is used to request the acquisition of negative indication information of the target region from the first database in the cloud device.

3. The method according to claim 1 or 2, characterized in that, The step of determining whether the candidate content contains negative elements based on the negative indication information includes: The candidate content is analyzed to obtain the first indication information of the candidate content; The first indication information is matched with the negative indication information to obtain a matching result; Based on the matching results, determine whether the candidate content contains negative elements.

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

5. The method according to claim 4, characterized in that, The step of matching the first indication information with the negative indication information to obtain a matching result includes: For any first negative label in the negative indication information, if there is a second negative label in the first indication information that matches the first negative label, then the matching result is determined to be a successful match; or, If there is no second negative label in the first indication information that matches the first negative label, then the matching result is determined to be a matching failure.

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 given negative text, the encoder processes the negative text into a corresponding negative vector; The step of performing content analysis on the candidate content to obtain the first indication information of the candidate content includes: The candidate content is 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, which is used to indicate the elements included in the candidate content.

7. The method according to claim 6, characterized in that, The step of matching the first indication information with the negative indication information to obtain a matching result includes: Determine the vector similarity between each of the negative vectors and each of the content vectors in the first indication information; For any of the negative vectors, if the first indication information contains a content vector with a vector similarity greater than a preset threshold to the negative vector, then the matching result is determined to be a successful match; or, If there is no content vector in the first indication information that has a vector similarity greater than a preset threshold with the negative vector, then the matching result is determined to be a matching failure.

8. The method according to any one of claims 1-7, characterized in that, The content processing command is used to instruct the generation of second content, and the method further includes: The negative indication information is provided to the generative model so that the second content generated by the generative model does not contain negative elements.

9. A content processing method, characterized in that, Applied to cloud devices, the method includes: Receive the first acquisition request sent by the terminal device; According to the first acquisition request, negative indication information of the target region is obtained from the first database. The first database includes negative indication information corresponding to multiple regions. The negative indication information in the first database supports real-time configuration. The negative indication information is sent to the terminal device, wherein the negative indication information is used to indicate that the content provided by the terminal device does not contain the negative element corresponding to the negative indication information; The method further includes: Based on the target news information of the first region, the newly added negative elements of the first region are obtained, and the newly added negative indication information corresponding to the newly added negative elements is determined; Based on the region identifier of the first region and the newly added negative indication information, an update instruction is generated for the first region; In response to the update instruction, new negative indication information is added to the first database for the first region.

10. The method according to claim 9, characterized in that, The step of obtaining newly added negative elements in the first region based on the target news information of the first region includes: Obtain target news information for the first region from the first interface; Semantic analysis is performed on the target news information to obtain newly added negative elements in the first region.

11. The method according to claim 10, characterized in that, Obtaining target news information for the first region through the first interface includes: When new news information exists in the first region, the system receives the new news information sent by the first interface, wherein the target news information is the new news information; or, A second acquisition request is sent to the first interface. The second acquisition request is used to request the acquisition of news information corresponding to the first region within a historical period, wherein the target news information is the news information corresponding to the first region within the historical period.

12. The method according to claim 9, characterized in that, The method further includes: The system receives feedback information sent by the terminal device, the feedback information including the region identifier of the first region, the feedback text, and the target content associated with the feedback information; Extract the negative elements to be processed from the feedback text, and detect whether the target content contains the negative elements to be processed; If so, then generate the negative indication information corresponding to the negative element to be processed; If the first database does not store the pending negative indication information for the first region, then the pending negative indication information is determined as the newly added negative indication information, and the update instruction is generated.

13. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the electronic device to perform the method as claimed in any one of claims 1-8 or 9-12.

14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-8 or 9-12.

15. A computer program product, characterized in that, Includes a computer program that, when run, causes a computer to perform the method as claimed in any one of claims 1-8 or 9-12.