An intelligent distribution method and device based on text similarity analysis and large model

By adopting intelligent distribution methods based on text similarity analysis and large models in urban governance scenarios, the problem of inefficiency caused by relying on manual events in the existing technology is solved, and efficient and accurate event distribution is achieved.

CN119740783APending Publication Date: 2025-04-01DIGITAL CHONGQING BIG DATA APPL DEV CO LTD

Patent Information

Application Number
CN202411694708.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-04-01

Smart Images

  • Figure CN119740783A_ABST
    Figure CN119740783A_ABST
Patent Text Reader

Abstract

The present invention provides an intelligent distribution method based on text similarity analysis and a large model, including: obtaining attribute information of an event to be distributed, extracting a matching attribute set from the attribute information; performing similarity matching between the event to be distributed and historical events based on the matching attribute set; if there is a historical event that matches the similarity of the event to be distributed, automatically distributing the event to be distributed according to the distribution result of the historical event that matches the similarity of the event to be distributed; if there is no historical event that matches the similarity of the event to be distributed, inputting the attribute information of the event to be distributed into a pre-trained large model, the large model outputs a distribution suggestion, and the distribution personnel perform manual distribution with reference to the distribution suggestion. The present invention also provides an intelligent distribution device based on text similarity analysis and a large model, a computer program product, and an electronic device. The present invention improves the accuracy and efficiency of event distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an intelligent distribution method and device based on text similarity analysis and a large model. Background Art

[0002] Events in the urban governance scenario refer to various situations or problems that occur during the operation and management of the city and require attention, processing or resolution, including sudden emergencies and daily management events. Specifically, they include public safety events such as fires, gas leaks, explosions, traffic accidents, natural disasters (such as floods, earthquakes), environmental protection events such as water pollution, air pollution, noise pollution, and solid waste disposal, traffic management events such as traffic congestion, traffic accidents, damage to traffic facilities, and illegal parking, public facility maintenance events such as damaged street lights, damaged roads, clogged sewers, and damaged park facilities, and community service events such as resident complaints, community activity organization, and neighborhood dispute mediation. In the urban governance scenario, after an event is reported, it needs to be quickly distributed to the corresponding department for processing. However, most existing events rely on manual distribution, which has low distribution efficiency and low real-time performance, especially for complex events that rely entirely on manual experience, resulting in lower efficiency.

[0003] In order to improve the efficiency of event allocation, the Chinese patent with publication number CN113535959A discloses an automatic event allocation method for grassroots governance, including: step 1, building a place name address gene library; step 2, extracting event geographical elements; step 3, extracting event description keywords; step 4, building a historical event case library; step 5, calculating event similarity; step 6, automatic event allocation. This patent uses natural language processing technology to analyze and mine the similarities between events, finds the most similar cases to the event to be processed and provides solution references. Although it improves the efficiency of event allocation to a certain extent, manual allocation is still required for events that cannot be matched with similar cases. As the complexity and diversity of events increase, more and more events cannot find similarity matching cases and need to return to manual allocation, and there is still a problem of low allocation efficiency. Summary of the invention

[0004] The present invention aims to solve the technical problem that the existing event distribution method in urban governance scenarios relies on manual distribution and has low efficiency, and provides an intelligent distribution method and device based on text similarity analysis and large models.

[0005] In order to achieve the above-mentioned object of the present invention, according to a first aspect of the present invention, the present invention provides an intelligent distribution method based on text similarity analysis and a large model, comprising: obtaining attribute information of an event to be distributed, extracting a matching attribute set from the attribute information; performing similarity matching between the event to be distributed and historical events based on the matching attribute set; if there is a historical event that matches the similarity of the event to be distributed, automatically distributing the event to be distributed according to the distribution result of the historical event that matches the similarity of the event to be distributed; if there is no historical event that matches the similarity of the event to be distributed, inputting the attribute information of the event to be distributed into a pre-trained large model, the large model outputs a distribution suggestion, and the distribution personnel perform manual distribution with reference to the distribution suggestion.

[0006] Further preferably, after completing the allocation of the event to be allocated, the method further includes:

[0007] The attribute information of the event to be distributed, the matching attribute set and the distribution result of the event to be distributed are saved in the historical event library.

[0008] Further preferably, after completing the allocation of the event to be allocated, the method further includes:

[0009] Score the allocation suggestions output by the large model to obtain the scoring results;

[0010] The scoring results are used to fine-tune the large model parameters through Prompt Tuning.

[0011] Further preferably, extracting the matching attribute set from the attribute information includes:

[0012] Selecting at least two of the event name, event type, event content and event level from the attribute information as matching attributes, and all matching attributes form a matching attribute set;

[0013] Configure an attribute weight for each matching attribute. The sum of the attribute weights of all matching attributes in the matching attribute set is equal to 1.

[0014] Further preferably, the to-be-allocated event and the historical event are matched for similarity based on a matching attribute set, including:

[0015] Calculating the event similarity between the event to be allocated and the historical event, wherein the event similarity is the similarity between the matching attribute set of the event to be allocated and the matching attribute set of the historical event;

[0016] If there is at least one historical event in the historical event database whose event similarity with the event to be allocated is greater than or equal to the event similarity threshold, it is considered that there is a historical event that matches the similarity with the event to be allocated, and the historical event with the highest event similarity with the event to be allocated is used as the similarity matching event of the event to be allocated;

[0017] If the event similarities between all historical events in the historical event database and the event to be allocated are less than the event similarity threshold, it is considered that there is no historical event that matches the similarity of the event to be allocated.

[0018] Further preferably, calculating the event similarity between the event to be allocated and the historical event includes:

[0019] Calculate the text similarity between each matching attribute in the matching attribute set of the event to be allocated and the corresponding matching attribute in the matching attribute set of the historical event;

[0020] Multiplying the text similarity by the attribute weight of each matching attribute to obtain the attribute similarity of each matching attribute;

[0021] The attribute similarities of all matching attributes of the event to be allocated are summed to obtain the event similarity between the event to be allocated and the historical event.

[0022] Further preferably, the text similarity calculation process of the matching attribute m of the event to be allocated and the corresponding matching attribute n in the matching attribute set of historical events includes:

[0023] Find the character union of matching attribute m and matching attribute n;

[0024] Count the frequency of each character in the character set appearing in the matching attribute m to obtain the first hit set;

[0025] Count the frequency of each character in the character set appearing in the matching attribute n to obtain a second hit set;

[0026] Calculating the set similarity between the first hit set and the second hit set, and using the set similarity as the text similarity between the matching attribute m and the matching attribute n;

[0027] Wherein, m represents the index of the matching attribute in the matching attribute set of the event to be allocated, and n represents the index of the matching attribute in the matching attribute set of the historical event.

[0028] In order to achieve the above-mentioned purpose of the present invention, according to the second aspect of the present invention, the present invention provides an intelligent distribution device based on text similarity analysis and a large model, which is used to implement the intelligent distribution method based on text similarity analysis and a large model described in the first aspect of the present invention, including: an acquisition module, which acquires the attribute information of the event to be distributed and extracts a matching attribute set from the attribute information; a similarity matching module, which performs similarity matching between the event to be distributed and the historical event based on the matching attribute set; a distribution module, which automatically distributes the event to be distributed according to the distribution result of the historical event matching the similarity of the event to be distributed if there is a historical event matching the similarity of the event to be distributed; if there is no historical event matching the similarity of the event to be distributed, the attribute information of the event to be distributed is input into the pre-trained large model, the large model outputs a distribution suggestion, and the distribution personnel perform manual distribution with reference to the distribution suggestion.

[0029] In order to achieve the above-mentioned purpose of the present invention, according to the third aspect of the present invention, the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of an intelligent distribution method based on text similarity analysis and a large model as described in the first aspect of the present invention.

[0030] In order to achieve the above-mentioned purpose of the present invention, according to the fourth aspect of the present invention, the present invention provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the intelligent distribution method based on text similarity analysis and a large model described in the first aspect of the present invention.

