Business order generation method and system, electronic equipment and storage medium

By collecting and analyzing images of the WeChat chat interface, combined with UI Automation and large language model technology, the problem of difficulty in extracting key information in WeChat messages is solved, and efficient and accurate business order generation is achieved.

CN119363698APending Publication Date: 2025-01-24YIHAILAN (BEIJING) DATA TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411389699.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The prior art cannot accurately extract key information from WeChat messages, resulting in inefficient business order generation.

Method used

By collecting the image of the chat interface of the communication software, determine whether there is an unprepared message, and use the UI Automation framework to control the software operation. After collecting unusual messages, it will be converted into a text format. Generate business orders.

Benefits of technology

The automation processing WeChat message is realized, the physical information in the unreasonable message is accurately extracted, the efficiency and accuracy of business orders are improved, and artificial intervention is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363698A_ABST
    Figure CN119363698A_ABST
Patent Text Reader

Abstract

The invention provides a business order generation method and system, electronic equipment and a storage medium. The business order generation method comprises the following steps: acquiring a first image of a chat interface of communication software; judging whether an unread message exists in the communication software or not according to the first image; if the unread message does not exist, re-collecting the first image after a preset time interval; if the unread message exists, collecting the unread message; obtaining entity information contained in the unread message according to the unread message and the analysis model; and generating a business order according to the entity information. According to the method, the automatically collected unread message is input into the analysis model, the entity information in the unread message is extracted by using the natural language processing capability of the analysis model, and then the business order is automatically established according to the entity information. According to the method and the device, the problem that key information cannot be accurately extracted from the WeChat message in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for generating a business order, an electronic device and a storage medium. Background Art

[0002] In order to automate the process of generating business orders based on WeChat messages, the related technologies use the UIAutomation (User Interface Automation) framework and Python (a programming language) scripts to collect and preliminarily process messages. For example, some implementations automatically operate the WeChat client through UI Automation, capture chat records, and use Python scripts to perform basic keyword extraction and preliminarily format the captured text. However, due to the diverse and non-standardized nature of WeChat message content expression, the related technologies are unable to accurately extract key messages from WeChat messages. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.

[0004] To this end, a first aspect of the present invention proposes a method for generating a business order.

[0005] A second aspect of the present invention provides a system for generating a business order.

[0006] A third aspect of the present invention provides an electronic device.

[0007] A fourth aspect of the present invention provides a storage medium.

[0008] In view of this, according to a first aspect of the present invention, a method for generating a business order is proposed, including: capturing a first image of a chat interface of a communication software; determining whether there are any unread messages in the communication software based on the first image; based on the absence of unread messages, re-capturing the first image after a preset time interval; based on the existence of unread messages, capturing the unread messages; obtaining entity information contained in the unread messages based on the unread messages and an analysis model; and generating a business order based on the entity information.

[0009] The method for generating a business order provided by the present invention mainly includes: firstly collecting a first image of a chat interface of a communication software, wherein the collection time can be a scheduled collection or a collection according to a preset time interval, and the communication software can be an instant communication software such as WeChat. At the same time, the communication software can be controlled by a UI Automation (User Interface Automation) framework, that is, the UI Automation framework can automatically operate the communication software. After obtaining the first image of the chat interface, the first image is analyzed to determine whether there are unread messages in the communication software. Unread messages refer to messages that have been received by the communication software but have not been viewed or read by the user or the UI Automation framework, so unread messages can be called new messages. It can be understood that when the communication software receives a message, an obvious visual mark will be displayed in the navigation bar or chat list in the chat interface of the communication software. Therefore, when an image corresponding to the visual mark appears in the first image, it means that there are currently unread messages. If the image corresponding to the visual mark does not appear in the first image, it means that there are currently no unread messages. If there are currently no unread messages, no operation is required, and the first image of the chat interface of the communication software is collected again after waiting for a preset time interval, and then it is re-determined whether there are unread messages. If there are currently unread messages, the current interface of the communication software can be controlled by the UI Automation framework to jump to the interface corresponding to the unread messages, and then the unread messages are collected by analyzing the content in the current chat interface. After obtaining the unread messages, the messages of the communication software are converted into text format and sent to the analysis model to obtain the entity information contained in the unread messages, wherein the analysis model is a large language model with a high natural language processing capability, so the analysis model can accurately extract entity information that meets the business order generation conditions from the diversified and non-standardized unread messages, wherein the number of entity information can be one or more. Finally, a business order is automatically generated according to the entity information. The present invention can automatically collect messages and generate orders without manual intervention, which greatly improves work efficiency. At the same time, in the present invention, the unread messages automatically collected are input into the analysis model, and the natural language processing capability of the analysis model is used to extract the entity information in the unread messages, thereby solving the problem that key information cannot be accurately extracted from WeChat messages in the related art.

[0010] The method for generating the business order according to the present invention may also have the following technical features: In some technical schemes, optionally, the step of determining whether there are unread messages in the communication software based on the first image includes: performing visual mark detection on the first image to obtain a detection result, wherein the visual mark is a mark that appears in the chat interface when the communication software receives a new message; based on the detection result that the visual mark exists in the first image, it is determined that there are unread messages; based on the detection result that the visual mark does not exist in the first image, it is determined that there are no unread messages.

