Method, device, system and computer program product for generating object description copy

By responding to editing commands, determining and modifying the description of target attributes in the object description copy, the problem of inability to effectively fine-tune the object description copy in the prior art is solved, and flexible adjustment of specified attributes is achieved to meet user needs.

CN114861621BActive Publication Date: 2025-02-14ALIBABA (CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210427259.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2025-02-14
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

When adjusting object attributes, the existing object description copy generation method cannot effectively use the generated description copy for fine-tuning and improvement, and cannot meet the user's need to adjust only the specified attributes.

Method used

A method for generating object description copy is proposed. By responding to editing commands, the description copy of the target object is obtained, the position of the target attribute in the description copy is determined, and the description of the target attribute is modified without changing the description of other attributes. , generate new descriptive text.

Benefits of technology

It realizes that without changing the description content of unspecified attributes, only the description of the specified attributes is adjusted to meet the user's fine-tuning and improvement needs, and improve the flexibility and user experience of object description text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114861621B_ABST
    Figure CN114861621B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, system and computer program product for generating an object description. In at least one embodiment of the present disclosure, in response to an edit command for a target attribute of a target object, a first description document of the target object is obtained; and then through the edit command, the target attribute and the first description document of the target object, the target description information and the corresponding target position of the target attribute in the first description document can be determined; thereby, other description information except the target description information in the first description document can be retained, and the target description information is only modified at the target position in the first description document. It can be seen that the present disclosure only adjusts the description of the specified attribute, but does not adjust the description of the unspecified attribute, thereby ensuring that the description content of the unspecified attribute remains unchanged, realizing fine-tuning and improvement using the original description document, and meeting the user's needs to adjust only the specified attribute.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, system and computer program product for generating an object description document. Background Art

[0002] The existing method for generating object description text is: taking a set of attributes of the object as input to a pre-trained generation model, and the generation model outputs the object description text corresponding to the set of attributes.

[0003] However, when adjusting at least one attribute of an object, the existing method can only regenerate the object description text according to the attributes contained in the object, which may have the following problems: for attributes that do not need to be adjusted, the description of the attribute in the regenerated object description text may change, and the generated object description text cannot be used for fine-tuning and improvement, and the user's need to adjust only specified attributes cannot be met. Summary of the invention

[0004] At least one embodiment of the present disclosure provides a method, device, system and computer program product for generating an object description document.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating an object description document, the method comprising:

[0006] In response to an edit command for a target attribute of a target object, obtaining a first description text of the target object;

[0007] Based on the editing command, the target attribute and the first description document, determining target description information corresponding to the target attribute in the first description document and a target position of the target description information in the first description document;

[0008] The other description information except the target description information in the first description document is retained, and the target description information is modified at the target position in the first description document to generate a second description document for the target object.

[0009] In some embodiments, determining, based on the editing command, the target attribute and the first description document, the target description information corresponding to the target attribute in the first description document and the target position of the target description information in the first description document includes:

[0010] Based on the fact that the editing command is a command to delete the target description information corresponding to the target attribute in the first description text, a word or a short sentence including the target attribute is searched in the first description text as the target description information, and a target position of the target description information in the first description text is determined.

[0011] In some embodiments, determining, based on the editing command, the target attribute and the first description document, the target description information corresponding to the target attribute in the first description document and the target position of the target description information in the first description document includes:

[0012] Based on the fact that the editing command is a command to add target description information corresponding to the target attribute to the first description document, the target position of the target description information in the first description document is determined to be the last position of the first description document or a preset position in the first description document.

[0013] In some embodiments, the method further comprises:

[0014] In response to an edit command for a target attribute of a target object, obtaining supplementary information of the target object, wherein the supplementary information includes at least one of the following: various attributes of the target object and a title of the target object;

[0015] The modifying the target description information at the target position in the first description document includes: modifying the target description information at the target position in the first description document based on the supplementary information.

[0016] In some embodiments, based on the edit command, the target attribute and the first description document, determining the target description information corresponding to the target attribute in the first description document and the target position of the target description information in the first description document; retaining other description information in the first description document except the target description information, and modifying the target description information at the target position in the first description document to generate a second description document of the target object includes:

[0017] The editing command, the target attribute, the first description text and the supplementary information are used as quadruple input data of a pre-trained autoregressive model, the quadruple input data is processed by the autoregressive model, and a second description text of the target object corresponding to the quadruple input data is output.

[0018] In some embodiments, the autoregressive model is trained by:

[0019] Determine the five-tuple training sample data of the autoregressive model, wherein the five-tuple includes: an editing command, a specified attribute, a description text to be edited, a description text after editing, and supplementary information;

[0020] Taking the edited description as a label, the editing command, designated attributes, description to be edited, and supplementary information in the five-tuple training sample data are input into the autoregressive model, and the training is completed by adjusting the parameters of the autoregressive model until the output of the autoregressive model is the same as the edited description as the label or converges to the edited description as the label.

[0021] In some embodiments, the edited description copy is determined by:

[0022] Searching the description document to be edited for a word or a short sentence including the specified attribute as first description information corresponding to the specified attribute;

[0023] The first description information in the description document to be edited is deleted to obtain an edited description document; and / or the first description information in the description document to be edited is replaced with the second description information to obtain an edited description document.

[0024] In some embodiments, replacing the first description information in the description text to be edited with the second description information to obtain the edited description text includes:

[0025] Replacing the first description information in the description text to be edited with a preset placeholder to obtain a description text to be filled in;

[0026] The preset placeholders in the description text to be filled in are filled with the second description information through a pre-trained fill-in-the-blank model to obtain an edited description text.

[0027] In a second aspect, the present disclosure also provides a device for generating an object description text, the device comprising:

[0028] An acquisition unit, configured to acquire a first description text of the target object in response to an edit command for a target attribute of the target object;

[0029] A generation unit is used to determine the target description information corresponding to the target attribute in the first description document and the target position of the target description information in the first description document based on the editing command, the target attribute and the first description document; retain other description information in the first description document except the target description information, and modify the target description information at the target position in the first description document to generate a second description document for the target object.

[0030] In a third aspect, an embodiment of the present disclosure further provides a system comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, prompt the at least one computing device to execute the steps of the method for generating an object description document as described in any embodiment of the first aspect.

[0031] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the method for generating an object description document as described in the first aspect.

[0032] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, wherein the computer program product comprises a computer program, the computer program is stored in a computer-readable storage medium, at least one processor of a computer reads and executes the computer program from the storage medium, so that the computer performs the steps of the method for generating an object description text as described in any embodiment of the first aspect.

[0033] It can be seen that in at least one embodiment of the present disclosure, in response to an edit command for a target attribute of a target object, a first description text of the target object is obtained; and then through the edit command, the target attribute and the first description text of the target object, the target description information and the corresponding target position of the target attribute in the first description text can be determined; thereby, other description information except the target description information in the first description text can be retained, and the target description information is only modified at the target position in the first description text. It can be seen that the present disclosure only adjusts the description of the specified attribute, but does not adjust the description of the unspecified attribute, thereby ensuring that the description content of the unspecified attribute remains unchanged, realizing fine-tuning and improvement using the original description text, and meeting the user's needs to adjust only the specified attribute. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure, and a person skilled in the art can also obtain other drawings based on these drawings.

[0035] Figure 1 A schematic diagram of a flow chart of a method for generating an object description document provided in an embodiment of the present disclosure;

[0036] Figure 2 A schematic diagram of a flow chart of another method for generating object description text provided by an embodiment of the present disclosure;

[0037] Figure 3 A schematic diagram of the training process of the fill-in-the-blank model provided in an embodiment of the present disclosure;

[0038] Figure 4 A schematic diagram of a device for generating object description text provided by an embodiment of the present disclosure;

[0039] Figure 5 An exemplary block diagram of a system including at least one computing device and at least one storage device storing instructions is provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0040] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in the field belong to the scope of protection of the present disclosure.

