Data processing method and device, electronic equipment and storage medium
Through the goal prediction model based on the large language model, the target prediction model outputs category information and adjusts parameters, the problem of high cost and low efficiency in the expansion of business scenarios of Internet products is solved, and efficient cross-scene category information determination and functional expansion are achieved.
Patent Information
- Application Number
- CN202410194330.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-21
- Publication Date
- 2025-08-26
AI Technical Summary
The prior art has high cost and low efficiency in the expansion of business scenarios and usage functions of Internet products, making it difficult to adapt to the expansion of functions in different business scenarios quickly and efficiently.
By obtaining the to-process corpus in the target scenario, using the target prediction model based on the large language model to output category information, adjust the preset model parameters, and realize heterogeneous object matching. The target prediction model is trained based on at least two sample sets, and the sample set corresponds one by one to the preset business scenarios. The classification granularity of the object set constitutes the object category is greater than the sample category information.
It improves the efficiency and convenience of training target prediction models, enhances the adaptability of the model, supports cross-scenario category information determination, reduces costs, and realizes the expansion of business scenarios and functions of Internet products.
Smart Images

Figure CN120541531A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet communication technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art
[0002] With the development of Internet communication technology, various Internet products have emerged one after another. Different Internet products can provide users with usage functions in different business scenarios. At the same time, the business scenarios corresponding to an Internet product can be expanded, and the usage functions in the corresponding business scenarios can be expanded. For such expansion, related technologies often perform specialized sample labeling and model training for the Internet product, so as to utilize the trained model to support the above expansion. However, this method of coping with the expansion of business scenarios and / or usage functions of Internet products in business scenarios is costly and inefficient. Therefore, it is necessary to provide a more convenient and efficient solution to adapt to the expansion of business scenarios and / or usage functions of Internet products in business scenarios. Summary of the Invention
[0003] In order to solve at least one of the above technical problems, the present application provides a data processing method, device, electronic device and storage medium:
[0004] According to a first aspect of the present application, a data processing method is provided, the method comprising:
[0005] Obtaining a corpus to be processed in a target scenario, the corpus to be processed indicating a target object, the target scenario and the target object respectively matching a preset business scenario and a preset object corresponding to a target sample set, the target sample set being any one of the at least two sample sets;
[0006] Taking the corpus to be processed as input, using a target prediction model to output corresponding target category information, so as to perform heterogeneous object matching for the target object based on the target category information;
[0007] In which, the target prediction model is trained based on the at least two sample sets, and is obtained by adjusting the parameters of the preset model based on the difference between the predicted category information and the sample category information during training. The prediction model is determined based on a large language model. The at least two sample sets correspond one-to-one to at least two of the preset business scenarios. The sample category information carried by each sample corpus in the sample set is determined based on the corresponding preset business scenario. The object set corresponds to at least two object categories. The object set is composed based on the preset objects corresponding to each of the at least two sample sets. The classification granularity corresponding to the object category is greater than the classification granularity corresponding to the sample category information.
[0008] According to a second aspect of the present application, a data processing device is provided, comprising:
[0009] An acquisition module is configured to acquire a corpus to be processed in a target scenario, wherein the corpus to be processed indicates a target object, and the target scenario and the target object respectively match a preset business scenario and a preset object corresponding to a target sample set, wherein the target sample set is any one of at least two sample sets;
[0010] Prediction module: used for taking the corpus to be processed as input, outputting corresponding target category information using a target prediction model, and performing heterogeneous object matching for the target object based on the target category information;
[0011] In which, the target prediction model is trained based on the at least two sample sets, and is obtained by adjusting the parameters of the preset model based on the difference between the predicted category information and the sample category information during training. The prediction model is determined based on a large language model. The at least two sample sets correspond one-to-one to at least two of the preset business scenarios. The sample category information carried by each sample corpus in the sample set is determined based on the corresponding preset business scenario. The object set corresponds to at least two object categories. The object set is composed based on the preset objects corresponding to each of the at least two sample sets. The classification granularity corresponding to the object category is greater than the classification granularity corresponding to the sample category information.
[0012] According to a third aspect of the present application, an electronic device is provided, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the at least one processor to implement the data processing method as described in the first aspect.
[0013] According to the fourth aspect of the present application, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the data processing method as described in the first aspect.
[0014] According to a fifth aspect of the present application, a computer program product is provided, which includes at least one instruction or at least one program segment, and the at least one instruction or at least one program segment is loaded and executed by a processor to implement the data processing method as described in the first aspect.
[0015] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.
[0016] The implementation of this application has the following beneficial effects:
[0017] The present application provides a solution for determining category information across scenarios. The determined category information can be used to expand the business function dimension of the current scenario, so as to achieve the expansion of business scenarios of Internet products and / or the expansion of usage functions under business scenarios. The present application predicts category information through a target prediction model. The target prediction model is trained with a large language model as the basic model, and the sample corpus used for training is object data from different preset business scenarios. The use of the large language model can improve the efficiency and convenience of training to obtain the target prediction model, and is also conducive to supporting and being compatible with sample corpora involving different business scenarios, carrying different sample category information, and indicating different categories of objects. At the same time, for training samples, support can be provided for the determination of category information across scenarios through the setting of data sources for at least two business scenarios and object category constraints, and the labeling requirements of sample category information. Compared with related technologies, the target prediction model obtained by training in the present application is more adaptable, and is more advantageous in terms of cost and efficiency for training the target prediction model.
[0018] Other features and aspects of the present application will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 A schematic diagram of an application environment according to an embodiment of the present application is shown;
[0021] Figure 2 A schematic diagram showing a flow chart of a data processing method according to an embodiment of the present application;
[0022] Figure 3 A schematic diagram showing a process of training and obtaining a target prediction model according to an embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram of a process for determining a preset model based on a large language model according to an embodiment of the present application is shown;
[0024] Figure 5 A schematic diagram of a process for determining a preset model based on a large language model according to an embodiment of the present application is also shown;
[0025] Figure 6A schematic diagram illustrating a process of obtaining at least two sample sets according to an embodiment of the present application is shown;
[0026] Figure 7 A schematic diagram of a process for model training according to an embodiment of the present application is shown;
[0027] Figure 8 Shows a block diagram of a device according to an embodiment of the present application;
[0028] Figure 9 A schematic diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0029] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0031] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0032] Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0033] The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
[0034] The term "and / or" herein simply describes an association relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can represent the existence of three situations: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.
[0035] In addition, numerous specific details are provided in the following detailed description to better illustrate the present application. Those skilled in the art will appreciate that the present application can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present application.
[0036] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0037] A large language model (LLM) is a computer model capable of processing and generating natural language. It represents a major advancement in artificial intelligence and has the potential to transform the field through its learned knowledge. LLMs can predict the next word or sentence by learning from the statistical patterns and semantic information of language data. Their capabilities improve as the input dataset and parameter space continue to expand. They are used in a variety of applications, such as robotics, machine learning, machine translation, speech recognition, and image processing, earning them the nickname "large multimodal language model" (MLLM).
[0038] Instruction Tuning: Instruction fine-tuning refers to generating a separate instruction for each task, fine-tuning it on several full-shot tasks, and then evaluating the generalization ability on a specific task (zeroshot). Usually, the pre-trained model parameters are unfrozen. This is usually performed on a large set of publicly available NLP task datasets to stimulate the language model's understanding ability. By giving more obvious instructions, the model can understand and provide correct feedback.
[0039] Prompt tuning: Prompt learning is a type of learning method in machine learning. It significantly improves model performance by adding "prompt information" to the input as information enhancement without significantly changing the structure and parameters of the pre-trained language model. It can be seen as an instruction for the task and a way to reuse the pre-training goals of a large model. Its essence is to enhance parameter effectiveness training. It generates prompt templates separately and then performs full-shot fine-tuning and evaluation on each task.
[0040] Reinforcement Learning with Human Feedback (RLHF) is an extension of reinforcement learning (RL) that incorporates human feedback into the training process, providing machines with a natural, human-like interactive learning process. In addition to reward signals, RLHF agents receive feedback from humans, learning with a broader perspective and higher efficiency, similar to how humans learn from the expertise of another person. By building a bridge between agents and humans, RLHF allows humans to directly guide machines and allows machines to master decision-making elements that are clearly embedded in human experience. As an effective alignment technique, RLHF can help mitigate the harmful content generated by large language models (LLMs) and improve information integrity to a certain extent.
[0041] Transformer: This model is based on an encoder-decoder architecture, consisting of two main components: an encoder and a decoder. It uses a self-attention mechanism for machine translation, achieving excellent results and offering fast training speed.
[0042] See also Figure 1 , Figure 1A schematic diagram of an application environment according to an embodiment of the present application is shown, and the application environment may include a terminal 10 and a server 20. The terminal 10 and the server 20 may be directly or indirectly connected via wired or wireless communication. The target object (such as a target user) sends a data processing request to the server 20 via the terminal 10. The server 20 obtains the corpus to be processed in the target scenario based on the received data processing request. The corpus to be processed indicates the target object. The target scenario and the target object are matched with the preset business scenario and preset object corresponding to the target sample set, respectively. The target sample set is any sample set in at least two sample sets; then, the corpus to be processed is used as input, the target prediction model is used to output the corresponding target category information, and heterogeneous object matching is performed for the target object based on the target category information. The target prediction model used is obtained by training through the following steps: first, a preset model is determined based on a large language model; then, at least two sample sets are obtained; furthermore, the sample corpus is used as input, and the preset model is used to output predicted category information; finally, based on the difference between the predicted category information and the sample category information, the preset model is parameter adjusted to obtain the target prediction model. Among them, at least two sample sets correspond to at least two preset business scenarios one-to-one, the sample category information carried by each sample corpus in the sample set is determined based on the corresponding preset business scenario, the object set corresponds to at least two object categories, and the object set is composed of the preset objects corresponding to the at least two sample sets. The classification granularity corresponding to the object category is greater than the classification granularity corresponding to the sample category information. It should be noted that Figure 1 Just an example.
[0043] Terminal 10 may be a physical device such as a smartphone, a computer (e.g., a desktop computer, tablet computer, or laptop computer), an augmented reality (AR) / virtual reality (VR) device, a digital assistant, an intelligent voice interaction device (e.g., a smart speaker), a smart wearable device, a smart home appliance, or an in-vehicle terminal. The operating system of terminal 10 may be Android, iOS (a mobile operating system developed by Apple), Linux, or Microsoft Windows. Clients such as instant messaging clients, browser clients, information streaming clients, video clients, and navigation clients may be installed on terminal 10.
[0044] The server end 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server may include a network communication unit, a processor, and a memory, etc.
[0045] In practical applications, the server end that trains the target prediction model using the training steps provided in the embodiments of the present application may be server end A, and the server end that processes the corpus to be processed using the data processing method provided in the embodiments of the present application may be server end B. Server end A and server end B may refer to the same server end or two different server ends. In addition, the terminal may also use the locally stored target prediction model to process the corpus to be processed.
[0046] The data processing method provided in the embodiments of the present application may be used in technologies related to artificial intelligence (AI). Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is the study of the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
[0047] It should be noted that for the unprocessed corpus, sample corpus, target category information, sample category information, etc. that are associated with user information, when the embodiments of this application are applied to specific products or technologies, user permission or consent must be obtained, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0048] Figure 2 A flow chart of a data processing method according to an embodiment of the present application is shown as follows: Figure 2 As shown, the data processing method can be executed by an electronic device, which can be a terminal or a server. The method includes:
[0049] S201: Acquire a corpus to be processed in a target scenario, where the corpus to be processed indicates a target object, and the target scenario and the target object respectively match a preset business scenario and a preset object corresponding to a target sample set, where the target sample set is any one of at least two sample sets;
[0050] In an embodiment of the present application, an electronic device obtains a corpus to be processed in a target scenario. The corpus to be processed is the corpus that needs to be processed. The form of the corpus to be processed may include text, images, audio, and video. Generally, the form of the corpus to be processed should be consistent with the form of the sample corpus. For example, if the sample corpus is a sample text, then the corpus to be processed is the text to be processed. In the case where the form of the corpus to be processed is inconsistent with the form of the sample corpus, the form of the corpus to be processed can be converted to obtain a candidate corpus. The form of the candidate corpus is consistent with the form of the sample corpus, and the candidate corpus will be used to input the target prediction model.
[0051] The target scenario is the business scenario corresponding to the corpus to be processed. According to different scenario classification rules, it can be considered that an Internet product (such as a client, platform, etc.) corresponds to a business scenario; it can also be considered that at least one usage function of an Internet product corresponds to a business scenario, such as the community function of platform A corresponds to business scenario 1, and the content publishing function corresponds to business scenario 2. Correspondingly, the corpus to be processed under the target scenario can be business data from related Internet products (Internet products corresponding to the target scenario); it can also be business data from related usage functions of related Internet products (usage functions of Internet products corresponding to the target scenario). Since the corpus to be processed indicates the target object, it can be understood that the target object is a business object in the target scenario, and the business object can be used as a basis for filtering out business data as the corpus to be processed from the business data pool, where the business data pool can represent the collection of all business data under the target scenario within a preset period. Taking the business scenario corresponding to an instant messaging client as an example, the business object can be an instant messaging account. Taking the business scenario corresponding to the content publishing function of an Internet product as an example, the business object can be the published content.
[0052] The target scenario and target object are matched with the preset business scenario and preset object corresponding to the target sample set, respectively. The target sample set is any sample set of at least two sample sets, so as to ensure the effectiveness of the subsequent application model for category information prediction. It can be understood that the category information prediction supported by the target prediction model has an effective range, and the effective range is constrained by at least two sample sets, that is, at least two preset business scenarios corresponding to the at least two sample sets, and the object category of each preset object in the object set. If the target scenario and target object are matched with the preset business scenario and preset object corresponding to the target sample set, respectively, since the target prediction model can support the category information prediction of the matched scenario and the matched object, then the target prediction model can also support the category information prediction of the target scenario and the target object to a certain extent.
[0053] Since the object set is composed of the preset objects corresponding to at least two sample sets, and the target sample set is any sample set from the at least two sample sets, whether the target object matches the preset object corresponding to the target sample set (hereinafter referred to as the target preset object) can be determined based on the relationship between the target object's object category and the target preset object's object category. If the two object categories are the same, the two objects can be considered to match. Of course, if the target object's object category belongs to or includes the target preset object's object category, the two objects can also be considered to match. In actual applications, the target object's object category and the target preset object's object category can both be determined based on object classification rules. The object classification rules provide multiple base categories and filtering conditions corresponding to each base category. In conjunction with the above example, the multiple base categories may include account categories, content categories, etc. The object category of an instant messaging account as a business object is the account category, and the object category of published content as a business object is the content category. Of course, the multiple base categories may include multiple equal-level major categories, and each major category may include at least one subcategory. If at least one subcategory includes at least two categories, the at least two categories may be equal-level, or they may be in a hierarchical relationship, or they may be both equal-level and sub-level.
[0054] Whether the preset business scenario (hereinafter referred to as the target preset business scenario) corresponding to the target object and the target sample set matches can be achieved by calculating the similarity between the scenario information of the target scenario and the scenario information of the target preset business scenario. If the calculated similarity is greater than the similarity threshold, the two scenarios can be considered to match. For the scenario information used for calculation, if the business scenario corresponds to an Internet product, the scenario information is the description information of the Internet product, such as the product type information and product audience information of the Internet product; if the business scenario corresponds to the usage function of an Internet product, the scenario information is the description information of the usage function, such as the function type information and function audience information of the usage function. Of course, when the business scenario corresponds to the usage function of an Internet product, the scenario information can also include both the description information of the usage function and the description information of the Internet product.
[0055] S202: taking the corpus to be processed as input, using a target prediction model to output corresponding target category information, and performing heterogeneous object matching for the target object based on the target category information;
[0056] In an embodiment of the present application, an electronic device uses a target prediction model to output corresponding target category information using a corpus to be processed as input. The target prediction model can obtain corresponding target category information, which can reflect the classification of a target object under at least two preset business scenarios. Leveraging the adaptability and reliability of the target prediction model, the efficiency of obtaining target category information and the accuracy of the obtained target category information can be improved. Subsequently, heterogeneous object matching can be performed for the target object based on the target category information, thereby expanding the business function dimension of the target scenario. It is understood that the at least two preset business scenarios are business scenario a and business scenario b. In at least two sample sets, the sample corpus under business scenario a all indicates a first category of object, and the sample category information carried by these sample corpus is determined based on business scenario a; the sample corpus under business scenario b all indicates a second category of object, and the sample category information carried by these sample corpus is determined based on business scenario b. The target prediction model is trained based on the at least two sample sets. For the input corpus to be processed, the target category information output by the target prediction model can include both category information indicating business scenario a and category information indicating business scenario b. If the target scenario matches business scenario a and the target object matches the first category object, the category information indicating business scenario a in the target category information can help further optimize the positioning of the target object in the target scenario, which is equivalent to drawing on the more fine-grained category information determined for the first category object based on business scenario a; the category information indicating business scenario b in the target category information can help determine the participation of the target object in the function to be expanded in the target scenario, which is equivalent to assuming that the corpus to be processed is sample corpus b and the target object is the second category object, and thereby obtaining the more fine-grained category information determined for the second category object based on business scenario b. This category information can be used to associate the target object with the true second category object.
[0057] For example, the first-category objects and target objects are account objects, and the second-category objects are content objects. Business scenarios a and b correspond to platform A's social networking and content publishing functions, respectively, and the target scenario corresponds to an instant messaging client. The category information indicating business scenario a in the target category information can be used as a reference to optimize the category information of account objects in the instant messaging client, such as filling in missing category information for account objects or adjusting the category information of existing account objects. The category information indicating business scenario b in the target category information can be used as a basis for establishing a correlation between account objects and content objects in the instant messaging client. If the content recommendation function is a feature to be expanded in the instant messaging client, the category information indicating business scenario b in the target category information can be used to select and recommend matching content objects for the account objects. Of course, the first-category objects and target objects can also be content objects, but these content objects are different from the content objects in the second-category objects. For example, the former is community-level content (content targeted at the community as a whole, such as content recommended for group accounts), while the latter is individual-level content (content targeted at individual individuals, such as content recommended for individual accounts). At this point, the category information indicating business scenario b in the target category information can be used as a basis for establishing a connection between the community-level content in the instant messaging client and the individual-level content in the content publishing function of platform A, helping the instant messaging client understand and learn from the individual-level content. This will help the instant messaging client expand its existing content recommendation function to include recommendations for individual-level content in addition to community-level content.
[0058] The target prediction model is described in detail below. The target prediction model is trained based on the at least two sample sets and is obtained by adjusting the parameters of the preset model based on the difference between the predicted category information and the sample category information during training. The prediction model is determined based on a large language model. The at least two sample sets correspond one-to-one to at least two preset business scenarios. The sample category information carried by each sample corpus in the sample set is determined based on the corresponding preset business scenario. The object set corresponds to at least two object categories. The object set is composed of the preset objects corresponding to each of the at least two sample sets. The classification granularity corresponding to the object category is greater than the classification granularity corresponding to the sample category information.
[0059] like Figure 3 、 7 As shown, the target prediction model is trained by the following steps:
[0060] S301: Determine the preset model based on the large language model;
[0061] S302: Acquire the at least two sample sets;
[0062] S303: using the sample corpus as input and using the preset model to output the predicted category information;
[0063] S304: Based on the difference between the predicted category information and the sample category information, adjust the parameters of the preset model to obtain the target prediction model.
[0064] A sample set corresponds to a preset business scenario. A sample set corresponds to a preset object. It can be understood that all sample corpora in a sample set each correspond to a sample object, and the object category of the sample objects corresponding to all sample corpora is the same, so the preset object represents the same type of objects here. The preset objects corresponding to at least two sample sets constitute an object set, and the object set corresponds to at least two object categories. If the at least two sample sets are two sample sets, then the preset objects corresponding to the two sample sets are of different object categories. If the at least two sample sets are multiple sample sets, then the preset objects corresponding to the multiple sample sets can be of different object categories; the preset objects corresponding to the multiple sample sets can have the same object category or different object categories. For the understanding of the preset business scenario, preset object, etc. here, please refer to the description of the target scenario, target object, etc. in the aforementioned step S201, and will not be repeated here.
[0065] The sample category information carried by all sample corpora within a sample set is determined based on the predefined business scenario corresponding to the sample set. Furthermore, the classification granularity corresponding to the object category is greater than the classification granularity corresponding to the sample category information. It should be understood that, for a predefined object, the object category setting is intended to roughly distinguish whether it is of the same or different type from other predefined objects and is used to address external predefined objects. Sample category information is a detailed representation of multiple sample objects of the same type in a specific business scenario and is used for internal management of the predefined object. The object category setting can be relatively general and, in practical applications, can be implemented using the object classification rules described in step S201. Sample category information can be relatively specific and detailed, reflecting the relevant business scenario to guide the model's understanding and learning of the relevant business scenario, which in turn can guide other business scenarios to further understand and learn the relevant business scenario. For example, the object classification rules can define whether a predefined object is an account category or a content category. Furthermore, defining a predefined object as a content category can indicate whether it is content from a community or individual dimension. Sample category information can be used to set category levels based on the content of individual dimensions indicated by known preset objects, combined with corresponding preset business scenarios, and to set labels for each category level. For example, first-level categories include game categories, sports categories, and technology categories; second-level categories include mobile game categories and PC game categories; and third-level categories include shooting game categories and card game categories. Labels for the first-level technology category can describe smartphones, such as camera tools, large-capacity batteries, and gaming phones.
[0066] Exemplarily, at least two sample sets include N sample corpora, sample corpus i is the i-th sample corpus in the N sample corpora, and the value range of i is 1-N. Sample corpus i carries sample category information i. Sample corpus i is input into the large language model. The large language model outputs predicted category information i based on sample corpus i. The difference between the predicted category information i and the sample category information i can be determined, and then the difference is used to adjust the parameters of the large language model. When using the difference to adjust the parameters of the large language model, a loss function can be constructed based on the difference, and then the loss function is used to adjust the parameters of the large language model. It should be noted that after each sample corpus is input into the model, a corresponding prediction result (such as the predicted category information i mentioned above) is obtained, and then the difference between the prediction result corresponding to each sample and the sample category information is obtained. In the process of training to obtain the target prediction model, at least one model parameter adjustment may be involved, and each model parameter adjustment is based on the difference corresponding to each sample corpus in the corresponding sample batch. A sample batch can be all of the N sample corpora or part of the N sample corpora.
[0067] Model training is ongoing. The target prediction model can be the result of a previous training session or the basis for the next. The target prediction model is a trained model with high generalization capabilities. Using the target prediction model to predict category information improves predictive adaptability and reliability. Using a large language model as the base model leverages its natural language processing capabilities to improve the efficiency and convenience of training the target prediction model. It also supports and is compatible with sample corpora covering diverse business scenarios, containing different sample category information, and indicating different categories of objects. The large language model can utilize the Transform architecture, employing LLaMa, GLM, and hybrid models.
[0068] In one embodiment, Figure 4 As shown, for step S301, determining the preset model based on the large language model may include the following steps:
[0069] S401: Acquire the large language model;
[0070] S402: Determine a preset low-rank matrix based on the large language model;
[0071] S403: Constructing the preset model based on the large language model and the preset low-rank matrix, where the preset low-rank matrix is used to represent the weights of key parameters in the large language model;
[0072] Correspondingly, for step S304, the parameter adjustment of the preset model based on the difference between the predicted category information and the sample category information to obtain the target prediction model may include the following steps: based on the difference between the predicted category information and the sample category information, the preset low-rank matrix is adjusted to obtain the target prediction model.
[0073] The preset model includes a large language model and a preset low-rank matrix. The preset low-rank matrix is used to characterize the weights of key parameters in the large language model. The large language model is the basis of the preset model. The large language model provides multiple preset parameters and preset weights for each preset parameter. The key parameters come from multiple preset parameters. In the preset model, the large language model is used, that is, multiple preset parameters are fixed and the preset weights for each preset parameter are fixed; a preset low-rank matrix is introduced to characterize the weights of key parameters in the large language model. In the process of training the preset model to obtain the target prediction model, the object of adjustment is the preset low-rank matrix, that is, the weights of the key parameters therein are adjusted; the basis for adjustment is the difference brought about by the predicted category information and the sample category information.
[0074] The preset low-rank matrix can be a bypass established based on the large language model. By adjusting the bypass, the overall training effect of the preset model can be affected. The determination of the preset low-rank matrix depends on selecting multiple key parameters from multiple preset parameters provided by the large language model. All or part of the parameters of the key network in the large language model can be used as key parameters according to historical feedback; the parameters related to the application of the attention mechanism in the large language model can be used as key parameters according to historical feedback; or part of the preset parameters with larger preset weights can be determined as key parameters according to the respective preset weights of the multiple preset parameters. For example, the multiple preset parameters are sorted in descending order according to the size of the preset weights to obtain a parameter sequence, and the preset parameters within the range before the descending order of the preset weight size in the preset sorting order are determined as key parameters.
[0075] Considering that the large language model still needs to be adjusted to adapt to the performance requirements of the current corpus processing task, and the number of parameters of the large language model, a preset low-rank matrix as the adjustment object is introduced to adapt to the performance requirements of the current corpus processing task. In this way, the number of parameter weights to be adjusted is reduced, and the efficiency and convenience of training to obtain the target prediction model and the prediction accuracy of the obtained target prediction model can be taken into account.
[0076] Exemplarily, the preset low-rank matrix indicates the multiplication result of the first matrix and the second matrix. Before adjusting the preset low-rank matrix, the first matrix can be initialized to zero; the second matrix can be initialized with Gaussian distribution. For example, the large language model can provide a weight matrix W0∈R d*d . The preset low-rank matrix can correspond to a weight matrix ΔW∈R d*d , and the weight matrix ΔW = BA. Where, B represents the first matrix, B∈R d*r , A represents the second matrix, A∈R r*d , r represents the rank, r << d. If the input of the preset model is x and the output is y, then y = W0x + ΔWx. Considering the accuracy of key parameter determination and its impact on the model effect, the first matrix and the second matrix are introduced as trainable matrices for initialization, and r is regarded as a hyperparameter to achieve the learning and improvement of the preset low-rank matrix. In practical applications, fine-tuning the large language model to obtain the target prediction model can be achieved through LoRA.
[0077] Furthermore, the large language model includes multiple encoding networks and multiple first decoding networks; as Figure 5 shown, for step S402, the determining the preset low-rank matrix based on the large language model includes:
[0078] S4021: For each of the first decoding networks, construct the low-rank matrix corresponding to the first decoding network to obtain multiple sub-matrices;
[0079] S4022: Obtain the preset low-rank matrix based on the multiple sub-matrices;
[0080] Accordingly, for step S403, constructing the preset model based on the large language model and the preset low-rank matrix includes:
[0081] S4031: For each first decoding network, update the first decoding network based on a low-rank matrix corresponding to the first decoding network to obtain multiple second decoding networks;
[0082] S4032: Update the large language model based on the second decoding network to obtain the preset model.
[0083] A plurality of first decoding networks are used as key networks to provide key parameters, thereby obtaining a preset low-rank matrix. Compared with using both the encoding network and the decoding network as key networks, using the decoding network that focuses more on classification as the key network is more convenient and efficient. Here, a method is also provided in which multiple first decoding networks as key networks participate in the construction of a preset low-rank matrix. The corresponding low-rank matrices can be constructed respectively according to the dimensions of the first decoding network, thereby obtaining a preset low-rank matrix. Correspondingly, constructing a preset model based on a large language model and a preset low-rank matrix can also be implemented in the dimensions of the first decoding network. In this way, the preset low-rank matrix as the adjustment object is more consistent with the large language model, which is conducive to improving the accuracy and effectiveness of the model adjustment.
[0084] Of course, the key network here can also serve as just the base network, with key parameters provided by other parts of the large language model (such as Dropout+Linear+Conv1d).
[0085] The low-rank matrix described above can be viewed as additional trainable parameters for the original decoding network. Similarly, trainable parameters can be added to the final output layer and fully connected layers of the larger language model. In practical applications, low-resource fine-tuning can be achieved through LoRA.
[0086] In one embodiment, for step S304, the parameter adjustment of the preset model based on the difference between the predicted category information and the sample category information to obtain the target prediction model may include the following steps: first, based on the difference between the predicted category information and the sample category information, the parameter adjustment of the preset model is performed to perform iterative training until a preset training end condition is met to obtain a candidate prediction model; then, the parameter adjustment of the candidate prediction model is performed based on a human feedback reinforcement learning strategy to obtain the target prediction model.
[0087] To ensure that the final actual task output effect can be aligned with human expectations, RLHF is introduced here. After obtaining the candidate prediction model and before the model is officially launched, the prediction results output by the candidate prediction model are manually aligned with human expectations. The prediction results are improved through reinforcement learning, thereby improving the readiness and adaptability of the prediction results.
[0088] It can be understood that the prediction result output by the candidate prediction model may include multiple sub-prediction results. The prediction result output by the candidate prediction model is manually scored for the quality of the sub-prediction result dimension. A sub-prediction result with a higher score indicates a higher quality, which means it is more in line with human expectations. The opposite is true for a sub-prediction result with a lower score. The application of the human feedback reinforcement learning strategy can be reflected in the established reinforcement learning quality scoring model. The samples that participate in the training to obtain the reinforcement learning quality scoring model are manually labeled with quality scores. The prediction result output by the candidate prediction model can be used as input and the reinforcement learning quality scoring model will perform a quality score on it. The quality score is used to guide the candidate prediction model to retain the sub-prediction results with higher scores and discard the sub-prediction results with lower scores.
[0089] In one embodiment, Figure 6 As shown, for step S302, the at least two preset business scenarios include a first scenario and a second scenario, and obtaining the at least two sample sets includes:
[0090] S601: Acquire multiple first corpora in the first scenario to obtain a first sample set, wherein the multiple first corpora all indicate content objects;
[0091] S602: Acquire a plurality of second corpora in the second scenario to obtain a second sample set, wherein the plurality of first corpora all indicate group-type objects;
[0092] S603: Construct the at least two sample sets based on the first sample set and the second sample set.
[0093] Here, the composition connotations of at least two sample sets are provided. The preset objects corresponding to one sample set are content class objects. This sample set corresponds to the first scene. The content class objects in the first scene can be used as data source constraints for the first corpus. The preset objects corresponding to the other sample set are group class objects. This sample set corresponds to the second scene. The group class objects in the second scene can be used as data source constraints for the second corpus. Based on such training samples, it is guaranteed that the target prediction model obtained through training supports the prediction of category information of different categories of objects across scenes. This is conducive to achieving effective association between content class objects and group class objects across scenes, thereby facilitating the expansion of business scenarios. In actual applications, the effective association between group class objects and content class objects in account class objects is suitable for the integration of community functions and content publishing functions in social network community services.
[0094] The following will introduce the acquisition of the first corpus and the second corpus respectively:
[0095] 1) The first corpus is obtained by the following steps: obtaining a first representational text of the content object, and determining that the first representational text is the first corpus, wherein the content object includes at least one of the following: a text content object, an image content object, a graphic content object, an audio content object, and a video content object.
[0096] The first representational text can be used as a textual representation of the content object. The representational text can be derived from the text portion of the content object itself or from the text conversion result of the non-text portion of the content object itself. The text conversion result derived from the non-text portion of the content object itself can be the text conversion result derived from the image portion of the content object itself, using optical character recognition (OCR) and image captioning tasks, which can utilize the BLIP2 model; or it can be the text conversion result derived from the audio portion of the content object itself, using automatic sound recognition (ASR). The text portion of the content object itself can include the content title, content introduction, etc.
[0097] 2) The second corpus is obtained by the following steps: first, obtaining object information of the group object, the object information including at least one of the following: group basic information and group member information; then, when the object information includes non-text information, performing text conversion on the non-text information to obtain a second representational text corresponding to the object information; further, determining that the second representational text is the second corpus.
[0098] Basic group information may include at least one of the following: group identifier, group name, group profile, group announcements, group avatar, group background image, etc. Group member information may include at least one of the following: a global member profile of all group members, a local member profile of each group member, and the interactions between group members. For example, a group in a social network community service may be a group, and the group identifier may be the group number. Basic group information may also include the group category and group tags originally set for the group in the social network community service. The group category may be a category selected by group members. Group member information refers to information about the group's internal members and may also include the total number of internal members. The interactions between group members may be reflected in friendship relationships between internal members, specifically the percentage of internal members who are not group owners and have friendship relationships with the group owner. Channels in social network community services may also be groups, with channel subscribers and visiting members corresponding to group members. Since a channel may have sub-channels, basic group information may include not only basic information for the channel itself, but also basic information for each sub-channel. Furthermore, basic group information may include information from the channel cover. Since the original form of the object information is not limited to text, the non-text information therein can be converted into text to obtain a second representation text used as the second corpus.
[0099] The sample corpora obtained in 1) and 2) above are all in text form. Using text to participate in model training can improve the efficiency of model training.
[0100] The data processing method provided in the embodiment of the present application can be applied to processing social network community services. Platform X provides users with the use function of social network community services. The group function provided by Platform X corresponds to business scenario 1, the channel function provided by Platform X corresponds to business scenario 2, and the content publishing function provided by Platform X corresponds to business scenario 3. Three sample sets can be used to train the target prediction model, namely sample sets 1-3. The sample corpus in sample set 1 is business data from business scenario 1, the sample corpus in sample set 2 is business data from business scenario 2, and the sample corpus in sample set 3 is business data from business scenario 3. There are differences in content understanding in different business scenarios, and the application of target prediction models can help achieve more efficient cross-scenario content understanding. Taking into account the large amount of content in groups and channels, and the strong correlation between content and user information, group class objects can be used as the preset objects corresponding to sample sets 1 and 2. The preset object corresponding to sample set 3 can be a content class object. Taking sample set 1 as an example, the sample corpus in sample set 1 and the sample category information it carries can be referred to Table 1 below:
[0101]
[0102] Table 1
[0103] Given that the target prediction model is designed to facilitate more efficient cross-scenario content understanding, when labeling sample category information for sample data in different sample sets, in addition to focusing on differences in specific business scenarios and specific pre-defined objects, attention should also be paid to commonalities across these scenarios and pre-defined objects. This standardization of labeling can be achieved by constructing closed sets and semi-open sets. A closed set represents a classification tree consisting of multiple category hierarchies and corresponding category labels for each category hierarchical level. Closed sets can be used to keep model output within a fixed range. Content in semi-open sets can be dynamically updated, such as by addition, replacement, or deletion. Semi-open sets facilitate the adaptability of model output. Reusing and sharing closed and semi-open sets can reduce labeling costs and computational overhead for cross-scenario content processing. This improves content distribution in recommendation and search systems, and is particularly suitable for recommendation and search systems in more mature businesses, as they offer a more cost-effective solution. A more mature business might be the social networking community business corresponding to Platform X. This involves multiple business scenarios, including multimodal content and complex user relationships. These scenarios all impact the content distribution effectiveness of the recommendation and search systems within the social networking community business. Combining the sample category information in Table 1 above, this same sample category information can also be applied to Sample Set 2, as shown in Table 2 below:
[0104] Channel Logo Channel Name Sample category information 12345 Photography Darkroom Interest Exchange_Photography_Photography Exchange 13456 XX University Channel Educational Growth_Universities_School Exchange Group
[0105] Table 2
[0106] The target prediction model can be obtained by using the large language model as the base model and fine-tuning the large language model through LoRA. When applying sample corpus to train the model, prompt learning and instruction fine-tuning can be used. Figure 7 The prompt-based learning approach can add prompt information when the sample corpus is input into the model. At the same time, the instruction-based fine-tuning approach can construct corresponding instruction fine-tuning tasks for the sample corpus to participate in model training. The instruction fine-tuning task involves three parts: instruction definition, instruction input, and output result instance. You can refer to the following example:
[0107] The first type of instruction fine-tuning task for sample set 1: Instruction definition: Please process the first-level, second-level, and third-level classification tasks and group keyword tasks of the group; Instruction input: group name [...], group label [...], number of group members [...], proportion of friend relationships in the group [...]; Output result example: first-level, second-level, and third-level classification categories and group keywords of the group, with the third-level classification category optional.
[0108] The second type of instruction fine-tuning task for sample set 2: Instruction definition: Please process the first-level, second-level, and third-level classification tasks and channel keyword tasks of the channel; instruction input: channel name [...], channel introduction [...], information extracted from the channel cover and avatar [...], sub-channel name [...]; output result example: the first-level, second-level, and third-level classification categories of the channel and channel keywords.
[0109] The third type of instruction fine-tuning task for sample set 3: Instruction definition: Please handle the keyword generation task of the content; Instruction input: content title [...], content text part [...], information extracted from the content image part [...]; Output result example: content keywords.
[0110] The aforementioned group keywords, channel keywords, and content keywords can correspond to the aforementioned category labels. When applying the trained target prediction model, prompt information can be used to guide the model to output category information corresponding to the business scenario.
[0111] Furthermore, since group objects are used as the default objects for sample sets 1 and 2, the sample corpus constrained by these objects also needs to be dynamically updated. For example, changes may occur to the group name, group profile, group announcements, or group members. Since the content in business scenario 3 is dynamically updated, sample set 3 can be updated accordingly, thereby improving the model's fit and adaptability.
[0112] From the technical solutions provided by the above embodiments of the present application, it can be seen that the embodiments of the present application provide a solution for determining category information across scenarios. The determined category information can be used to expand the business function dimension of the current scenario, so that the business scenario expansion of Internet products and / or the expansion of usage functions under the business scenario can be achieved. The embodiments of the present application predict category information through a target prediction model. The target prediction model is trained with a large language model as the basic model, and the sample corpus used for training is object data from different preset business scenarios. The use of the large language model can improve the efficiency and convenience of training to obtain the target prediction model, and is also conducive to supporting and being compatible with sample corpora involving different business scenarios, carrying different sample category information, and indicating different categories of objects. At the same time, for training samples, by setting the data source of at least two business scenarios and object category constraints, and labeling requirements for sample category information, support can be provided for determining category information across scenarios. Compared with related technologies, the target prediction model obtained by training in the embodiments of the present application is more adaptable and has more advantages in cost and efficiency for training the target prediction model.
[0113] The present application also provides a data processing device, such as Figure 8 As shown, the data processing device 80 includes:
[0114] Acquisition module 801: used to acquire a corpus to be processed in a target scenario, wherein the corpus to be processed indicates a target object, and the target scenario and the target object respectively match a preset business scenario and a preset object corresponding to a target sample set, wherein the target sample set is any sample set of at least two sample sets;
[0115] Prediction module 802: configured to take the corpus to be processed as input, output corresponding target category information using a target prediction model, and perform heterogeneous object matching for the target object based on the target category information;
[0116] In which, the target prediction model is trained based on the at least two sample sets, and is obtained by adjusting the parameters of the preset model based on the difference between the predicted category information and the sample category information during training. The prediction model is determined based on a large language model. The at least two sample sets correspond one-to-one to at least two of the preset business scenarios. The sample category information carried by each sample corpus in the sample set is determined based on the corresponding preset business scenario. The object set corresponds to at least two object categories. The object set is composed based on the preset objects corresponding to each of the at least two sample sets. The classification granularity corresponding to the object category is greater than the classification granularity corresponding to the sample category information.
[0117] In one embodiment, the target prediction model is obtained by training through the following steps: determining the preset model based on the large language model; obtaining the at least two sample sets; taking the sample corpus as input, using the preset model to output the predicted category information; based on the difference between the predicted category information and the sample category information, adjusting the parameters of the preset model to obtain the target prediction model.
[0118] In one embodiment, determining the preset model based on the large language model includes: obtaining the large language model; determining a preset low-rank matrix based on the large language model; constructing the preset model based on the large language model and the preset low-rank matrix, wherein the preset low-rank matrix is used to represent the weights of key parameters in the large language model;
[0119] The step of adjusting the parameters of the preset model based on the difference between the predicted category information and the sample category information to obtain the target prediction model includes: adjusting the preset low-rank matrix based on the difference between the predicted category information and the sample category information to obtain the target prediction model.
[0120] In one embodiment, the large language model includes multiple encoding networks and multiple first decoding networks; determining the preset low-rank matrix based on the large language model includes: constructing a low-rank matrix corresponding to the first decoding network for each of the first decoding networks to obtain multiple sub-matrices; and obtaining the preset low-rank matrix based on the multiple sub-matrices;
[0121] Constructing the preset model based on the large language model and the preset low-rank matrix, including: for each of the first decoding networks, updating the first decoding network based on the low-rank matrix corresponding to the first decoding network to obtain multiple second decoding networks; and updating the large language model based on the second decoding network to obtain the preset model.
[0122] In one embodiment, the parameter adjustment of the preset model based on the difference between the predicted category information and the sample category information to obtain the target prediction model includes: based on the difference between the predicted category information and the sample category information, the parameter adjustment of the preset model to perform iterative training until a preset training end condition is met to obtain a candidate prediction model; and the parameter adjustment of the candidate prediction model based on a human feedback reinforcement learning strategy to obtain the target prediction model.
[0123] In one embodiment, the at least two preset business scenarios include a first scenario and a second scenario, and obtaining the at least two sample sets includes: obtaining multiple first corpora under the first scenario to obtain a first sample set, and the multiple first corpora all indicate content class objects; obtaining multiple second corpora under the second scenario to obtain a second sample set, and the multiple second corpora all indicate group class objects; and constructing the at least two sample sets based on the first sample set and the second sample set.
[0124] In one embodiment, the first corpus is obtained by the following steps: obtaining a first representational text of the content-type object, and determining that the first representational text is the first corpus, wherein the content-type object includes at least one of the following: a text content object, an image content object, a graphic content object, an audio content object, and a video content object.
[0125] In one embodiment, the second corpus is obtained by the following steps: obtaining object information of the group class object, the object information including at least one of the following: group basic information and group member information; when the object information includes non-text information, performing text conversion on the non-text information to obtain a second representational text corresponding to the object information; and determining that the second representational text is the second corpus.
[0126] It should be noted that the device and method embodiments in the device embodiment are based on the same inventive concept.
[0127] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0128] The present application also provides a computer-readable storage medium having at least one instruction or at least one program stored therein, which is loaded and executed by a processor to implement the above method. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0129] An embodiment of the present application also provides an electronic device, which includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the at least one processor to implement the above method.
[0130] The electronic device may be provided as a terminal, a server, or other forms of devices.
[0131] Figure 9 FIG. 1 is a block diagram of an electronic device according to an embodiment of the present application. Figure 9 The electronic device 1900 includes a processing component 1922, which further includes one or more processors and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922. In addition, the processing component 1922 is configured to execute instructions to perform the above-described method.
[0132] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0133] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0134] The present application may be a system, method, and / or computer program product. The computer program product may include a computer-readable storage medium carrying at least one instruction or at least one program for causing a processor to implement various aspects of the present application.
[0135] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0136] The at least one instruction or at least one program described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the at least one instruction or at least one program from the network and forwards the at least one instruction or at least one program to be stored in the computer-readable storage medium in each computing / processing device.
[0137] At least one instruction or at least one program for performing the operations of the present application can be an assembly instruction, an instruction set architecture (ISA) instruction, a machine instruction, a machine-dependent instruction, a microcode, a firmware instruction, a state setting data, or a source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. At least one instruction or at least one program can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, by utilizing the status information of at least one instruction or at least one program to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute at least one instruction or at least one program, thereby realizing various aspects of the present application.
[0138] Various aspects of the present application are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by at least one instruction or at least one program.
[0139] The at least one instruction or at least one program segment can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when the instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. The at least one instruction or at least one program segment can also be stored in a computer-readable storage medium, where the instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner, so that the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0140] At least one instruction or at least one program may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0141] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the above-mentioned module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions specified in the box can also occur in an order different from the order specified in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a special hardware-based system that performs the specified function or action, or can be implemented by a combination of special hardware and computer instructions.
[0142] While various embodiments of the present application have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A data processing method, characterized in that: The method comprises: Obtaining a corpus to be processed in a target scenario, the corpus to be processed indicating a target object, the target scenario and the target object respectively matching a preset business scenario and a preset object corresponding to a target sample set, the target sample set being any one of the at least two sample sets; Taking the corpus to be processed as input, using a target prediction model to output corresponding target category information, so as to perform heterogeneous object matching for the target object based on the target category information; In which, the target prediction model is trained based on the at least two sample sets, and is obtained by adjusting the parameters of the preset model based on the difference between the predicted category information and the sample category information during training. The prediction model is determined based on a large language model. The at least two sample sets correspond one-to-one to at least two of the preset business scenarios. The sample category information carried by each sample corpus in the sample set is determined based on the corresponding preset business scenario. The object set corresponds to at least two object categories. The object set is composed based on the preset objects corresponding to each of the at least two sample sets. The classification granularity corresponding to the object category is greater than the classification granularity corresponding to the sample category information.
2. The method according to claim 1, characterized in that The target prediction model is trained by the following steps: Determining the preset model based on the large language model; Acquiring the at least two sample sets; Taking the sample corpus as input, outputting the predicted category information using the preset model; Based on the difference between the predicted category information and the sample category information, parameters of the preset model are adjusted to obtain the target prediction model.
3. The method according to claim 2, wherein: The determining the preset model based on the large language model includes: Acquire the large language model; Determining a preset low-rank matrix based on the large language model; Constructing the preset model based on the large language model and the preset low-rank matrix, where the preset low-rank matrix is used to represent the weights of key parameters in the large language model; The step of adjusting parameters of the preset model based on the difference between the predicted category information and the sample category information to obtain the target prediction model includes: Based on the difference between the predicted category information and the sample category information, the preset low-rank matrix is adjusted to obtain the target prediction model.
4. The method according to claim 3, characterized in that The large language model includes multiple encoding networks and multiple first decoding networks; The determining a preset low-rank matrix based on the large language model includes: For each of the first decoding networks, construct a low-rank matrix corresponding to the first decoding network to obtain a plurality of sub-matrices; Obtaining the preset low-rank matrix based on the multiple sub-matrices; Constructing the preset model based on the large language model and the preset low-rank matrix includes: For each of the first decoding networks, updating the first decoding network based on a low-rank matrix corresponding to the first decoding network to obtain a plurality of second decoding networks; The large language model is updated based on the second decoding network to obtain the preset model.
5. The method according to claim 2, characterized in that The step of adjusting parameters of the preset model based on the difference between the predicted category information and the sample category information to obtain the target prediction model includes: Based on the difference between the predicted category information and the sample category information, adjusting the parameters of the preset model to perform iterative training until a preset training end condition is met to obtain a candidate prediction model; The parameters of the candidate prediction model are adjusted based on a human feedback reinforcement learning strategy to obtain the target prediction model.
6. The method according to claim 2, characterized in that The at least two preset business scenarios include a first scenario and a second scenario, and obtaining the at least two sample sets includes: Acquire a plurality of first corpora in the first scenario to obtain a first sample set, wherein the plurality of first corpora all indicate content objects; Acquire a plurality of second corpora in the second scenario to obtain a second sample set, wherein the plurality of second corpora all indicate group-type objects; The at least two sample sets are constructed based on the first sample set and the second sample set.
7. The method according to claim 6, characterized in that The first corpus is obtained by the following steps: A first representation text of the content object is obtained, and it is determined that the first representation text is the first corpus, wherein the content object includes at least one of the following: a text content object, an image content object, a graphic content object, an audio content object, and a video content object.
8. The method according to claim 6, characterized in that The second corpus is obtained by the following steps: Obtaining object information of the group object, wherein the object information includes at least one of the following: group basic information and group member information; In a case where the object information includes non-text information, performing text conversion on the non-text information to obtain a second representation text corresponding to the object information; It is determined that the second representation text is the second corpus.
9. A data processing device, characterized in that: The device comprises: An acquisition module is configured to acquire a corpus to be processed in a target scenario, wherein the corpus to be processed indicates a target object, and the target scenario and the target object respectively match a preset business scenario and a preset object corresponding to a target sample set, wherein the target sample set is any one of at least two sample sets; Prediction module: used for taking the corpus to be processed as input, outputting corresponding target category information using a target prediction model, and performing heterogeneous object matching for the target object based on the target category information; In which, the target prediction model is trained based on the at least two sample sets, and is obtained by adjusting the parameters of the preset model based on the difference between the predicted category information and the sample category information during training. The prediction model is determined based on a large language model. The at least two sample sets correspond one-to-one to at least two of the preset business scenarios. The sample category information carried by each sample corpus in the sample set is determined based on the corresponding preset business scenario. The object set corresponds to at least two object categories. The object set is composed based on the preset objects corresponding to each of the at least two sample sets. The classification granularity corresponding to the object category is greater than the classification granularity corresponding to the sample category information.
10. An electronic device, characterized in that: The electronic device includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the at least one processor to implement the data processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the data processing method according to any one of claims 1 to 8.