[0011] In the technical scheme, the step of judging whether there are unread messages in the communication software according to the first image includes: firstly, performing visual mark detection on the first image to obtain the detection result, wherein the visual mark refers to the mark generated in the chat interface to prompt the user when the communication software receives a new message and the user has not viewed it. If there is a visual mark in the first image, it means that there are new messages that have not been viewed in the communication software, that is, there are unread messages in the communication software. If there is no visual mark in the first image, it means that the communication software has not received a new message, that is, there are no unread messages in the communication software. For example: when the communication software is WeChat, it can be understood that when there are unread messages in WeChat, a red dot or a digital prompt will appear in the chat option in the navigation bar in the chat interface of WeChat, that is, the red dot or the digital prompt is a visual mark. After obtaining the first image of WeChat, the first image can be detected for red pixels. If there are red pixels, it means that there are red dots in WeChat, indicating that there are unread messages in WeChat; if there are no red pixels, it means that there are no red dots in WeChat, indicating that there are no unread messages in WeChat. The present invention performs visual mark detection on the first image, thereby realizing the judgment of whether there are unread messages in the communication software.

[0012] In some technical solutions, optionally, the step of collecting unread messages includes: determining the chat box where the unread messages are located based on visual marks; extracting all chat messages in the chat box to obtain a chat message set; and obtaining the unread messages in the chat message set.

[0013] In this technical solution, the step of collecting unread messages includes: first, determining the chat box where the unread message is located according to the visual mark. It can be understood that when the visual mark is displayed in the communication software, the chat box where the new message is located does not necessarily appear in the chat interface of the communication software, that is, when the communication software receives a new message, the new message does not directly appear in the current interface of the communication software. Therefore, the UI Automation framework is required to operate the communication software to enter the chat box where the unread message is located. For example, when the communication software is WeChat, the UI Automation framework will automatically double-click the session item in the chat control to enter the session, that is, enter the chat box where the unread message is located. After determining the chat box, the content of the chat box is parsed to extract all chat messages in the chat box, thereby obtaining a chat message collection, wherein the chat messages that can be extracted can be all chat messages under the session, that is, all historical messages and new messages, or chat messages under the session that appear in the interface, that is, only historical messages and new messages that appear in the interface are obtained. After obtaining the chat message collection, since there are historical messages in the chat message collection, it is necessary to process the messages in the chat messages to obtain new messages, that is, unread messages.

[0014] In some technical solutions, optionally, the step of obtaining unread messages in the chat message collection includes: obtaining unread messages in the chat message collection according to a preset rule and a preset time period.

[0015] In this embodiment, the step of obtaining unread messages in the chat message set includes: extracting unread messages from the chat message set according to a preset rule and a preset time period. Specifically, the chat messages in the chat message set may be sorted according to a time sequence or other logical rules, and then the unread messages are determined from the sorted chat messages according to a preset time period, wherein the preset time period may be the same as the time interval for capturing the first image. By obtaining unread messages from the chat message set according to the preset rule and the preset time period, the accuracy and comprehensiveness of the unread messages are ensured.

[0016] In some technical schemes, optionally, the step of obtaining entity information contained in the unread messages based on the unread messages and the analysis model includes: analyzing the unread messages to determine the purpose of the unread messages; when the purpose is the same as a preset purpose, saving the unread messages, and obtaining entity information based on the unread messages and the analysis model, wherein the preset purpose includes placing an order or hanging an order; when the purpose is different from the preset purpose, ignoring the unread messages.

[0017] In the technical solution, the step of obtaining the entity information contained in the unread message according to the unread message and the analysis model includes: analyzing the unread message to determine the purpose of the unread message, that is, after collecting the unread message, it is necessary to analyze the unread message, analyze the meaning of the content in the unread message, and clarify the purpose of the user who sent the unread message. Among them, the purpose can be greetings, consultations, orders or pending orders. After determining the purpose of the unread message, the purpose is matched with the preset purpose. When the purpose of the unread message is the same as the preset purpose, the unread message is saved, and the unread message is sent to the analysis model for analysis to determine the entity information contained in the unread message. If the purpose of the unread message is not the same as the preset purpose, it means that the unread message is not related to the business order, and the unread message is ignored, that is, the unread message will not be sent to the analysis model. Among them, the preset purpose can be an order or a pending order. By analyzing the purpose of the unread message, the unread message with the purpose of the order or the pending order is saved and sent to the analysis model to obtain the entity message, thereby ensuring the accuracy of the business order.

[0018] In some technical solutions, optionally, the step of obtaining entity information based on unread messages and an analysis model includes: adding the unread messages to a prompt word template to obtain a prompt word; and inputting the prompt word into the analysis model to obtain the entity information.

[0019] In the technical solution, the step of obtaining entity information according to the unread message and the analysis model includes: adding the unread message to the prompt word template, thereby obtaining the prompt word containing the unread message, wherein the prompt word template can be a guiding prompt (prompt word) template designed according to the specific entity category (goods, consignor, unit price, port of departure and port of destination, etc.). After obtaining the prompt word, the prompt word containing the unread message is input into the analysis model, thereby obtaining the entity message that meets the conditions. In the present invention, by adding the unread message to the prompt word template to obtain the prompt word, and then inputting the prompt word into the analysis model, the analysis model can more clearly understand the meaning of the unread message, so as to better extract the entity information that meets the conditions.

[0020] In some technical solutions, optionally, the step of generating a business order based on entity information includes: determining a purpose of the unread message; obtaining a business order template corresponding to the purpose; and adding the entity information to the business order template to obtain the business order.