[0031] Beneficial technical effects of the present invention: After acquiring the attribute information of the event to be allocated, the present invention first performs similarity matching with the historical events in the historical event library. When there is a historical event with matching similarity, the event to be allocated is automatically allocated according to the allocation result of the historical event with matching similarity. When there is no historical event with matching similarity, the allocation suggestion obtained by the big model is used as a reference for manual allocation, which reduces manual participation and greatly improves the allocation efficiency. At the same time, compared with the manual allocation that completely relies on experience and offline communication, accurate matching can be achieved based on text similarity analysis. As long as there is similar historical allocation data, accurate allocation can be achieved. For the situation where text similarity cannot be allocated, reasonable suggestions are given in combination with the big model during manual allocation to improve the allocation accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1It is a flow chart of an intelligent allocation method based on text similarity analysis and a large model in a preferred embodiment of the present invention;

[0033] Figure 2 It is a specific execution process of the intelligent allocation method in an application scenario of the present invention;

[0034] Figure 3 It is a system block diagram of an intelligent distribution device based on text similarity analysis and a large model in a preferred embodiment of the present invention;

[0035] Figure 4 It is a schematic structural diagram of an electronic device in a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0036] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0037] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0038] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.

[0039] The execution subject of the intelligent distribution method based on text similarity analysis and large models includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided in the embodiment of the present application. In other words, the intelligent distribution method based on text similarity analysis and large models can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0040] The present invention provides an intelligent allocation method based on text similarity analysis and a large model. In a preferred embodiment, Figure 1 As shown, including:

[0041] Step S1, obtaining attribute information of the event to be distributed, and extracting a matching attribute set from the attribute information.

[0042] The attribute information of the event to be allocated includes event content, event time, event location, event level (which can be an emergency level or an important level, such as general, urgent, and very urgent, and general, important, and very important), event type, event name, etc. Preferably, a matching attribute set that can significantly characterize the characteristics of the event to be allocated is extracted from the attribute information so as to quickly and accurately perform similarity matching in the historical event library.

[0043] In this implementation, preferably, in step S1, extracting a matching attribute set from the attribute information includes:

[0044] Step S11, at least two of the event name, event type, event content and event level are selected from the attribute information as matching attributes, and all matching attributes form a matching attribute set. Event types include public safety events, environmental protection events, traffic management events, public facility maintenance events, and community service events. Event content is a description of the event. For example, in an example, the event content is: "Someone was found fishing by the river."

[0045] Step S12: configuring an attribute weight for each matching attribute, and the sum of the attribute weights of all matching attributes in the matching attribute set is equal to 1.

[0046] In an example, the matching attribute set includes four matching attributes: event name, event type, event content, and event level. The four matching attributes each have an attribute weight, and the sum of the four attribute weights is equal to 1.

[0047] Step S2: similarity matching is performed between the event to be allocated and the historical event based on a matching attribute set.

[0048] Step S3, if there is a historical event that matches the similarity of the event to be allocated, the event to be allocated is automatically allocated according to the allocation result of the historical event that matches the similarity of the event to be allocated;

[0049] If there is no historical event that matches the similarity of the event to be allocated, the attribute information of the event to be allocated is input into the pre-trained large model, and the large model outputs allocation suggestions. The allocation personnel refer to the allocation suggestions for manual allocation.

[0050] In this implementation, the allocation result or allocation suggestion includes at least one department to which the event to be allocated should be allocated. For example, in an example of this implementation, a grassroots grid worker reported an event: a gas leak occurred at xx time and xx location. After the event was reported, similarity matching was first performed from the historical event library. If the similarity matching was unsuccessful, the allocation suggestion was obtained using the large model, and the event was allocated based on the allocation suggestion. The final allocation result was: gas department and fire department.

[0051] In this embodiment, the large model is preferably but limited to the existing GLM large model or GPT-3, etc. In this embodiment, the output of the large model is in text form, and the output text includes at least one department name allocated for the event to be allocated, and these departments can be gas departments, market supervision departments, fire departments, etc.

[0052] In this embodiment, the pre-training process of the large model includes:

[0053] Step 1: construct training samples based on historical events and their allocation results. The training samples include input text and allocation text. The text obtained by segmenting and denoising the attribute information of historical events is called the input text of the input large model. The allocation text is the department name of all the executing departments included in the allocation results of historical events. Obtain the sample set according to step 1.

[0054] Step 2: Based on the open source big model, build the network structure of the big model and set hyperparameters such as learning rate. Divide the training set and validation set from the sample set.

[0055] Step 3: Use the sample set to train the network structure of the large model, calculate the loss function during the training process, obtain the gradient of the loss function, update the network parameters of the large model according to the gradient of the loss function using the gradient descent method, continue training until the training stop condition is reached, and output the large model after the training is completed;

[0056] Step 4: Use the validation set to validate the large model trained in step 3.

[0057] The training stop condition in step 3 is that the number of training times reaches the preset maximum number of training times, or the loss function no longer decreases or the change value of the loss function is less than the preset difference. The loss function is preferably, but not limited to, the existing cross entropy loss function.

[0058] Further preferably, the loss function is set to:

[0059]

[0060] Among them, N represents the number of training samples in each training batch, n represents the training sample index, and y n Indicates the output text obtained after the input text of the nth training sample in training is input into the large model, y' n represents the real allocation text of the nth training sample. The first function f 1 (y n ,y' n ) means to find y n With y' n ; 1≤n≤N. The historical event set S represents the set of all historical events in the historical event library whose event similarity with the event corresponding to the nth training sample is less than the event similarity low threshold, and the event similarity low threshold is less than the event similarity threshold. Specifically, the event similarity low threshold can be 1 / 4 to 1 / 3 of the event similarity low threshold. The historical event set S represents a set of historical events with very low relevance to the event corresponding to the nth training sample. |S| represents the size of the historical event set S, that is, the number of historical events it includes. 1≤k≤S. y' k represents the allocation text of the kth historical event in the historical event set S, f 2 (y n ,y' k ) means to find y n With y' k The text similarity can be obtained through the subsequent set similarity S0 calculation formula, which will not be repeated here.

[0061] The first term in the above loss function represents the difference between the output text of the large model and the actual distribution text. The first function is directly used to obtain the predicted output text y n With the real allocation text y' nThe higher the similarity, the smaller the first loss, which means that the training process optimizes the network parameters with the allocation text as the target. At the same time, the second term in the above loss function introduces a set of historical events with low relevance to the events corresponding to the training samples. In order to make the output text of the predicted output more accurate, the second term in the loss function makes the output text obtained by training differ greatly from the actual allocation text of the historical events in the historical event set S, avoiding obtaining similar execution department texts with irrelevant historical events, thereby improving the accuracy of the output text and the convergence speed of large model training.

[0062] In a preferred embodiment, after the allocation of the event to be allocated is completed, that is, after the allocation personnel manually allocate the event with reference to the allocation suggestion, or after the allocation is automatically allocated according to the allocation result of the historical event matching the similarity with the event to be allocated, the method further includes:

[0063] Step S4, saving the attribute information of the event to be distributed, the matching attribute set and the distribution result of the event to be distributed in the historical event library.

[0064] In this implementation, the allocated events are stored and collected to facilitate subsequent similarity matching and provide rich samples for large model pre-training.

[0065] In a preferred embodiment, in order to reduce the time consumption and computing resource consumption of large model training and improve the allocation accuracy of large models, after completing the allocation of events to be allocated, it also includes:

[0066] Score the allocation suggestions output by the large model to obtain the scoring results;

[0067] The scoring results are used to fine-tune the large model parameters through Prompt Tuning.

[0068] In this embodiment, the core idea of ​​the Prompt Tuning fine-tuning method is to add a small amount of learnable continuous prompts to the pre-trained language model. These prompts are called virtual tokens. These continuous prompts can be regarded as additional parameters of the large model, which are randomly initialized in the pre-training stage and optimized in the fine-tuning process of downstream tasks. In this way, the large model can quickly and effectively adapt to different tasks. By providing appropriate prompt tokens and mask labels, the model can be trained to complete specific tasks and generate high-quality text content. In this embodiment, the score of each allocation suggestion (which can be an evaluation level) is used as a virtual token as a learnable continuous prompt to guide the large model to complete the training. The evaluation level is converted into a learnable vector by means of soft prompts, and the large model understands the task by training these vectors. In the input, the soft prompt of the score is embedded in the input vector of the large model.

[0069] This embodiment has the following advantages:

[0070] 1. High flexibility: Prompt Tuning does not require manual feature design or modification of model structure, but only requires providing appropriate prompts to adapt to specific tasks. This makes it a highly flexible fine-tuning method.

[0071] 2. High efficiency: Since there is no need to manually design features or modify the model structure, Prompt Tuning's training speed is usually faster than traditional fine-tuning methods.

[0072] 3. Strong generalization ability: Since prompt tokens can be flexibly adapted to various tasks, Prompt Tuning has strong generalization ability. The same prompt tokens and mask labels can be shared between multiple tasks, thereby improving the reusability of large models.

[0073] In a preferred embodiment, in step S2, the event to be allocated and the historical event are matched for similarity based on the matching attribute set, including:

[0074] Step S21, calculating the event similarity between the event to be allocated and the historical event, where the event similarity is the similarity between the matching attribute set of the event to be allocated and the matching attribute set of the historical event;

[0075] Step S22, judging step:

[0076] If there is at least one historical event in the historical event database whose event similarity with the event to be allocated is greater than or equal to the event similarity threshold, it is considered that there is a historical event that matches the similarity with the event to be allocated, and the historical event with the highest event similarity with the event to be allocated is used as the similarity matching event of the event to be allocated;

[0077] If the event similarities between all historical events in the historical event database and the event to be allocated are less than the event similarity threshold, it is considered that there is no historical event that matches the similarity of the event to be allocated.

[0078] In this embodiment, the event similarity between the allocation event and the historical event is converted into the similarity of the matching attribute sets of the two, which can simplify the similarity solving process and improve efficiency. The similarity threshold can be set based on experience.

[0079] In this embodiment, the event to be allocated can be subjected to the above-mentioned similarity matching judgment with the historical events in the historical event library, or the above-mentioned similarity matching judgment can be performed on the event to be allocated in order from the newest to the oldest according to the storage time of the historical events, or the historical events in the historical event library are classified and stored according to the event type, and the event to be allocated and the historical events of the same event type are subjected to the above-mentioned similarity matching judgment, which can improve efficiency.

[0080] In this embodiment, preferably, in step S21, calculating the event similarity between the event to be allocated and the historical event includes:

[0081] Step a, calculate the text similarity between each matching attribute in the matching attribute set of the event to be allocated and the corresponding matching attribute in the matching attribute set of the historical event. Let the allocation event be j, the historical event in the historical event library be i, the matching attribute set of the allocation event corresponds to the matching attribute in the matching attribute set of the historical event one by one, and calculate the text similarity of each pair of matching attributes.

[0082] Step b, multiplying the text similarity by the attribute weight of each matching attribute to obtain the attribute similarity of each matching attribute; that is, multiplying the text similarity of each matching attribute by the attribute weight of the matching attribute to obtain the attribute similarity of the matching attribute. Assume that there are M matching attributes in the matching attribute set of the allocation event j, and the text similarity of the mth matching attribute is S0 m , with weight w m , m∈[1,M], then the attribute similarity of the mth matching attribute is: S0 m *w m .

[0083] Step c: summing up the attribute similarities of all matching attributes of the event to be allocated, and obtaining the event similarity between the event to be allocated and the historical event.

[0084] In this embodiment, further preferably, to improve the calculation accuracy of text similarity, the process of calculating the text similarity between the matching attribute m of the to-be-allocated event and the corresponding matching attribute n in the matching attribute set of the historical event, that is, assuming that in the allocation event j, the matching attribute m corresponds to the matching attribute n of the historical event i, the process of calculating the text similarity between the matching attribute m and the matching attribute n includes:

[0085] Obtain the character union of the matching attribute m and the matching attribute n;

[0086] Count the frequency of each character in the character union that appears in the matching attribute m to obtain the first hit set;

[0087] Count the frequency of each character in the character union that appears in the matching attribute n to obtain the second hit set;

[0088] Calculate the set similarity between the first hit set and the second hit set, and use the set similarity as the text similarity between the matching attribute m and the matching attribute n;

[0089] Among them, m represents the index of the matching attribute in the matching attribute set of the to-be-allocated event, and n represents the index of the matching attribute in the matching attribute set of the historical event.

[0090] In an example of this embodiment, assume that the matching attribute m is "Found someone fishing by the river", and the matching attribute n is "Someone fishing by the river". The character union obtained by taking them out is: {发, 江, 现, 河, 边, 有, 人, 钓, 鱼}, a total of 9 characters. Obtain the number of times the first character "发" appears in the matching attribute m as 1, the number of times the character "江" appears in the matching attribute m as 0,..., and obtain the first hit set as A, A = (1, 0, 1, 1, 1, 1, 1, 1, 1). Obtain the number of times the first character "发" appears in the matching attribute n as 0, the number of times the character "江" appears in the matching attribute n as 1,..., and obtain the first hit set as B, B = (0, 1, 0, 0, 1, 1, 1, 1, 1). Calculate the set similarity between the first hit set and the second hit set according to the following formula:

[0091]

[0092] The present invention also discloses an intelligent allocation device based on text similarity analysis and a large model, which is used to implement the above-mentioned intelligent allocation method based on text similarity analysis and a large model. In a preferred embodiment, the device includes:

[0093] An acquisition module, which acquires the attribute information of the to-be-allocated event and extracts the matching attribute set from the attribute information;

[0094] Similarity matching module, to-be-allocated events and historical events are matched based on the matching attribute set;

[0095] The distribution module automatically distributes the event to be distributed according to the distribution result of the historical event matching the similarity with the event to be distributed if there is a historical event matching the similarity with the event to be distributed; if there is no historical event matching the similarity with the event to be distributed, the attribute information of the event to be distributed is input into the pre-trained large model, and the large model outputs a distribution suggestion, and the distribution personnel perform manual distribution with reference to the distribution suggestion.

[0096] In this embodiment, the acquisition module, similarity matching module and distribution module correspond one-to-one to step S1, step S2 and step S3 of the above-mentioned intelligent distribution method based on text similarity analysis and large model, and will not be repeated here.

[0097] The present invention also discloses a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the above-mentioned intelligent distribution method based on text similarity analysis and a large model provided by the present invention are implemented. The computer program product should be understood as a software product that mainly implements its solution through a computer program, such as a program product integrated in the cloud or a software library.

[0098] The present invention also discloses an electronic device. In one embodiment, the electronic device includes at least one processor; and a memory connected to the at least one processor in communication; wherein:

[0099] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute an intelligent allocation method based on text similarity analysis and a large model provided by the present invention.

[0100] like Figure 4 , which is a schematic diagram of the structure of an electronic device for an intelligent distribution method based on text similarity analysis and a large model provided by an embodiment of the present invention. The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an intelligent distribution method program based on text similarity analysis and a large model.

[0101] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing an intelligent allocation method based on text similarity analysis and large models, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0102] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as a code of an intelligent allocation method program based on text similarity analysis and a large model, but can also be used to temporarily store data that has been output or is to be output.