[0041] It should be noted that, in this document, relational terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.

[0042] With the development of network technology, electronic commerce (e-commerce for short) came into being. E-commerce uses the Internet to conduct trading activities and related service activities in the form of electronic transactions, making all aspects of traditional commercial activities electronic and networked.

[0043] Merchants can publish new objects (items), so that users can browse the object descriptions of new objects published by merchants on the merchant's store page. Published objects usually include two categories: one, physical goods, such as clothing, electrical appliances, wearables and other tangible goods, which are usually functions provided by the service systems of e-commerce companies such as Taobao, Pinduoduo, and JD.com; two, virtual goods, such as service goods, including intangible goods such as takeaways, videos, music, and content. Whether it is a physical product or a virtual product, it is the result of labor produced for sale and is a labor product for exchange. Therefore, the published object can be understood as a product for sale.

[0044] There are usually two application scenarios for publishing objects: one is that merchants settle in third-party platforms, such as Taobao, JD.com, Amazon, Pinduoduo and other e-commerce service systems; the other is that merchants build their own e-commerce websites. Both application scenarios require the generation of object descriptions. The existing object description generation method is automatic generation, specifically: a set of object attributes is used as input to a pre-trained generation model, and the generation model outputs the object description corresponding to the set of attributes.

[0045] However, when adjusting at least one attribute of an object, for example, adding an attribute, deleting an attribute, etc., the existing method can only regenerate the object description text according to the attributes contained in the object, which may have the following problems: for attributes that do not need to be adjusted, the description of the attribute in the regenerated object description text may change, and the generated object description text cannot be used for fine-tuning and improvement, and the following adjustment requirements cannot be met: only the description of the specified attribute is adjusted, and the description of the unspecified attribute is not adjusted.