[0021] In this technical solution, the step of generating a business order based on entity information includes: first determining the purpose of the unread message, that is, after collecting the unread message, it is necessary to analyze the unread message, analyze the meaning of the content in the unread message, and clarify the purpose of the user who sent the unread message, which can be to place an order or hang up an order. It can be understood that different purposes correspond to different types of business orders. Therefore, after determining the purpose of the unread message, obtain the business order template corresponding to the purpose, and then organize the obtained entity information into a structured data form, and finally input the entity information in the structured data form into the business order model, thereby automatically generating a business order. The present invention avoids various errors that may occur in the manual order recording process by automatically generating a business order based on the entity information.

[0022] According to a second aspect of the present invention, a system for generating a business order is proposed, comprising: a first acquisition module, the first acquisition module is used to acquire a first image of a chat interface of a communication software; a judgment module, the judgment module is used to determine whether there are unread messages in the communication software according to the first image; a second acquisition module, the second acquisition module is used to re-acquire the first image after a preset time interval based on the absence of unread messages; a third acquisition module, the third acquisition module is used to acquire unread messages based on the existence of unread messages; a first processing module, the first processing module is used to obtain entity information contained in the unread messages according to the unread messages and an analysis model; and a second processing module, the second processing module is used to generate a business order based on the entity information.

[0023] The business order generation system provided by the present invention mainly includes: a first acquisition module, a judgment module, a second acquisition module, a third acquisition module, a first processing module and a second processing module. Among them, the first acquisition module can acquire the first image of the chat interface of the communication software, wherein the acquisition time can be a scheduled acquisition or can be acquired at a preset time interval, and the communication software can be an instant communication software such as WeChat. At the same time, the communication software can be controlled by the UIAutomation (User Interface Automation) framework, that is, the UI Automation framework can automatically operate the communication software. After obtaining the first image of the chat interface, the judgment module performs image analysis on the first image to determine whether there are unread messages in the communication software. Unread messages refer to messages that have been received by the communication software but have not been viewed or read by the user or the UI Automation framework, so unread messages can be called new messages. It can be understood that when the communication software receives a message, an obvious visual mark will be displayed in the navigation bar or chat list in the chat interface of the communication software. Therefore, when an image corresponding to the visual mark appears in the first image, it means that there are currently unread messages. If the image corresponding to the visual mark does not appear in the first image, it means that there are currently no unread messages. If there are no unread messages at present, no operation is required. The second acquisition module waits for a preset time interval and then re-acquires the first image of the chat interface of the communication software, and then re-determines whether there are unread messages. If there are unread messages at present, the current interface of the communication software can be controlled by the UI Automation framework to jump to the interface corresponding to the unread message, and then the third acquisition module can collect the unread messages by analyzing the content in the current chat interface. After obtaining the unread message, the first processing module converts the message of the communication software into a text format and sends it to the analysis model to obtain the entity information contained in the unread message, wherein the analysis model is a large language model with a high natural language processing capability, so the analysis model can accurately extract entity information that meets the business order generation conditions from diversified and non-standardized unread messages, wherein the number of entity information can be one or more. Finally, the second processing module automatically generates a business order based on the entity information. The present invention can automatically collect messages and generate orders without manual intervention, thereby greatly improving work efficiency. At the same time, in the present invention, the automatically collected unread messages are input into the analysis model, and the natural language processing ability of the analysis model is used to extract the entity information in the unread messages, thereby solving the problem in the related art that key information cannot be accurately extracted from WeChat messages.

[0024] According to a third aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of a method for generating a business order as described above are implemented.

[0025] The electronic device provided by the present invention, in which the processor implements the steps of the above-mentioned method for generating a business order when executing a computer program, can achieve the technical effects of any of the above-mentioned technical solutions, which will not be repeated here.

[0026] According to a fourth aspect of the present invention, a storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above-mentioned methods for generating a business order are implemented.

[0027] The storage medium provided by the present invention implements the steps of the above-mentioned method for generating a business order when the computer program is executed by the processor, and can achieve the technical effects of any of the above-mentioned technical solutions, which will not be repeated here.

[0028] Additional aspects and advantages of the present invention will become apparent from the following description or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 A schematic diagram showing a flow chart of a method for generating a business order according to an embodiment of the present invention; Figure 2 A flow chart showing a step of determining whether there are unread messages in the communication software according to a first image in a method for generating a business order according to an embodiment of the present invention; Figure 3 A schematic flow chart showing the step of collecting unread messages in a method for generating a business order according to an embodiment of the present invention; Figure 4 A schematic flow chart showing the step of obtaining entity information contained in unread messages according to unread messages and an analysis model in a method for generating a business order according to an embodiment of the present invention; Figure 5 A schematic flow chart showing the step of obtaining entity information according to unread messages and an analysis model in a method for generating a business order according to an embodiment of the present invention; Figure 6 A schematic flow chart showing the steps of generating a business order according to entity information in a method for generating a business order according to an embodiment of the present invention; Figure 7 A schematic diagram of WeChat window layout according to an embodiment of the present invention is shown; Figure 8 A schematic diagram of unread messages according to an embodiment of the present invention is shown; Fig. 9 An example diagram of a WeChat complex message according to an embodiment of the present invention is shown; Fig.10 A schematic diagram showing a method for generating a business order according to an embodiment of the present invention; Fig.11 A schematic block diagram showing a system for generating a business order according to an embodiment of the present invention; Fig.12 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0030] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0031] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0032] Figure 1 A schematic diagram of a process flow of a method for generating a business order according to an embodiment of the present invention is shown. The method comprises: Step 102: Capturing a first image of a chat interface of a communication software; Step 104: determining whether there are any unread messages in the communication software according to the first image; Step 106: based on the absence of unread messages, re-capturing the first image after a preset time interval; Step 108: based on the existence of unread messages, collect the unread messages; Step 110: Obtain entity information contained in the unread message according to the unread message and the analysis model; Step 112: Generate a business order based on the entity information.