[0103] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0104] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0105] Figure 4 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0106] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0107] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited by this structure.

[0108] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0109] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", "an implementation", "a preferred implementation" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0110] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. An intelligent allocation method based on text similarity analysis and large models, characterized in that: include: Obtaining attribute information of the event to be allocated, and extracting a matching attribute set from the attribute information; The events to be allocated and the historical events are matched based on the matching attribute set; If there is a historical event that matches the similarity of the event to be allocated, the event to be allocated is automatically allocated according to the allocation result of the historical event that matches the similarity of the event to be allocated; If there is no historical event that matches the similarity of the event to be allocated, the attribute information of the event to be allocated is input into the pre-trained large model, and the large model outputs allocation suggestions. The allocation personnel perform manual allocation with reference to the allocation suggestions.

2. The intelligent allocation method based on text similarity analysis and large model as claimed in claim 1, characterized in that: After completing the dispatch of the pending dispatch events, it also includes: The attribute information of the event to be distributed, the matching attribute set and the distribution result of the event to be distributed are saved in the historical event library.

3. The intelligent allocation method based on text similarity analysis and large model as claimed in claim 1, characterized in that: After completing the dispatch of the pending dispatch events, it also includes: Score the allocation suggestions output by the large model to obtain the scoring results; The scoring results are used to fine-tune the large model parameters through Prompt Tuning.