[0046] Therefore, at least one embodiment of the present disclosure provides a method, device, system, medium or computer program product for generating an object description document, which obtains a first description document of the target object in response to an edit command for a target attribute of the target object; and then through the editing command, the target attribute and the first description document of the target object, the target description information and the corresponding target position of the target attribute in the first description document can be determined; thereby, other description information except the target description information in the first description document can be retained, and the target description information is only modified at the target position in the first description document. It can be seen that the present disclosure only adjusts the description of the specified attribute, but does not adjust the description of the unspecified attribute, thereby ensuring that the description content of the unspecified attribute remains unchanged, realizing fine-tuning and improvement using the original description document, and meeting the user's needs to adjust only the specified attribute.

[0047] Figure 1 A flow chart of a method for generating an object description document provided in an embodiment of the present disclosure, wherein the execution subject of the method is an electronic device. The electronic device may be a portable mobile device such as a smart phone, a tablet computer, a laptop computer, a car navigation device, or an intelligent sports equipment; or a fixed device such as a personal computer, an intelligent home appliance, or a server, wherein the server may be a single server or a server cluster, and the server cluster may be a distributed cluster or a centralized cluster.

[0048] like Figure 1 As shown, the method for generating the object description text may include but is not limited to the following steps 101 to 103:

[0049] In step 101 , in response to an edit command for a target attribute of a target object, a first description document of the target object is obtained.

[0050] For example, the target object is the object of the description text to be edited. The target object may be product X, which includes five attributes, namely A, B, C, D, and E. Each attribute has a corresponding attribute description, recorded as: A1, B1, C1, D1, and E1. The attribute description may be a short sentence containing the attribute. For example, if C is the color, then C1 may be that the color of product X is red. The set of A1, B1, C1, D1, and E1 may be understood as the first description text of the target object. The first description text is the current description text of the target object, that is, the description text before editing.

[0051] When the user needs to adjust the C attribute, the attribute description C1 corresponding to the C attribute will also be adjusted. The user triggers an edit command for the target attribute of the target object, and the electronic device responds to the edit command for the target attribute of the target object and obtains a first description text of the target object.

[0052] In some embodiments, the editing command triggered by the user for the target attribute of the target object includes: a command to delete the target description information corresponding to the target attribute in the first description text, and a command to add the target description information corresponding to the target attribute to the first description text.

[0053] In some embodiments, the command to delete the target description information corresponding to the target attribute in the first description text may be implemented as a delete instruction for the target attribute of the target object; the command to add the target description information corresponding to the target attribute to the first description text may be implemented as an add instruction for the target attribute of the target object. In response to the delete instruction for the target attribute of the target object, the electronic device deletes the attribute description content corresponding to the target attribute of the target object. In response to the add instruction for the target attribute of the target object, the electronic device adds the attribute description content corresponding to the target attribute to the description text of the target object.

[0054] In step 102, based on the editing command, the target attribute and the first description document, the target description information corresponding to the target attribute in the first description document and the target position of the target description information in the first description document are determined.

[0055] Specifically, after obtaining the first description of the target object, the electronic device can determine the target description information corresponding to the target attribute in the first description according to the target attribute; after determining the target description information, determine the target position of the target description information in the first description. The purpose of determining the target position is to facilitate the subsequent steps to adjust only the target description information at the target position, and to ensure that the description information at other positions remains unchanged.

[0056] In some embodiments, the electronic device can search for words or short sentences including the target attributes as target description information in the first description text based on an editing command that is a command to delete the target description information corresponding to the target attributes in the first description text, and determine the target position of the target description information in the first description text.

[0057] For example, the first description of the product "apple" is "apples are big, sweet, and red in color." When the editing command is a command to delete the target description information corresponding to the color attribute in the first description of the product "apple," the electronic device will search for words or short sentences related to the color attribute in the first description as the target description information corresponding to the color attribute. In this example, the short sentence "the color is red" is used as the target description information corresponding to the color attribute, and the position of the target description information in the first description is the target position.

[0058] In some embodiments, the electronic device can determine that the target position of the target description information in the first description document is the last position of the first description document or a preset position in the first description document based on the editing command being a command to add target description information corresponding to the target attribute to the first description document.

[0059] The preset position may be a position of a single sentence inserted in the first description text, that is, the preset position may be any position in the first description text; the preset position may also be an adjacent position of the description information related to the target attribute.