[0033] The method for generating a business order provided by the present invention mainly includes: firstly collecting a first image of a chat interface of a communication software, wherein the collection time can be a scheduled collection or a collection according to a preset time interval, and the communication software can be an instant communication software such as WeChat. At the same time, the communication software can be controlled by a UI Automation (User Interface Automation) framework, that is, the UI Automation framework can automatically operate the communication software. After obtaining the first image of the chat interface, the first image is analyzed to determine whether there are unread messages in the communication software. Unread messages refer to messages that have been received by the communication software but have not been viewed or read by the user or the UI Automation framework, so unread messages can be called new messages. It can be understood that when the communication software receives a message, an obvious visual mark will be displayed in the navigation bar or chat list in the chat interface of the communication software. Therefore, when an image corresponding to the visual mark appears in the first image, it means that there are currently unread messages. If the image corresponding to the visual mark does not appear in the first image, it means that there are currently no unread messages. If there are currently no unread messages, no operation is required, and the first image of the chat interface of the communication software is collected again after waiting for a preset time interval, and then it is re-determined whether there are unread messages. If there are currently unread messages, the current interface of the communication software can be controlled by the UI Automation framework to jump to the interface corresponding to the unread messages, and then the unread messages are collected by analyzing the content in the current chat interface. After obtaining the unread messages, the messages of the communication software are converted into text format and sent to the analysis model to obtain the entity information contained in the unread messages, wherein the analysis model is a large language model with a high natural language processing capability, so the analysis model can accurately extract entity information that meets the business order generation conditions from the diversified and non-standardized unread messages, wherein the number of entity information can be one or more. Finally, a business order is automatically generated according to the entity information. The present invention can automatically collect messages and generate orders without manual intervention, which greatly improves work efficiency. At the same time, in the present invention, the unread messages automatically collected are input into the analysis model, and the natural language processing capability of the analysis model is used to extract the entity information in the unread messages, thereby solving the problem that key information cannot be accurately extracted from WeChat messages in the related art.

[0034] Figure 2 A flow chart showing a step of determining whether there are unread messages in a communication software according to a first image in a method for generating a service order according to an embodiment of the present invention; wherein the step of determining whether there are unread messages in the communication software according to the first image includes: Step 202: Perform visual mark detection on the first image to obtain a detection result, wherein the visual mark is a mark that appears on the chat interface when the communication software receives a new message; Step 204: determining that there is an unread message based on the detection result that there is a visual mark in the first image; Step 206: Based on the detection result that there is no visual mark in the first image, it is determined that there is no unread message.

[0035] In this embodiment, the step of judging whether there are unread messages in the communication software according to the first image includes: firstly, performing visual mark detection on the first image to obtain a detection result, wherein the visual mark refers to a mark generated in the chat interface to prompt the user when the communication software receives a new message and the user has not viewed it. If there is a visual mark in the first image, it means that there are new messages that have not been viewed in the communication software, that is, there are unread messages in the communication software. If there is no visual mark in the first image, it means that the communication software has not received a new message, that is, there are no unread messages in the communication software. For example: when the communication software is WeChat, it can be understood that when there are unread messages in WeChat, a red dot or a digital prompt will appear in the chat option in the navigation bar in the chat interface of WeChat, that is, the red dot or the digital prompt is a visual mark. After obtaining the first image of WeChat, the first image can be detected for red pixels. If there are red pixels, it means that there are red dots in WeChat, indicating that there are unread messages in WeChat; if there are no red pixels, it means that there are no red dots in WeChat, indicating that there are no unread messages in WeChat. The present invention performs visual mark detection on the first image, thereby realizing the judgment of whether there are unread messages in the communication software.

[0036] Figure 3 A schematic flow chart of the step of collecting unread messages in a method for generating a business order according to an embodiment of the present invention is shown; wherein the step of collecting unread messages includes: Step 302: Determine the chat box where the unread message is located according to the visual mark; Step 304: extract all chat messages in the chat box to obtain a chat message set; Step 306: Obtain unread messages in the chat message collection.

[0037] In this embodiment, the step of collecting unread messages includes: first, determining the chat box where the unread message is located according to the visual mark. It can be understood that when the visual mark is displayed in the communication software, the chat box where the new message is located does not necessarily appear in the chat interface of the communication software, that is, when the communication software receives a new message, the new message does not directly appear in the current interface of the communication software. Therefore, the UI Automation framework is required to operate the communication software to enter the chat box where the unread message is located. For example, when the communication software is WeChat, the UI Automation framework will automatically double-click the session item in the chat control to enter the session, that is, enter the chat box where the unread message is located. After determining the chat box, the content of the chat box is parsed to extract all chat messages in the chat box, thereby obtaining a chat message set, wherein the chat messages that can be extracted can be all chat messages under the session, that is, all historical messages and new messages, or can be chat messages under the session that appear in the interface, that is, only historical messages and new messages that appear in the interface are obtained. After obtaining the chat message set, since there are historical messages in the chat message set, it is necessary to process the messages in the chat message to obtain new messages, that is, unread messages.

[0038] In some embodiments, optionally, the step of obtaining unread messages in the chat message collection includes: obtaining unread messages in the chat message collection according to a preset rule and a preset time period.

