Accounting method and device, electronic equipment and readable storage medium
By receiving user input and automatically extracting transaction information, and displaying the accounting interface based on preset templates, the problem of cumbersome accounting operations in the existing technology is solved, and the convenience and efficiency of accounting operations are achieved.
Patent Information
- Application Number
- CN202411411089.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-07
AI Technical Summary
In the prior art, the accounting operation is complicated, and users need to manually view the payment bill, switch the interface, and find and enter bill information.
By receiving user input, transaction information is automatically extracted and the accounting interface is displayed based on preset templates, automatic recording and display of transaction information is realized.
It simplifies accounting operations, reduces the steps of user manual input and interface switching, and improves the convenience and efficiency of accounting.
Smart Images

Figure CN119398771A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and specifically relates to an accounting method, device, electronic device and readable storage medium. Background Art
[0002] In today's digital age, people are increasingly relying on electronic devices for payments. Therefore, users' demand for accounting is becoming increasingly prominent, and some payment applications have launched accounting functions.
[0003] In the prior art, when a user needs to record an account, he needs to manually check the payment bill and enter the transaction information in the bill into the accounting interface. This method requires the user to manually switch interfaces, search bills, input bill information, and other operations, which makes the user's operation cumbersome. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an accounting method that can solve the problem of cumbersome accounting operations in the prior art.
[0005] In a first aspect, an embodiment of the present application provides an accounting method, the method comprising: receiving a first input; extracting transaction information based on the first input; and displaying an accounting interface based on a first preset template and the transaction information.
[0006] In a second aspect, an embodiment of the present application provides an accounting device, comprising: a receiving unit for receiving a first input; an extraction unit for extracting transaction information based on the first input; and a first display unit for displaying an accounting interface based on a first preset template and the transaction information.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps described in the first aspect are implemented.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0011] In the embodiment of the present application, after receiving the first input, the transaction information can be automatically extracted based on the first input, and the accounting interface can be displayed based on the first preset template and the transaction information. It can be seen that the embodiment of the present application can automatically record the user's transaction information in the accounting interface in combination with the first preset template. In this process, the user only needs to perform a simple trigger, and there is no need to manually switch interfaces, search for bills, enter bill information, etc., which improves the convenience of accounting operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is a flow chart of the accounting method of some embodiments of the present application;
[0013] Figure 2 is a schematic diagram of extracting prompts in some embodiments of the present application;
[0014] Figure 3A is one of the display schematic diagrams of the electronic device in some embodiments of the present application;
[0015] Figure 3B This is a second display schematic diagram of an electronic device in some embodiments of the present application;
[0016] Figure 4A This is a third display schematic diagram of an electronic device in some embodiments of the present application;
[0017] Figure 4B This is a fourth display schematic diagram of an electronic device in some embodiments of the present application;
[0018] Figure 4C This is a fifth display schematic diagram of an electronic device in some embodiments of the present application;
[0019] Figure 5 This is the sixth display schematic diagram of the electronic device in some embodiments of the present application;
[0020] Figure 6 This is the seventh display schematic diagram of the electronic device of some embodiments of the present application;
[0021] Figure 7 is a schematic diagram of billing information of some embodiments of the present application;
[0022] Figure 8 This is an eighth display schematic diagram of an electronic device in some embodiments of the present application;
[0023] Fig. 9 This is a ninth display schematic diagram of an electronic device according to some embodiments of the present application;
[0024] Fig.10 is a schematic diagram of analysis prompts of some embodiments of the present application;
[0025] Fig.11 is a schematic diagram of bill analysis results of some embodiments of the present application;
[0026] Fig.12 This is a tenth display schematic diagram of an electronic device in some embodiments of the present application;
[0027] Fig.13 is a schematic diagram of consulting prompts of some embodiments of the present application;
[0028] Fig.14 is a block diagram of an accounting device in some embodiments of the present application;
[0029] Fig.15 Schematic diagram of the hardware structure of the electronic device of some embodiments of the present application;
[0030] Fig.16 It is a schematic diagram of the hardware structure of an electronic device of some embodiments of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings of the embodiments of the present application to clearly describe the technical solutions of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present application belong to the scope of protection of this application.
[0032] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the target object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0033] The following is a detailed description of the accounting method provided by the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0034] like Figure 1 As shown, a flowchart of an accounting method according to an embodiment of the present application is shown, and the method is applied to an electronic device as an example. The method includes:
[0035] Step 101, receiving a first input.
[0036] In this embodiment, the first input can be used to trigger the extraction of transaction information. The first input can be a touch input, or a voice command, or a specific gesture input by the user, or other feasible input, which can be determined according to actual use requirements, and is not limited in the embodiments of the present application. The specific gesture in the embodiments of the present application can be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double-press gesture, and a double-click gesture. The click input in the embodiments of the present application can be a single-click input, a double-click input, or any number of click inputs, etc., and can also be a long press input or a short press input.
[0037] In practice, the interactive process provided by the accounting method of this embodiment can be completed in the program of the accounting intelligent assistant. The above-mentioned first input can be an input for triggering the accounting intelligent assistant to extract transaction information. Among them, the accounting intelligent assistant provides an intelligent interaction method based on a large language model (LLM), which can understand and process natural language. Users can use natural language to have multiple rounds of dialogue with the accounting intelligent assistant to complete various tasks, such as question and answer, creation, etc., to help users solve problems and obtain information. A large language model refers to a deep learning model with a large number of parameters that can understand and process complex relationships in natural language texts. It has excellent language understanding and generation capabilities through training on massive text data, and can perform a variety of natural language processing tasks, such as text generation, question and answer, etc.
[0038] Step 102: extract transaction information based on the first input.
[0039] In this embodiment, based on the first input, the content to be input into the accounting intelligent assistant can be obtained first, and the content may include but is not limited to at least one of the following: image, text, and voice. For images, optical character recognition (OCR) technology can be used to extract text from images. Among them, OCR technology is a technology that converts text in pictures, PDFs or scans into editable data. For voice, voice recognition technology can be used to convert the voice into text. Afterwards, the text is input into the large language model provided by the above-mentioned accounting intelligent assistant, and transaction information is extracted from the above-mentioned text through the large language model. Among them, the transaction information may include the transaction amount, and may also include information such as transaction category, transaction time, transaction object, transaction method, counterparty account, remarks, etc.
[0040] The embodiment of the present application provides three types of transaction records, which can be images, texts and voices, so that the accounting method of the embodiment can support multi-modal transaction records, flexibly respond to various transaction scenarios, and help users to perform more comprehensive accounting, thereby realizing intelligent and efficient accounting. Among them, for each type of transaction record, it only needs to be uniformly converted into a text input model, and the model performs unified processing, without the need for the model to process different types of transaction records separately, thus realizing a highly automated accounting method.
[0041] It should be noted that in addition to the above text, the content input into the large language model can also include instructions, extraction content instructions, output format requirements and other extraction prompts. The large language model processes the text according to the input extraction prompts, and then outputs transaction information that meets the requirements. During operation, the system replaces the {input text placeholder} in the extraction prompt with the actual text. The combined complete instructions are used as the input of the large language model, and the large language model extracts information and outputs transaction information in json format. As an example, see Figure 2 , extract the instructions 201 in the prompt, extract the content description 202, and the output format requirements 203 such as Figure 2 shown.
[0042] In practice, in order to enable the large language model to output transaction information, the large language model can be trained in advance. For reference, payment data of different payment scenarios can be collected, such as payment notification messages of payment scenarios of various applications with payment functions, and the payment data can be converted into text, where the text is used as training text. A training data consists of a triple <training text, extraction prompt, label>, so that multiple training data are used for model training, and iterative optimization is continuously performed to obtain a trained model, so that the accuracy of the first parameter of the transaction record output by the trained model is higher.
[0043] Furthermore, for payment data in a standard format, such as payment notification messages in a fixed format, data expansion can be achieved by replacing the content of the corresponding entries with preset rules; for irregular payment data, such as payment content manually recorded by users, a large language model is used for imitation expansion, thereby achieving data enhancement and increasing the number of training texts. In addition, as shown in the following table, redundant information or irrelevant information can be randomly inserted into the training text, and redundant information and irrelevant information can be obtained from non-payment data, thereby adding adversarial data. Because the transaction records entered by users during the interaction process may contain some redundant or irrelevant information, adding adversarial data can improve the robustness of the model and enable the model to output parameters for transaction records more accurately.
[0044]
[0045] Furthermore, the transaction information output by the model can be verified and corrected, and the verified and corrected transaction information can be used as a label to further train the large language model to optimize the parameters of the large language model, which means that more accurate transaction information can be output.
[0046] Step 103: Display an accounting interface based on the first preset template and transaction information.
[0047] In this embodiment, after the transaction information is extracted, a notification may be output first, the notification being used to indicate the transaction information. When the user clicks on the notification, the transaction information may be filled into the first preset template to obtain the transaction information in a set format, and the transaction information in the set format may be displayed in the accounting interface.
[0048] As an example, Figure 3A As shown in FIG. 1 , after the transaction information is extracted, a notification 301 indicating the transaction information is first displayed. After the user clicks the notification 301, the following may be displayed: Figure 3B The accounting interface shown includes details of transaction information, such as the details shown by label 304.
[0049] Optionally, the user clicks Figure 3A The edit option 302 in the figure can be used to modify the content in the details to obtain more accurate details. Figure 3A The refresh option 303 in the example can trigger the large language model to re-extract transaction information to obtain transaction information that is more in line with expectations. Since the output of the large language model is random, the transaction information outputted twice has a certain difference.
[0050] The method provided in the embodiment of the present application can automatically extract transaction information based on the first input after receiving the first input, and display the accounting interface based on the first preset template and the transaction information. It can be seen that the embodiment of the present application can automatically record the user's transaction information in the accounting interface in combination with the first preset template. In this process, the user only needs to perform a simple trigger, and there is no need to manually switch interfaces, search for bills, enter bill information, etc., which improves the convenience of accounting operations.
[0051] In some optional embodiments, step 102 may include the following sub-steps:
[0052] Sub-step S11, acquiring an image in response to a first input.
[0053] In some scenarios, the first input may include a screenshot operation and an image upload operation. As an example, a payment application may be installed in the electronic device. If an expenditure or an income is generated based on the payment application, the electronic device may receive a notification sent by the payment application, such as a payment notification, a text message notification, etc. At this time, the user may perform a screenshot operation to obtain a screenshot, see Figure 4A As shown in the reference numeral 401 in FIG. 1 . The user can upload the captured image to the above-mentioned accounting intelligent assistant to complete the first input. The above-mentioned screenshot may include transaction information, such as transaction amount, transaction time, transaction method, counterparty account, etc.
[0054] In some scenarios, the first input may be an input to a specific control. For example, if an expenditure or income is generated based on the payment application, the electronic device may receive a notification sent by the payment application, such as a payment notification or SMS notification. The notification page may include a control for triggering a quick input function, see Figure 4B The floating control shown by the label 402 in the figure. When the user clicks the floating control, the system automatically triggers the screenshot function in the background, obtains the snapshot image of the notification page, and transmits the obtained snapshot image to the accounting intelligent assistant in the background. The user does not need to perform additional screenshot operations. At this time, you can directly jump to the interface of the accounting intelligent assistant and display the prompt information in the interface. See Figure 4C As shown in the reference numeral 403.
[0055] Sub-step S12, extracting transaction information from the image.
[0056] Here, we can first use optical character recognition technology to extract text from the image, then input the extracted text and the preset extraction prompt words into the large language model, and extract transaction information from the text through the large language model. Continuing with the above example, the extracted transaction information may include "transaction amount: -31.87", "transaction method: XXX", "transaction time: XXX", "counterparty account: XXX", etc.
[0057] By acquiring images and extracting transaction information from them, users only need to perform simple triggering, without having to manually switch interfaces, search for bills, enter bill information, etc., which greatly improves the convenience of accounting operations.
[0058] In some optional embodiments, step 102 may include the following sub-steps:
[0059] Sub-step S21, in response to the first input, obtaining text.
[0060] Here, the first input may include copying and pasting text. Specifically, if an expenditure or income is generated based on the payment application, the electronic device may receive a notification sent by the payment application, such as a payment notification, SMS notification, etc. The user may copy the notification, and copy and upload the pasted notification to the accounting smart assistant to complete the first input. The notification may include transaction information, such as transaction amount, transaction time, transaction method, other party's account, etc.
[0061] As an example, see Figure 5 , the user copies a text message notification 501, pastes it into the interface of the accounting smart assistant and sends it. The specific content of the text message notification 301 includes: [XXX Mall] Dear Xiao Ming, you successfully spent 898.00 on January 1, 2022. Please log in to the official website for details. Unsubscribe and reply N.
[0062] Sub-step S22, extracting transaction information from the text.
[0063] Here, the above text and the preset extraction prompt words can be input into the large language model, and the transaction information can be extracted from the text through the large language model. Continuing with the above example, the transaction information extracted by the large language model may include "transaction amount: -898.00", "transaction method: XXX mall", "transaction time: January 1, 2022", etc.
[0064] By obtaining text and extracting transaction information from the text, users only need to perform simple triggering, without having to manually switch interfaces, search for bills, input bill information, etc., which greatly improves the convenience of accounting operations.
[0065] In some optional embodiments, step 102 may include the following sub-steps:
[0066] Sub-step S31, in response to the first input, obtaining voice information.
[0067] Sub-step S32, converting the voice information into text.
[0068] Sub-step S33, extracting transaction information from the text.
[0069] Here, the first input may be a voice input to the accounting interface. Figure 6In the accounting interface of the accounting intelligent assistant shown in , the user long presses the voice input option 601 and enters the transaction content, such as the voice of "I had a meal and spent 31.87". Then, the voice can be converted into text through voice recognition technology, so that the text and the preset extraction prompt words are input into the large language model, and the transaction information in the text is extracted through the large language model. Continuing with the above example, the extracted transaction information may include "transaction amount: -31.87", "transaction type: catering", etc.
[0070] By acquiring voice and extracting transaction information from the text corresponding to the voice, it can be adapted to offline transaction scenarios such as cash to help users achieve more comprehensive economic management.
[0071] In some optional embodiments, after executing step 103, the following steps may also be executed:
[0072] Step 104, obtaining historical transaction information extracted within a preset period.
[0073] Step 105: Based on the second preset template and the historical transaction information, a billing interface for a preset period is displayed.
[0074] The preset period can be set as needed. For example, it can be one day, one week, one month, one year, etc. Correspondingly, according to the different durations of the preset period, historical transaction information can be counted and summarized at fixed times within the period to obtain a bill for the preset period, so that the user can trigger the display of the bill interface of the preset period at any time by input. Within the preset period, each time a transaction information is extracted, the bill of the preset period can be updated in real time.
[0075] After obtaining the historical transaction information extracted within the preset period, the historical transaction information can be summarized according to the second preset template to be converted into bill information of the preset period in an expected format, thereby displaying a bill interface containing the bill information of the preset period. The bill interface of the preset period may include, but is not limited to, information such as the preset period, income and expenditure, fixed expenditure, additional expenditure, target transaction category, target transaction time period, target transaction object, and target transaction method.
[0076] like Figure 7 As shown, all historical transaction information in the week from May 2, 2024 to May 12, 2024 is summarized to obtain the billing interface for this week. The billing interface may include the billing information for this week. Among them, the target transaction category can be the top three categories with the highest transaction amount; the target transaction time period can be the top three time periods with the highest transaction amount; the target transaction object can be the top three objects with the highest transaction amount; and the target transaction method can be the top three transaction methods with the highest transaction amount.
[0077] The above target transaction types, target transaction objects, target transaction time periods, and target transaction methods are further divided into income and expenditure. For reference, fixed expenditures include housing, water, electricity, gas, Internet, television, phone bills, transportation, insurance, membership subscriptions, and other transaction categories with relatively fixed amounts; additional expenditures include catering, entertainment, clothing, medical care, maintenance, travel, and other transaction categories with unfixed amounts.
[0078] Optionally, the parameters required to generate the above-mentioned bill information can be retrieved and processed from the database through a standardized programming language (Structured Query Language, SQL) database technology for managing and processing data in the database. Optionally, the database here includes a large amount of historical transaction information. In the processing process, for example, the category field is matched according to the rules, and fixed expenses or additional expenses can be mapped, so as to calculate the fixed and additional expenses. Among them, SQL database technology is a technology widely used in database management systems, which supports users to perform various operations, including but not limited to updating data, deleting records, querying information, and creating and managing data tables.
[0079] This embodiment obtains historical transaction information extracted within a preset period, and displays the billing interface of the preset period based on a second preset template and the historical transaction information, so that users can easily view the billing information of the preset period and thus know the economic situation of the preset period, thereby helping users to achieve more comprehensive economic management.
[0080] In some optional embodiments, after executing step 105, the following steps may also be executed:
[0081] Step 106, receiving a second input of a billing interface for a preset period.
[0082] Step 107: In response to the second input, extract bill information of bills within a preset period.
[0083] Step 108, obtaining a billing target determined based on the third input.
[0084] Step 109: Based on the third preset template, the billing target, and the bill information of the bills within the preset period, a bill analysis interface for the preset period is displayed.
[0085] Here, the second input can be used to trigger the extraction of billing information of bills within a preset period from the billing interface of the preset period. The third input can be used to determine the billing target. The second input and the third input can be touch input, or voice command, or a specific gesture input by the user, or other feasible input, which can be determined according to actual use requirements, and the embodiment of the present application is not limited. The specific gesture in the embodiment of the present application can be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double-press gesture, and a double-click gesture. The click input in the embodiment of the present application can be a single-click input, a double-click input, or any number of click inputs, etc., and can also be a long press input or a short press input.
[0086] The user enters the accounting goal in advance in the accounting intelligent assistant. Taking a bill as an example, the large language model can use relevant algorithms to output the bill analysis results for the bill according to the accounting goal. The bill analysis interface of the preset period may include the bill analysis results of the preset period. Among them, the bill analysis results include consumption level sub-results, consumption preference sub-results, consumption habit sub-results, user status sub-results, user demand sub-results, summary sub-results, and feedback sub-results.
[0087] As an example, Figure 8 As shown, the bill information of the bills within the preset period is displayed in the form of card 801 on the interface of the accounting intelligent assistant, and the summary and feedback part of the bill analysis results are pushed to the user in the form of dialog box 802. When the user clicks the enter account option 803 in the card 801, the detailed page of the bill analysis results can be entered, such as Fig. 9 The details page can display the details 901 of the bill analysis result and can also display the bill content in more forms, such as charts.
[0088] Accordingly, during the training phase of the large language model, bills of various periods can be collected, such as daily, weekly, monthly, and annual bills; at the same time, relevant personnel record different accounting targets. In practice, the content input into the large language model, in addition to the bill information of the bills within the preset period, can also include instructions, output analysis content descriptions, output format requirements, and other content and form analysis prompts. That is, a training data is composed of a four-tuple <bill, accounting target, analysis prompt, label>, so that multiple training data are used for model training, and iterative optimization is continuously performed to obtain a trained model, so that the trained model outputs a higher bill analysis result. See Fig.10 The instructions in the analysis prompt are shown in label 1001, the analysis content description is shown in label 1002, and the output format requirements are shown in label 1003.
[0089] When applying, the "billing information placeholder" in the analysis prompt can be replaced with the billing information of the bill within the period, and the "user goal placeholder" can be replaced with the billing goal. The combined complete analysis prompt is used as the input of the model, and the model analyzes the billing information and billing goal, and outputs the bill analysis results in json format, such as Fig.11 As shown, the bill analysis results include: consumption level sub-results, consumption preference sub-results, consumption habit sub-results, user status sub-results, user demand sub-results, summary sub-results, and feedback sub-results.
[0090] Furthermore, the collected billing data can be enhanced. Since the real data is limited, the model can be used to simulate and expand the real data.
[0091] Furthermore, the bill analysis results can be verified and corrected, and the verified and corrected bill analysis results are used as labels, that is, the large language model is further trained with reference to the bill analysis results to improve the accuracy of its output information.
[0092] This embodiment extracts the billing information of the bills within the preset period, and based on the third preset template, the accounting target and the billing information of the bills within the above preset period, displays the bill analysis interface of the preset period, so that the user can view the bill analysis results of the preset period, thereby knowing the economic situation of the preset period, so as to help the user achieve more comprehensive economic management.
[0093] In some optional embodiments, the above-mentioned accounting intelligent assistant can provide consulting services in addition to accounting services. The types of consultation may include but are not limited to detailed query, bill query, target query, balance query, operation guide query, investment and financial consulting, etc. The user can enter information in the accounting intelligent assistant. After judging that it does not belong to the "accounting scene" through scene recognition, the information entered by the user can be used as a query condition, parsed through natural language understanding technology, and a database query statement is constructed. Rule matching and semantic matching are performed in the database to retrieve relevant content. Among them, details, bills, targets, and balances can be found in the account book table of the database. Operation guides and investment and financial content are found in the knowledge table of the database.
[0094] Among them, the bill table includes N1 kinds of bills of preset periods, and N1 is a positive integer. For reference, the accounting intelligent assistant updates and outputs the bills of the period in real time and regularly, and stores them in the bill table. For example, the bill table includes monthly bills from January to December, weekly bills for each month, and daily bills for each week. Among them, the bill table will continue to be updated and expanded over time. The knowledge table includes N2 pairs of data, and a pair of data includes a preset question and a corresponding answer, and N2 is a positive integer. For reference, the model pre-creates a knowledge table, and the knowledge table includes a large number of knowledge questions and corresponding answers, and a question and an answer are regarded as a data pair. Among them, the knowledge table is continuously updated and expanded over time. The intent key information can be matched with the knowledge table to obtain the corresponding answers to the matching preset questions. Among them, the matching methods include rule matching and semantic matching.
[0095] In this embodiment, the user can ask questions related to the bill to the accounting intelligent assistant, and the accounting intelligent assistant will answer the user's questions, thereby avoiding the user from manually searching for bills on the electronic device, simplifying the user's operation, and helping the user to efficiently obtain useful information.
[0096] In another embodiment of the present application, if the intention of the user's question does not indicate any of the above two embodiments, or the parameter items and preset questions cannot be obtained, based on rule matching and semantic matching, the result obtained may be that no relevant content can be retrieved.
[0097] like Fig.12 As shown, the carrier of the user question can be a dialog box, such as dialog box 1201; correspondingly, the carrier of the answer to the user question can also be a dialog box, such as dialog box 1202. In dialog box 1203, if the user question displayed does not match the preset question in the knowledge table, a paragraph of speech can be displayed in dialog box 1204 in combination with the user question based on the result that no relevant content can be retrieved. The speech can be answered by the model itself, for example, the model combines the semantic understanding of the user question with a fixed speech template to output a paragraph of speech.
[0098] In another embodiment of the present application, a model training process is provided to enable the model to have the ability to answer user questions.
[0099] First, construct user questions: The data collector constructs some questions or collects relevant questions from the Internet, such as detailed query, bill query, target query, balance query, operation guide query, and investment and financial consulting. At the same time, for questions such as operation consulting and investment and financial consulting, construct relevant knowledge to supplement the knowledge table of the database, and based on the real-time updated bills, supplement them to the bill table.
[0100] For the constructed user questions, at least one of the knowledge table and the bill table is searched through rule matching and semantic matching to obtain the search content. The search content in the bill table is the relevant bill parameters, and the search content in the knowledge table is the answer to the relevant question. If no content is retrieved, it is set as a result that no relevant content is retrieved.
[0101] After that, construct adversarial data: Due to the errors in the retrieval technology itself, the retrieved content is not always relevant. As shown in the table below, based on the hamburger, the retrieved bread is irrelevant content. Therefore, during the training process, it is necessary to introduce some irrelevant content in the retrieval content as adversarial samples to improve the model's error-resistance when facing irrelevant retrieval content. Among them, irrelevant content such as the top 10 retrieved content can be used to construct adversarial samples. Based on this processing method, the trained model can also output corresponding answers for some irrelevant retrieval content. For example, the user's question is: I want to know the hamburger expenditure in April, and the output answer is: I'm sorry, no relevant content can be found, and the only query is that the diet-bread expenditure is -200".
[0102] Related content Irrelevant content User Questions Want to know the food expenses in April Want to know the hamburger expenditure in April Search content Food expenses in April: ¥-2,500 April food-bread expenditure: ¥-200
[0103] In the next step, prompt engineering is performed on the model to design and adjust the content and form of the instructions, response rules, etc. in the consulting prompts, so as to select the consulting prompts with the best test performance as the final consulting prompts. Fig.13 , the instructions in the consulting prompt are shown as label 1301.
[0104] Furthermore, the consulting prompt, the constructed user question, and the search content are combined to form a complete instruction input model, and the answer to the user question is output through the model, and the answer to the user question is verified and corrected, and the verified and corrected content is used as the target label, that is, the reference answer. It can be seen that a training data is composed of a four-tuple <user question, search content, consulting prompt, target label>, so that multiple training data are used for model training, and iterative optimization is continuously performed to obtain a trained model, so that the trained model can output answers to user questions with a high accuracy rate.
[0105] like Fig.13 As shown, based on the training of the model, the consultation prompt includes instructions, reference content, user consultation questions, and reply rules. When applied, the "user consultation content placeholder" in the consultation prompt is replaced with the user question, and the "reference content placeholder" is replaced with the retrieved content. Thus, the combined complete instruction is used as the input of the model, and the model responds according to the requirements and generates answers in text form.
[0106] In summary, the embodiment of the present application provides a personalized automatic accounting method based on a large language model. Users can interact with the accounting intelligent assistant in a variety of ways such as dialogue, flexibly respond to various transaction scenarios, optimize the operation process, and achieve efficient accounting and consulting services. Among them, by utilizing the powerful understanding and reasoning ability of the large language model, combined with the prompt project to extract the first parameter of the transaction record, and automatically output the bill, the accuracy and automation level of accounting are improved. Furthermore, through the user bill and the user's accounting goals, a user consumption portrait is constructed to provide the user with a bill summary and personalized suggestions. In addition, the user can directly consult the accounting intelligent assistant, so that the large language model combines the retrieval technology to integrate and reply information, so that the user can quickly and efficiently obtain the required information. It can be seen that the embodiment of the present application improves the convenience and accuracy of user accounting, thereby improving the efficiency of user accounting, optimizing the user experience, and helping users better understand their own consumption habits, so that they can manage and plan their financial situation more reasonably.
[0107] Based on the ideas proposed in this application, the user's financial analysis technology can be further extended to the shopping field, realize shopping budget formulation, and provide users with comprehensive shopping suggestions.
[0108] It should be noted that the accounting method provided in the embodiment of the present application can be executed by an accounting device. In the embodiment of the present application, the accounting device executing the accounting method is taken as an example to illustrate the accounting device provided in the embodiment of the present application.
[0109] Fig.14 A block diagram of an accounting device 1400 according to an embodiment of the present application is shown, the device comprising: a receiving unit 1401, for receiving a first input; an extracting unit 1402, for extracting transaction information based on the first input; a first display unit 1403, for displaying an accounting interface based on a first preset template and the transaction information.
[0110] The device provided in the embodiment of the present application can automatically extract transaction information based on the first input after receiving the first input, and display the accounting interface based on the first preset template and the transaction information. It can be seen that the embodiment of the present application can automatically record the user's transaction information in the accounting interface in combination with the first preset template. In this process, the user only needs to perform a simple trigger, and there is no need to manually switch interfaces, search for bills, enter bill information, etc., which greatly improves the convenience of accounting operations.
[0111] Optionally, the extraction unit 1402 is further configured to: obtain an image in response to the first input; and extract transaction information from the image. By obtaining an image and extracting transaction information from the image, the user only needs to perform a simple trigger, without manually performing operations such as interface switching, bill search, and bill information input, thereby improving the convenience of accounting operations.
[0112] Optionally, the extraction unit 1402 is further configured to: obtain text in response to the first input; and extract transaction information from the text. By obtaining the text and extracting transaction information from the text, the user only needs to perform a simple trigger, without manually performing operations such as interface switching, bill search, and bill information input, which greatly improves the convenience of accounting operations.
[0113] Optionally, the extraction unit 1402 is further configured to: obtain voice information in response to the first input; convert the voice information into text; and extract transaction information from the text. By obtaining voice and extracting transaction information from the text corresponding to the voice, it can be adapted to offline transaction scenarios such as cash, so as to help users achieve more comprehensive economic management.
[0114] Optionally, the device further includes a second display unit, which is used to: obtain historical transaction information extracted within a preset period; and display a billing interface for the preset period based on a second preset template and the historical transaction information. This embodiment obtains historical transaction information extracted within a preset period, and displays a billing interface for the preset period based on the second preset template and the historical transaction information, so that the user can view the billing information for the preset period, thereby knowing the economic situation of the preset period, and helping the user to achieve more comprehensive economic management.
[0115] Optionally, the device further includes a third display unit, which is used to: receive a second input to the billing interface of the preset period; extract the billing information of the bills within the preset period in response to the second input; obtain the billing target determined based on the third input; and display the billing analysis interface of the preset period based on the third preset template, the billing target, and the billing information of the bills within the preset period. By extracting the billing information of the bills within the preset period and displaying the billing analysis interface of the preset period based on the third preset template, the billing target, and the billing information of the bills within the preset period, it is possible for the user to view the billing analysis results of the preset period, thereby knowing the economic situation of the preset period, and helping the user to achieve more comprehensive economic management.
[0116] The device in the embodiment of the present application can be a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0117] The device of the embodiment of the present application may be a device having an action system. The action system may be an Android action system, an iOS action system, or other possible action systems, which are not specifically limited in the embodiment of the present application.
[0118] The device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0119] Alternatively, if Fig.15 As shown, an embodiment of the present application also provides an electronic device 1500, including a processor 1501, a memory 1502, and a program or instruction stored in the memory 1502 and executable on the processor 1501. When the program or instruction is executed by the processor 1501, each step of any of the above-mentioned accounting method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0120] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0121] Fig.16 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0122] The electronic device 1600 includes but is not limited to: a radio frequency unit 1601, a network module 1602, an audio output unit 1603, an input unit 1604, a sensor 1605, a display unit 1606, a user input unit 1607, an interface unit 1608, a memory 1609, a processor 1610, a camera 1611 and other components.
[0123] Those skilled in the art will appreciate that the electronic device 1600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1610 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.16 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0124] Among them, the user input unit 1607 is used to receive a first input; the processor 1610 is used to extract transaction information based on the first input; and the display unit 1606 is used to display an accounting interface based on a first preset template and the transaction information.
[0125] The device provided in the embodiment of the present application can automatically extract transaction information based on the first input after receiving the first input, and display the accounting interface based on the first preset template and the transaction information. It can be seen that the embodiment of the present application can automatically record the user's transaction information in the accounting interface in combination with the first preset template. In this process, the user only needs to perform a simple trigger, and there is no need to manually switch interfaces, search for bills, enter bill information, etc., which greatly improves the convenience of accounting operations.
[0126] Optionally, the processor 1610 is further configured to obtain an image in response to the first input; and extract transaction information from the image. By obtaining an image and extracting transaction information from the image, the user only needs to perform a simple trigger, without manually performing operations such as interface switching, bill search, and bill information input, which greatly improves the convenience of accounting operations.
[0127] Optionally, the processor 1610 is further configured to obtain text in response to the first input and extract transaction information from the text. By obtaining the text and extracting transaction information from the text, the user only needs to perform a simple trigger, without manually performing operations such as interface switching, bill search, and bill information input, which greatly improves the convenience of accounting operations.
[0128] Optionally, the processor 1610 is further configured to obtain voice information in response to the first input; convert the voice information into text; and extract transaction information from the text. By obtaining voice and extracting transaction information from the text corresponding to the voice, it can be adapted to offline transaction scenarios such as cash, so as to help users achieve more comprehensive economic management.
[0129] Optionally, the processor 1610 is further configured to obtain historical transaction information extracted within a preset period; based on the second preset template and the historical transaction information, display the bill interface of the preset period through the display unit 1606. In this embodiment, by obtaining historical transaction information extracted within a preset period, and displaying the bill interface of the preset period based on the second preset template and the historical transaction information, it is convenient for the user to view the bill information of the preset period, so as to know the economic situation of the preset period, and help the user achieve more comprehensive economic management.
[0130] Optionally, the processor 1610 is further configured to receive a second input on the billing interface of the preset period; extract billing information of the bills within the preset period in response to the second input; obtain a billing target determined based on a third input; and display the billing analysis interface of the preset period through the display unit 1606 based on a third preset template, the billing target, and the billing information of the bills within the preset period. By extracting the billing information of the bills within the preset period and displaying the billing analysis interface of the preset period based on the third preset template, the billing target, and the billing information of the bills within the preset period, it is possible to facilitate the user to view the billing analysis results of the preset period, thereby knowing the economic situation of the preset period, and helping the user to achieve more comprehensive economic management.
[0131] It should be understood that in the embodiment of the present application, the input unit 1604 may include a graphics processor (Graphics Processing Unit, GPU) 16041 and a microphone 16042, and the graphics processor 16041 processes the image data of the static picture or video image obtained by the image capture device (such as a camera) in the video image capture mode or the image capture mode. The display unit 1606 may include a display panel 16061, and the display panel 16061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1607 includes a touch panel 16071 and at least one of other input devices 16072. The touch panel 16071 is also called a touch screen. The touch panel 16071 may include two parts: a touch detection device and a touch controller. Other input devices 16072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and an action rod, which will not be repeated here. The memory 1609 can be used to store software programs and various data, including but not limited to cameras and action systems. The processor 1610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the action system, user pages and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1610.
[0132] The memory 1609 can be used to store software programs and various data. The memory 1609 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1609 may include a volatile memory or a non-volatile memory, or the memory 1609 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1609 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0133] The processor 1610 may include one or more processing units; optionally, the processor 1610 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1610.
[0134] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned accounting method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0135] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0136] The embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned accounting method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0137] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0138] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned accounting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0139] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0141] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A bookkeeping method, characterized in that: The method comprises: receiving a first input; extracting transaction information based on the first input; An accounting interface is displayed based on the first preset template and the transaction information.
2. The method according to claim 1, characterized in that The extracting transaction information based on the first input includes: In response to the first input, acquiring an image; Transaction information is extracted from the image.
3. The method according to claim 1, characterized in that The extracting transaction information based on the first input includes: In response to the first input, obtaining text; Transaction information is extracted from the text.
4. The method according to claim 1, characterized in that: The extracting transaction information based on the first input includes: In response to the first input, acquiring voice information; Converting the voice information into text; Transaction information is extracted from the text.
5. The method according to claim 1, characterized in that After extracting transaction information based on the first input, the method further includes: Obtain historical transaction information extracted within a preset period; Based on the second preset template and the historical transaction information, a billing interface for the preset period is displayed.
6. The method according to claim 5, characterized in that After displaying the bill interface of the preset period, the method further includes: receiving a second input of the billing interface of the preset period; In response to the second input, extracting bill information of bills within the preset period; obtaining a billing target determined based on a third input; Based on the third preset template, the billing target and the bill information of the bills within the preset period, a bill analysis interface of the preset period is displayed.
7. A bookkeeping device, characterized in that: The device comprises: A receiving unit, configured to receive a first input; an extraction unit, configured to extract transaction information based on the first input; The first display unit is used to display an accounting interface based on a first preset template and the transaction information.
8. The device according to claim 7, characterized in that The extraction unit is further used for: In response to the first input, acquiring an image; Transaction information is extracted from the image.
9. The device according to claim 7, characterized in that The extraction unit is further used for: In response to the first input, obtaining text; Transaction information is extracted from the text.
10. The device according to claim 7, characterized in that The extraction unit is further used for: In response to the first input, acquiring voice information; Converting the voice information into text; Transaction information is extracted from the text.
11. The device according to claim 7, characterized in that The device further comprises a second display unit, configured to: Obtain historical transaction information extracted within a preset period; Based on the second preset template and the historical transaction information, a billing interface for the preset period is displayed.
12. The device according to claim 11, characterized in that The device further comprises a third display unit, configured to: receiving a second input of the billing interface of the preset period; In response to the second input, extracting bill information of bills within the preset period; obtaining a billing target determined based on a third input; Based on the third preset template, the billing target and the bill information of the bills within the preset period, a bill analysis interface of the preset period is displayed.
13. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the accounting method according to any one of claims 1 to 6 are implemented.
14. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the accounting method according to any one of claims 1 to 6 are implemented.