[0060] For example, the first description of the product "sportswear" is "the color of the sportswear top is white, and the pants are black". When the editing command is a command to add the target description information corresponding to the size attribute of the top to the first description, the electronic device will determine that the preset position of the target description information of the top size in the first description is: the adjacent position of the description information related to the target attribute "the color of the top is white". The edited description is, for example: "the color of the sportswear top is white, the size of the top is XL, and the pants are black".

[0061] In some embodiments, the command to add target description information corresponding to the target attribute to the first description document includes two scenarios: 1) adding a new attribute, that is, it is necessary to add the target description information corresponding to the new attribute in the first description document. In this scenario, the electronic device determines that the target position of the target description information in the first description document is the last position of the first description document or the preset position in the first description document; 2) the change of the original attribute, for example, the color attribute of the target object changes, the color of the target object in the first description document is red, and the user needs to adjust it to green. In this scenario, the position of the description information "red" corresponding to the color attribute of the target object in the first description document is the target position.

[0062] In step 103, other description information except the target description information in the first description document is retained, and the target description information is modified at the target position in the first description document to generate a second description document of the target object.

[0063] In this embodiment, after determining the target position, the electronic device will modify the target description information at the target position in the first description text, and retain other description information in the first description text except the target description information, and generate a second description text of the target object, and the second description text is the edited description text. It can be seen that the electronic device only adjusts the description of the target attribute, but does not adjust the description of the non-target attribute, ensuring that the description content of the non-target attribute remains unchanged, realizing fine-tuning and improvement using the original description text, and meeting the user's demand for adjusting only the specified attribute.

[0064] based on Figure 1 In some embodiments, the object description text generation method may further include: in response to an edit command for a target attribute of a target object, obtaining supplementary information of the target object, wherein the supplementary information may include but is not limited to at least one of the following: various attributes of the target object, and a title of the target object. The supplementary information may be understood as information that assists in editing the description text. Accordingly, Figure 1 The target description information is modified at the target position in the first description document as described in step 103, specifically: based on the supplementary information, the target description information is modified at the target position in the first description document, so that after the modification, the second description document includes at least part of the information provided by the supplementary information.

[0065] Based on the above embodiments, Figure 2 A flowchart of another method for generating an object description document provided by an embodiment of the present disclosure is shown below. Figure 2 As shown, the method for generating the object description text includes the following steps 201 and 202:

[0066] In step 201 , in response to an edit command for a target attribute of a target object, a first description document of the target object is obtained.

[0067] Specifically, the implementation process and principle of step 201 are the same as those of step 101, and will not be repeated here.

[0068] In step 202, the editing command, target attribute, first description text and supplementary information are used as quadruple input data of a pre-trained autoregressive model, the quadruple input data is processed by the autoregressive model, and a second description text of the target object corresponding to the quadruple input data is output.

[0069] The autoregressive model is a sequence-to-sequence model, that is, the input is a sequence and the output is also a sequence. Autoregressive means that according to the input sequence, the first word in the output sequence is first generated, and then based on the input sequence and the generated first word, the second word of the output sequence is generated, and so on, one word at a time to get the output sequence.

[0070] In this embodiment, the input to the autoregressive model is the four-tuple input data, and the output of the autoregressive model is the second description text of the target object corresponding to the four-tuple input data.

[0071] For example, the first description of the product "pants" is "the pants are pure cotton, wide-leg style, and gray", the target object is "pants", the editing command is a command to change the color attribute of "pants" from gray to black, the target attribute is the color attribute of "pants", and the supplementary information includes "all attributes of the target object (material, style, color) and / or the product title (high-quality and low-priced pants)". Further, the electronic device inputs the editing command, the target attribute, the first description and the supplementary information into a pre-trained autoregressive model, processes the four-tuple input data through the autoregressive model, and outputs the second description of the target object corresponding to the four-tuple input data. The generated second description is "the pants are pure cotton, wide-leg style, and black". It can be seen that this example realizes fine-tuning and improvement using the first description, retains the "pants are pure cotton, wide-leg style" in the first description, and only modifies the description information corresponding to the color attribute of the target object, realizing fine-tuning and improvement using the original description, satisfying the user's needs to adjust only specified attributes.

[0072] In some embodiments, the autoregressive model is as follows:

[0073]

[0074] Among them, a is the target attribute, q is the editing command, is the first description text, x is the second description text, g is the supplementary information, T is the total length of the generated second description text, and θ is the training parameter of the autoregressive model.

[0075] This embodiment uses the editing command, target attribute, first description text and supplementary information as the four-tuple input data of the pre-trained autoregressive model, processes the four-tuple input data through the autoregressive model, and outputs the second description text of the target object corresponding to the four-tuple input data. It can only adjust the description of the specified attribute without adjusting the description of the unspecified attribute, thereby ensuring that the description content of the unspecified attribute remains unchanged, realizing fine-tuning and improvement using the original description text, and meeting the user's demand for adjusting only the specified attributes.