[0039] In this embodiment, the step of obtaining unread messages in the chat message set includes: extracting unread messages from the chat message set according to a preset rule and a preset time period. Specifically, the chat messages in the chat message set may be sorted according to a time sequence or other logical rules, and then the unread messages are determined from the sorted chat messages according to a preset time period, wherein the preset time period may be the same as the time interval for capturing the first image. By obtaining unread messages from the chat message set according to the preset rule and the preset time period, the accuracy and comprehensiveness of the unread messages are ensured.

[0040] Figure 4 A flow chart showing a step of obtaining entity information contained in an unread message according to an unread message and an analysis model in a method for generating a service order according to an embodiment of the present invention is provided; wherein the step of obtaining entity information contained in an unread message according to an unread message and an analysis model comprises: Step 402: Analyze the unread messages to determine the purpose of the unread messages; Step 404: when the purpose is the same as the preset purpose, the unread message is saved, and entity information is obtained according to the unread message and the analysis model, wherein the preset purpose includes placing an order or placing an order; Step 406: When the purpose is different from the preset purpose, the unread message is ignored.

[0041] In this embodiment, the step of obtaining entity information contained in the unread message according to the unread message and the analysis model includes: analyzing the unread message to determine the purpose of the unread message, that is, after collecting the unread message, it is necessary to analyze the unread message, analyze the meaning of the content in the unread message, and clarify the purpose of the user who sent the unread message. Among them, the purpose can be greetings, consultations, orders or pending orders. After determining the purpose of the unread message, the purpose is matched with the preset purpose. When the purpose of the unread message is the same as the preset purpose, the unread message is saved, and the unread message is sent to the analysis model for analysis to determine the entity information contained in the unread message. If the purpose of the unread message is not the same as the preset purpose, it means that the unread message is not related to the business order, and the unread message is ignored, that is, the unread message will not be sent to the analysis model. Among them, the preset purpose can be an order or a pending order. By analyzing the purpose of the unread message, the unread message with the purpose of the order or the pending order is saved and sent to the analysis model to obtain the entity message, thereby ensuring the accuracy of the business order.

[0042] Figure 5 A flow chart showing a step of obtaining entity information according to unread messages and an analysis model in a method for generating a business order according to an embodiment of the present invention is provided; wherein the step of obtaining entity information according to unread messages and an analysis model includes: Step 502: adding the unread message to the prompt word template to obtain the prompt word; Step 504: Input the prompt word into the analysis model to obtain entity information.

[0043] In this embodiment, the step of obtaining entity information according to the unread message and the analysis model includes: adding the unread message to the prompt word template, thereby obtaining the prompt word containing the unread message, wherein the prompt word template can be a guiding prompt (prompt word) template designed according to the specific entity category (goods, consignor, unit price, port of departure and port of destination, etc.). After obtaining the prompt word, the prompt word containing the unread message is input into the analysis model, thereby obtaining the entity message that meets the conditions. In the present invention, by adding the unread message to the prompt word template to obtain the prompt word, and then inputting the prompt word into the analysis model, the analysis model can more clearly understand the meaning of the unread message, so as to better extract the entity information that meets the conditions.

[0044] Figure 6 A flow chart showing the step of generating a business order according to entity information in a method for generating a business order according to an embodiment of the present invention is shown; wherein the step of generating a business order according to entity information includes: Step 602: Determine the purpose of the unread message; Step 604: Obtain a business order template corresponding to the purpose; Step 606: Add the entity information to the business order template to obtain a business order.

[0045] In this embodiment, the step of generating a business order based on entity information includes: first determining the purpose of the unread message, that is, after collecting the unread message, it is necessary to analyze the unread message, analyze the meaning of the content in the unread message, and clarify the purpose of the user who sent the unread message, which can be to place an order or hang up an order. It can be understood that different purposes correspond to different types of business orders. Therefore, after determining the purpose of the unread message, obtain the business order template corresponding to the purpose, and then organize the obtained entity information into a structured data form, and finally input the entity information in the structured data form into the business order model, thereby automatically generating a business order. The present invention automatically generates a business order based on the entity information, thereby avoiding various errors that may occur in the manual order recording process.

