File pushing method, device and equipment and readable medium
By using SFTP connections to retrieve and transfer various formats of operation and maintenance files from external servers, the problem of operation and maintenance robots being unable to push files in real time is solved, enabling rich operation and maintenance information interaction and secure data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AGRICULTURAL BANK OF CHINA
- Filing Date
- 2023-04-13
- Publication Date
- 2026-05-26
AI Technical Summary
Existing maintenance robots cannot send online real-time generated files or images to designated users, failing to meet users' needs for complex and comprehensive maintenance information.
By receiving file requests from the maintenance robot, an SFTP connection is established to obtain the target file from the external target server and transfer it to the maintenance robot. It supports the push of various file and image formats, including Excel, PDF, JPEG, PNG, etc.
It broadens the interaction methods of operation and maintenance robots, enabling users to obtain complex and rich operation and maintenance information, improving the security and compliance of data transmission, and avoiding the impact of disk read and write on transmission rate.
Smart Images

Figure CN116366637B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission technology, and in particular to file push methods, apparatus, devices, and readable media. Background Technology
[0002] Traditional intelligent Q&A customer service responses are mostly in plain text format, or rich text formatted with HTML. However, in the operations and maintenance (O&M) field, with the continuous enrichment of O&M tools and the expansion of business scenarios, users have a more urgent need for the format and richness of message responses from O&M robots.
[0003] Currently, the maintenance robot cannot send online real-time generated files or images (Excel, PDF, JPEG, PNG, etc.) to a specified user; it only supports sending files that already exist on the server.
[0004] Therefore, a file push method is needed to meet users' needs for obtaining complex and rich operation and maintenance information. Summary of the Invention
[0005] This invention provides a file push method, apparatus, device, and readable medium to meet users' needs for obtaining complex and rich operation and maintenance information.
[0006] According to one aspect of the present invention, a file push method is provided, comprising:
[0007] Receive a file request from the maintenance robot, wherein the file request is generated by the maintenance robot in response to the user's file acquisition request, and the file request contains file information representing the target file to be acquired;
[0008] The target file is obtained from an external target server based on the file information.
[0009] An SFTP connection is established with the maintenance robot to transfer the target file to the maintenance robot, so that the user can obtain the target file through the maintenance robot.
[0010] Optionally, the file request includes a business identifier, which represents the business type of the target file. Correspondingly, obtaining the target file from an external target server based on the file information includes:
[0011] Access the target server corresponding to the business type based on the business identifier;
[0012] Based on the file information, the target file is obtained from the target server.
[0013] Optionally, establishing an SFTP connection with the maintenance robot and transferring the target file to the maintenance robot so that the user can obtain the target file through the maintenance robot includes:
[0014] Establish an SFTP connection with the backend server of the maintenance robot and transfer the target file to a preset disk path;
[0015] A response message is generated based on the disk path and sent to the maintenance robot, so that the user can obtain the target file through the response message pushed by the maintenance robot.
[0016] Optionally, generating response information based on the disk path includes:
[0017] Generate reply text information based on the file information and the preset text reply template;
[0018] The reply information is generated based on the reply text information and the disk path.
[0019] Optionally, the method further includes: pre-generating corresponding SSH public and private keys and sending the SSH public key to the backend server representing the operation and maintenance robot that allows connection; correspondingly, establishing an SFTP connection with the backend server of the operation and maintenance robot includes:
[0020] Verify whether the SSH public key saved on the backend server corresponds to the preset SSH private key;
[0021] When the SSH public key stored on the backend server corresponds to the preset SSH private key, an SFTP connection is established with the backend server.
[0022] Optionally, the method further includes:
[0023] When the preset file push conditions are met, the target server corresponding to the file push conditions is determined;
[0024] Obtain the target file from the target server;
[0025] An SFTP connection is established with the maintenance robot to transfer the target file to the maintenance robot, so that the user can obtain the target file through the maintenance robot.
[0026] Optionally, the method further includes:
[0027] The maximum number of concurrent transmissions of the target file is controlled by a thread pool;
[0028] And / or,
[0029] The number of transmissions of the target file is planned according to the preset upper limit of the size of a single transmission.
[0030] According to another aspect of the present invention, a file pushing device is provided, comprising:
[0031] The file request receiving unit is used to receive file requests sent by the operation and maintenance robot, wherein the file request is generated by the operation and maintenance robot in response to the user's file acquisition request, and the file request contains file information representing the target file to be acquired;
[0032] A target file acquisition unit is used to acquire the target file based on the file information;
[0033] The target file transfer unit is used to establish an SFTP connection with the maintenance robot and transfer the target file to the maintenance robot so that the user can obtain the target file through the maintenance robot.
[0034] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0035] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the file push method according to any embodiment of the present invention.
[0036] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the file push method described in any embodiment of the present invention.
[0037] The technical solution of this invention involves receiving a file request from an operations and maintenance robot. The file request is generated by the operations and maintenance robot in response to a user's file retrieval request, and includes file information representing the target file to be retrieved. The target file is then retrieved from an external target server based on the file information. An SFTP connection is established with the operations and maintenance robot to transfer the target file to the robot, enabling the user to retrieve the target file through the robot. This invention achieves file transfer and push via SFTP and an external server, combining files from the external server to generate more operations and maintenance information for various scenarios, broadening the interaction methods of the operations and maintenance robot, and allowing users to obtain complex and rich operations and maintenance information.
[0038] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a flowchart of a file push method provided in Embodiment 1 of the present invention;
[0041] Figure 2 This is a flowchart of a target file transfer method provided in Embodiment 2 of the present invention;
[0042] Figure 3 This is a schematic diagram illustrating the target file transfer applicable to Embodiment 2 of the present invention;
[0043] Figure 4 This is a flowchart of a target file transfer method provided in Embodiment 2 of the present invention;
[0044] Figure 5 This is a schematic diagram of a file push device provided in Embodiment 3 of the present invention;
[0045] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the file push method of this invention. Detailed Implementation
[0046] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0047] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0048] Example 1
[0049] Figure 1 This is a flowchart of a file push method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where maintenance information is pushed to users via a maintenance robot. The method can be executed by a file push device, which can be implemented in hardware and / or software and can be configured in a computer. Figure 1 As shown, the method includes:
[0050] S110. Receive a file request from the maintenance robot, wherein the file request is generated by the maintenance robot in response to the user's file acquisition request, and the file request contains file information representing the target file to be acquired.
[0051] The operations and maintenance (O&M) robot is an intelligent O&M client that interacts with users through a front-end, providing them with professional O&M knowledge, key configuration information of internal application systems, application system performance curves, and O&M-specific reports. The client runs on the business OA software. The file push method in this embodiment can be executed by an intelligent customer service representative. The intelligent customer service representative processes the specific question-and-answer requests from the O&M robot and returns the processing results to the O&M robot, which then provides the answers to the user's questions.
[0052] A file request refers to a request generated by a user through the front end of the operations and maintenance robot to retrieve a response file. The user can input the file retrieval request via text or voice commands. The file information includes relevant information about the operations and maintenance file the user wishes to obtain, such as its business type and the time it was generated.
[0053] S120. Obtain the target file from an external target server based on the file information.
[0054] Traditional intelligent Q&A customer service responses are mostly in plain text format, or rich text formatted with HTML. However, in the operations and maintenance (O&M) field, with the continuous enrichment of O&M tools and the expansion of business scenarios, users have a more urgent need for more diverse and richer message responses. Examples include requesting operational briefings, tool integration process documents, and proactive push notifications of basic resource monitoring curves from the O&M platform. As information carriers, files and images can effectively meet users' needs for O&M information.
[0055] In this embodiment of the invention, the file request includes a service identifier, which represents the service type of the target file. Correspondingly, obtaining the target file from an external target server based on the file information includes:
[0056] Access the target server corresponding to the business type based on the business identifier;
[0057] Based on the file information, the target file is obtained from the target server.
[0058] When a user submits a file retrieval request through the operations and maintenance robot, a business identifier is simultaneously output to identify the relevant category of the requested data. Since each server stores different files, the target server needs to be identified using the business identifier to retrieve the target file. Currently, the industry's OA chat software does not support sending online real-time generated files or images (Excel, PDF, JPEG, PNG, etc.) to a specific user via the operations and maintenance platform; it only supports sending files already existing on the server hosting the intelligent Q&A customer service. By connecting to an external server, it is possible to obtain files in various formats, as well as images in Excel, PDF, JPEG, PNG, etc., allowing users to obtain richer file and image answers during Q&A sessions. This also enables the intelligent Q&A customer service backend to collaborate with other business modules to push operations and maintenance information in more scenarios using images and files.
[0059] S130. Establish an SFTP connection with the maintenance robot and transfer the target file to the maintenance robot so that the user can obtain the target file through the maintenance robot.
[0060] SFTP, or Secret File Transfer Protocol, is a network transfer protocol that provides file access, transfer, and management capabilities through a data streaming connection. SFTP allows users to transfer critical files and sensitive data without exposing them to unauthorized parties. Secure data transfer is particularly important in remote work scenarios. SFTP makes it easier for users to comply with security regulations such as PCI-DSS, HIPAA, GDPR, and CCPA. Data during transmission is encrypted using SSH to ensure compliance.
[0061] Existing file transfer solutions are primarily used for file storage and are not directly applicable to file push scenarios in intelligent Q&A customer service, such as the intelligent Q&A customer service backend calling SFTP for file transfer and retrieving the results. Furthermore, existing solutions require files to be stored on disk before being transferred to the server. Disk read / write operations significantly reduce transfer speed and require the caller to periodically clean up temporary files on the disk. In this embodiment, the intelligent Q&A customer service backend can use a Java-based SFTP file transfer tool. Therefore, file transfers with external servers and calls to SFTP to transfer files to the server where the maintenance robot resides do not generate temporary files on the disk.
[0062] The solution of this invention realizes file transfer and push through SFTP and external servers, and generates more operation and maintenance information in more scenarios by combining files from external servers, which broadens the interaction mode of operation and maintenance robots and enables users to obtain complex and rich operation and maintenance information.
[0063] In this embodiment of the invention, the method further includes: when a preset file push condition is met, determining the target server corresponding to the file push condition;
[0064] Obtain the target file from the target server;
[0065] An SFTP connection is established with the maintenance robot to transfer the target file to the maintenance robot, so that the user can obtain the target file through the maintenance robot.
[0066] In addition to users actively triggering file retrieval requests through the maintenance robot frontend, the intelligent Q&A customer service can also proactively push files to users when file push conditions are met, such as pushing files at preset time intervals. The intelligent Q&A customer service backend provides an interface for proactively pushing files, enabling the target server to transfer files to the intelligent Q&A customer service backend. After the file transfer is complete, the intelligent Q&A customer service backend will proactively call the maintenance robot interface to establish an SFTP connection, thereby completing the proactive file push.
[0067] In this embodiment of the invention, the method further includes: controlling the maximum number of concurrent transmissions of the target file through a thread pool.
[0068] In this embodiment of the invention, the method further includes: planning the number of transmissions of the target file according to a preset upper limit for the size of a single transmission.
[0069] A thread pool is a form of multithreaded processing where tasks are added to a queue and then automatically started after threads are created. Thread pool threads are all background threads. Each thread uses a default stack size, runs at a default priority, and exists within a multithreaded unit.
[0070] To improve the stability of file push under concurrent conditions and address server load issues, this invention employs multiple control methods. Firstly, a maximum SFTP connection limit is set on the server hosting the maintenance robot to prevent server crashes due to excessive connections, thus ensuring overall service availability. Secondly, the intelligent Q&A customer service backend uses a thread pool to control the maximum concurrent transmission count and sets a maximum file size limit for each transmission to prevent large file transfers from causing the intelligent Q&A customer service backend server to crash.
[0071] Example 2
[0072] Figure 2 This is a flowchart illustrating a target file transfer method provided in Embodiment 2 of the present invention. Figure 2 As shown, the method includes:
[0073] S210. Establish an SFTP connection with the backend server of the maintenance robot and transfer the target file to the preset disk path.
[0074] Figure 3 This is a schematic diagram illustrating the target file transfer applicable to Embodiment 2 of the present invention, as shown below. Figure 3 As shown, the user first triggers a file transfer scenario during the interaction with the maintenance robot. Then, the intelligent response customer service backend will first obtain the target file required by the user from the target server of the relevant business module. Next, the intelligent response customer service backend will establish an SFTP connection with the server where the maintenance robot is located and transfer the file to the agreed disk path.
[0075] S220. Generate response information based on the disk path and send it to the maintenance robot so that the user can obtain the target file through the response information pushed by the maintenance robot.
[0076] Optionally, in this embodiment of the invention, generating response information based on the disk path includes:
[0077] Generate reply text information based on the file information and the preset text reply template;
[0078] The reply information is generated based on the reply text information and the disk path.
[0079] After the target file is transferred to the preset disk path, the intelligent response customer service backend sends the target file path information along with the relevant text reply to the intelligent response customer service. Finally, the intelligent response customer service sends the file and related text content to the user.
[0080] Figure 4 This is a flowchart of a target file transfer method provided in Embodiment 2 of the present invention, as follows: Figure 4 As shown, the method includes:
[0081] S410. Generate the corresponding SSH public key and SSH private key in advance and send the SSH public key to the backend server representing the maintenance robot that is allowed to connect.
[0082] S420. Verify whether the SSH public key saved on the backend server corresponds to the preset SSH private key.
[0083] S430. When the SSH public key saved by the backend server corresponds to the preset SSH private key, an SFTP connection is established with the backend server and the target file is transferred to the preset disk path.
[0084] S440. Generate response information based on the disk path and send it to the maintenance robot so that the user can obtain the target file through the response information pushed by the maintenance robot.
[0085] To enhance the security of the SFTP connection between the intelligent Q&A customer service backend and the maintenance robot, this embodiment of the invention uses the SSH secure connection protocol for connection establishment. First, the intelligent Q&A customer service backend generates an SSH public key and private key. Then, it stores the private key on a cloud server, provides the public key to the server hosting the maintenance robot, and adds the public key to the public key trust list of the maintenance robot's server.
[0086] Example 3
[0087] Figure 5 This is a schematic diagram of a file push device provided in Embodiment 3 of the present invention. Figure 5 As shown, the device includes:
[0088] The file request receiving unit 510 is used to receive a file request sent by the operation and maintenance robot, wherein the file request is generated by the operation and maintenance robot in response to the user's file acquisition request, and the file request contains file information representing the target file to be acquired.
[0089] The target file acquisition unit 520 is used to acquire the target file based on the file information.
[0090] The target file transfer unit 530 is used to establish an SFTP connection with the maintenance robot and transfer the target file to the maintenance robot so that the user can obtain the target file through the maintenance robot.
[0091] Optionally, the file request includes a business identifier, which represents the business type of the target file. Correspondingly, the target file acquisition unit 520 is specifically used for:
[0092] Access the target server corresponding to the business type based on the business identifier;
[0093] Based on the file information, the target file is obtained from the target server.
[0094] Optionally, the target file transfer unit 530 is specifically used for:
[0095] Establish an SFTP connection with the backend server of the maintenance robot and transfer the target file to a preset disk path;
[0096] A response message is generated based on the disk path and sent to the maintenance robot, so that the user can obtain the target file through the response message pushed by the maintenance robot.
[0097] Optionally, the target file transfer unit 530 is specifically used for:
[0098] Generate reply text information based on the file information and the preset text reply template;
[0099] The reply information is generated based on the reply text information and the disk path.
[0100] Optionally, the target file transfer unit 530 is further configured to pre-generate corresponding SSH public and private keys and send the SSH public key to the backend server representing the maintenance robot that is allowed to connect; correspondingly, the target file transfer unit 530 is specifically configured to:
[0101] Verify whether the SSH public key saved on the backend server corresponds to the preset SSH private key;
[0102] When the SSH public key stored on the backend server corresponds to the preset SSH private key, an SFTP connection is established with the backend server.
[0103] Optional, such as Figure 5 As shown, the device also includes: a target file active push unit 540;
[0104] Target file active push unit 540, used for execution:
[0105] When the preset file push conditions are met, the target server corresponding to the file push conditions is determined;
[0106] Obtain the target file from the target server;
[0107] An SFTP connection is established with the maintenance robot to transfer the target file to the maintenance robot, so that the user can obtain the target file through the maintenance robot.
[0108] Optionally, the target file transfer unit 530 is further configured to control the maximum number of concurrent transfers of the target file through a thread pool and / or plan the number of transfers of the target file according to a preset upper limit for the size of a single transfer.
[0109] The file push device provided in the embodiments of the present invention can execute the file push method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0110] Example 4
[0111] Figure 6 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0112] like Figure 6As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0113] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0114] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the file push method.
[0115] In some embodiments, the file push method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the file push method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the file push method by any other suitable means (e.g., by means of firmware).
[0116] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0117] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0118] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0119] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0120] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0121] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0122] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0123] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A file push method, applied to the backend of an intelligent question-and-answer customer service system, characterized in that, include: Receive a file request from the maintenance robot, wherein the file request is generated by the maintenance robot in response to the user's file acquisition request, and the file request contains file information representing the target file to be acquired; The target file is obtained from an external target server based on the file information. Establish an SFTP connection with the maintenance robot and transfer the target file to the maintenance robot so that the user can obtain the target file through the maintenance robot; The file request includes a business identifier, which represents the business type of the target file. Accordingly, obtaining the target file from an external target server based on the file information includes: Access the target server corresponding to the business type based on the business identifier; Based on the file information, the target file is obtained from the target server; wherein, when the user inputs a file retrieval request through the operation and maintenance robot, a business identifier is output at the same time to identify the relevant category of the required data; The step of establishing an SFTP connection with the maintenance robot and transferring the target file to the maintenance robot so that the user can obtain the target file through the maintenance robot includes: Establish an SFTP connection with the backend server of the maintenance robot and transfer the target file to a preset disk path; A response message is generated based on the disk path and sent to the maintenance robot, so that the user can obtain the target file through the response message pushed by the maintenance robot.
2. The method according to claim 1, characterized in that, The step of generating response information based on the disk path includes: Generate reply text information based on the file information and the preset text reply template; The reply information is generated based on the reply text information and the disk path.
3. The method according to claim 1, characterized in that, Further includes: Pre-generate corresponding SSH public and private keys and send the SSH public key to the backend server representing the operation and maintenance robot that allows connection; correspondingly, establishing an SFTP connection with the backend server of the operation and maintenance robot includes: Verify whether the SSH public key saved on the backend server corresponds to the preset SSH private key; When the SSH public key stored on the backend server corresponds to the preset SSH private key, an SFTP connection is established with the backend server.
4. The method according to claim 1, characterized in that, Further includes: When the preset file push conditions are met, the target server corresponding to the file push conditions is determined; Obtain the target file from the target server; An SFTP connection is established with the maintenance robot to transfer the target file to the maintenance robot, so that the user can obtain the target file through the maintenance robot.
5. The method according to claim 1, characterized in that, Further includes: The maximum number of concurrent transmissions of the target file is controlled by a thread pool; And / or, The number of transmissions of the target file is planned according to the preset upper limit of the size of a single transmission.
6. A file pushing device, characterized in that, include: The file request receiving unit is used to receive file requests sent by the operation and maintenance robot, wherein the file request is generated by the operation and maintenance robot in response to the user's file acquisition request, and the file request contains file information representing the target file to be acquired; A target file acquisition unit is used to acquire the target file based on the file information; The target file transfer unit is used to establish an SFTP connection with the maintenance robot and transfer the target file to the maintenance robot so that the user can obtain the target file through the maintenance robot. The file request includes a business identifier, which represents the business type of the target file. Correspondingly, obtaining the target file from an external target server based on the file information includes: Access the target server corresponding to the business type based on the business identifier; Based on the file information, the target file is obtained from the target server; wherein, when the user inputs a file retrieval request through the operation and maintenance robot, a business identifier is output at the same time to identify the relevant category of the required data; The step of establishing an SFTP connection with the maintenance robot and transferring the target file to the maintenance robot so that the user can obtain the target file through the maintenance robot includes: Establish an SFTP connection with the backend server of the maintenance robot and transfer the target file to a preset disk path; A response message is generated based on the disk path and sent to the maintenance robot, so that the user can obtain the target file through the response message pushed by the maintenance robot.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the file push method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the file push method according to any one of claims 1-5.