[0076] The training process of the autoregressive model is described as follows:

[0077] First, determine the five-tuple training sample data of the autoregressive model, where the five-tuple includes: editing command, specified attribute, description text to be edited, description text after editing, and supplementary information. It should be noted that each element in a five-tuple is for the same object.

[0078] Edit command: includes one of the two commands: 1) deleting the description information corresponding to the specified attribute in the description document to be edited; 2) adding the description information corresponding to the specified attribute to the description document to be edited.

[0079] Specified attribute: text that describes a certain attribute of the target object, such as color, material, etc., usually a word or a phrase.

[0080] Description to be edited: Description of the target object to be modified, which contains the description information corresponding to all attributes of the target object.

[0081] Edited description: the description that has been modified according to the editing command and the specified attributes. The edited description is the description that has been tested for fluency.

[0082] Secondly, taking the edited description as the label, the editing command, specified attributes, description to be edited, and supplementary information in the five-tuple training sample data are input into the autoregressive model. The training of the autoregressive model is completed by adjusting the parameters of the autoregressive model (i.e., θ mentioned above) until the output of the autoregressive model is the same as or converges to the edited description as the label.

[0083] It can be seen that in this embodiment, since the edited description is a text that has been tested for fluency, the autoregressive model is trained using a large amount of sample data containing the edited description, and the parameters of the autoregressive model are adjusted to make the second description generated by the trained autoregressive model more fluent and flexible. In addition, the trained autoregressive model can be used to make fine-tuning improvements using the original description, meeting the user's needs to adjust only the specified attributes.

[0084] However, obtaining the edited description is a difficult point in determining the training sample data. The relevant scheme can only ensure the fluency and diversity of the edited description by manually writing the edited description, which has high labor costs and is time-consuming. Therefore, the embodiment of the present disclosure provides the following method for determining the edited description:

[0085] Search the description text to be edited for a word or a short sentence including the specified attribute as the first description information corresponding to the specified attribute; delete the first description information in the description text to be edited to obtain the edited description text; and / or replace the first description information in the description text to be edited with the second description information to obtain the edited description text.

[0086] In some embodiments, two construction methods are provided to determine the edited description text, namely, a rule-based construction method and a model-based construction method.

[0087] 1) The rule-based construction method can simulate manual direct deletion of the first description information corresponding to the specified attribute in the description text to be edited. Specifically: according to the specified attribute and the description text to be edited, directly delete the first description information corresponding to the specified attribute in the description text to be edited (with punctuation marks as the deletion cutoff point) to form the edited description text. The punctuation marks can be any one or more of the following combinations: period, comma, semicolon, exclamation mark, etc.

[0088] In some embodiments, a rule-based construction method determines whether the first description information of a specified attribute is an adjective; if the first description information is an adjective, the adjective is directly deleted; if the first description information is not an adjective and there is only one description information corresponding to an attribute in the short sentence corresponding to the first description information, the entire short sentence is deleted.

[0089] For example, the description to be edited for the product "toy" is "interactive pet toy, size: 4.5 cm". When the editing command is a command to delete the first description information corresponding to the toy type attribute in the description to be edited for the product "toy", the rule-based construction method determines that the first description information corresponding to the toy type attribute is "interactive", which is an adjective, and then directly deletes the adjective to form the edited description, and the edited description is "pet toy, size: 4.5 cm".

[0090] When the editing command is a command to delete the first description information corresponding to the size attribute in the description text to be edited of the product "toy", the rule-based construction method determines that the first description information corresponding to the size attribute is "size: 4.5cm", which is not an adjective and there is only one description information corresponding to one attribute in the short sentence corresponding to the first description information, then the entire short sentence is directly deleted to form the edited description text, and the edited description text is "interactive pet toy".

[0091] For another example, the description text to be edited for the product “apple” is “apples are big, sweet, and red in color.” When the editing command is a command to delete the first description information corresponding to the color attribute in the description text to be edited for the product “apple,” the electronic device will search for words or short sentences related to the color attribute in the description text to be edited as the first description information corresponding to the color attribute. In this example, the short sentence “the color is red” is used as the first description information corresponding to the color attribute. The first description information is directly deleted to form the edited description text, which is “apples are big and sweet.”

[0092] 2) The model-based construction method can simulate the need to modify the context after manually deleting the first description information corresponding to the specified attribute to ensure the fluency of the edited description copy. Specifically: for the specified attribute, the fuzzy matching method is first used to locate the position in the description copy to be edited, and the first description information in the description copy to be edited is replaced with the second description information to obtain the edited description copy. Among them, the fuzzy matching method is a mature technology in the computer field and will not be repeated.

