Method and device for determining merchant label, medium and equipment
By splitting merchant data in modes and converting text, using large language models to generate meta description information, the problems of model identification results decay and single data information in merchant status monitoring are solved, and the accuracy and stability of merchant labels are achieved reduces maintenance costs.
Patent Information
- Application Number
- CN202411830666.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-12-12
AI Technical Summary
In the prior art, during the merchant status monitoring and risk assessment, the model identification results decay with the development of the business, resulting in high maintenance costs and the lack of information in single data, resulting in inaccurate marking.
By dividing merchant data in modalities and converting text, unifying the format of different modal data, using large language models to generate meta description information, and finally obtaining merchant’s merchant labels through the encoding and decoding process, collecting structured and unstructured Data, ensure data richness and alignment, and avoid the loss of single data information.
It realizes a comprehensive and objective description of merchants, reduces model maintenance costs, improves the accuracy and stability of label marking, and avoids the problem of inaccurate marking caused by the lack of single data information.
Smart Images

Figure CN119293241A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computer technology, and in particular to a method, device, medium and equipment for determining a merchant tag. Background Art
[0002] At present, with the development of the Internet, the rapid expansion of e-commerce and online service platforms, the number of merchants on the platform has increased dramatically. In order to ensure the healthy operation of the platform and the protection of consumer rights, it is crucial to conduct continuous status monitoring and risk assessment of merchants. This process can also be called the merchant recognition process.
[0003] In the prior art, since there are many different states that need to be monitored on the merchant side and there is no clear connection between different states, it is generally necessary to first separate the merchant elements that the platform needs to recognize in order to monitor these merchant elements. Among them, merchant recognition can be separated into merchant elements such as the merchant's industry, the merchant's business form, the commodity form, and so on. For the identification of each merchant element, it is necessary to train the corresponding classification model of the merchant element, and by inputting the preset type of merchant data, obtain the merchant's recognition result corresponding to the merchant element, that is, the merchant label. For example, the merchant's sales data is input into the classifier, and the classification result of the merchant's business form output by the classifier is a combination of online and offline, then the label of the merchant's business form is determined to be online + online. By determining the label of the merchant corresponding to each merchant element, the effect of identifying the merchant status can be achieved.
[0004] However, this method of using different models to identify different merchant elements still has certain problems. With the continuous development of business and other objective conditions, the model recognition results will continue to decay, and retraining the model will lead to higher maintenance costs. In order to solve the above problems, this specification provides a method, device, medium and equipment for determining merchant tags. Summary of the invention
[0005] The embodiments of this specification provide a method for determining merchant tags, by segmenting merchant data by modality, performing text conversion separately, using text as an intermediate state, aligning the data of different modalities in a unified format, and then inputting the merchant's comprehensive, objective and meaningful text content, i.e., meta description information, through a large language model, and finally obtaining the merchant tag of the merchant through an encoding and decoding process. On the one hand, the collection of structured data and unstructured data improves the richness of the data required for merchant tagging. On the other hand, by converting it into text form, the alignment of data of different modalities is guaranteed, so that a comprehensive and objective description of the merchant can be achieved later. Based on the integration of unified meta description information, multi-category tagging of merchants also avoids the problem of inaccurate tagging caused by missing information of a single data. The method includes: Acquire merchant data of target merchants in different modes, wherein the merchant data includes structured data and unstructured data; For each modality of merchant data, the merchant data of the modality is input into a trained data encoder of the modality to determine text information describing the merchant data of the modality; Combine the text information of each mode and the preset first prompt text as the description text of the target merchant, and input the description text into A large language model is used to determine meta description information of the target merchant; The meta description information is input into a trained text encoder to determine the characteristics of the target merchant, and then the merchant tag of the target merchant is determined through a tag decoder.
[0006] Furthermore, in some embodiments, Get merchant data of target merchants in different modes, including: According to the identification of the target merchant, acquiring merchant data of the target merchant throughout its life cycle from a database; Dividing the merchant data to determine merchant data of the target merchant belonging to different modes; Wherein, the modality includes at least one of text data, image data, operation sequence data, table data, and merchant graph relationship data.
[0007] Further, in some embodiments, the following method is used to train the data encoder of the modality, wherein: Obtaining merchant data of training merchants for training; For each training merchant, the merchant data of the training merchant in the modality is used as a training sample of the data encoder of the modality, and based on the merchant data of the training merchant in the modality, text information used to describe the merchant data of the modality is obtained as a label of the training sample; Based on the training samples and annotations, the data encoder of the modality is trained.
[0008] Furthermore, in some embodiments, The text information of each mode and the preset prompt text are combined as the description text of the target merchant, specifically including: Determine the labeling requirements of the target merchant; According to the marking requirements, a key mode is determined from each mode; Determining, from among a plurality of preset prompt texts, a prompt text containing the focus mode as the first prompt text; The text information of each mode and the determined first prompt text are combined as a description text of the target merchant.
[0009] Furthermore, in some embodiments, Determining the merchant tag of the target merchant through a tag decoder specifically includes: The characteristics of the target merchant are input into each label classification layer of the label decoder, and the merchant label of the target merchant output by each label classification layer is determined.
[0010] Furthermore, in some embodiments, Determining the merchant tag of the target merchant through a tag decoder specifically includes: Obtaining the tagging information of historical merchants and inputting it into the retrieval enhancement generation network of the tag decoder to obtain a second prompt text for assisting the tag decoder in tagging; The second prompt text and the feature combination of the target merchant are input into the large language network of the label decoder to obtain the merchant label of the target merchant.
[0011] Furthermore, in some embodiments, Get the historical merchant tagging information, including: Obtain historical labeling results for different merchants, and / or obtain pre-set expert labeling rules as labeling information.
[0012] Furthermore, in some embodiments, The method further comprises: Determine the label change frequency and / or the business change frequency of the target merchant in history, and determine the stability of the target merchant, wherein the stability is negatively correlated with the label change frequency, and the stability is negatively correlated with the business change frequency; Determine the labeling frequency of the target merchant according to the stability, the higher the stability, the lower the labeling frequency; The time for re-marking the target merchant is determined according to the last marking time of the target merchant and the determined marking frequency.
[0013] The embodiment of this specification also provides a device for determining a merchant tag, the device comprising: An acquisition module, which acquires merchant data of different modes of a target merchant, wherein the merchant data includes structured data and unstructured data; The encoding module inputs the merchant data of each modality into a trained data encoder of the modality to determine text information describing the merchant data of the modality; An extraction module combines the text information of each modality and a preset first prompt text as a description text of the target merchant, and inputs the description text into a large language model to determine meta description information of the target merchant; The tagging module inputs the meta description information into the trained text encoder to determine the characteristics of the target merchant, and then determines the merchant tag of the target merchant through the tag decoder.
[0014] The embodiments of the present specification also provide a computer program product, wherein the computer program product stores at least one instruction, and the at least one instruction is suitable for being loaded by a processor and executing the above method steps.
[0015] The embodiments of the present specification also provide a storage medium, wherein the storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the steps of the above method.
[0016] An embodiment of the present specification also provides an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the above method.
[0017] In the embodiments of this specification, the merchant data is segmented by modality, and text conversion is performed separately. The data of different modalities are aligned in format by using text as an intermediate state, and the comprehensive, objective and meaningful text content of the merchant, namely the meta description information, is input through a large language model, and finally the merchant tag of the merchant is obtained through the encoding and decoding process. On the one hand, the collection of structured data and unstructured data improves the richness of the data required for merchant labeling. On the other hand, by converting it into text form, the alignment of data of different modalities is guaranteed, so that a comprehensive and objective description of the merchant can be achieved later. Based on the fusion of unified meta description information, the merchant is labeled with multiple categories of labels, which also avoids the problem of inaccurate labeling caused by the missing information of a single data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of a process for determining a merchant tag is provided for an embodiment of this specification.
[0019] Figure 2 A schematic diagram of the merchant recognition process provided in the embodiments of this specification.
[0020] Figure 3 A schematic diagram of the process of obtaining a merchant tag from meta description information provided in an embodiment of this specification.
[0021] Figure 4 A schematic diagram of the structure of a device for determining a merchant tag provided in an embodiment of this specification.
[0022] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0024] At present, in the process of recognizing merchants, the conventional approach is to first disassemble the merchant elements that need to be recognized based on the preset strategy. Different single-item recognition models need to be constructed for different merchant elements, such as the merchant industry category (Merchant Category Code, MCC) model, the merchant business model, and the merchant closeness model. Alternatively, a comprehensive model applied to user recommendation and risk detection, such as the merchant health model, can be used. Subsequently, the merchant's merchant label and confidence score are obtained based on the prediction results of multiple single-item recognition models.
[0025] However, unimodal cognitive models usually focus on fitting a specific label and cannot well integrate and align multimodal merchant information for other single-item related data. At the same time, as the merchant business develops, the accuracy of the model will also decline, and the single-item model needs to be retrained.
[0026] Furthermore, in the process of labeling merchants, many individual models are involved, and the standards of some labeling classifications change frequently. For example, industry classification standards may also change, and the indicator evaluation standards in the same industry may also be updated. Once the above changes occur, the individual models need to be retrained, resulting in high maintenance costs.
[0027] The present invention provides a flowchart of a method for determining a merchant tag according to an embodiment of the present invention.
[0028] Based on this, please see Figure 1 , the following will focus on Figure 1 The process shown is described in detail, and the method may specifically include the following steps: S100: Acquire merchant data of different modes of a target merchant, wherein the merchant data includes structured data and unstructured data.
[0029] Generally speaking, e-commerce and online service platforms have a need for merchant tagging. Therefore, in one or more embodiments of this specification, the method for determining merchant tags can be executed by a server of the platform that has a need for merchant tagging. For the convenience of description, this specification also takes the process of determining merchant tags executed by the server as an example. Among them, the server is a device, or a distributed server composed of multiple devices. This specification does not limit it and can be set as needed.
[0030] Specifically, the server may determine the target merchant based on the merchant tagging request initiated by the user, and execute the process of determining the merchant tag. Of course, the server may also determine the merchant that needs to be tagged from various merchants as the target merchant according to a pre-set rule. This specification does not limit when the server determines the target merchant and executes the subsequent steps.
[0031] First, the server can determine the identification of the target merchant, and obtain multimodal data related to the identification from the data according to the identification as the merchant data of the target merchant. The merchant data obtained by the server may include structured data and unstructured data. For example, obtaining store photos of merchants, screenshots of the homepage of online stores, pictures of merchants' products, etc. are unstructured data, while obtaining merchant transaction data, flow details, background operation data, etc. are structured data.
[0032] Secondly, the server can filter out text data related to the merchant from the merchant data as text modal data. Image data can be filtered out from the merchant data as image modal data. Table data of the merchant can be filtered out from the merchant data as table modal data. Sequence data of merchant operation operations can be filtered out from the merchant data as action modal data. From the database, the graph data containing the merchant's logo is determined, and each obtained graph data is used as relationship graph modal data. Of course, the above-mentioned modes are only examples mentioned in the embodiments of this specification. How to subdivide or merge the data modalities can be set as needed, and this specification does not limit it. That is to say, in one or more embodiments of this specification, each mode of the merchant data includes at least one of: text mode, image mode, table mode, action mode and relationship graph mode, and this example will be used for explanation later.
[0033] In this specification, the form of the target merchant's data is not limited, and the restrictions are minimized from the source of the data to reduce the problem of inaccurate labeling due to missing data. Therefore, this specification does not distinguish between unstructured data and structured data.
[0034] It should be noted that the segmentation of merchant data of different modalities in this specification is not based solely on whether the data is structured or unstructured. This is only one of the judgment conditions.
[0035] S102: For each modality of merchant data, the merchant data of the modality is input into a trained data encoder of the modality to determine text information describing the merchant data of the modality.
[0036] In one or more embodiments of the present specification, after determining the merchant data of each modality, the server may encode the merchant data of each modality separately and determine the text information corresponding to the modality data to facilitate the subsequent fusion of data of different modalities.
[0037] Since for commercial scenarios, especially merchant scenarios, risk control, recommendation and other businesses are generally performed based on structured data as the data source, there is no problem of "unification" between structured data and unstructured data. However, this also leads to data missing, which actually leads to defects in the merchant labels determined. For example, for merchants across business fields, they may provide both consumer electronic products and industrial algorithm services. In this case, labeling the merchant only through data of a certain modality will be insufficient.
[0038] In order to solve the above problems, the embodiments of this specification obtain the target merchants for labeling regardless of whether the data is structured or unstructured. Then there is a new problem, which is how to align the data for subsequent unified processing. If it is still divided into single model processing, the aforementioned problems will exist. In this regard, this specification creatively adopts a textual method to solve the "alignment" between structured data and unstructured data, and data of different modalities.
[0039] Specifically, the server determines the pre-trained data encoder of each modality for the merchant data of each modality. After that, the merchant data of the modality is input into the data encoder of the modality to obtain the text information output by the data encoder of the modality. Since the data encoder is used to convert the data of the corresponding modality into text information with practical meaning, the obtained text information can explain, illustrate and describe the modality data from a textual level.
[0040] For example, taking table modal data as an example, assuming that the table contains the transaction details of the target merchant in the past month, the table is input into the trained table modal data encoder to obtain the following text information: 10% of the merchant's transactions in the past month occurred between 4 and 5 o'clock, 15% occurred between 5 and 6 o'clock, 20% occurred between 6 and 7 o'clock, 25% occurred between 7 and 8 o'clock, and the rest occurred after 8 o'clock. The proportion of transactions after 1 o'clock in the middle of the night is less than 1%. The proportion of transactions with a transaction amount of less than 100 is 20%, 100-200 is 30%, 200-300 is 35%, and the proportion of transactions above 500 is less than 2%. The maximum transaction amount is X, and the minimum transaction amount is Y yuan. In the past week, the number of transactions decreased by 20% compared with the previous week, and the amount decreased by 10%.
[0041] Taking image data as an example, assuming that the picture is a menu image of a merchant, the environmental image data is input into the trained image modality data encoder to obtain the following text information: the merchant is engaged in the catering industry, and the menu content is as follows: A, B, C... Of course, since the merchant's image data generally does not only include menu images, if all image data are input into the image modality data encoder, the obtained text information will be richer.
[0042] From the above examples, it can be seen that through the above encoding process, the server can unify merchant data of different modalities into text form, and the text is not a simple copy of the original data, but a text with high-density information obtained through statistical processing. That is, the data volume is compressed and the effect of "aligning" data of different modalities is achieved.
[0043] S104: combining the text information of each modality and the preset first prompt text as a description text of the target merchant, and inputting the description text into a large language model to determine the meta description information of the target merchant.
[0044] In one or more embodiments of the present specification, after the server obtains the text information corresponding to each modality, it can combine the text information of each modality and the preset first question text to obtain the description text of the target merchant. Then, through the large language model, a comprehensive description text of the target merchant, that is, meta description information, is obtained. The process of the above steps S100~S104 can be regarded as a process of comprehensive cognition of the target merchant, and the meta description information finally obtained is also output by the large language model, so the user can clearly understand it, and the cognition of the merchant is essentially realized, such as Figure 2 As shown. Based on this comprehensive and clear understanding, other businesses can be continued in the future. Although the meta description information is text information, its information density is also high, but the absolute amount of data is still large. In order to facilitate the rapid positioning of the merchant's status, the merchant tag of the target merchant can be determined through subsequent steps.
[0045] Figure 2 Schematic diagram of merchant recognition process provided by the embodiment of this specification, in which it can be seen that the input merchant data is divided into different modes, and the output is the description data of text information, that is, text information A~E, which is then combined and input into the large language model to obtain the output meta description information, that is, Figure 2 "The merchant id is XXX, the name is XX catering, and the address is in XXXX. There is a catering street near the address, and the catering industry is concentrated; the merchant's transaction time is concentrated from X pm to X midnight, and 80% of the transaction amount is distributed in the range of ZZ-ZZZ; the merchant has historically provided a business license and storefront photo, showing that the business scope is catering; the current contracted collection products are XXX; the system has had catering-fast food and snacks category labeling; the association relationship shows that there have been two same-device relationships with the merchant idXXXX in the past 7 days, and the association relationship between the two shows that the legal person is the same." Figure 2 The thick line surrounds the model structure, and the thin line surrounds the input and output data.
[0046] Specifically, in this step, the server can be similar to the process of applying the large language model to summarize and unify data in a conventional manner. By adding the preset first prompt text, the large language model determines what kind of text needs to be output. In addition to the text information of each modality determined in the previous step, the large language model can provide meta description information that contains all objective factual information of the target merchant as detailed as possible, and in a relatively coherent and meaningful summary form. For example, the first prompt text can be: Please help me integrate all objective information of the merchant, and try to describe it as concisely as possible.
[0047] It should be noted that the large language model can directly adopt a mature general large language model, such as the GPT series model. Alternatively, the server can also fine-tune the general large language model to obtain a model specifically used to determine the meta description information. Of course, this manual does not limit how to adjust the large language model, and it can be set as needed. For example, it is necessary to provide as concise meta description information as possible, or to provide structured meta description information, etc.
[0048] S106: Input the meta description information into the trained text encoder to determine the characteristics of the target merchant, and then determine the merchant tag of the target merchant through a tag decoder.
[0049] In one or more embodiments of the present specification, as described above, after the server determines the meta description information of the target merchant, it can determine the merchant tags corresponding to the target merchant based on the meta description information. Since the meta description information is determined based on the full amount of merchant data, it not only has high information density, but also has complete information in a unified text format. Therefore, more accurate merchant tags can be determined through the meta description information.
[0050] Specifically, first, the server may input the meta description information into a trained text encoder to determine the characteristics of the target merchant. The text encoder may be a commonly used text encoder, such as a bidirectional encoder representation from transformers (BRET), an Electra model, a text-to-text transfer transformer (T5) model, etc. This specification does not limit this and can be set as needed.
[0051] After that, the server can input the feature into the label decoder to determine the merchant label of the target merchant. The label decoder can be a neural network structure. By inputting the feature into the label decoder, the feature can be input into different label classification layers respectively to obtain the merchant label of the target merchant output by each label classification layer. Which classification labels are there can be manually set in advance. Of course, the text encoder and label decoder can be regarded as a codec structure obtained through end-to-end training.
[0052] Alternatively, in one or more embodiments of this specification, the server may also introduce a retrieval-augmented generation (RAG) network into the tag decoder, and generate a merchant tag of the target merchant by means of a large language model. Then, there is no need for the user to manually set a new tag, and the powerful summarization capability of the large language model can be used to give the new tag. Then, the tag decoder is actually a combination of a retrieval-augmented generation network and a large language model.
[0053] Specifically, firstly, the server needs to obtain the appropriate second prompt text through RAG, so the server can first obtain the marking information of the historical merchants.
[0054] Afterwards, the labeling information is input into the retrieval enhancement generation network of the label decoder to obtain a second prompt text for assisting the label decoder in labeling.
[0055] Finally, the server can combine the second prompt text and the characteristics of the target merchant and input them into the large language network of the label decoder to obtain the merchant label of the target merchant. The large language network is the large language model included in the label decoder. The large language model can be the same as the large language model in the previous step, or a different large language model. This specification does not limit this and can be set as needed.
[0056] Figure 3 The schematic diagram of the process of obtaining a merchant tag from meta description information provided in this specification shows that the server can obtain the second prompt text through the RAG model, combine it with the feature vector obtained by encoding the text encoder, and input it into the large language model to obtain the output of each merchant tag, that is, Figure 3 The symbols shown on the right. Figure 3 The thick line surrounds the model structure, and the thin line surrounds the input and output data.
[0057] based on Figure 1 The method for determining merchant tags shown in the figure divides merchant data by modality, performs text conversion separately, uses text as an intermediate state, aligns the data of different modalities in a unified format, and then inputs the merchant's comprehensive, objective and meaningful text content, i.e., meta description information, through a large language model. Finally, the merchant tag of the merchant is obtained through the encoding and decoding process. On the one hand, the collection of structured data and unstructured data improves the richness of the data required for merchant tagging. On the other hand, by converting it into text form, the alignment of data of different modalities is guaranteed, so that a comprehensive and objective description of the merchant can be achieved later. Based on the integration of unified meta description information, multi-category labeling of merchants is performed, which also avoids the problem of inaccurate labeling caused by missing information of single data.
[0058] It should be further explained that the process of determining the household label mentioned above in this manual relies on a large language model to align and integrate the multimodal data of the merchant domain throughout its life cycle in the form of text description, thereby improving the merchant cognition ability and effect. In addition, the RAG model can be used in the future to integrate expert experience and historical precipitation labels, that is, the labeling information of historical merchants. The effect of the single-modal small-parameter model is greatly improved through the large model's parameter quantity and understanding and reasoning capabilities.
[0059] pass Figure 2 as well as Figure 3 It can be seen that this manual provides a two-stage modeling of merchant cognition. In the future, we only need to focus on maintaining the large model of the aforementioned meta description information, and then we can output merchant tags in a lightweight manner through a simple classification layer based on the meta description information it produces. This reduces the amount of model retraining required due to category changes or new demands, and reduces model maintenance costs.
[0060] In addition, in one or more embodiments of the present specification, since the requirements for merchant labels of target merchants are different in different business scenarios, when determining the first prompt text, a prompt text that better meets the requirements can be provided to improve labeling efficiency.
[0061] Specifically, the server may first determine the labeling requirements for the target merchant. Specifically, the server may first determine the labeling requirements for the target merchant input by the user, and the user may be an employee in charge of monitoring the status of merchants in the platform. Of course, the labeling requirements are input by the user as needed, and may be natural language text. Alternatively, the server may provide the user with various optional labeling options, and the user may select the required labeling options as the labeling requirements for the target merchant. These labeling options may be positive labeling requirements, such as requiring a summary of which type of data to be highlighted, or may be reverse labeling options, such as requiring a summary of which type of data to be ignored. This specification does not limit how the labeling requirements are specifically determined, and the labeling requirements are used for subsequent models to understand the directions that need to be summarized and the directions that need to be ignored.
[0062] For example, when the user is not sensitive to the transaction content of the merchant but is more concerned about the relationship between the target merchant and other merchants, the labeling requirement may be: reduce the transaction description and increase the object relationship description.
[0063] Afterwards, the server can determine the key mode from each mode according to the labeling requirement. Continuing with the above example, the key modal data is the graph data. Specifically, the server can determine the keywords in the labeling requirement, and determine the key mode in each mode according to the correspondence between the preset keywords and each modal data. Of course, in the aforementioned embodiment, the labeling requirement may include positive and reverse requirements. In addition to determining the keywords, the server can also determine the positive words or negative words corresponding to the keywords according to the sentence order. The server can use the keywords corresponding to the positive words as keywords to determine the key mode.
[0064] Then, the server can determine the prompt text containing the key mode from the preset multiple prompt texts as the first prompt text. Of course, if there are multiple key modes corresponding to the keyword, the server can determine the prompt text containing all the key modes. If there is no prompt text containing all the key modes, the server can determine the prompt text containing some of the key modes, and determine multiple prompt texts that can cover all the key modes after combination as the first prompt text.
[0065] Furthermore, since the aforementioned requirements that need to be ignored or simplified may also be included when determining the marking requirements, when determining the key mode, the mode corresponding to the requirements to be ignored or simplified may also be determined as a non-key mode. Therefore, when determining the first prompt text, the corresponding ignored or simplified text may also be determined based on the non-key mode. Continuing with the above example, the server may use the key mode as graph data and the non-key mode as transaction data, then the server may also determine the following prompt text "Simplify the description of the transaction class, and describe the relationships between different merchants, especially the relationships with legal persons, as extensively as possible."
[0066] Finally, the server may combine the text information of each mode and the determined first prompt text as a description text of the target merchant.
[0067] Further, in this specification, when obtaining the labeling information of historical merchants for inputting the RAG model, the server may obtain the labeling results of different merchants in history as the labeling information. Alternatively, it may also obtain the pre-set expert labeling rules as the labeling information. Alternatively, both may be used as the labeling information.
[0068] Furthermore, as described in step S100, this specification does not limit when the server executes the process of determining the merchant tag. However, when the server monitors the merchant status according to a preset frequency, the server needs to automatically and repeatedly determine the merchant tag of the target merchant. For different target merchants, the server can use different frequencies for tagging.
[0069] Specifically, the server may determine the target merchant's historical label change frequency and / or the target merchant's historical business change frequency, and determine the target merchant's stability, which is negatively correlated with the label change frequency and the business change frequency.
[0070] According to the stability, the labeling frequency of the target merchant is determined. The higher the stability, the lower the labeling frequency.
[0071] According to the last marking time of the target merchant and the determined marking frequency, the time to re-mark the target merchant is determined.
[0072] In addition, in the embodiments of this specification, the data encoder is an encoder used to convert data of unintelligible modalities into text data, thereby achieving the effects of subsequent fusion and data alignment. Therefore, the encoder is not a common encoder that is only used for feature extraction. The output text information also needs to be a natural language that is easy for a large language model to understand. Therefore, the data encoder can be trained using the following method.
[0073] First, the server can obtain the merchant data of the training merchant for training. The merchant data is consistent with the requirements for merchant data in the aforementioned step S100, but because the data encoder needs to be pre-trained, even if the training merchant is physically the same merchant as the target merchant, the corresponding merchant data is also historical merchant data. Of course, the server can determine a large amount of merchant data of the training merchant for training the data encoder of each modality to improve the effect of training the data encoder.
[0074] Afterwards, for each modality, the server needs to train the data encoder corresponding to the modality. For the data encoder corresponding to the modality that needs to be trained, the server can use the merchant data of the training merchant in the modality as the training sample of the data encoder of the modality for each training merchant. And based on the merchant data of the training merchant in the modality, obtain text information used to describe the merchant data of the modality as the annotation of the training sample. Among them, the annotation of each training sample can be manually annotated.
[0075] Finally, the server can train the data encoder of the modality based on the training samples and annotations, thereby obtaining the data encoder of each modality.
[0076] See also Figure 4 , is a schematic diagram of a structure of a device for determining a merchant tag provided in an embodiment of this specification. Figure 4 As shown, the device for determining the merchant tag can be implemented as all or part of the electronic device through software, hardware or a combination of both. According to some embodiments, the device for determining the merchant tag includes an acquisition module 401, an encoding module 402, an extraction module 403, and a marking module 404, specifically including: An acquisition module 401 acquires merchant data of different modes of a target merchant, wherein the merchant data includes structured data and unstructured data; The encoding module 402 inputs the merchant data of each modality into a trained data encoder of the modality to determine text information describing the merchant data of the modality; The extraction module 403 combines the text information of each modality and the preset first prompt text as the description text of the target merchant, and inputs the description text into the large language model to determine the meta description information of the target merchant; The tagging module 404 inputs the meta description information into the trained text encoder to determine the characteristics of the target merchant, and then determines the merchant tag of the target merchant through a tag decoder.
[0077] Optionally, the acquisition module 401 is used to obtain the merchant data of the target merchant throughout its life cycle from the database according to the identifier of the target merchant, divide the merchant data, and determine the merchant data of the target merchant belonging to different modalities, wherein the modality includes at least one of text data, image data, operation sequence data, table data, and merchant graph relationship data.
[0078] Optionally, the device also includes a training module 405, which is used to obtain merchant data of training merchants for training, and for each training merchant, use the merchant data of the training merchant in the modality as a training sample for the data encoder of the modality, and based on the merchant data of the training merchant in the modality, obtain text information used to describe the merchant data of the modality as an annotation of the training sample, and train the data encoder of the modality according to the training samples and the annotations.
[0079] Optionally, the extraction module 403 is used to determine the labeling requirements of the target merchant, determine the key mode from each mode according to the labeling requirements, determine the prompt text containing the key mode from the preset multiple prompt texts as the first prompt text, and combine the text information of each modality and the determined first prompt text as the description text of the target merchant.
[0080] Optionally, the labeling module 404 is used to input the characteristics of the target merchant into each label classification layer of the label decoder, and determine the merchant label of the target merchant output by each label classification layer.
[0081] Optionally, the labeling module 404 obtains the labeling information of historical merchants and inputs it into the retrieval enhancement generation network of the label decoder to obtain a second prompt text for assisting the label decoder in labeling, and combines the second prompt text and the features of the target merchant and inputs them into the large language network of the label decoder to obtain the merchant label of the target merchant.
[0082] Optionally, the labeling module 404 obtains historical labeling results for different merchants and / or obtains pre-set expert labeling rules as labeling information.
[0083] Optionally, acquisition module 401 determines the frequency of label changes in the history of the target merchant and / or the frequency of business changes in the history of the target merchant, determines the stability of the target merchant, the stability is negatively correlated with the frequency of label changes, and the stability is negatively correlated with the frequency of business changes. Based on the stability, the marking frequency of the target merchant is determined, the higher the stability, the lower the marking frequency. Based on the last marking time of the target merchant and the determined marking frequency, the time to re-mark the target merchant is determined.
[0084] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.
[0085] The present specification also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 1 The method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 The specific description of the illustrated embodiment will not be repeated here.
[0086] The present specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 The method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 The specific description of the illustrated embodiment will not be repeated here.
[0087] The embodiments of this specification also provide Figure 5 The structural diagram of the electronic device shown in FIG. Figure 5 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above data processing method.
[0088] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0089] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with hardware entity modules. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0090] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0091] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0092] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0093] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0097] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0098] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0099] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0100] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0101] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0103] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0104] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A method for determining a merchant tag, comprising: Acquire merchant data of target merchants in different modes, wherein the merchant data includes structured data and unstructured data; For each modality of merchant data, the merchant data of the modality is input into a trained data encoder of the modality to determine text information describing the merchant data of the modality; Combining the text information of each modality and the preset first prompt text as the description text of the target merchant, and inputting the description text into the large language model to determine the meta description information of the target merchant; The meta description information is input into a trained text encoder to determine the characteristics of the target merchant, and then the merchant tag of the target merchant is determined through a tag decoder.
2. The method according to claim 1, obtaining merchant data of target merchants in different modes, specifically comprising: According to the identification of the target merchant, acquiring merchant data of the target merchant throughout its life cycle from a database; Dividing the merchant data to determine merchant data of the target merchant belonging to different modes; Wherein, the modality includes at least one of text data, image data, operation sequence data, table data, and merchant graph relationship data.
3. The method of claim 1, wherein the data encoder of the modality is trained by the following method, wherein: Obtaining merchant data of training merchants for training; For each training merchant, the merchant data of the training merchant in the modality is used as a training sample of the data encoder of the modality, and based on the merchant data of the training merchant in the modality, text information used to describe the merchant data of the modality is obtained as a label of the training sample; Based on the training samples and annotations, the data encoder of the modality is trained.
4. The method according to claim 1, combining the text information of each mode and the preset prompt text as the description text of the target merchant, specifically comprising: Determine the labeling requirements of the target merchant; According to the marking requirements, a key mode is determined from each mode; Determining, from among a plurality of preset prompt texts, a prompt text containing the focus mode as the first prompt text; The text information of each mode and the determined first prompt text are combined as a description text of the target merchant.
5. The method according to claim 1, determining the merchant tag of the target merchant through a tag decoder, specifically comprising: The characteristics of the target merchant are input into each label classification layer of the label decoder, and the merchant label of the target merchant output by each label classification layer is determined.
6. The method according to claim 1, determining the merchant tag of the target merchant by a tag decoder, specifically comprises: Obtaining the tagging information of historical merchants and inputting it into the retrieval enhancement generation network of the tag decoder to obtain a second prompt text for assisting the tag decoder in tagging; The second prompt text and the feature combination of the target merchant are input into the large language network of the label decoder to obtain the merchant label of the target merchant.
7. The method according to claim 6, obtaining the marking information of historical merchants, specifically comprising: Obtain historical labeling results for different merchants, and / or obtain pre-set expert labeling rules as labeling information.
8. The method according to any one of claims 1 to 7, further comprising: Determine the label change frequency and / or the business change frequency of the target merchant in history, and determine the stability of the target merchant, wherein the stability is negatively correlated with the label change frequency, and the stability is negatively correlated with the business change frequency; Determine the labeling frequency of the target merchant according to the stability, the higher the stability, the lower the labeling frequency; The time for re-marking the target merchant is determined according to the last marking time of the target merchant and the determined marking frequency.
9. A device for determining a merchant tag, the device comprising: An acquisition module, which acquires merchant data of different modes of a target merchant, wherein the merchant data includes structured data and unstructured data; The encoding module inputs the merchant data of each modality into a trained data encoder of the modality to determine text information describing the merchant data of the modality; An extraction module combines the text information of each modality and a preset first prompt text as a description text of the target merchant, and inputs the description text into a large language model to determine meta description information of the target merchant; The tagging module inputs the meta description information into the trained text encoder to determine the characteristics of the target merchant, and then determines the merchant tag of the target merchant through the tag decoder.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
11. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method as claimed in any one of claims 1 to 8.
12. A computer program product having at least one instruction stored thereon, characterized in that: When the at least one instruction is executed by the processor, the steps of the method described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Commodity label generation method based on large language model and electronic equipment
CN117788109A
Multi-modal large language model training method, correlation calculation method and label generation method
CN118113901A
Target identification method, commodity identification method, equipment and storage medium
CN118279705A
Label circling method and device based on large language model and computer equipment
CN118551769A
Systems and methods for event tracking
US12117984B1