[0046] Exemplarily, when the communication software is WeChat, the method for generating a business order of the present invention may be: first obtain the WeChat client, wherein the acquisition of the WeChat client is achieved through automation technology. A framework called UIAutomation (User Interface Automation) may be used, which can automatically identify and control the user interface elements of WeChat. Specifically, first locate and obtain control of the WeChat client by identifying specific attributes of the WeChat main window, so that subsequent message collection and interface analysis operations can be performed on WeChat. Further, the layout of the WeChat window is parsed, such as Figure 7 or Figure 8 As shown in Figure 1, the user interface of the WeChat client usually consists of multiple functional areas, the most important of which include the navigation bar (A), the chat list (B) and the chat box (C). Figure 7In order to realize the automatic control of WeChat, the layout of these functional areas must be parsed first. The UI Automation framework is used to describe the structure of the user interface in a hierarchical manner, and then the control hierarchy of the WeChat window can be traversed layer by layer, so as to accurately identify key areas such as the navigation bar (A), chat list (B) and chat box (C). Specifically, the navigation bar (A) refers to the vertical area on the left side of the WeChat interface, which contains multiple functional entrances, such as chat, contacts, favorites, etc. The UI Automation framework can locate and identify these functional entrances by analyzing the sub-controls of the navigation bar (A) so as to switch between different functions. The chat list (B) is located on the right side of the navigation bar and displays all current conversations. The UI Automation framework can obtain the status of each conversation item by parsing the chat list (B), such as whether there are unread messages, and then decide whether to enter the conversation to obtain the latest messages. The chat box (C) is the core area of ​​the WeChat window, which displays all message contents in the current conversation. The UI Automation framework can identify and extract the message text or other multimedia content in this area, providing a basis for subsequent data processing. This layout parsing process enables the system to accurately identify the various functional areas of the WeChat interface, thereby realizing precise automatic control. After parsing the WeChat window, new message judgment is performed. In WeChat, if Figure 8 As shown, when a new message arrives, an obvious visual mark, such as a dot mark or a number prompt, will appear in the navigation bar (A). These marks are the key to determining the existence of new messages. For example, when the color of the dot mark or number prompt is red, you can use the powerful control recognition ability of the UI Automation framework to obtain the rectangular coordinates of the chat control to take a screenshot, and then perform red pixel detection to determine whether there is a new message. Once it is determined that there is a new message, the UI Automation framework will automatically double-click the chat control and session item to enter the session. After entering the session, the UI Automation framework will parse the content in the chat box, extract all messages, and obtain the latest message, that is, the unread message, based on chronological order or other logical rules. Among them, the obtained message will be as follows Fig. 9 As shown, the message can be the flow direction: "xxx~xxx, ship name: xxx ship, can load: 500 bags = 600 bags, contact: 181xxxxxxxx, name: Zhou xx, ID number: xxxxxxx", the message can also be "xxx company, route: xx-xx, cargo name: coal, ship name: xxx, tonnage: 2430, draft: 2.9, expected arrival time: 2024.2.24", the message can also be "xxx ship, xxx tons of soybeans, xxx port-xxx port, departure on 2024.02.28, unit price 10 yuan". Fig. 9As can be seen from the messages shown in the figure, WeChat messages are diverse and non-standardized, so it is inaccurate to obtain entity information only by extracting keywords. Fig.10 The method shown is used for processing. Specifically, first, the message, that is, the front end sends the message text of the unread message to the background service. After the background service pre-processes the message text, it verifies, that is, matches the unread message, identifies the operation required by the user, and if the operation required by the user is to place an order or place an order, the unread message is saved. If the operation required by the user is not to place an order or place an order, the unread message is not processed. Then the prompt (prompt word) is spliced, that is, after reading the unread message that needs to be ordered, according to the specific entity category (goods, consignor, unit price, port of departure and port of destination, etc.), a guiding prompt template is designed, and then the unread message is filled into the prompt template, thereby obtaining the spliced ​​prompt. Subsequently, the background service sends the spliced ​​prompt to the large model, and the large model analyzes the prompt, obtains the recognition result and sends it to the background service, wherein the recognition result includes multiple entity information. The backend service extracts entity information that meets the conditions from multiple entity information and organizes it into json (structured data format). Finally, the backend service sends the entity information in json format to the message, i.e., the front end, and the front end generates a business order based on the entity information in json format. The business order generation method provided by the present invention has the advantages of automated processing, rapid response, reduced labor costs, and avoidance of human errors.

[0047] Fig.11 A schematic block diagram of a system for generating a business order according to an embodiment of the present invention is shown; wherein the system 1100 for generating a business order includes: A first acquisition module 1102, used for acquiring a first image of a chat interface of a communication software; A determination module 1104, configured to determine whether there are any unread messages in the communication software according to the first image; The second acquisition module 1106 is configured to re-acquire the first image after a preset time interval if there is no unread message; The third collection module 1108 is used to collect unread messages based on the existence of unread messages; The first processing module 1110 is used to obtain entity information contained in the unread messages according to the unread messages and the analysis model; The second processing module 1112 is used to generate a business order according to the entity information.

[0048] The business order generation system 1100 provided by the present invention mainly includes: a first acquisition module 1102, a judgment module 1104, a second acquisition module 1106, a third acquisition module 1108, a first processing module 1110 and a second processing module 1112. Among them, the first acquisition module 1102 can acquire the first image of the chat interface of the communication software, wherein the acquisition time can be a scheduled acquisition, or it can be acquired at a preset time interval, and the communication software can be an instant communication software such as WeChat. At the same time, the communication software can be controlled by the UI Automation (User Interface Automation) framework, that is, the UI Automation framework can automatically operate the communication software. After obtaining the first image of the chat interface, the judgment module 1104 performs image analysis on the first image to determine whether there are unread messages in the communication software. Unread messages refer to messages that have been received by the communication software but have not been viewed or read by the user or the UI Automation framework, so unread messages can be called new messages. It is understandable that when the communication software receives a message, an obvious visual mark will be displayed in the navigation bar or chat list in the chat interface of the communication software. Therefore, when an image corresponding to the visual mark appears in the first image, it means that there are currently unread messages. If the image corresponding to the visual mark does not appear in the first image, it means that there are currently no unread messages. If there are currently no unread messages, no operation is required. The second acquisition module 1106 waits for a preset time interval and then re-acquires the first image of the chat interface of the communication software, and then re-determines whether there are unread messages. If there are currently unread messages, the current interface of the communication software can be controlled by the UI Automation framework to jump to the interface corresponding to the unread message, and then the third acquisition module 1108 can collect the unread messages by analyzing the content in the current chat interface. After obtaining the unread messages, the first processing module 1110 converts the messages of the communication software into text format and sends it to the analysis model to obtain the entity information contained in the unread messages, wherein the analysis model is a large language model with a high natural language processing capability, so the analysis model can accurately extract entity information that meets the business order generation conditions from the diverse and non-standardized unread messages, wherein the number of entity information can be one or more. Finally, the second processing module 1112 automatically generates a business order based on the entity information. The present invention can automatically collect messages and generate orders without manual intervention, which greatly improves work efficiency. At the same time, in the present invention, the automatically collected unread messages are input into the analysis model, and the natural language processing capability of the analysis model is used to extract the entity information in the unread messages, thereby solving the problem that key information cannot be accurately extracted from WeChat messages in the related art.