[0093] In some embodiments, the model-based construction method replaces the first description information in the description text to be edited with the second description information to obtain the edited description text. Specifically: the first description information in the description text to be edited is replaced with a preset placeholder to obtain the description text to be filled in; the preset placeholder in the description text to be filled in is filled with the second description information through a pre-trained fill-in-the-blank model to obtain the edited description text.

[0094] Among them, the preset placeholder can be represented by a special symbol "[FILL]", and technical personnel in this field can select the representation of the preset placeholder according to actual applications. This embodiment does not limit the specific representation of the preset placeholder.

[0095] The model-based construction method uses a pre-trained fill-in-the-blank model to perform text replacement on the "[FILL]" position, fills the "[FILL]" in the description text to be filled in with the second description information, and obtains the edited description text. In this embodiment, the model-based construction method constrains the fill-in-the-blank model not to select words or phrases representing attributes as the second description information to ensure the diversity of the edited description text.

[0096] For example, for a new input, a pre-trained fill-in-the-blank model will output multiple results. These multiple results are sorted from high to low in probability and the result with the highest probability is output. However, this result with the highest probability may involve attributes. In order to expand the sample, the result with the highest probability is not selected, but the result with the second highest probability is selected for output, so that sufficient sample data is obtained.

[0097] The training process of the fill-in-the-blank model is as follows:

[0098] First, the training samples of the fill-in-the-blank model are constructed by using the preset placeholder masking method. For example, the target object has five attributes: A, B, C, D, E, and the description of the target object is: A1, B1, C1, D1, E1. Mask C1 with the preset placeholder "[FILL]" to obtain A1, B1, [FILL], D1, E1. C2 is constructed manually. C2 and C1 are different descriptions of attribute C. For example, if attribute C is color and C1 is red, then C2 can be green, and A1, B1, C2, D1, E1 must meet the fluency requirements. A1, B1, [FILL], D1, E1 are used as input samples in the training samples, and A1, B1, C2, D1, E1 are used as labels in the training samples.

[0099] Secondly, if Figure 3 As shown in the figure, A1, B1, C2, D1, and E1 are used as labels, A1, B1, [FILL], D1, and E1 are used as the input of the fill-in-the-blank model, and the parameters of the fill-in-the-blank model are adjusted until the output of the fill-in-the-blank model is A1, B1, C2, D1, and E1 or converges to A1, B1, C2, D1, and E1, then the fill-in-the-blank model training is completed. Since the labels A1, B1, C2, D1, and E1 in the training samples meet the fluency requirements, the description copy output by the trained fill-in-the-blank model can meet the fluency requirements.

[0100] The preset placeholder masking methods mentioned above include: token level masking and phrase level masking, which can increase sample diversity. In the disclosed embodiment, phrase level masking includes the following three masking methods, which are intended to be close to manual editing scenarios, specifically, random masking, attribute-based masking, and conjunction-based masking.

[0101] In word-level masking, use TF-IDF (Term Frequency–Inverse Document Frequency) scores to select and mask key words (except stop words and punctuation marks), where TF-IDF scores can provide a word's uniqueness and local importance at the corpus level. In random masking, you can refer to the length statistics and randomly select 2-5 word blocks for masking. In attribute-based masking, consider using phrase fuzzy matching tools to mask attribute-related words so that the fill-in-the-blank model can better handle attributes. In conjunction-based masking, short sentences connected by coordinating conjunctions are masked because the use of coordinating conjunctions is a common conjunction used to describe the corresponding description information of multiple attributes in the copywriting.

[0102] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all described as a series of action combinations, but those skilled in the art can understand that the embodiments of the present disclosure are not limited by the described action sequence, because according to the embodiments of the present disclosure, some steps can be performed in other sequences or simultaneously. In addition, those skilled in the art can understand that the embodiments described in the specification are all optional embodiments.

[0103] Figure 4 The present invention provides a schematic diagram of an object description text generation device provided in an embodiment of the present invention. The execution subject of the object description text generation device is an electronic device used by a user. The electronic device may be a portable mobile device such as a smart phone, a tablet computer, a laptop computer, a car navigation device, or a smart sports equipment. The electronic device is installed with client software for generating description texts. The client software exchanges data with the navigation server through the network to fine-tune and improve the first description text and generate a second description text. Figure 4 As shown, the object description text generation device may include but is not limited to: an acquisition unit 41 and a generation unit 42.

[0104] An acquisition unit 41 is used to acquire a first description text of a target object in response to an edit command for a target attribute of the target object;

[0105] The generation unit 42 is used to determine the target description information corresponding to the target attribute in the first description text and the target position of the target description information in the first description text based on the editing command, the target attribute and the first description text; retain the other description information in the first description text except the target description information, and modify the target description information at the target position in the first description text to generate a second description text of the target object.