4. An intelligent allocation method based on text similarity analysis and large model as described in any one of claims 1 to 3, characterized in that: The step of extracting a matching attribute set from the attribute information includes: Selecting at least two of the event name, event type, event content and event level from the attribute information as matching attributes, and all matching attributes form a matching attribute set; Configure an attribute weight for each matching attribute. The sum of the attribute weights of all matching attributes in the matching attribute set is equal to 1.

5. The intelligent allocation method based on text similarity analysis and large model as claimed in claim 4, characterized in that: The event to be allocated and the historical event are matched for similarity based on a matching attribute set, including: Calculating the event similarity between the event to be allocated and the historical event, wherein the event similarity is the similarity between the matching attribute set of the event to be allocated and the matching attribute set of the historical event; If there is at least one historical event in the historical event database whose event similarity with the event to be allocated is greater than or equal to the event similarity threshold, it is considered that there is a historical event that matches the similarity with the event to be allocated, and the historical event with the highest event similarity with the event to be allocated is used as the similarity matching event of the event to be allocated; If the event similarities between all historical events in the historical event database and the event to be allocated are less than the event similarity threshold, it is considered that there is no historical event that matches the similarity of the event to be allocated.

6. The intelligent allocation method based on text similarity analysis and large model as claimed in claim 5, characterized in that: Calculate the event similarity between the event to be allocated and the historical event, including: Calculate the text similarity between each matching attribute in the matching attribute set of the event to be allocated and the corresponding matching attribute in the matching attribute set of the historical event; Multiplying the text similarity by the attribute weight of each matching attribute to obtain the attribute similarity of each matching attribute; The attribute similarities of all matching attributes of the event to be allocated are summed to obtain the event similarity between the event to be allocated and the historical event.