[0049] In some embodiments, optionally, the judgment module 1104 is used to perform visual mark detection on the first image to obtain a detection result, wherein the visual mark is a mark that appears in the chat interface when the communication software receives a new message; based on the detection result that the visual mark exists in the first image, it is determined that there are unread messages; based on the detection result that the visual mark does not exist in the first image, it is determined that there are no unread messages.

[0050] In this embodiment, the judgment module 1104 is used to perform visual mark detection on the first image to obtain a detection result, wherein the visual mark refers to a mark generated in the chat interface to prompt the user when the communication software receives a new message and the user has not viewed it. If there is a visual mark in the first image, it means that there are new messages that have not been viewed in the communication software, that is, there are unread messages in the communication software. If there is no visual mark in the first image, it means that the communication software has not received a new message, that is, there are no unread messages in the communication software. For example: when the communication software is WeChat, it can be understood that when there are unread messages in WeChat, a red dot or a digital prompt will appear in the chat option in the navigation bar in the chat interface of WeChat, that is, the red dot or the digital prompt is a visual mark. After obtaining the first image of WeChat, the first image can be detected for red pixels. If there are red pixels, it means that there are red dots in WeChat, indicating that there are unread messages in WeChat; if there are no red pixels, it means that there are no red dots in WeChat, indicating that there are no unread messages in WeChat. The present invention realizes the judgment of whether there are unread messages in the communication software by performing visual mark detection on the first image.

[0051] In some embodiments, optionally, the third acquisition module 1108 is used to determine the chat frame where the unread message is located based on the visual mark; extract all chat messages in the chat frame to obtain a chat message set; and obtain the unread messages in the chat message set.

[0052] In this embodiment, the third acquisition module 1108 is used to determine the chat box where the unread message is located according to the visual mark. It can be understood that when the visual mark is displayed in the communication software, the chat box where the new message is located does not necessarily appear in the chat interface of the communication software, that is, when the communication software receives a new message, the new message does not directly appear in the current interface of the communication software. Therefore, the UI Automation framework is required to operate the communication software to enter the chat box where the unread message is located. For example, when the communication software is WeChat, the UI Automation framework will automatically double-click the session item in the chat control to enter the session, that is, enter the chat box where the unread message is located. After determining the chat box, the content of the chat box is parsed to extract all chat messages in the chat box, thereby obtaining a chat message set, wherein the chat messages that can be extracted can be all chat messages under the session, that is, all historical messages and new messages, or chat messages under the session that appear in the interface, that is, only historical messages and new messages that appear in the interface are obtained. After obtaining the chat message set, since there are historical messages in the chat message set, it is necessary to process the messages in the chat message to obtain new messages, that is, unread messages.

[0053] In some embodiments, optionally, the third acquisition module 1108 is also used to obtain unread messages in the chat message collection according to preset rules and preset time periods.

[0054] In this embodiment, the third acquisition module 1108 is also used to extract unread messages from the chat message set according to a preset rule and a preset time period. Specifically, the chat messages in the chat message set may be sorted according to a time sequence or other logical rules, and then the unread messages are determined from the sorted chat messages according to a preset time period, wherein the preset time period may be the same as the time interval for collecting the first image. By obtaining unread messages from the chat message set according to the preset rule and the preset time period, the accuracy and comprehensiveness of the unread messages are ensured.

[0055] In some embodiments, optionally, the first processing module 1110 is used to analyze the unread messages and determine the purpose of the unread messages; when the purpose is the same as a preset purpose, the unread messages are saved, and entity information is obtained based on the unread messages and the analysis model, wherein the preset purpose includes placing an order or hanging an order; when the purpose is different from the preset purpose, the unread messages are ignored.

[0056] In this embodiment, the first processing module 1110 is used to analyze the unread messages and determine the purpose of the unread messages. That is, after the unread messages are collected, the unread messages need to be analyzed to analyze the meaning of the content in the unread messages and clarify the purpose of the user who sent the unread messages. Among them, the purpose can be greetings, consultations, orders or pending orders. After determining the purpose of the unread messages, the purpose is matched with the preset purpose. When the purpose of the unread messages is the same as the preset purpose, the unread messages are saved, and the unread messages are sent to the analysis model for analysis to determine the entity information contained in the unread messages. If the purpose of the unread messages is not the same as the preset purpose, it means that the unread messages are not related to the business order, and the unread messages are ignored, that is, the unread messages will not be sent to the analysis model. Among them, the preset purpose can be an order or a pending order. By analyzing the purpose of the unread messages, the unread messages with the purpose of orders or pending orders are saved and sent to the analysis model to obtain entity messages, thereby ensuring the accuracy of the business orders.

[0057] In some embodiments, optionally, the first processing module 1110 is further configured to add the unread message to the prompt word template to obtain the prompt word; and input the prompt word into the analysis model to obtain the entity information.