[0106] In some embodiments, the generation unit 42 is used to: based on an editing command that is a command to delete the target description information corresponding to the target attribute in the first description text, search for words or short sentences including the target attribute as the target description information in the first description text, and determine the target position of the target description information in the first description text.

[0107] In some embodiments, the generation unit 42 is also used to: based on the editing command being a command to add target description information corresponding to the target attribute to the first description text, determine that the target position of the target description information in the first description text is the last position of the first description text or a preset position in the first description text.

[0108] In some embodiments, the acquisition unit 41 is used to acquire supplementary information of the target object in response to an edit command for a target attribute of the target object, wherein the supplementary information includes at least one of the following: various attributes of the target object and a title of the target object;

[0109] The generating unit 42 is used to modify the target description information at the target position in the first description text based on the supplementary information.

[0110] In some embodiments, the generation unit 42 is used to: use the editing command, target attribute, first description text and supplementary information as quadruple input data of a pre-trained autoregressive model, process the quadruple input data through the autoregressive model, and output a second description text of the target object corresponding to the quadruple input data.

[0111] In some embodiments, the autoregressive model is trained by:

[0112] Determine the five-tuple training sample data of the autoregressive model, wherein the five-tuple includes: editing command, specified attribute, description text to be edited, description text after editing, and supplementary information;

[0113] Taking the edited description as the label, the editing command, specified attributes, description to be edited, and supplementary information in the five-tuple training sample data are input into the autoregressive model. The training is completed by adjusting the parameters of the autoregressive model until the output of the autoregressive model is the same as the edited description as the label or converges to the edited description as the label.

[0114] In some embodiments, the edited description copy is determined by:

[0115] Searching for a word or a short sentence including a specified attribute in the description text to be edited as first description information corresponding to the specified attribute;

[0116] The first description information in the description text to be edited is deleted to obtain the edited description text; and / or the first description information in the description text to be edited is replaced with the second description information to obtain the edited description text.

[0117] In some embodiments, the generating unit 42 is used to: replace the first description information in the description text to be edited with a preset placeholder to obtain the description text to be filled in;

[0118] The preset placeholders in the description text to be filled in are filled with the second description information through a pre-trained fill-in-the-blank model to obtain the edited description text.

[0119] The details of the above-disclosed embodiments of the device for generating object description texts can refer to the details of the above-disclosed embodiments of the method for generating object description texts, which will not be described again to avoid repetition.

[0120] Figure 5 1 is an exemplary block diagram of a system including at least one computing device and at least one storage device storing instructions provided by an embodiment of the present disclosure. In some embodiments, the system can be used for big data processing, and at least one computing device and at least one storage device can be deployed in a distributed manner, making the system a distributed data processing cluster.

[0121] like Figure 5 As shown, the system includes: at least one computing device 51, and at least one storage device 52 for storing instructions. It can be understood that the storage device 52 in this embodiment can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.

[0122] In some embodiments, the storage device 52 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system and application programs.

[0123] The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic tasks and process hardware-based tasks. The application includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application tasks. The program that implements the method for generating the object description text provided in the embodiment of the present disclosure can be included in the application.

[0124] In the embodiment of the present disclosure, at least one computing device 51 calls a program or instruction stored in at least one storage device 52, specifically, a program or instruction stored in an application program. At least one computing device 51 is used to execute the steps of each embodiment of the method for generating object description text provided in the embodiment of the present disclosure.

[0125] The object description text generation method provided in the embodiment of the present disclosure can be applied to the computing device 51, or implemented by the computing device 51. The computing device 51 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the computing device 51 or the instructions in the form of software. The above-mentioned computing device 51 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0126] The steps of the method for generating the object description provided by the embodiment of the present disclosure can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software units in the decoding processor. The software unit can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a storage device 52, and the computing device 51 reads the information in the storage device 52, and completes the steps of the method in combination with its hardware.

[0127] The present disclosure also provides a computer-readable storage medium that stores a program or instruction. When the program or instruction is executed by at least one computing device, the at least one computing device executes the steps of each embodiment of the method for generating an object description document. To avoid repeated description, it is not repeated here. The computing device may be Figure 5 The computing device 51 is shown. In some embodiments, the computer readable storage medium is a non-transitory computer readable storage medium.

[0128] The embodiments of the present disclosure also provide a computer program product, wherein the computer program product includes a computer program, the computer program is stored in a non-transitory computer-readable storage medium, and at least one processor of a computer reads and executes the computer program from the storage medium, so that the computer executes the steps of each embodiment of the method for generating an object description document. To avoid repeated description, they are not repeated here.

[0129] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0130] Those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present disclosure and to form different embodiments.

