Query method and device, terminal equipment and computer readable storage medium
By building a pre-defined model library to generate query models, transaction compliance queries are automated, solving the problems of high labor costs and low accuracy in existing technologies, and achieving efficient and accurate transaction compliance queries.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, online transaction compliance inquiries are costly in terms of manpower and have low accuracy, and cannot quickly adapt to rapid updates in transaction rules.
By building a pre-set model library, query models are generated, and transaction rules are used to automatically generate query models, thereby automating compliance queries and reducing manual intervention.
It improved the accuracy of transaction compliance inquiries, reduced labor costs, and ensured the timeliness and accuracy of query results.
Smart Images

Figure CN114417089B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to a query method, apparatus, terminal equipment, and computer-readable storage medium. Background Technology
[0002] Currently, many transactions are conducted online, such as securities trading, futures trading, and wealth management trading. Before a transaction can proceed, a compliance check is required on the entity conducting the transaction; only if the entity meets the relevant trading rules can the transaction take place. In existing technology, compliance checks are typically conducted by industry professionals, which is labor-intensive. Furthermore, because trading rules are complex and frequently updated, professionals cannot quickly master all the rules, leading to lower accuracy in the search results and consequently affecting the success rate of the transaction. Summary of the Invention
[0003] This application provides a query method, apparatus, terminal device, and computer-readable storage medium, which can effectively improve the accuracy of transaction compliance queries and reduce the manpower cost of queries.
[0004] In a first aspect, embodiments of this application provide a query method applied to a query system, the method comprising:
[0005] When a query command is detected, the current user information is obtained, including identity information and transaction information;
[0006] Based on the applicable objects of each query model in the preset model library, a query model matching the identity information is obtained to obtain the target model. The query models in the preset model library are models generated by the query system based on the obtained transaction rules.
[0007] Based on the transaction information and the target model, the query results are obtained.
[0008] In this embodiment, the query system pre-generates a corresponding query model based on transaction rules. When a query command is detected, it searches for the corresponding target model in the preset model library based on the current user information and determines the query result based on the target model. Through this method, the query system automatically generates a query model based on transaction rules, which comprehensively and objectively reflects the transaction rules. Automating the query results using the query model avoids errors caused by incomplete understanding or misunderstanding of transaction rules during manual queries, effectively improving the accuracy of transaction compliance queries and significantly reducing the human resource costs required for queries.
[0009] In one possible implementation of the first aspect, before obtaining the target model by acquiring the query model matching the identity information based on the applicable objects of each query model in the preset model library, the method further includes:
[0010] Extract key information from the obtained transaction rules, wherein the key information includes the applicable objects and at least one transaction condition;
[0011] Generate the algorithm formula corresponding to each of the aforementioned transaction conditions;
[0012] The algorithmic formulas corresponding to each of the at least one transaction condition are combined to form a query model that matches the applicable object.
[0013] In one possible implementation of the first aspect, the algorithmic formula for generating each of the transaction conditions includes:
[0014] For each of the aforementioned transaction conditions, identify the transaction variables in the transaction condition and the boundary conditions corresponding to the transaction variables;
[0015] The algorithm formula corresponding to the transaction variable is generated based on the boundary conditions.
[0016] In one possible implementation of the first aspect, after assembling the algorithmic formulas corresponding to each of the at least one transaction condition into a query model that matches the applicable object, the method further includes:
[0017] For each algorithm formula, a prompt template corresponding to the algorithm formula is generated based on the trading variable corresponding to the algorithm formula and the boundary condition corresponding to the trading variable.
[0018] In one possible implementation of the first aspect, obtaining the query result based on the transaction information and the target model includes:
[0019] Extract the variable values corresponding to the transaction variables from the transaction information;
[0020] The calculation result of the target formula is calculated based on the variable values, wherein the target formula is the algorithm formula corresponding to the transaction variables in the transaction information in the target model;
[0021] If the calculation result indicates that the transaction information does not conform to the transaction rules, then the variable value is added to the prompt template corresponding to the target formula to obtain prompt information, wherein the query result includes the prompt information.
[0022] In one possible implementation of the first aspect, the method further includes:
[0023] The user information is obtained according to the first preset cycle;
[0024] Generate the query results corresponding to each of the first preset periods based on the user information obtained within each of the first preset periods;
[0025] According to the first preset period, the query results corresponding to each of the first preset periods are sent to the client.
[0026] In one possible implementation of the first aspect, the method further includes:
[0027] The transaction rules are obtained according to the second preset period;
[0028] The query model corresponding to each second preset period is updated according to the transaction rules obtained within each second preset period.
[0029] Secondly, embodiments of this application provide a query device for use in a query system, the device comprising:
[0030] The information acquisition unit is used to acquire current user information when a query command is detected, the user information including identity information and transaction information;
[0031] The model acquisition unit is used to acquire a query model that matches the identity information based on the applicable objects of each query model in the preset model library, and obtain the target model. The query models in the preset model library are models generated by the query system based on the acquired transaction rules.
[0032] The result query unit is used to obtain query results based on the transaction information and the target model.
[0033] Thirdly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the query method as described in any one of the first aspects above.
[0034] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the query method as described in any one of the first aspects above.
[0035] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the method described in any one of the first aspects.
[0036] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a schematic diagram illustrating the application scenario provided in the embodiments of this application;
[0039] Figure 2 This is a schematic diagram of the generation process of the query model provided in the embodiments of this application;
[0040] Figure 3 This is a flowchart illustrating the query method provided in an embodiment of this application;
[0041] Figure 4 This is a schematic diagram of the structure of the query device provided in the embodiments of this application;
[0042] Figure 5 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. Detailed Implementation
[0043] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0044] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0045] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0046] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0047] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0048] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0049] See Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. The query system 11 can communicate and connect with multiple third-party databases 12 and multiple clients 13, respectively. Figure 1 The example only illustrates a scenario with one third-party database and one client. In one application scenario, the query system retrieves transaction rules from the third-party database, then uses the query model generation method provided in this application to generate a query model and build a preset model library. The client can send a query command to the query system; when the query system receives the query command, it queries the user's transaction compliance based on the user information sent by the client and the generated query model, and returns the query results to the client.
[0050] First, we will introduce the process of pre-building a preset model library for the query system. (See also...) Figure 2 This is a schematic diagram illustrating the generation process of the query model provided in an embodiment of this application. It is intended as an example and not a limitation. Figure 2 As shown, the query model generation process includes:
[0051] S201, extract key information from the obtained transaction rules, wherein the key information includes the applicable objects and at least one transaction condition.
[0052] In this embodiment of the application, the query system can obtain transaction rules from a third-party database through a web crawler, or the user can manually input transaction rules into the query system.
[0053] Taking securities trading as an example, trading rules can be the relevant laws, regulations, and rules issued by the national government website and / or local securities regulatory bureaus.
[0054] In this embodiment, the query system can extract key information from transaction rules using existing text recognition methods. For example, it first performs keyword detection on the transaction rules, and then extracts transaction conditions related to the keywords based on the semantic information before and after the detected keywords.
[0055] For example, during the process of extracting key information, the trading rules can be divided into chapters, sections, and articles using the trading rules' own directory rules (the directory rules can be: the content between Chapter 1 and Chapter 2 is the content of Chapter 1, the content between 1.1 and 1.2 is the content of Section 1 of Chapter 1, etc.); then, entries related to compliance judgment are extracted from each chapter, section, and article; and then, the applicable objects and trading conditions (such as buying and selling direction, share change method, time unit, etc.) are extracted from these entries.
[0056] In summary, this application's embodiments involve fine-grained division of transaction rules, followed by extraction of key information for each rule. This method allows for a more comprehensive and objective interpretation of the transaction rules.
[0057] S202, Generate the algorithm formula corresponding to each of the transaction conditions.
[0058] In one embodiment, the steps for generating the algorithm formula include:
[0059] For each of the aforementioned transaction conditions, identify the transaction variables and the boundary conditions corresponding to the transaction variables; and generate the algorithm formula corresponding to the transaction variables based on the boundary conditions.
[0060] For example, if the transaction condition is that the time interval between the first and second transactions must not be less than 30 days, then the variables in this transaction condition are the time of the first transaction, the time of the second transaction, and the time interval. The relationship between these three variables is: Second transaction time - First transaction time = Time interval. Based on the boundary condition of this transaction condition, namely, the time interval is less than 30 days, the algorithm formula is: Second transaction time - First transaction time > 30.
[0061] For example, let's set the initial public offering (IPO) date as A1, and the date when the venture capital fund's cumulative investment in the IPO company reaches 3 million yuan or the date when the cumulative investment reaches 50% of the total investment in the IPO company as A2. Then, the investment period A = |A1 - A2|, with the value in months. Let the total number of company shares be S. t The number of shares reduced in the currently active valid trading records (sell direction, and block trade method) is T. The total number of shares reduced on the trading date of the currently active valid trading records is T. m The total number of shares sold in valid trading records on day t within the previous 90 / 60 / 30 days is T. t The generated algorithm formula is:
[0062] 1) |A1-A2|<=36,
[0063] When F1 > 0, it is recommended not to sell any more shares. (Where F1 represents the number of shares exceeding the limit.)
[0064] 2) 36 < |A1-A2| <= 48,
[0065] When F2 > 0, it is recommended not to sell any more shares. (Where F2 represents the number of shares exceeding the limit.)
[0066] 3) 48 < |A1-A2| <= 60,
[0067] When F3 > 0, it is recommended not to sell any more shares. (Where F3 represents the number of shares exceeding the limit.)
[0068] 4) |A1-A2|>60, F1 is not limited.
[0069] F1 indicates the number of portions exceeding the rated range.
[0070] S203, combine the algorithm formulas corresponding to each of the at least one transaction condition into a query model that matches the applicable object.
[0071] Each query model includes all the algorithm formulas corresponding to a transaction.
[0072] To ensure the effectiveness of the query model, in one embodiment, the method further includes:
[0073] The transaction rules are obtained according to the second preset period; the query model corresponding to each second preset period is updated according to the transaction rules obtained in each second preset period.
[0074] By using the methods described above, the latest transaction rules can be obtained regularly, and the query model can be updated regularly to ensure the timeliness and effectiveness of the query model.
[0075] If the final result is only returned to the client as a numerical value from the algorithm formula, the user may not understand its meaning and therefore cannot adjust their transactions based on the query results. To address this issue, in one embodiment, the method further includes:
[0076] For each algorithm formula, a prompt template corresponding to the algorithm formula is generated based on the trading variable corresponding to the algorithm formula and the boundary condition corresponding to the trading variable.
[0077] In practical applications, notification messages are often sent to the client when transaction information does not meet transaction rules. Therefore, the wording in the notification template needs to indicate that the variable value in the current transaction information does not meet the corresponding boundary conditions. For example, taking the algorithm formula "Second Transaction Time - First Transaction Time > 30" as an example, the corresponding notification template could be: "The interval between your 'first transaction' and 'second transaction' is less than 30 days." Here, the part in quotation marks represents the variable; when generating the notification message, simply replace the position of that variable in the notification template with its corresponding value.
[0078] For some variables, the transaction information does not directly provide their values, requiring calculation based on the generated algorithm formula. In such cases, the calculation method can be set in the corresponding position in the prompt template. For example, the prohibited sale prompt template in the regulations for block trade reductions by venture capital fund shareholders could be: "From #start time# to this block trade, the total number of shares you have reduced through #historical transaction quantity plus this transaction quantity# shares. The total number of shares reduced accounts for #historical transaction quantity plus this transaction quantity divided by the company's total number of shares#%, exceeding 2%, violating the regulation that block trade reductions cannot exceed 2% within 90 / 60 / 30 consecutive days." The content between the two "#" symbols represents the calculation method for the variables. When generating the prompt information, substitute the variable values involved in the calculation method into the calculation method, and replace the position of the calculation method in the prompt template with the calculated result.
[0079] See Figure 3 This is a flowchart illustrating the query method provided in an embodiment of this application. It is intended as an example and not a limitation. The method may include the following steps:
[0080] S301, when a query command is detected, obtain the current user information, which includes identity information and transaction information.
[0081] In this embodiment, different user identities may correspond to different transaction rules. Taking securities trading as an example, the transaction rules for large shareholders with a large number of shares are different from those for small shareholders with a small number of shares. As described in Embodiment 2, query models will be generated for different applicable objects. The identity information in this step is used to match the applicable objects.
[0082] Transaction information includes transaction variables and their values. For example, the transaction information is: User A's transaction date is December 27, 2021. Here, the transaction date is the variable, and its value is December 27, 2021.
[0083] S302, based on the applicable objects of each query model in the preset model library, obtain the query model that matches the identity information to obtain the target model.
[0084] The query models in the preset model library are models generated by the query system based on the obtained transaction rules.
[0085] Identify the applicable objects that match the user's identity, and then search for the corresponding query model in the preset model library.
[0086] In some application scenarios, the description of identity information and the applicable object is the same. In this case, it is sufficient to retrieve the query model corresponding to the identity information from the preset database. For example, if the user's identity information is "major shareholder," the query model corresponding to "major shareholder" can be found in the preset model library.
[0087] In other application scenarios, the description of identity information differs from that of the applicable object. In such cases, it is necessary to first convert the identity information into a description of the applicable object before obtaining the corresponding query model. For example, if the identity information is 12345 (i.e., the user's registered account), the query for the applicable object corresponding to this user is "major shareholder," and then the query model corresponding to the major shareholder is searched in the preset model library.
[0088] S303, Based on the transaction information and the target model, obtain the query results.
[0089] like Figure 2 As described in the embodiment, the algorithm formula corresponds to a prompt template. Accordingly, S303 may include:
[0090] Extract the variable values corresponding to the transaction variables from the transaction information;
[0091] The calculation result of the target formula is calculated based on the variable values, wherein the target formula is the algorithm formula corresponding to the transaction variables in the transaction information in the target model;
[0092] If the calculation result indicates that the transaction information does not conform to the transaction rules, then the variable value is added to the prompt template corresponding to the target formula to obtain prompt information, wherein the query result includes the prompt information.
[0093] continue Figure 2 In the examples shown in formulas 1)-4), under the conditions of formulas 1)-3), when F1>0, it indicates that the number of shares exceeding the specified range does not meet the trading conditions, i.e., it does not comply with the trading rules. Under the conditions of formula 4), since F1 is not limited, F1 meets the trading conditions, i.e., it complies with the trading rules.
[0094] Accordingly, assuming the prompt template corresponding to formulas 1)-3) of this algorithm is: Your current investment period is "A", which is less than or equal to 60 days, and the number of shares exceeding the limit "F1" is greater than 0, selling is not recommended. Substitute the variable value of the investment period in the transaction information into the "A" position, and substitute the variable value of the number of shares exceeding the limit into the "F1" position. Assuming A = 40 and F1 = 50, the prompt message would be: "Your current investment period is 30 days, which is less than or equal to 60 days, and the number of shares exceeding the limit is 50, which is greater than 0, selling is not recommended."
[0095] Of course, A and F1 may not be given directly in the transaction information and need to be calculated using algorithm formulas 1)-3). In that case, you can substitute the variable values in the transaction information into algorithm formulas 1), 2), or 3) and replace the corresponding positions of the transaction variables in the above prompt template with the calculated results.
[0096] In this embodiment, the query system pre-generates a corresponding query model based on transaction rules. When a query command is detected, it searches for the corresponding target model in the preset model library based on the current user information and determines the query result based on the target model. Through this method, the query system automatically generates a query model based on transaction rules, which comprehensively and objectively reflects the transaction rules. Automating the query results using the query model avoids errors caused by incomplete understanding or misunderstanding of transaction rules during manual queries, effectively improving the accuracy of transaction compliance queries and significantly reducing the human resource costs required for queries.
[0097] The steps S301-S303 described in the above embodiments are the process of performing a query based on a query instruction. In practical applications, the query system can automatically perform compliance queries on user transactions according to a certain query cycle. In one embodiment, the method further includes:
[0098] The user information is obtained according to the first preset cycle;
[0099] Generate the query results corresponding to each of the first preset periods based on the user information obtained within each of the first preset periods;
[0100] According to the first preset period, the query results corresponding to each of the first preset periods are sent to the client.
[0101] The above method is equivalent to periodically and automatically monitoring user transactions. If a user's transaction violates regulations, the system can promptly alert the user. Using this method, users only need to set a first preset cycle, and the query system can automatically and promptly query the user's transactions, effectively improving the timeliness of the query and thus enhancing the user experience.
[0102] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0103] Corresponding to the query method described in the above embodiments, Figure 4 This is a structural block diagram of the query device provided in the embodiments of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0104] Reference Figure 4 The device includes:
[0105] The information acquisition unit 41 is used to acquire current user information when a query command is detected. The user information includes identity information and transaction information.
[0106] The model acquisition unit 42 is used to acquire a query model that matches the identity information based on the applicable objects of each query model in the preset model library, and obtain the target model. The query models in the preset model library are models generated by the query system based on the acquired transaction rules.
[0107] The result query unit 43 is used to obtain query results based on the transaction information and the target model.
[0108] Optionally, device 4 also includes:
[0109] The model training unit 44 is used to extract key information from the acquired transaction rules, wherein the key information includes the applicable object and at least one transaction condition; generate an algorithm formula corresponding to each of the transaction conditions; and combine the algorithm formulas corresponding to each of the at least one transaction condition into a query model that matches the applicable object.
[0110] Optionally, model training unit 44 is also used for:
[0111] For each of the aforementioned transaction conditions, identify the transaction variables and the boundary conditions corresponding to the transaction variables; and generate the algorithm formula corresponding to the transaction variables based on the boundary conditions.
[0112] Optionally, device 4 also includes:
[0113] The prompt generation unit 45 is used to generate a prompt template corresponding to each algorithm formula for each algorithm formula after assembling the algorithm formulas corresponding to each of the at least one transaction condition into a query model that matches the applicable object, based on the transaction variable corresponding to the algorithm formula and the boundary condition corresponding to the transaction variable.
[0114] Optionally, result query unit 43 is also used for:
[0115] Extract the variable values corresponding to the transaction variables from the transaction information;
[0116] The calculation result of the target formula is calculated based on the variable values, wherein the target formula is the algorithm formula corresponding to the transaction variables in the transaction information in the target model;
[0117] If the calculation result indicates that the transaction information does not conform to the transaction rules, then the variable value is added to the prompt template corresponding to the target formula to obtain prompt information, wherein the query result includes the prompt information.
[0118] Optionally, device 4 also includes:
[0119] The automatic query unit 46 is configured to acquire the user information according to a first preset period; generate the query result corresponding to each first preset period based on the user information acquired in each first preset period; and send the query result corresponding to each first preset period to the client according to the first preset period.
[0120] Optionally, model training unit 44 is also used for:
[0121] The transaction rules are obtained according to the second preset period;
[0122] The query model corresponding to each second preset period is updated according to the transaction rules obtained within each second preset period.
[0123] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0124] in addition, Figure 4The query device shown can be a software unit, hardware unit, or a combination of software and hardware built into an existing terminal device, or it can be integrated into the terminal device as an independent component, or it can exist as an independent terminal device.
[0125] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0126] Figure 5 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. For example... Figure 5 As shown, the terminal device 5 in this embodiment includes: at least one processor 50 ( Figure 5 (Only one is shown) a processor, a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 executes the computer program 52 to implement the steps in any of the above query method embodiments.
[0127] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. This terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 5 This is merely an example of terminal device 5 and does not constitute a limitation on terminal device 5. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0128] The processor 50 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0129] In some embodiments, the memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or memory of the terminal device 5. In other embodiments, the memory 51 may be an external storage device of the terminal device 5, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the terminal device 5. Furthermore, the memory 51 may include both internal and external storage units of the terminal device 5. The memory 51 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 51 can also be used to temporarily store data that has been output or will be output.
[0130] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0131] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.
[0132] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / terminal equipment, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0133] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0134] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0135] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0137] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A query method, characterized by, The method is applied to a query system and comprises the following steps: When a query instruction is monitored, current user information is acquired, the user information comprising identity information and transaction information; According to applicable objects of each query model in a preset model library, a query model matched with the identity information is acquired to obtain a target model, wherein the query model in the preset model library is a model generated by the query system according to acquired transaction rules; According to the transaction information and the target model, a query result is obtained; Before acquiring, according to applicable objects of each query model in a preset model library, a query model matched with the identity information to obtain a target model, the method further comprises the following steps: Key information is extracted from the acquired transaction rules, wherein the key information comprises applicable objects and at least one transaction condition; An algorithm formula corresponding to each transaction condition is generated; The algorithm formulas corresponding to the at least one transaction condition are combined into a query model matched with the applicable objects, each query module comprising all algorithm formulas corresponding to a transaction; The generation of the algorithm formula corresponding to each transaction condition comprises the following steps: For each transaction condition, a transaction variable in the transaction condition and a boundary condition corresponding to the transaction variable are identified; The algorithm formula corresponding to the transaction variable is generated according to the boundary condition; After the algorithm formulas corresponding to the at least one transaction condition are combined into a query model matched with the applicable objects, the method further comprises the following steps: For each algorithm formula, a prompt template corresponding to the algorithm formula is generated according to the transaction variable corresponding to the algorithm formula and the boundary condition corresponding to the transaction variable.
2. The query method of claim 1, wherein, The generation of the algorithm formula corresponding to each transaction condition comprises the following steps: A variable value corresponding to a transaction variable in the transaction information is extracted; A calculation result of a target formula is calculated according to the variable value, wherein the target formula is an algorithm formula corresponding to the transaction variable in the transaction information in the target model; If the calculation result indicates that the transaction information does not conform to a transaction rule, the variable value is added to a prompt template corresponding to the target formula to obtain prompt information, wherein the query result comprises the prompt information.
3. The query method of claim 1, wherein, The method further comprises the following steps: The user information is acquired according to a first preset period; The query result corresponding to each first preset period is generated according to the user information acquired in each first preset period; The query result corresponding to each first preset period is sent to a client according to the first preset period.
4. The query method of claim 1, wherein, The method further comprises the following steps: The transaction rules are acquired according to a second preset period; The query model corresponding to each second preset period is updated according to the transaction rules acquired in each second preset period.
5. A query device, characterized in that The device is applied to a query system and comprises the following units: An information acquisition unit is configured to acquire current user information when a query instruction is monitored, the user information comprising identity information and transaction information; The model obtaining unit is configured to obtain a query model matched with the identity information according to an applicable object of each query model in a preset model library, to obtain a target model, wherein the query model in the preset model library is a model generated by the query system according to the obtained transaction rule; The result querying unit is configured to obtain a query result according to the transaction information and the target model; The device further comprises a model training unit and a prompt generating unit; The model training unit is configured to extract key information from the obtained transaction rule, wherein the key information comprises an applicable object and at least one transaction condition; generate an algorithm formula corresponding to each transaction condition; and group the algorithm formula corresponding to each of the at least one transaction condition into a query model matched with the applicable object, each query module comprising all algorithm formulas corresponding to a transaction; The model training unit is further configured to, for each transaction condition, identify a transaction variable in the transaction condition and a boundary condition corresponding to the transaction variable; and generate the algorithm formula corresponding to the transaction variable according to the boundary condition; The prompt generating unit is configured to, after grouping the algorithm formula corresponding to each of the at least one transaction condition into a query model matched with the applicable object, generate, for each algorithm formula, a prompt template corresponding to the algorithm formula according to the transaction variable corresponding to the algorithm formula and the boundary condition corresponding to the transaction variable.
6. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method of any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, wherein the computer program comprises the following steps of: receiving a request for a resource from a client; determining whether the client is authorized to access the resource; and if the client is authorized to access the resource, providing the resource to the client. The computer program is executed by the processor to implement the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Private data query method and device based on blockchain account
CN110580418A
Systems and methods for identifying synthetic identities
US20210241120A1