7. The intelligent allocation method based on text similarity analysis and large model as claimed in claim 6, characterized in that: The text similarity calculation process of the matching attribute m of the event to be allocated and the corresponding matching attribute n in the matching attribute set of the historical events includes: Find the character union of matching attribute m and matching attribute n; Count the frequency of each character in the character set appearing in the matching attribute m to obtain the first hit set; Count the frequency of each character in the character set appearing in the matching attribute n to obtain a second hit set; Calculating the set similarity between the first hit set and the second hit set, and using the set similarity as the text similarity between the matching attribute m and the matching attribute n; Wherein, m represents the index of the matching attribute in the matching attribute set of the event to be allocated, and n represents the index of the matching attribute in the matching attribute set of the historical event.

8. An intelligent distribution device based on text similarity analysis and large models, used to implement an intelligent distribution method based on text similarity analysis and large models as claimed in any one of claims 1 to 7, characterized in that: include: An acquisition module obtains the attribute information of the event to be allocated and extracts a matching attribute set from the attribute information; Similarity matching module, to-be-allocated events and historical events are matched based on the matching attribute set; A distribution module, if there is a historical event that matches the similarity of the event to be distributed, automatically distributes the event to be distributed according to the distribution result of the historical event that matches the similarity of the event to be distributed; If there is no historical event that matches the similarity of the event to be allocated, the attribute information of the event to be allocated is input into the pre-trained large model, and the large model outputs allocation suggestions. The allocation personnel perform manual allocation with reference to the allocation suggestions.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of an intelligent allocation method based on text similarity analysis and a large model as described in one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: The electronic device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute an intelligent distribution method based on text similarity analysis and a large model as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Automatic event allocation method for grassroots governance

    CN113535959A

Cited By

  • Event allocation method based on collaborative reasoning of multi-modal data and knowledge graph

    CN120950699A

  • An event distribution method based on multimodal data and knowledge graph collaborative reasoning

    CN120950699B