[0131] Those skilled in the art will appreciate that the description of each embodiment has its own emphasis, and for parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0132] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for generating an object description copy, the method comprising: In response to an edit command for a target attribute of a target object, obtaining a first description text and supplementary information of the target object; Based on the editing command, the target attribute and the first description document, determining target description information corresponding to the target attribute in the first description document and a target position of the target description information in the first description document; retaining other description information in the first description except the target description information, and modifying the target description information at the target position in the first description to generate a second description of the target object, wherein the second description is obtained by processing the edit command, the target attribute, the first description and the supplementary information through a pre-trained autoregressive model; The pre-trained autoregressive model is trained by the editing command, the specified attribute, the description text to be edited, the description text after editing and the supplementary information.

2. The method according to claim 1, wherein: The determining, based on the editing command, the target attribute and the first description document, target description information corresponding to the target attribute in the first description document and a target position of the target description information in the first description document comprises: Based on the fact that the editing command is a command to delete the target description information corresponding to the target attribute in the first description text, a word or a short sentence including the target attribute is searched in the first description text as the target description information, and a target position of the target description information in the first description text is determined.

3. The method according to claim 1, wherein: The determining, based on the editing command, the target attribute and the first description document, target description information corresponding to the target attribute in the first description document and a target position of the target description information in the first description document comprises: Based on the fact that the editing command is a command to add target description information corresponding to the target attribute to the first description document, the target position of the target description information in the first description document is determined to be the last position of the first description document or a preset position in the first description document.

4. The method according to claim 1, wherein: The method further comprises: In response to an edit command for a target attribute of a target object, obtaining supplementary information of the target object, wherein the supplementary information includes at least one of the following: various attributes of the target object and a title of the target object; The modifying the target description information at the target position in the first description document includes: modifying the target description information at the target position in the first description document based on the supplementary information.

5. The method according to claim 4, wherein: The step of determining, based on the edit command, the target attribute, and the first description document, target description information corresponding to the target attribute in the first description document and a target position of the target description information in the first description document; retaining other description information in the first description document except the target description information, and modifying the target description information at the target position in the first description document to generate a second description document of the target object includes: The editing command, the target attribute, the first description text and the supplementary information are used as quadruple input data of a pre-trained autoregressive model, the quadruple input data is processed by the autoregressive model, and a second description text of the target object corresponding to the quadruple input data is output.

6. The method according to claim 5, wherein: The autoregressive model is trained in the following way: Determine the five-tuple training sample data of the autoregressive model, wherein the five-tuple includes: an editing command, a specified attribute, a description text to be edited, a description text after editing, and supplementary information; Taking the edited description as a label, the editing command, designated attributes, description to be edited, and supplementary information in the five-tuple training sample data are input into the autoregressive model, and the training is completed by adjusting the parameters of the autoregressive model until the output of the autoregressive model is the same as the edited description as the label or converges to the edited description as the label.

7. The method according to claim 6, wherein: The edited description is determined in the following manner: Searching the description document to be edited for a word or a short sentence including the specified attribute as first description information corresponding to the specified attribute; Deleting the first description information in the description document to be edited to obtain an edited description document; And / or, the first description information in the description text to be edited is replaced with the second description information to obtain the edited description text.

8. The method according to claim 7, wherein: The step of replacing the first description information in the description document to be edited with the second description information to obtain the edited description document includes: Replacing the first description information in the description text to be edited with a preset placeholder to obtain a description text to be filled in; The preset placeholders in the description text to be filled in are filled with the second description information through a pre-trained fill-in-the-blank model to obtain an edited description text.

9. A device for generating an object description document, the device comprising: an acquisition unit, configured to acquire a first description text and supplementary information of the target object in response to an edit command for a target attribute of the target object; A generating unit, configured to determine, based on the editing command, the target attribute and the first description document, the target description information corresponding to the target attribute in the first description document and the target position of the target description information in the first description document; retain the other description information in the first description document except the target description information, and modify the target description information at the target position in the first description document to generate a second description document of the target object, wherein the second description document is obtained by processing the editing command, the target attribute, the first description document and the supplementary information through a pre-trained autoregressive model; The pre-trained autoregressive model is trained by the editing command, the specified attribute, the description text to be edited, the description text after editing and the supplementary information.

10. A system comprising at least one computing device and at least one storage device storing instructions, wherein: When the instructions are executed by the at least one computing device, the at least one computing device is prompted to execute the steps of the method for generating an object description text as claimed in any one of claims 1 to 8.

11. A computer-readable storage medium, wherein: The computer-readable storage medium stores a program or instruction, and when the program or instruction is executed by at least one computing device, the at least one computing device executes the steps of the method for generating an object description text as claimed in any one of claims 1 to 8.

12. A computer program product, wherein: The computer program product includes a computer program, which is stored in a computer-readable storage medium. At least one processor of a computer reads and executes the computer program from the storage medium, so that the computer executes the steps of the method for generating an object description text as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for generating design scheme and electronic equipment

    CN113010062A