Case search and push method and device, storage medium and electronic device
By using the case element identification model and updated search model in case search, the element characteristics of cases to be searched and historical cases are processed, the problems of low efficiency and poor accuracy of case search in the existing technology are solved, and more efficient and accurate search results are achieved.
Patent Information
- Application Number
- CN202211358807.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-11-01
AI Technical Summary
The prior art is inefficient and poorly accurate in case search, making it difficult to effectively use historical case judgment documents on the Internet for accurate case search.
By obtaining the text data to be retrieved for the case to be retrieved, the case element identification model is used to obtain the target element characteristics and obtain the historical element characteristics of multiple historical cases. The search model is updated based on the number of pushes, and the initial push case sequence is determined through comparison processing, and the target push case sequence is determined based on the sequence for display.
The efficiency and accuracy of similar case search results are improved, and the search model is updated through implicit feedback to meet users' personalized search needs.
Smart Images

Figure CN115687766B_ABST
Abstract
Description
Background Art
[0002] With the development of network technology, most of the judicial documents of historical cases can be publicly searched and retrieved online. Carrying out similar case searches can ensure the uniformity of judgment standards for similar cases.
[0003] In the related technology, usually the relevant personnel search the Internet for historical cases that are similar to the case to be retrieved based on their experience, which is inefficient and has poor accuracy.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a case search and push method, device, electronic device and storage medium to improve the efficiency and accuracy of similar case search results.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, a case retrieval and push method is provided, comprising: obtaining text data to be retrieved of a case to be retrieved; processing the text data to be retrieved through a case element recognition model to obtain target element features of each element of the case to be retrieved; obtaining historical element features of each element of multiple historical cases, and obtaining the current number of pushes; updating the retrieval model based on the number of pushes, comparing the target element features of the case to be retrieved with the historical element features of each historical case through the updated retrieval model, so as to determine an initial push case sequence from multiple historical cases; determining a target push case sequence of the case to be retrieved based on the initial push case sequence, so as to push and display the historical cases in the target push case sequence.
[0008] In one embodiment of the present disclosure, a retrieval model is updated based on the number of times that cases have been pushed, and the target element features of the case to be retrieved and the historical element features of each historical case are compared with the updated retrieval model to determine an initial push case sequence from multiple historical cases, including: updating the current weight value of each element in the retrieval model based on the number of times that cases have been pushed; calculating the similarity between the target element features and the historical element features according to the current weight value to obtain the similarity between the case to be retrieved and each historical case; sorting the multiple historical cases according to the similarity to obtain the sorting results of the multiple historical cases; and determining a preset number of historical cases in the sorting results as the initial push case sequence.
[0009] In one embodiment of the present disclosure, the current weight value of each element in the retrieval model is updated based on the number of pushes, including: if the number of pushes is equal to 0, the current weight value corresponding to each element is determined as a preset weight value; if the number of pushes is greater than 0, the user behavior feedback data in the most recent push is obtained, and the historical weight value of each element used in the retrieval model in the most recent push is obtained; the historical weight value is updated according to the user behavior feedback data to obtain the current weight value of each element.
[0010] In one embodiment of the present disclosure, obtaining user behavior feedback data in the most recent push includes: obtaining the user's browsing time for each target historical case in the target push case sequence of the most recent push, and obtaining a preset time threshold; converting the browsing time into a behavior feedback value according to the time threshold; and determining the user behavior feedback data of each target historical case according to the behavior feedback value of each target historical case.
[0011] In one embodiment of the present disclosure, historical weight values are updated according to user behavior feedback data to obtain current weight values of each element, including: obtaining the similarity between each target historical case and the case to be retrieved in the target push case sequence pushed most recently to form environmental data, and using historical weights as action data; merging the environmental data, action data and user behavior feedback data to obtain input data; inputting the input data into a trained deep reinforcement learning model, and outputting the current weight values of each element.
[0012] In one embodiment of the present disclosure, multiple historical cases include a first case; the elements include a first element; wherein, similarity is calculated between target element features and each historical element feature according to a current weight value to obtain the similarity between the case to be retrieved and each historical case, including: using a similarity algorithm to calculate the similarity between the target element feature of the first element of the case to be retrieved and the historical element feature of the first element of the first case to obtain the element similarity between the case to be retrieved and the first case regarding the first element, thereby obtaining the element similarity between the case to be retrieved and the first case regarding each element; weighted calculation is performed according to the current weight value of each element and the corresponding element similarity to obtain the similarity between the case to be retrieved and the first case.
[0013] In one embodiment of the present disclosure, a target pushed case sequence of cases to be retrieved is determined based on an initial pushed case sequence, including: if the number of pushes is equal to 0, the initial pushed case sequence is used as the target pushed case sequence; if the number of pushes is greater than 0, the historical pushed case sequence of the most recent push is obtained, and the target pushed case sequence is determined based on the historical pushed case sequence and the initial pushed case sequence.
[0014] In one embodiment of the present disclosure, the case retrieval and push method also includes: obtaining historical text data of multiple historical cases; processing each historical text data through a case element recognition model to obtain historical element features of each historical case; storing the historical text data of the historical cases and their historical element features in a case database; and in the method, obtaining historical element features of multiple historical cases includes: obtaining historical element features of multiple historical cases from the case database.
[0015] In one embodiment of the present disclosure, the element features include at least one of the following: legal relationship features, core fact features, and evidence situation features.
[0016] According to another aspect of the present disclosure, there is provided a case retrieval and pushing device, comprising:
[0017] The acquisition module is used to acquire the text data to be retrieved of the case to be retrieved; the processing module is used to process the text data to be retrieved through the case element recognition model to obtain the target element characteristics of each element of the case to be retrieved; the acquisition module is also used to acquire the historical element characteristics of each element of multiple historical cases, and obtain the current number of pushes; the processing module is also used to update the retrieval model based on the number of pushes, and compare the target element characteristics of the case to be retrieved and the historical element characteristics of each historical case through the updated retrieval model to determine the initial push case sequence from multiple historical cases; the push module is used to determine the target push case sequence of the case to be retrieved based on the initial push case sequence, so as to push and display the historical cases in the target push case sequence.
[0018] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned case retrieval and push method is implemented.
[0019] According to another aspect of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned case retrieval and push method by executing the executable instructions.
[0020] The case retrieval and push method provided by the embodiments of the present disclosure can first determine the target element features of the case to be retrieved and obtain the historical element features of each historical case, and then update the retrieval model based on the number of pushes. The target element features of the case to be retrieved and the historical element features of each historical case are compared with the updated retrieval model. Updating the retrieval model based on the number of pushes can achieve implicit feedback on the results generated by the retrieval model, so that the results of the case retrieval push are more accurate and can better meet the personalized retrieval needs of users.
[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0023] Figure 1 A schematic diagram showing an exemplary system architecture to which the case retrieval and push method according to an embodiment of the present disclosure can be applied;
[0024] Figure 2 A flowchart of a case retrieval and push method according to an embodiment of the present disclosure is shown;
[0025] Figure 3 A flowchart of determining a target push case sequence in a case retrieval and push method according to an embodiment of the present disclosure is shown;
[0026] Figure 4 A flowchart is shown of determining an initial push case sequence from the multiple historical cases by using an updated retrieval model in a case retrieval and push method according to an embodiment of the present disclosure;
[0027] Figure 5 A flowchart showing similarity calculation in a case retrieval and push method according to an embodiment of the present disclosure is shown;
[0028] Figure 6 A schematic diagram showing a case retrieval and push method according to an embodiment of the present disclosure is shown;
[0029] Figure 7 A schematic diagram showing the implementation of functional modules in a case search and push method according to an embodiment of the present disclosure is shown;
[0030] Figure 8 A block diagram showing a case search and push device 700 according to an embodiment of the present disclosure; and
[0031] Fig. 9 A structural block diagram of a case retrieval and push computer device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0033] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0034] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present disclosure, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0035] Figure 1 A schematic diagram showing an exemplary system architecture to which the case retrieval and push method according to an embodiment of the present disclosure can be applied.
[0036] like Figure 1 As shown, the system architecture may include a server 101, a network 102, and a client 103. The network 102 is used to provide a medium for a communication link between the client 103 and the server 101. The network 102 may include various connection types, such as wired, wireless communication links, or optical fiber cables.
[0037] In an exemplary embodiment, the client 103 for data transmission with the server 101 may include, but is not limited to, electronic devices of types such as smart phones, desktop computers, tablet computers, laptop computers, smart speakers, digital assistants, AR (Augmented Reality) devices, VR (Virtual Reality) devices, and smart wearable devices. Optionally, the operating system running on the electronic device may include, but is not limited to, Android system, IOS system, Linux system, Windows system, and the like.
[0038] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some practical applications, server 101 can also be a server of a network platform, which can be, for example, a trading platform, a live broadcast platform, a social platform, or a music platform, etc., which is not limited in the embodiments of the present disclosure. Among them, the server can be a single server or a cluster formed by multiple servers, and the present disclosure does not limit the specific architecture of the server.
[0039] In an exemplary embodiment, the process of server 101 for implementing the case retrieval and push method may be: server 101 obtains text data to be retrieved of the case to be retrieved; server 101 processes the text data to be retrieved through a case element recognition model to obtain target element features of each element of the case to be retrieved; server 101 obtains historical element features of each element of multiple historical cases, and obtains the current number of pushes; based on the number of pushes, server 101 compares the target element features of the case to be retrieved and the historical element features of each historical case through a retrieval model to determine an initial push case sequence from multiple historical cases; server 101 determines a target push case sequence of the case to be retrieved based on the initial push case sequence, so as to push and display the historical cases in the target push case sequence.
[0040] In addition, it should be noted that Figure 1 What is shown is merely one application environment of the case retrieval and push method provided by the present invention. Figure 1 The numbers of clients, networks and servers in the embodiment are merely illustrative, and any number of clients, networks and servers may be provided according to actual needs.
[0041] In order to enable ordinary persons in the art to better understand the technical solution of the present disclosure, the various steps of the case retrieval and push method in the exemplary embodiment of the present disclosure will be described in more detail below with reference to the accompanying drawings and embodiments.
[0042] Figure 2 A flowchart of a case search and push method according to an embodiment of the present disclosure is shown. The method provided by the embodiment of the present disclosure can be performed as follows: Figure 1 The process is executed in the server or client shown in the figure, but the present disclosure is not limited to this.
[0043] In the following examples, the server 101 is used as the execution subject for illustration.
[0044] like Figure 2 As shown, the case retrieval and push method provided by the embodiment of the present disclosure may include the following steps:
[0045] Step S201, obtaining text data to be retrieved of the case to be retrieved.
[0046] The case to be retrieved may be an event involving litigation or the like, and the text data to be retrieved of the case to be retrieved may be a text file or a judgment document used to describe the case to be retrieved.
[0047] Step S203, processing the text data to be retrieved through the case element recognition model to obtain the target element features of each element of the case to be retrieved.
[0048] In some embodiments, the element features include at least one of the following: legal relationship features, core fact features, and evidence features. The case element recognition model may be pre-trained and may be used to extract preset element information from the text and convert the element information into element features; in some practical applications, the element features may be textual information.
[0049] For example, in the case element recognition model, information extraction methods such as rule matching and deep learning can be used to identify and extract element features; for example, for the rule matching method, keywords (such as "facts", etc.) can be set to directly identify the keywords from the judgment documents, and then extract information within a certain range around the keywords, and then determine the element features. For the deep learning method, some sequence annotation algorithms or models can be used to extract element features.
[0050] Step S205, obtaining the historical element features of each element of multiple historical cases, and obtaining the current number of pushes.
[0051] In some practical applications, multiple retrieval calculations may be performed on a case for push notifications, and the number of push notifications may be considered as the number of times the case has been displayed to the user for viewing.
[0052] In some embodiments, before obtaining the historical element features of each element of multiple historical cases, the case search and push method may further include: obtaining historical text data of multiple historical cases; processing each historical text data through a case element recognition model to obtain the historical element features of each historical case; and storing the historical text data of the historical cases and their historical element features in the case database. The historical text data may be information such as judgment documents of historical cases.
[0053] Based on this, step S205 may further include: obtaining historical element features of multiple historical cases from the above-constructed case database.
[0054] Step S207, updating the retrieval model based on the number of pushes, comparing the target element features of the case to be searched with the historical element features of each historical case through the updated retrieval model, so as to determine the initial push case sequence from multiple historical cases.
[0055] In this step, the similarity between the case to be retrieved and each historical case can be calculated based on the target element characteristics of the case to be retrieved and the historical element characteristics of each historical case, combined with the number of times it has been pushed, and then the initial push case sequence can be determined. Among them, the user behavior feedback data can be determined based on the number of times it has been pushed, and then the retrieval model can be updated based on the user behavior feedback data, so as to realize the implicit feedback of the user behavior on the results generated by the retrieval model, that is, the output retrieval results can be dynamically adjusted according to the user's implicit feedback, so that the results of the case retrieval push are more accurate and can better meet the user's personalized retrieval needs.
[0056] Step S209, determining a target pushed case sequence of the cases to be retrieved according to the initial pushed case sequence, so as to push and display the historical cases in the target pushed case sequence.
[0057] In some embodiments, a target push case sequence for cases to be retrieved is determined based on an initial push case sequence, including: if the number of pushes is equal to 0, the initial push case sequence is used as the target push case sequence; if the number of pushes is greater than 0, the historical push case sequence of the most recent push is obtained, and the target push case sequence is determined based on the historical push case sequence and the initial push case sequence.
[0058] If the number of pushes is equal to 0, it can be understood that it has not been pushed before. This is the first time to push the search results for the cases to be searched. In this case, the calculated initial push case sequence can be directly used as the target push case sequence for push. If the number of pushes is greater than 0, it can be understood that it has been pushed and displayed before. The target push case sequence for display can be determined by combining the previous historical push case sequence with the calculated initial push case sequence.
[0059] The target pushed case sequence is determined according to the historical pushed case sequence and the initial pushed case sequence. The number and relative order of cases to be displayed in each sequence can be determined according to the two sequences, and then cross-recombination is performed to obtain the target pushed case sequence.
[0060] In some practical applications, it is also possible to obtain historical cases that the user has clicked on in the last push. If there are historical cases that the user has clicked on in the initial push case sequence, the historical cases that the user has clicked on can be removed first, and then the target push case sequence can be determined. This ensures that the cases in each push are those that the user has not clicked on, thereby improving the user's browsing and retrieval efficiency.
[0061] In some practical applications, a function of deleting designated cases or retaining the function of displaying designated cases can also be set to meet the personalized search needs of users.
[0062] Figure 3 A flowchart of determining a target push case sequence in a case retrieval and push method according to an embodiment of the present disclosure is shown. Figure 3 The example shows the case where the number of pushes is greater than 0. Figure 3 As shown, it includes a historical pushed case sequence 301, an initial pushed case sequence 302 and a target pushed case sequence 303; it is assumed that the number of cases in the historical pushed case sequence 301 is 4, and the number of cases in the initial pushed case sequence 302 is 4; then, a subsequence consisting of the two top-ranked cases can be determined from the historical pushed case sequence 301, and then a subsequence consisting of the two top-ranked cases can be determined from the initial pushed case sequence 302, and then the cases in the two subsequences can be cross-recombined according to their relative order to obtain a new sequence, namely, the target pushed case sequence 303.
[0063] Through the case retrieval and push method provided by the present invention, it is possible to first determine the target element features of the case to be retrieved and obtain the historical element features of each historical case, and then update the retrieval model based on the number of pushes. The target element features of the case to be retrieved and the historical element features of each historical case are compared with the updated retrieval model. Updating the retrieval model based on the number of pushes can achieve implicit feedback on the results generated by the retrieval model, so that the results of the case retrieval push are more accurate and can better meet the personalized retrieval needs of users.
[0064] Figure 4 A flowchart of determining an initial push case sequence from the multiple historical cases by using an updated retrieval model in a case retrieval and push method according to an embodiment of the present disclosure is shown. Figure 4 As shown, in some embodiments, step S207 may further include the following steps.
[0065] Step S401, updating the current weight value of each element in the retrieval model based on the number of pushes.
[0066] For example, in some embodiments, if the number of pushes is equal to 0, the current weight value corresponding to each element is determined as the preset weight value; if the number of pushes is greater than 0, the user behavior feedback data in the most recent push is obtained, and the historical weight value of each element used in the retrieval model in the most recent push is obtained; the historical weight value is updated according to the user behavior feedback data to obtain the current weight value of each element.
[0067] If the number of pushes is equal to 0, it can be understood that there has been no push before, and this is the first time to calculate the cases to be pushed for the cases to be retrieved. In this case, it can be considered that the importance of each factor is equal, and the current weight value corresponding to each factor can be determined as the preset weight value, for example, all set to 1. If the number of pushes is greater than 0, the user behavior feedback data in the most recent push can be obtained to update the retrieval model.
[0068] When the number of pushes is greater than 0, in some embodiments, the process of obtaining user behavior feedback data in the most recent push can be: obtaining the user's browsing time for each target historical case in the target push case sequence of the most recent push, and obtaining a preset time threshold; converting the browsing time into a behavior feedback value according to the time threshold; and determining the user behavior feedback data of each target historical case according to the behavior feedback value of each target historical case.
[0069] In some practical applications, the user behavior feedback data R can be in the following form:
[0070] R={(Hi,Ti),...},i∈[1,...,N]; where N is the number of output case results; Hi represents the click status of the ith case, and "click" can usually be set to 1 and "not clicked" can be set to 0; Ti represents the time the user browses the ith case, and for example, it can be set to 4 states: 0 for not browsing, 1 for short browsing (such as the browsing time is usually set to (0,3] minutes), 2 for medium browsing (such as the browsing time is usually set to (3,10] minutes), and 3 for long browsing (such as the browsing time is usually set to more than 10 minutes); the browsing time state setting can be adjusted according to actual conditions. Ti can be regarded as the behavior feedback value of the ith historical case, and (Hi,Ti) can be regarded as the user behavior feedback data of the ith historical case.
[0071] In some embodiments, the process of updating historical weight values according to user behavior feedback data to obtain the current weight values of each element can be: obtaining the similarity between each target historical case and the case to be retrieved in the target push case sequence pushed most recently to form environmental data, and using historical weights as action data; merging the environmental data, action data and user behavior feedback data to obtain input data; inputting the input data into a trained deep reinforcement learning model, and outputting the current weight values of each element.
[0072] In some practical applications, the environment data s can be set as the similarity distribution s of all search case results currently output to the user = [(s i1 ,s i2 ,...,s iE),...],i∈[1,...,N], action a can be the weight distribution a=(w1,w2,...,w E ), where N is the number of similar case results output, and E is the number of elements set in the current business scenario.
[0073] Then, the above (s, a, R) can be combined and input into the offline trained deep reinforcement learning model, and the updated weights can be output, that is, a′=(w1′, w2′, ..., w E ′).
[0074] Step S403, similarity calculation is performed based on the target element features of the case to be retrieved and the historical element features of each historical case according to the current weight value, so as to obtain the similarity between the case to be retrieved and each historical case.
[0075] Figure 5 A flowchart of similarity calculation in a case search and push method according to an embodiment of the present disclosure is shown. Figure 5 As shown, in some embodiments, multiple historical cases may include the first case; the elements may include the first element; based on this, step S403 may include the following steps.
[0076] Step S501, using a similarity algorithm, calculates the similarity between the target element feature of the first element of the case to be retrieved and the historical element feature of the first element of the first case, and obtains the element similarity between the case to be retrieved and the first case with respect to the first element; thereby obtaining the element similarity between the case to be retrieved and the first case with respect to each element. The similarity algorithm includes at least one of the following: Euclidean distance algorithm and cosine algorithm.
[0077] Step S503, performing weighted calculation according to the current weight value of each element and the corresponding element similarity, to obtain the similarity between the case to be retrieved and the first case.
[0078] Then, using the similarity method, we can get the similarity between the case to be retrieved and each historical case.
[0079] Step S405, sorting the multiple historical cases according to the similarity to obtain sorting results of the multiple historical cases.
[0080] Step S407: determine the first preset number of historical cases in the sorting result as the initial push case sequence, wherein the value of the preset number can be set according to the actual situation or user needs.
[0081] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0082] Figure 6 A schematic diagram of a case search and push method according to an embodiment of the present disclosure is shown. Figure 6 As shown, the following steps are included:
[0083] Step 1, inputting the historical case document 601 into the case element recognition model 602, and extracting the case element 603 of the historical case document 601 from the historical case document 601 using the case element recognition model 602;
[0084] Step 2, storing the case elements 603 and the corresponding documents (i.e., historical case documents 601) generated in step 1 in the inspection database 606;
[0085] Step 3, inputting the search case 604 to be searched into the case element recognition model 602, and extracting the case element 605 of the search case 604 from the search case 604 using the case element recognition model 602; wherein, the method of extracting case elements using the case element recognition model 602 in step 1 and step 3 may be: defining E types of elements according to the business scenario of similar case search, the elements may include but are not limited to core facts, legal relations, controversial legal issues, etc., and using rule matching, deep learning and other information extraction methods for identification and extraction;
[0086] Step 4, inputting the case elements 605 in step 3 and the data in the database 606 in step 2 into the retrieval model 607, performing similarity calculation on the retrieval case 604 and each historical case document 601, so as to perform retrieval recall sorting on the historical case documents 601; wherein, when performing the similarity calculation for the first time, the weights corresponding to each element in the retrieval model 607 are the same;
[0087] Specifically, the retrieval model 607 involved in step 4 can calculate the similarity scores between the retrieved case 604 and all historical case documents 601, and output the cases with higher scores to the user; wherein, the initial calculation method of the similarity score is shown in the formula: where s e Calculate the score for the similarity between the retrieval case and the retrieved case regarding the e-th element, w e is the weight of the e-th element, s e The specific calculation methods include but are not limited to calculating the Euclidean distance between two strings, calculating the cosine distance based on word vectors, etc.
[0088] Step 5: When displaying the results for the first time, the top N similar case results generated in step 4 are output to the user;
[0089] Step 6, the user browses and clicks on the result in step 5 609, thereby generating an implicit feedback;
[0090] Step 7: The implicit feedback is transmitted to the agent module 610, and then the retrieval model 607 is updated using the deep reinforcement learning algorithm DQN; specifically, the weights of each element in the retrieval model 607 may be updated;
[0091] Step 8, using the updated retrieval model 607 to recalculate the retrieval results, i.e., re-rank the historical cases;
[0092] Step 9: The new result in step 8 may be cross-combined with the result generated in step 4, and the cases previously clicked by the user may be filtered out and output to the user again;
[0093] Step 10, repeat steps 6, 7, 8, and 9 until the user finishes browsing the search results.
[0094] Figure 7 FIG. 1 shows a schematic diagram of the functional modules in the case search and push method according to an embodiment of the present disclosure. Figure 7 As shown, it includes: an element extraction module 701, a retrieval module 702, a result output module 703 and a reinforcement learning module 704;
[0095] Among them, the element extraction module 701 can extract several basic identification elements required for similar cases from case documents; the retrieval module 702 can search for the case elements to be retrieved in the case elements of historical case documents, and output the previous results with high similarity; the result output module 703 can display the results output in the retrieval module to the user, and record the user's implicit feedback such as click status and browsing time; the reinforcement learning module 704 can dynamically adjust the retrieval module using the user's implicit feedback.
[0096] Figure 8 FIG. 8 is a block diagram of a case search and push device 800 according to an embodiment of the present disclosure; Figure 8 As shown, including:
[0097] The acquisition module 801 is used to acquire the text data to be retrieved of the case to be retrieved; the processing module 802 is used to process the text data to be retrieved through the case element recognition model to obtain the target element characteristics of each element of the case to be retrieved; the acquisition module 801 is also used to acquire the historical element characteristics of each element of multiple historical cases, and obtain the current number of pushes; the processing module 802 is also used to update the retrieval model based on the number of pushes, and compare the target element characteristics of the case to be retrieved and the historical element characteristics of each historical case through the updated retrieval model to determine the initial push case sequence from multiple historical cases; the push module 803 is used to determine the target push case sequence of the case to be retrieved based on the initial push case sequence, so as to push and display the historical cases in the target push case sequence.
[0098] Through the case retrieval and push device provided by the present invention, it is possible to first determine the target element features of the case to be retrieved and obtain the historical element features of each historical case, and then update the retrieval model based on the number of pushes. The target element features of the case to be retrieved and the historical element features of each historical case are compared with the updated retrieval model. By updating the retrieval model based on the number of pushes, implicit feedback on the results generated by the retrieval model can be achieved, so that the results of the case retrieval push are more accurate and can better meet the personalized retrieval needs of users.
[0099] In some embodiments, the processing module 802 updates the retrieval model based on the number of pushes, and compares the target element features of the case to be retrieved and the historical element features of each historical case through the updated retrieval model to determine the initial push case sequence from multiple historical cases, including: updating the current weight value of each element in the retrieval model based on the number of pushes; calculating the similarity between the target element features and each historical element feature according to the current weight value to obtain the similarity between the case to be retrieved and each historical case; sorting multiple historical cases according to the similarity to obtain the sorting results of multiple historical cases; determining a preset number of historical cases in the sorting results as the initial push case sequence.
[0100] In some embodiments, the processing module 802 updates the current weight value of each element in the retrieval model based on the number of pushes, including: if the number of pushes is equal to 0, the current weight value corresponding to each element is determined as the preset weight value; if the number of pushes is greater than 0, the acquisition module 801 obtains the user behavior feedback data in the most recent push, and obtains the historical weight value of each element used in the retrieval model in the most recent push; the processing module 802 updates the historical weight value according to the user behavior feedback data to obtain the current weight value of each element.
[0101] In some embodiments, the acquisition module 801 acquires the user behavior feedback data in the most recent push, including: acquiring the user's browsing time for each target historical case in the target push case sequence of the most recent push, and acquiring a preset time threshold; converting the browsing time into a behavior feedback value according to the time threshold; and determining the user behavior feedback data of each target historical case according to the behavior feedback value of each target historical case.
[0102] In some embodiments, the processing module 802 updates the historical weight value according to the user behavior feedback data to obtain the current weight value of each element, including: the acquisition module 801 obtains the similarity between each target historical case and the case to be retrieved in the target pushed case sequence pushed most recently to form environmental data, and uses the historical weight as action data; the processing module 802 merges the environmental data, action data and user behavior feedback data to obtain input data; the input data is input into the trained deep reinforcement learning model, and the current weight value of each element is obtained as output.
[0103] In some embodiments, multiple historical cases include a first case; the elements include a first element; wherein the processing module 802 calculates the similarity between the target element feature and each historical element feature according to the current weight value to obtain the similarity between the case to be retrieved and each historical case, including: using a similarity algorithm to calculate the similarity between the target element feature of the first element of the case to be retrieved and the historical element feature of the first element of the first case to obtain the element similarity between the case to be retrieved and the first case regarding the first element, thereby obtaining the element similarity between the case to be retrieved and the first case regarding each element; performing weighted calculation according to the current weight value of each element and the corresponding element similarity to obtain the similarity between the case to be retrieved and the first case.
[0104] In some embodiments, the push module 803 determines the target push case sequence of the cases to be retrieved based on the initial push case sequence, including: if the number of pushes is equal to 0, the initial push case sequence is used as the target push case sequence; if the number of pushes is greater than 0, the historical push case sequence of the most recent push is obtained, and the target push case sequence is determined based on the historical push case sequence and the initial push case sequence.
[0105] In some embodiments, the acquisition module 801 is also used to: acquire historical text data of multiple historical cases; the processing module 802 is also used to: process each historical text data through a case element recognition model to obtain historical element characteristics of each historical case; store the historical text data of the historical case and its historical element characteristics correspondingly in the case database; and the acquisition module 801 acquires the historical element characteristics of multiple historical cases, including: acquiring the historical element characteristics of multiple historical cases from the case database.
[0106] In some embodiments, the element features include at least one of the following: legal relationship features, core fact features, and evidence situation features.
[0107] Figure 8 For other contents of the embodiment, reference can be made to the other embodiments mentioned above.
[0108] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0109] Fig. 9 The structural block diagram of a case search and push computer device in the embodiment of the present disclosure is shown. It should be noted that the electronic device shown in the figure is only an example and should not bring any limitation to the function and scope of use of the embodiment of the present invention.
[0110] Refer to the following Fig. 9 An electronic device 900 according to this embodiment of the present invention will be described. Fig. 9 The electronic device 900 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0111] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include but are not limited to: at least one processing unit 910, at least one storage unit 920, and a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910).
[0112] The storage unit stores program codes, which can be executed by the processing unit 910, so that the processing unit 910 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 910 can perform the following steps: Figure 2 The method shown in .
[0113] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .
[0114] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0115] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0116] The electronic device 900 may also communicate with one or more external devices 1000 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0117] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0118] The program product for implementing the above method according to the embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0119] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0120] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0121] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0122] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0123] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0124] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0125] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0126] According to one aspect of the present disclosure, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations of the above-mentioned embodiments.
[0127] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A case search and push method, characterized in that: include: Obtaining text data to be retrieved of the case to be retrieved; Processing the to-be-searched text data through a case element recognition model to obtain target element features of each element of the to-be-searched case; Obtaining historical element features of each element of multiple historical cases, and obtaining the current number of pushes; wherein the number of pushes is the number of times that the case has been displayed to the user for viewing; updating the retrieval model based on the number of times the cases have been pushed, and comparing the target element features of the cases to be searched with the historical element features of each historical case through the updated retrieval model to determine an initial push case sequence from the multiple historical cases; Determine the target pushed case sequence of the cases to be retrieved according to the initial pushed case sequence, so as to push and display the historical cases in the target pushed case sequence; Wherein, updating the retrieval model based on the number of times the cases have been pushed, comparing the target element features of the cases to be searched with the historical element features of each historical case through the updated retrieval model to determine the initial push case sequence from the multiple historical cases, including: Based on the number of times the information has been pushed, the current weight value of each element in the retrieval model is updated; based on the current weight value, the similarity between the target element feature and each of the historical element features is calculated to obtain the similarity between the case to be retrieved and each of the historical cases; based on the similarity, the multiple historical cases are sorted to obtain the sorting results of the multiple historical cases; and the first preset number of historical cases in the sorting results are determined as the initial push case sequence; Wherein, updating the current weight value of each element in the retrieval model based on the number of pushes includes: If the number of pushes is equal to 0, the current weight values corresponding to each element are determined as preset weight values; if the number of pushes is greater than 0, the user behavior feedback data in the most recent push is obtained, and the historical weight values of each element used in the retrieval model in the most recent push is obtained; the historical weight values are updated according to the user behavior feedback data to obtain the current weight values of each element; Wherein, the historical weight value is updated according to the user behavior feedback data to obtain the current weight value of each factor, including: Obtain the similarity between each target historical case in the most recently pushed target push case sequence and the case to be retrieved to form environmental data, and use the historical weight as action data; merge the environmental data, the action data and the user behavior feedback data to obtain input data; input the input data into a trained deep reinforcement learning model, and output the current weight value of each element.
2. The method according to claim 1, characterized in that Get the user behavior feedback data in the most recent push, including: Obtain the user's click status and browsing time for each target historical case in the target push case sequence pushed most recently, and obtain the preset time threshold; Converting the browsing time into a behavior feedback value according to the time threshold; The user behavior feedback data of each target historical case is determined according to the click status and behavior feedback value of each target historical case.
3. The method according to claim 1, characterized in that The multiple historical cases include a first case; the elements include a first element; wherein, similarity calculation is performed on the target element feature and each of the historical element features according to the current weight value to obtain the similarity between the case to be retrieved and each of the historical cases, including: Using a similarity algorithm, similarity is calculated between the target element feature of the first element of the case to be retrieved and the historical element feature of the first element of the first case, to obtain the element similarity between the case to be retrieved and the first case with respect to the first element, thereby obtaining the element similarity between the case to be retrieved and the first case with respect to each element; A weighted calculation is performed according to the current weight value of each factor and the corresponding factor similarity to obtain the similarity between the case to be retrieved and the first case.
4. The method according to claim 1, characterized in that: Determining a target pushed case sequence of the cases to be retrieved according to the initial pushed case sequence includes: If the number of pushed cases is equal to 0, the initial pushed case sequence is used as the target pushed case sequence; If the number of pushes is greater than 0, the historical push case sequence of the most recent push is obtained, and the target push case sequence is determined according to the historical push case sequence and the initial push case sequence.
5. The method according to any one of claims 1 to 4, characterized in that: Also includes: Acquiring historical text data of the plurality of historical cases; Processing each of the historical text data through the case element recognition model to obtain the historical element features of each historical case; Storing the historical text data and historical element features of the historical case in a case database; And in the method, obtaining the historical element features of multiple historical cases includes: obtaining the historical element features of the multiple historical cases from the case database.
6. The method according to any one of claims 1 to 4, characterized in that: The element characteristics include at least one of the following: legal relationship characteristics, core fact characteristics and evidence situation characteristics.
7. A case search and push device, characterized in that: include: An acquisition module, used for acquiring text data to be retrieved of a case to be retrieved; A processing module, used for processing the text data to be retrieved through a case element recognition model to obtain target element features of each element of the case to be retrieved; The acquisition module is also used to acquire the historical element features of each element of multiple historical cases, and acquire the current number of pushes; wherein the number of pushes is the number of times that the information has been displayed to the user for viewing; The processing module is further used to update the retrieval model based on the number of times the cases have been pushed, and compare the target element features of the cases to be searched with the historical element features of each historical case through the updated retrieval model to determine the initial push case sequence from the multiple historical cases; A push module, used to determine a target push case sequence of the cases to be retrieved according to the initial push case sequence, so as to push and display the historical cases in the target push case sequence; The processing module updates the retrieval model based on the number of times the cases have been pushed, and compares the target element features of the cases to be searched with the historical element features of each historical case through the updated retrieval model to determine the initial push case sequence from the multiple historical cases, including: Based on the number of times the information has been pushed, the current weight value of each element in the retrieval model is updated; based on the current weight value, the similarity between the target element feature and each of the historical element features is calculated to obtain the similarity between the case to be retrieved and each of the historical cases; based on the similarity, the multiple historical cases are sorted to obtain the sorting results of the multiple historical cases; and the first preset number of historical cases in the sorting results are determined as the initial push case sequence; The processing module updates the current weight value of each element in the retrieval model based on the number of pushes, including: If the number of pushes is equal to 0, the current weight values corresponding to each element are determined as preset weight values; if the number of pushes is greater than 0, the user behavior feedback data in the most recent push is obtained, and the historical weight values of each element used in the retrieval model in the most recent push is obtained; the historical weight values are updated according to the user behavior feedback data to obtain the current weight values of each element; The processing module updates the historical weight value according to the user behavior feedback data to obtain the current weight value of each factor, including: Obtain the similarity between each target historical case in the most recently pushed target push case sequence and the case to be retrieved to form environmental data, and use the historical weight as action data; merge the environmental data, the action data and the user behavior feedback data to obtain input data; input the input data into a trained deep reinforcement learning model, and output the current weight value of each element.
8. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the case retrieval and push method according to any one of claims 1 to 6 is implemented.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the case retrieval and push method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Legal instrument generation method and device based on knowledge graph, equipment and medium
CN113868391A
Computer security based on artificial intelligence
US20170214701A1