[0058] In this embodiment, the first processing module 1110 is also used to add the unread message to the prompt word template, so as to obtain the prompt word containing the unread message, wherein the prompt word template can be a guiding prompt (prompt word) template designed according to a specific entity category (goods, consignor, unit price, port of departure and port of destination, etc.). After obtaining the prompt word, the prompt word containing the unread message is input into the analysis model, so as to obtain the entity message that meets the conditions. In the present invention, by adding the unread message to the prompt word template, the prompt word is obtained, and then the prompt word is input into the analysis model, so that the analysis model can more clearly understand the meaning of the unread message, so as to better extract the entity information that meets the conditions.

[0059] In some embodiments, optionally, the second processing module 1112 is used to determine the purpose of the unread message; obtain a business order template corresponding to the purpose; and add the entity information to the business order template to obtain a business order.

[0060] In this embodiment, the second processing module 1112 is used to determine the purpose of the unread message, that is, after the unread message is collected, it is necessary to analyze the unread message, analyze the meaning of the content in the unread message, and clarify the purpose of the user who sent the unread message, which may be to place an order or to place an order. It can be understood that different purposes correspond to different types of business orders. Therefore, after determining the purpose of the unread message, the business order template corresponding to the purpose is obtained, and then the entity information obtained is sorted into a structured data form, and finally the entity information in the structured data form is input into the business order model, thereby automatically generating a business order. The present invention automatically generates a business order based on the entity information, thereby avoiding various errors that may occur in the manual order recording process.

[0061] Fig.12 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown; wherein the electronic device 1200 includes a memory 1202, a processor 1204, and a computer program stored in the memory 1202 and executable on the processor 1204, and when the processor 1204 executes the computer program, the steps of the method for generating a business order as described above are implemented.

[0062] The electronic device 1200 provided by the present invention, in which the processor 1204 implements the steps of the above-mentioned method for generating a business order when executing a computer program, can achieve the technical effect of any of the above-mentioned embodiments, and will not be described in detail.

[0063] An embodiment of the present invention provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for generating a business order are implemented.

[0064] The storage medium provided by the present invention, when the computer program is executed by the processor, implements the steps of the above-mentioned method for generating a business order, and can achieve the technical effects of any of the above-mentioned embodiments, which will not be repeated here.

[0065] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance unless otherwise clearly specified and limited; the terms "connection", "installation", "fixation" and the like should be understood in a broad sense, for example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

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

[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for generating a business order, characterized in that: include: Capturing a first image of a chat interface of a communication software; Determining whether there are unread messages in the communication software according to the first image; Based on the absence of the unread message, re-capturing the first image after a preset time interval; Based on the existence of the unread messages, collecting the unread messages; Obtaining entity information contained in the unread message according to the unread message and the analysis model; A business order is generated according to the entity information.

2. The method for generating a business order according to claim 1, characterized in that: The step of determining whether there are unread messages in the communication software according to the first image comprises: Performing visual mark detection on the first image to obtain a detection result, wherein the visual mark is a mark that appears on the chat interface when the communication software receives a new message; Based on the detection result that the visual mark exists in the first image, determining that the unread message exists; Based on the detection result that the visual mark does not exist in the first image, it is determined that the unread message does not exist.

3. The method for generating a business order according to claim 2, characterized in that: The step of collecting the unread messages comprises: Determine the chat box where the unread message is located according to the visual mark; Extracting all chat messages in the chat box to obtain a chat message set; The unread message is obtained from the chat message set.

4. The method for generating a business order according to claim 3, characterized in that: The step of obtaining the unread messages in the chat message set includes: The unread messages are obtained from the chat message collection according to a preset rule and a preset time period.

5. The method for generating a business order according to any one of claims 1 to 4, characterized in that: The step of obtaining the entity information contained in the unread messages according to the unread messages and the analysis model comprises: Analyzing the unread messages to determine the purpose of the unread messages; When the purpose is the same as a preset purpose, the unread message is saved, and the entity information is obtained according to the unread message and the analysis model, wherein the preset purpose includes placing an order or placing an order; When the purpose is different from the preset purpose, the unread message is ignored.

6. The method for generating a business order according to claim 5, characterized in that: The step of obtaining the entity information according to the unread messages and the analysis model comprises: Adding the unread message to a prompt word template to obtain a prompt word; The prompt word is input into the analysis model to obtain the entity information.

7. The method for generating a business order according to claim 1, characterized in that: The step of generating a business order according to the entity information includes: determining a purpose of the unread message; Obtain a business order template corresponding to the purpose; The entity information is added to the business order template to obtain the business order.

8. A system for generating a business order, characterized in that: include: A first acquisition module, the first acquisition module is used to acquire a first image of a chat interface of the communication software; a judgment module, the judgment module being used to judge whether there are unread messages in the communication software according to the first image; a second acquisition module, the second acquisition module being configured to re-acquire the first image after a preset time interval if the unread message does not exist; a third collection module, the third collection module being used to collect the unread messages based on the existence of the unread messages; A first processing module, the first processing module is used to obtain entity information contained in the unread message according to the unread message and the analysis model; A second processing module, wherein the second processing module is used to generate a business order according to the entity information.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for generating a business order according to any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for generating a business order according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Live broadcast scene order generation method and corresponding device, equipment and medium thereof

    CN113689253A

  • Order generation method and device based on network chat information

    CN116012098A

  • Automatic control method and device of instant messaging software, electronic equipment and medium

    CN117729168A

  • Social information processing method, computing device and computer readable storage medium

    CN118657624A