File migration method and device, electronic equipment and computer readable storage medium
Patent Information
- Application Number
- CN202211605995.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2042-12-14
AI Technical Summary
[0063]根据本申请实施例的方法,可以实现在无PC的情况下将终端设备中的文件转存到存储设备,提高了用户转存文件的便利性。
Smart Images

Figure CN115857816B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of file storage, and in particular to a file transfer method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] As the number of users using file transfer services grows, the demand for transferring files from electronic devices to portable storage devices (such as USB flash drives) during work is also increasing.
[0003] When the electronic device storing the file is not a personal computer (PC) (e.g., a mobile phone), the user needs to use a PC as an intermediary to save the file from the electronic device to the mobile storage device.
[0004] When users do not have a PC or do not wish to insert their electronic devices into an unknown third-party PC to copy files, they need to use an auxiliary hardware card reader (such as an OTG interface or Lightning interface) to transfer files from their electronic devices to a mobile storage device using a dedicated app on the electronic device that supports the hardware.
[0005] Therefore, a new file transfer method is needed to more easily transfer files from non-PC electronic devices to portable storage devices. Summary of the Invention
[0006] To address the problem of how to transfer files from non-personal computer electronic devices to mobile storage devices under existing technology, this application provides a file transfer method, apparatus, electronic device, and computer-readable storage medium. This application also provides a computer-readable storage medium.
[0007] The embodiments of this application adopt the following technical solutions:
[0008] In a first aspect, this application provides a file transfer method, which is applied to a terminal device, and the method includes:
[0009] A file transfer operation instruction is generated, which instructs the image forming device that receives the file transfer operation instruction to save the target data to a first storage device, wherein the first storage device is a storage device connected to the image forming device.
[0010] Send the file transfer operation instruction to the image forming device.
[0011] In one implementation of the first aspect, the file transfer operation instruction includes at least one of a first file name, a first save path, and first device information, wherein:
[0012] The first file name is used to indicate the name used when the target data is saved to the first storage device;
[0013] The first save path is used to indicate the save location when the target data is saved to the first storage device;
[0014] The first device information includes the location information and / or device identifier of the first storage device.
[0015] In one implementation of the first aspect, the target data is stored on a second storage device, which is a storage device connected to the image forming apparatus. The file transfer operation instruction includes at least one of a second file name, a second save path, and second device information, wherein:
[0016] The second file name is the name by which the target data is stored on the second storage device;
[0017] The second storage path is the location where the target data is stored on the second storage device;
[0018] The second device information is the location information and / or device identifier of the second storage device.
[0019] In one implementation of the first aspect, the method further includes:
[0020] A print instruction is sent to the image forming apparatus, the print instruction being used to instruct the image forming apparatus to print the target data stored on the first storage device.
[0021] In one implementation of the first aspect, the method further includes:
[0022] Sending a request to upload a file to the image forming device, wherein the request to upload a file includes a third file name, and the request to upload a file is used to instruct the image forming device to upload the file corresponding to the third file name in the files stored on the first storage device;
[0023] Receive the file corresponding to the third file name sent by the image forming device.
[0024] In one implementation of the first aspect, before sending the request to upload a file instruction to the image forming device, the method further includes:
[0025] Send a request file list instruction to the image forming device, the request file list instruction being used to request to view file information of the first storage device;
[0026] Receive a file list sent by the image forming device, the file list containing the file names of files stored on the first storage device;
[0027] Select the third file name from the file list.
[0028] Secondly, this application provides a file transfer method, which is applied to an image forming apparatus. The method includes: receiving a file transfer operation instruction from a terminal device, wherein the file transfer operation instruction is used to instruct that target data be saved to a first storage device, wherein the first storage device is a storage device connected to the image forming apparatus.
[0029] According to the file transfer operation instruction, the target data is saved to the first storage device.
[0030] In one implementation of the second aspect, saving the target data to the first storage device according to the file transfer operation instruction includes:
[0031] If the file transfer operation instruction includes a first file name, the target data is saved to the first storage device, and the name of the target data saved on the first storage device is the first file name;
[0032] or,
[0033] If the file transfer operation instruction does not contain a first file name, the target data is saved to the first storage device, and the target data is saved on the first storage device with a preset first default name.
[0034] In one implementation of the second aspect, the file transfer operation instruction includes a first save path or first device information, and the step of saving the target data to the first storage device according to the file transfer operation instruction includes:
[0035] When the file transfer operation instruction includes a first save path, the target data is saved to the first save path of the first storage device;
[0036] When the file transfer operation instruction contains first device information, the first storage device is determined from the storage devices connected to the image forming device based on the first device information, and the target data is saved to the first storage device.
[0037] In one implementation of the second aspect, saving the target data to the first storage device according to the file transfer operation instruction includes:
[0038] A data acquisition request is sent to a second storage device, which is a storage device connected to the image forming device. The second storage device is used to store the target data, and the data acquisition request is used to request the acquisition of the target data.
[0039] Receive the target data sent by the second storage device;
[0040] The target data is saved to the first storage device.
[0041] In one implementation of the second aspect, the file transfer operation instruction includes any one of a second file name, a second save path, and second device information; sending a data acquisition request to the second storage device includes:
[0042] If the file transfer operation instruction includes a second file name, the data acquisition request containing the second file name is sent to the second storage device, and the second file name is the name by which the target data is saved on the second storage device;
[0043] If the file transfer operation instruction includes a second save path, the data acquisition request containing the second save path is sent to the second storage device, where the second save path is the save path of the target data on the second storage device;
[0044] If the file transfer operation instruction includes second device information, the second storage device is determined based on the second device information, and the data acquisition request is sent to the second storage device.
[0045] In one implementation of the second aspect, the method further includes:
[0046] Receive printing instructions from the terminal device;
[0047] The target data stored on the first storage device is printed according to the print instruction.
[0048] In one implementation of the second aspect, the method further includes:
[0049] Receive a request to upload a file from the terminal device, wherein the request to upload a file includes a third file name, and the request to upload a file corresponding to the third file name stored on the first storage device;
[0050] Read the file corresponding to the third file name from the first storage device;
[0051] Upload the file corresponding to the third file name to the terminal device.
[0052] In one implementation of the second aspect, before receiving the request to upload a file instruction from the terminal device, the method further includes:
[0053] Receive a request file list instruction from the terminal device, the request file list instruction being used to request to view file information of the first storage device;
[0054] Obtain a file list, which includes the file names of the files stored on the first storage device;
[0055] The file list is sent to the terminal device.
[0056] Thirdly, this application provides a file transfer device, which is applied to a terminal device. The device includes: an instruction generation module, which is used to generate a file transfer operation instruction. The file transfer operation instruction is used to instruct an image forming device that receives the file transfer operation instruction to save target data to a first storage device. The first storage device is a storage device connected to the image forming device.
[0057] A sending module is used to send the file transfer operation instruction to the image forming device.
[0058] Fourthly, this application provides a file transfer device, which is applied to an image forming apparatus, and the device includes:
[0059] The instruction receiving module is used to receive a file transfer operation instruction from the terminal device. The file transfer operation instruction is used to instruct that the target data be saved to the first storage device, which is a storage device connected to the image forming device.
[0060] A data storage module is used to save the target data to the first storage device according to the file transfer operation instruction.
[0061] Fifthly, this application provides an electronic device, which includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute method steps as described in the first aspect or any implementation thereof, or the electronic device executes method steps as described in the second aspect or any implementation thereof.
[0062] In a sixth aspect, this application provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the method described in the first or second aspect.
[0063] The method according to the embodiments of this application can realize the transfer of files from a terminal device to a storage device without a PC, thereby improving the convenience of file transfer for users. Attached Figure Description
[0064] Figure 1 This is a schematic diagram illustrating an application scenario according to an embodiment of this application;
[0065] Figure 2 This is a flowchart of a file transfer method according to an embodiment of this application;
[0066] Figure 3 This is a flowchart of a file transfer method according to an embodiment of this application;
[0067] Figure 4 This is a flowchart of a file transfer method according to an embodiment of this application;
[0068] Figure 5 This is a flowchart of a file transfer method according to an embodiment of this application;
[0069] Figure 6 This is a flowchart of a file transfer method according to an embodiment of this application;
[0070] Figure 7 This is a flowchart of a file upload method according to an embodiment of this application;
[0071] Figure 8 This is a schematic diagram of an electronic device according to an embodiment of this application;
[0072] Figure 9 This is a schematic diagram of an apparatus according to an embodiment of this application;
[0073] Figure 10 This is a schematic diagram of an apparatus according to an embodiment of the present application. Detailed Implementation
[0074] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0075] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.
[0076] This application provides a file transfer method for transferring files from a mobile phone to a USB flash drive using a printer as an auxiliary device without a PC, as described in the existing technology.
[0077] Figure 1 This is a schematic diagram of an application scenario according to an embodiment of this application.
[0078] Terminal device 101 is a mobile phone. Users issue commands by clicking on the screen of terminal device 101, and terminal device 101 performs corresponding operations according to the commands issued by users.
[0079] In other embodiments, the terminal device 101 may also be a terminal device other than a mobile phone, such as a tablet computer, a laptop computer, or a smartwatch.
[0080] Image forming device 102 is a device that can perform printing and document data processing functions, such as a printer or multifunction printer.
[0081] A data connection (e.g., USB wired data connection, Bluetooth wireless connection, WIFI wireless connection) can be established between the terminal device 101 and the image forming device 102 to achieve data interaction.
[0082] Storage device 103 (first storage device) is used to store data. A data connection can be established between storage device 103 and image forming device 102 to enable data interaction. Image forming device 102 can read data from storage device 103 and write data to storage device 103 based on the data connection. Image forming device 102 can be connected to one or more storage devices. Storage device 103 is one of the one or more storage devices connected to image forming device 102.
[0083] For example, storage device 103 can be a USB flash drive, which is inserted into image forming device 102 via a USB interface. Image forming device 102 accesses storage device 103 via the USB interface.
[0084] In one application scenario, terminal device 101 stores target data (e.g., file A), and terminal device 101 sends a file transfer operation instruction for the target file to image forming device 102. The file transfer operation instruction is used to instruct image forming device 102 to transfer the target data to storage device 103.
[0085] According to the method of the embodiments of this application, files in terminal device 101 can be transferred to storage device 103 without a PC, which improves the convenience of users transferring files.
[0086] Figure 2 as well as Figure 3This is a flowchart of a file transfer method according to an embodiment of this application.
[0087] Figure 1 The terminal device 101 shown executes Figure 2 The following process is shown to transfer the target data.
[0088] S201: Terminal device 101 generates a file transfer operation instruction for the target data.
[0089] In practice, S201 can be executed in a variety of different ways.
[0090] For example, in one implementation, the user selects target data stored on the terminal device 101 by clicking a button displayed on the screen of the terminal device 101, and confirms the transfer operation of the target data. The terminal device 101 triggers the execution of S201 based on the user's operation.
[0091] Furthermore, when the target data is transferred to the storage device 103, it is necessary to name the target data stored on the storage device 103. Therefore, it is necessary to instruct the image forming device 102 on the name to which the target data is stored on the storage device 103.
[0092] Specifically, in one implementation of S201, S201 includes S202.
[0093] S202: Terminal device 101 obtains the transfer name (first file name) for the target data. The transfer name of the target data is the file name used when the target data is saved to storage device 103.
[0094] In one embodiment, the filename of the target data on the terminal device 101 (e.g., file A) can be directly used as the transfer name of the target data.
[0095] In another embodiment, terminal device 101 may specify the transfer name of the target data (e.g., file B).
[0096] For example, the user enters the name of the target data to be transferred on the terminal device 101.
[0097] For example, terminal device 101 generates a transfer name for the target data based on preset naming rules. For example, it may directly use the file name of the target data; or it may generate a file name using the format: file name of the target data + date.
[0098] Furthermore, when transferring the target data to the storage device 103, it is necessary to specify the storage location of the target data on the storage device 103, that is, to specify the storage path of the target data on the storage device 103.
[0099] Specifically, in one implementation of S201, S201 includes S203.
[0100] S203: Terminal device 101 obtains the expected storage path (first storage path) of the target data on storage device 103.
[0101] For example, the user inputs the expected storage path of the target data on the storage device 103 on the terminal device 101.
[0102] Furthermore, in one embodiment, when the image forming apparatus 102 is connected to only one storage device (storage device 103), the image forming apparatus 102 transfers the target data to the storage device 103 when it receives a file transfer operation instruction for the target data.
[0103] In another embodiment, when the image forming apparatus 102 is connected to multiple storage devices including storage device 103, the terminal device 101 needs to specify which storage device the target data needs to be transferred to.
[0104] Specifically, in one implementation of S201, S201 includes S204.
[0105] S204: Terminal device 101 obtains device information (first device information) of storage device 103, the device information of storage device 103 includes the location information and / or device identifier of storage device 103.
[0106] Specifically, in one implementation, terminal device 101 obtains a device list from image forming device 102, which contains device information of all storage devices connected to image forming device 102.
[0107] Terminal device 101 displays a list of devices to the user. The user selects storage device 103 from the list of devices by clicking on the screen of terminal device 101.
[0108] In another implementation, the user inputs the device identifier of the storage device 103 on the terminal device 101.
[0109] In another implementation, the user enters the device name of the storage device 103 on the terminal device 101, and the terminal device 101 queries the corresponding device identifier based on the device name.
[0110] Furthermore, S201 also includes S204.
[0111] S205: Generate a file transfer operation instruction based on the target data's transfer name (first file name), the target data's desired save path (first save path), and the storage device 103's device information (first device information). Specifically, call the file transfer operation instruction template (the file transfer operation instruction template contains the basic structure of the instruction, but does not have specific instruction parameters), and add the target data's transfer name (first file name), the target data's desired save path (first save path), and the storage device 103's device information (first device information) to the blank file transfer operation instruction.
[0112] Furthermore, in one embodiment, the terminal device 101 may skip the execution of one or more steps in S202, S203, and S204. That is, the file transfer operation instruction may include any one or any combination of the following: the transfer name of the target data (first file name), the desired save path of the target data (first save path), and the device information of the storage device 103 (first device information).
[0113] For example, the image forming apparatus 102 has a pre-set default save name (first default name) for file transfer, such as the current date plus the number of times the file has been transferred within the day. In S201, the terminal device 101 does not execute S202. In S205, the finally generated file transfer operation instruction does not include the transfer name of the target data.
[0114] After receiving a file transfer operation instruction that does not contain a file name for the target data, the image forming apparatus 102 saves the target data on the storage device 103 according to a preset default name.
[0115] For example, the image forming apparatus 102 has a pre-set default save path (first default path) for file transfer, such as the root directory of the storage device 103. In S201, the terminal device 101 does not execute S203. In S205, the finally generated file transfer operation instruction does not include the desired save path (first save path) for the target data.
[0116] After receiving a file transfer operation instruction that does not contain a device identifier for a storage device, the image forming apparatus 102 saves the target data in a preset default save location.
[0117] For example, the image forming apparatus 102 may have a default save device pre-set for file transfer (e.g., a removable storage device inserted into the first USB port of the image forming apparatus 102 may be the default save device for file transfer). In S201, the terminal device 101 does not execute S204. In S205, the final generated file transfer operation instruction does not include device information of the storage device 103.
[0118] After receiving a file transfer operation instruction that does not contain a device identifier for a storage device, the image forming apparatus 102 determines the storage device 103 according to the preset default storage device.
[0119] S206: Terminal device 101 sends a file transfer operation instruction for the target data and the target data to image forming device 102.
[0120] In practice, in S201, various methods can be used to establish the correspondence between file transfer operation instructions and target data.
[0121] Specifically, in one implementation, in S201, the target data is packaged and added to the file transfer operation instruction. In S206, the file transfer operation instruction containing the target data is sent to the image forming apparatus 102. The target data contained in the file transfer operation instruction is the target data corresponding to the file transfer operation instruction.
[0122] In another implementation, the first data file following the file transfer operation command is pre-defined as the target data in the image forming apparatus 102. In S206, the file transfer operation command and the target data are sent sequentially to the image forming apparatus 102. The first file data received by the image forming apparatus 102 after receiving the file transfer operation command is the target data corresponding to that file transfer operation command.
[0123] In another implementation, in S201, description information of the target data is added to the file transfer operation instruction. In S206, the file transfer operation instruction containing the description information of the target data is sent to the image forming apparatus 102. After receiving the file transfer operation instruction, the image forming apparatus 102 determines the target data corresponding to the file transfer operation instruction from subsequently received data files based on the description information of the target data.
[0124] Figure 1 The image forming apparatus 102 shown performs the following operations. Figure 3 The following process is shown to transfer the target data.
[0125] S300 receives file transfer operation instructions and target data sent by terminal device 101.
[0126] The target data can be included in the file transfer operation instruction, or the target data and the file transfer operation instruction can be received as two separate data items. See S206.
[0127] S301, Identify storage device 103.
[0128] Specifically, when the file transfer operation instruction includes device information (first device information) of storage device 103, storage device 103 is determined from the storage devices connected to image forming apparatus 102 based on the device information (first device information) of storage device 103.
[0129] Alternatively, if the file transfer operation instruction does not contain device information (first device information) of storage device 103, the default save device is determined to be storage device 103. Refer to S201 and S205.
[0130] S302, Determine the transfer name of the target data (first file name).
[0131] Specifically, if the file transfer operation instruction contains the transfer name (first file name) of the target data, the transfer name (first file name) of the target data is extracted from the file transfer operation instruction.
[0132] or,
[0133] If the file transfer operation instruction does not include a transfer name (first file name) for the target data, the default save name (first default name) for the file transfer is used as the transfer name (first file name) for the target data. Refer to S201 and S205.
[0134] S303, determine the storage path (first storage path) of the target data on storage device 103.
[0135] Specifically, if the file transfer operation instruction includes the save path (first save path) of the target data, the save path (first save path) of the target data is extracted from the file transfer operation instruction.
[0136] or,
[0137] If the file transfer operation instruction does not include a save path (first save path) for the target data, the default save path (first default path) for the preset file transfer is used as the save path (first save path) on the storage device 103. Refer to S201 and S205.
[0138] S304, according to the save path (first save path) determined in S303, save the target data to the storage device 103, and save the data as the transfer name of the target data (first file name).
[0139] Furthermore, in one embodiment, the terminal device 101 generates a file transfer operation instruction based on the printer's print job instruction (PJL) format. Specifically, in one embodiment, the file transfer operation instruction uses the following format: UEL@PJL (file transfer operation instruction / print instruction start)
[0140] @PJL SET FILENAME = filename (the destination data will be saved as filename)
[0141] @PJL SET SAVETOUDISK = ON (Whether to save the target data to the storage device, ON means "yes") @PJLENTERLANGUAGE = BINARYFILE (The input language is binary language (BINARYFILE)) XXXXXXXXXX (Target data, where X represents the code of the target data)
[0142] UEL (End of file transfer / print command)
[0143] Figure 4 This is a flowchart of a file transfer method according to an embodiment of this application. After the image forming apparatus 102 receives the file transfer operation instruction in the format of the print job instruction (PJL), the image forming apparatus 102 executes the following... Figure 4 The following process is shown.
[0144] S400 receives file transfer operation commands (PJL).
[0145] S401, parsing PJL.
[0146] S402, check the SET SAVETOUDISK command and confirm SET SAVETOUDISK=ON.
[0147] S403, save the data (target data) after the ENTERLANGUAGE=BINARYFILE command to the root directory (default save path) of storage device 103 (the default save device), and save it as filename in PJL.
[0148] Furthermore, in another application scenario, the target data is not stored on the terminal device 101, but is stored on another device (a second storage device) other than the terminal device 101. For example, a server device.
[0149] For application scenarios where the target data is not stored on the terminal device 101, one implementation scheme for file transfer is that the terminal device 101 obtains the target data from the device storing the target data, and then... Figure 2 as well as Figure 3 The process shown implements file transfer.
[0150] Another implementation involves the terminal device 101 sending a file transfer operation instruction for the target file to the image forming apparatus 102. The file transfer operation instruction does not contain the target data, and the terminal device 101 does not send the target data after sending the file transfer operation instruction. The file transfer operation instruction instructs the image forming apparatus 102 to obtain the target data from the device storing the target data and transfer the target data to the storage device 103.
[0151] Taking the storage of target data on a cloud server device as an example, the image forming device 102 is connected to the cloud server device.
[0152] Figure 5 This is a flowchart of a file transfer method according to an embodiment of this application.
[0153] Figure 1 The terminal device 101 and the image forming device 102 shown perform... Figure 5 The following process is shown to transfer the target data.
[0154] S501, terminal device 101 sends a file transfer operation instruction to image forming device 102.
[0155] The file transfer operation instruction includes any one or a combination of any of the following: the transfer name of the target data (first file name), the desired save path of the target data (first save path), and the device information of the storage device 103 (first device information). Refer to S201 and S205.
[0156] Furthermore, the file transfer operation instruction also includes the storage location information of the target data, which is used to indicate the save location of the target data (e.g., which device it is saved on, which file path on the device it is saved in, and which file name it is saved with on the device).
[0157] For example, in one embodiment, the storage location information of the target data includes any one or a combination of the following:
[0158] The name by which the target data is saved on the second storage device (second file name);
[0159] The location (second storage path) where the target data is stored on the second storage device;
[0160] Location information and / or device identifier (second device information) of the second storage device.
[0161] S502, the image forming apparatus 102 determines the storage device (cloud server device) (second storage device) for the target data.
[0162] Specifically, when the file transfer operation instruction includes second device information, the second storage device is determined based on the second device information.
[0163] Alternatively, if the file transfer operation instruction does not include information about the second device, the preset default device can be used as the second storage device.
[0164] S503, the image forming apparatus 102 sends a data acquisition request to the cloud server device (second storage device), the data acquisition request being used to request the acquisition of target data.
[0165] Specifically, in one implementation of S503, when the file transfer operation instruction includes a second file name, a data acquisition request containing the second file name is sent to the second storage device, and the second file name is the name by which the target data is saved on the second storage device.
[0166] or,
[0167] If the file transfer operation instruction does not include a second file name, a data retrieval request containing a preset second default name will be sent to the second storage device. The preset second default name is the name at which the target data is saved on the second storage device.
[0168] In another implementation of S503, when the file transfer operation instruction includes a second save path, the data acquisition request containing the second save path is sent to the second storage device, where the second save path is the save path of the target data on the second storage device.
[0169] or,
[0170] If the file transfer operation instruction does not include a second save path, the data acquisition request containing a preset second default path is sent to the second storage device, where the preset second default path is the save path of the target data on the second storage device.
[0171] The S505 cloud server device locates the corresponding file and retrieves the target data based on the data retrieval request.
[0172] S506, the cloud server device sends target data to the image forming device 102.
[0173] S507, the image forming apparatus 102 receives target data.
[0174] In step S508, the image forming apparatus 102 saves the target data to the storage device 103 according to the file transfer operation instruction. See steps S301-S303.
[0175] Furthermore, in practical application scenarios, when a user wants to print target data in terminal device 101, one solution is to use the preview program of terminal device 101 to preview the data on terminal device 101, and then terminal device 101 generates a rasterized halftone image based on the preview image for printing (GDI printing). However, due to the limitations of the preview image quality, GDI printing cannot achieve high-quality printing.
[0176] To address the aforementioned issues, one embodiment of this application proposes a printing method. Specifically, based on the file transfer method of this embodiment, the target data in the terminal device 101 is first transferred to the storage device 103 via the image forming device 102, and then the image forming device 102 directly prints the target data stored on the storage device 103.
[0177] Specifically, in one implementation of the printing method, after the terminal device 101 sends a file transfer operation instruction to the image forming device 102, it sends a print instruction to the image forming device 102. The print instruction is used to instruct the image forming device 102 to print the target data stored on the storage device 103.
[0178] In another implementation of the printing method, terminal device 101 adds a print command to a file transfer operation instruction and sends the file transfer operation instruction containing the print command to image forming device 102. For example, in one embodiment, terminal device 101 generates the file transfer operation instruction based on the printer's print job instruction (PJL) format. Specifically, in one embodiment, the file transfer operation instruction uses the following format:
[0179] UEL@PJL (File transfer operation command / print command start)
[0180] @PJL SET FILENAME = filename (the destination data will be saved as filename)
[0181] @PJL SET SAVETOUDISK = ON (Whether to save the target data to the storage device, ON means "yes") @PJL SET PRINTUDISKFILE = ON (Whether to print the target data on the storage device, ON means "yes") @PJLENTERLANGUAGE = BINARYFILE (The input language is binary language (BINARYFILE)) XXXXXXXXXX (Target data, where X represents the code of the target data)
[0182] UEL (End of file transfer / print command)
[0183] Figure 6This is a flowchart of a file transfer method according to an embodiment of this application. After the image forming apparatus 102 receives the file transfer operation instruction in the format of the print job instruction (PJL), the image forming apparatus 102 executes the following... Figure 6 The following process is shown.
[0184] S601 receives file transfer operation instructions (PJL).
[0185] S602, parsing PJL.
[0186] S603, check the SET SAVETOUDISK command and confirm SET SAVETOUDISK=ON.
[0187] S604, check the SET PRINTTOUDISK command.
[0188] S605, save the data (target data) after the ENTERLANGUAGE=BINARYFILE command to the preset default save location (storage device 103), and save it as filename in PJL.
[0189] S606 checks if the PRINTTOUDISK instruction is ON.
[0190] If the PRINTTOUDISK instruction is not ON, it is determined that the PRINTTOUDISK instruction will not be executed, and the operation ends.
[0191] If the PRINTTOUDISK instruction is ON, execute S608.
[0192] S608 loads target data from storage device 103, sends the target data to the Procedure Design Language (PDL) module for parsing, and the PDL module generates halftone pages.
[0193] S609, Print the halftone page generated by the PDL module.
[0194] After S609, this operation is complete.
[0195] According to the method in this application embodiment, when a user wants to print target data from terminal device 101, image forming device 102 loads the target data from storage device 103 and prints it directly. This not only protects the user's privacy but also ensures print quality. Compared to printing via app preview, it achieves better printing results.
[0196] Furthermore, one embodiment of this application also proposes a method for uploading files to a terminal device 101, thereby uploading files from storage device 103 to the terminal device 101.
[0197] Figure 7 This is a flowchart of a file upload method according to an embodiment of this application.
[0198] Terminal device 101 and image forming device 102 perform as follows Figure 7 The following process is shown.
[0199] S701, terminal device 101 sends a request file list instruction to image forming device 102. The request file list instruction is used to request to view file information in storage device 103.
[0200] Specifically, in one embodiment, terminal device 101 generates a request file list instruction based on the printer's print job instruction (PJL) format. Specifically, in one embodiment, the request file list instruction uses the following format:
[0201] UEL@PJL
[0202] @pjl set requestlistudisk = yes(whether to upload file list, yes means "yes")
[0203] UEL
[0204] In other embodiments, terminal device 101 may also request a file list from image forming device 102 based on other server-client protocols.
[0205] S702, the image forming apparatus 102 receives a request for a file list instruction.
[0206] S703, the image forming apparatus 102 obtains a file list from the storage device 103, the file list containing the file names of the files stored on the storage device 103.
[0207] S704, the image forming apparatus 102 sends the file list of the storage device 103 to the terminal device 101.
[0208] S705, Terminal device 101 receives file list from storage device 103.
[0209] S706, terminal device 101 outputs a list of files on storage device 103 to the user.
[0210] Specifically, terminal device 101 displays a list of files from storage device 103 on the screen. The user can select one or more file names from the file list by clicking.
[0211] S707, Terminal device 101 determines one or more file names selected by the user based on user input.
[0212] S708, terminal device 101 sends a request to upload a file to image forming device 102.
[0213] The request to upload a file instruction includes one or more file names selected by the user. The request to upload a file is used to instruct the image forming device 102 to upload the file corresponding to the file name to the terminal device 101.
[0214] Specifically, in one embodiment, terminal device 101 generates a request to upload a file instruction based on the printer's print job instruction (PJL) format. Specifically, in one embodiment, the request to upload a file instruction uses the following format:
[0215] UEL@PJL
[0216] @PJL SET UPLOADUDISKFILENAME = filename (indicates the file to be uploaded, where filename is the filename selected by the user).
[0217] @PJL SET STARTUPLOADUDISKFILE=ON(Whether to upload files, ON means "yes")
[0218] UEL
[0219] S709, the image forming apparatus 102 receives a request to upload.
[0220] S710, the image forming apparatus 102 uploads the file corresponding to the file name in the upload file instruction to the terminal device 101 according to the request upload instruction.
[0221] Specifically, in S710, the image forming device 102 can upload files to the terminal device 101 using a similar PJL format protocol or other existing file transfer protocols, or a custom server-client protocol.
[0222] Based on the file transfer method in the embodiments of this application, the embodiments of this application also propose a file transfer device, which is applied to a terminal device (e.g., terminal device 101).
[0223] Figure 8 This is a structural diagram of a file transfer device according to an embodiment of this application. In one embodiment of this application, the file transfer device 900 includes:
[0224] The instruction generation module 901 is used to generate file transfer operation instructions. The file transfer operation instructions instruct the image forming device that receives the file transfer operation instructions to save the target data to a first storage device, which is a storage device connected to the image forming device.
[0225] The sending module 902 is used to send file transfer operation instructions to the image forming device.
[0226] Furthermore, in one embodiment, the target data is stored on the terminal device 101, and the file transfer operation instruction carries the target data. In another embodiment, the sending module 902 is also used to send the target data to the image forming device.
[0227] Furthermore, in one embodiment, the sending module 902 is also configured to send a print instruction to the image forming apparatus. The print instruction is used to instruct the image forming apparatus to print the target data stored on the first storage device.
[0228] Furthermore, in one embodiment, the sending module 902 is also configured to send a request to upload a file instruction to the image forming device. The request to upload a file instruction includes a third file name, and is used to instruct the image forming device to upload the file corresponding to the third file name stored on the first storage device.
[0229] Furthermore, in one embodiment, the sending module 902 is also configured to send a request file list instruction to the image forming device. The request file list instruction is used to request to view file information of the first storage device.
[0230] The file transfer device 900 further includes a file selection module 903, which is used to: receive a file list sent by the image forming device, the file list containing the file names of files stored on the first storage device; and select the third file name from the file list.
[0231] Based on the file transfer method of the embodiments of this application, the embodiments of this application also propose a file transfer device, which is applied to an image forming apparatus (e.g., image forming apparatus 102).
[0232] Figure 9 This is a structural diagram of a file transfer device according to an embodiment of this application.
[0233] In one embodiment of this application, the file transfer device 1000 includes:
[0234] The instruction receiving module 1001 is used to receive file transfer operation instructions from the terminal device. The file transfer operation instructions are used to instruct the target data to be saved to a first storage device, which is a storage device connected to the image forming device.
[0235] The data storage module 1002 is used to save the target data to the first storage device according to the file transfer operation instruction.
[0236] In one embodiment, the instruction receiving module 1001 is further configured to receive a print instruction from a terminal device. The print instruction is used to instruct the printing of target data stored on a first storage device.
[0237] The file transfer device 1000 also includes a print instruction module 1003, which is used to instruct the image forming device to print the target data stored on the first storage device.
[0238] In one embodiment, the instruction receiving module 1001 is further configured to receive a request to upload a file instruction from a terminal device, wherein the request to upload a file instruction includes a third file name, and the request to upload a file instruction is used to instruct the upload of the file corresponding to the third file name in the files stored on the first storage device.
[0239] The file transfer device 1000 also includes a sending module 1004, which is used to read the file corresponding to the third file name from the first storage device and upload the file corresponding to the third file name to the terminal device.
[0240] In one embodiment, the instruction receiving module 1001 is further configured to receive a request file list instruction from a terminal device, the request file list instruction being used to request to view file information of the first storage device.
[0241] The sending module 1004 is also used to obtain a file list, which contains the file names of the files stored on the first storage device; and to send the file list to the terminal device.
[0242] The method flow in the embodiments of this application can be implemented separately through various modules according to function. The division of each module is only a logical functional division. When implementing the embodiments of this application, the functions of each module can be implemented in one or more software and / or hardware.
[0243] Specifically, the apparatus proposed in this application can be fully or partially integrated onto a single physical entity, or physically separated. These modules can be implemented entirely in software via processing element calls; entirely in hardware; or partially in software via processing element calls and partially in hardware. For example, the detection module can be a separate processing element or integrated into a chip in the electronic device. The implementation of other modules is similar. Furthermore, these modules can be fully or partially integrated together, or implemented independently. During implementation, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0244] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs). Alternatively, these modules can be integrated together as a system-on-a-chip (SOC).
[0245] Furthermore, based on the method proposed in the embodiments of this application, an embodiment of this application also proposes an electronic device (terminal device, for example, terminal device 101).
[0246] Figure 10 The diagram shown is a simplified structural diagram of an electronic device according to an embodiment of this application.
[0247] like Figure 10 As shown, the electronic device 800 includes a memory 801 for storing computer program instructions and a processor 802 for executing computer program instructions.
[0248] In one embodiment, when the computer program instructions are executed by the processor 802, the electronic device 800 is triggered to perform the method steps performed by the terminal device 101 of this application.
[0249] Furthermore, based on the method proposed in the embodiments of this application, an embodiment of this application also proposes an electronic device (image forming apparatus, for example, image forming apparatus 102).
[0250] like Figure 10 As shown, in one embodiment, when computer program instructions are executed by the processor 802, the electronic device 800 is triggered to perform the method steps performed by the image forming apparatus 102 of this application.
[0251] Specifically, in one embodiment of this application, the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to perform the method steps described in the embodiment of this application.
[0252] Specifically, in one embodiment of this application, the processor of the electronic device may be a device-on-a-chip (SoC), which may include a central processing unit (CPU) and may further include other types of processors. Specifically, in one embodiment of this application, the processor of the electronic device may be a PWM control chip.
[0253] Specifically, in one embodiment of this application, the processor may include, for example, a CPU, DSP, microcontroller, or digital signal processor, and may also include a GPU, embedded neural network processing units (NPUs), and image signal processors (ISPs). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the program of the technical solution of this application. Furthermore, the processor may have the function of operating one or more software programs, which may be stored in a storage medium.
[0254] Specifically, in one embodiment of this application, the memory of the electronic device may be a read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), or other types of dynamic storage devices capable of storing information and instructions. It may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices. Alternatively, it may be any computer-readable medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer.
[0255] Specifically, in one embodiment of this application, the processor and the memory can be combined into a single processing device, or more commonly, they are independent components. The processor executes program code stored in the memory to implement the method described in the embodiments of this application. In specific implementations, the memory can also be integrated into the processor, or it can be independent of the processor.
[0256] Furthermore, the devices, apparatuses, and modules described in the embodiments of this application may be implemented by computer chips or physical entities, or by products with certain functions.
[0257] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media containing computer-usable program code.
[0258] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0259] Specifically, one embodiment of this application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the method provided in the embodiment of this application.
[0260] An embodiment of this application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method provided in the embodiment of this application.
[0261] The embodiments described in this application are described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0262] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0263] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0264] It should also be noted that in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0265] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0266] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0267] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0268] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments of this application can be implemented using electronic hardware, computer software, or a combination of electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0269] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0270] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A file transfer method, characterized in that, The method is applied to a terminal device, and the method includes: A file transfer operation instruction is generated, which instructs the image forming device that receives the file transfer operation instruction to retrieve the target data from the second storage device that stores the target data and save the target data to the first storage device, wherein the first storage device is a storage device connected to the image forming device. Send the file transfer operation instruction to the image forming device; The target data is stored on a second storage device, which is a storage device connected to the image forming device. The file transfer operation instruction includes at least one of a second file name, a second save path, and second device information, wherein: The second file name is the name by which the target data is stored on the second storage device; The second storage path is the location where the target data is stored on the second storage device; The second device information is the location information and / or device identifier of the second storage device.
2. The method according to claim 1, characterized in that, The file transfer operation instruction includes at least one of a first file name, a first save path, and first device information, wherein: The first file name is used to indicate the name used when the target data is saved to the first storage device; The first save path is used to indicate the save location when the target data is saved to the first storage device; The first device information includes the location information and / or device identifier of the first storage device.
3. The method according to any one of claims 1-2, characterized in that, The method further includes: A print instruction is sent to the image forming apparatus, the print instruction being used to instruct the image forming apparatus to print the target data stored on the first storage device.
4. The method according to any one of claims 1-2, characterized in that, The method further includes: Sending a request to upload a file to the image forming device, wherein the request to upload a file includes a third file name, and the request to upload a file is used to instruct the image forming device to upload the file corresponding to the third file name stored on the first storage device; Receive the file corresponding to the third file name sent by the image forming device.
5. The method according to claim 4, characterized in that, Before sending the request to upload a file to the image forming device, the method further includes: Send a request file list instruction to the image forming device, the request file list instruction being used to request to view file information of the first storage device; Receive a file list sent by the image forming device, the file list containing the file names of files stored on the first storage device; Select the third file name from the file list.
6. A file transfer method, characterized in that, The method is applied to an image forming apparatus, and the method includes: The system receives a file transfer operation instruction from a terminal device, the file transfer operation instruction being used to instruct that the target data be saved to a first storage device, the first storage device being a storage device connected to the image forming device; According to the file transfer operation instruction, the target data is saved to the first storage device; The step of saving the target data to the first storage device according to the file transfer operation instruction includes: A data acquisition request is sent to a second storage device, which is a storage device connected to the image forming device. The second storage device is used to store the target data, and the data acquisition request is used to request the acquisition of the target data. Receive the target data sent by the second storage device; The target data is saved to the first storage device.
7. The method according to claim 6, characterized in that, The step of saving the target data to the first storage device according to the file transfer operation instruction includes: If the file transfer operation instruction includes a first file name, the target data is saved to the first storage device, and the name of the target data saved on the first storage device is the first file name; or, If the file transfer operation instruction does not contain a first file name, the target data is saved to the first storage device, and the name of the target data saved on the first storage device is a preset first default name.
8. The method according to claim 6, characterized in that, The file transfer operation instruction includes a first save path or first device information. Saving the target data to the first storage device according to the file transfer operation instruction includes: When the file transfer operation instruction includes a first save path, the target data is saved to the first save path of the first storage device; When the file transfer operation instruction contains first device information, the first storage device is determined from the storage devices connected to the image forming device based on the first device information, and the target data is saved to the first storage device.
9. The method according to claim 6, characterized in that, The file transfer operation instruction includes any one of the second file name, the second save path, and the second device information. Sending the data acquisition request to the second storage device includes: If the file transfer operation instruction includes a second file name, the data acquisition request containing the second file name is sent to the second storage device, and the second file name is the name by which the target data is saved on the second storage device; If the file transfer operation instruction includes a second save path, the data acquisition request containing the second save path is sent to the second storage device, where the second save path is the save path of the target data on the second storage device; If the file transfer operation instruction includes second device information, the second storage device is determined based on the second device information, and the data acquisition request is sent to the second storage device.
10. The method according to any one of claims 6-9, characterized in that, The method further includes: Receive printing instructions from the terminal device; The target data stored on the first storage device is printed according to the print instruction.
11. The method according to any one of claims 6-9, characterized in that, The method further includes: Receive a request to upload a file from the terminal device, wherein the request to upload a file includes a third file name, and the request to upload a file corresponding to the third file name in the files stored on the first storage device; Read the file corresponding to the third file name from the first storage device; Upload the file corresponding to the third file name to the terminal device.
12. The method according to claim 11, characterized in that, Before receiving the request to upload a file from the terminal device, the method further includes: Receive a request file list instruction from the terminal device, the request file list instruction being used to request to view file information of the first storage device; Obtain a file list, which includes the file names of the files stored on the first storage device; Send the file list to the terminal device.
13. A file transfer device, characterized in that, The device is used in a terminal device, and the device includes: The instruction generation module is used to generate a file transfer operation instruction, which instructs the image forming device that receives the file transfer operation instruction to obtain the target data from the second storage device that stores the target data and save the target data to the first storage device, wherein the first storage device is a storage device connected to the image forming device. A sending module is used to send the file transfer operation instruction to the image forming device; The target data is stored on a second storage device, which is a storage device connected to the image forming device. The file transfer operation instruction includes at least one of a second file name, a second save path, and second device information, wherein: The second file name is the name by which the target data is stored on the second storage device; The second storage path is the location where the target data is stored on the second storage device; The second device information is the location information and / or device identifier of the second storage device.
14. A file transfer device, characterized in that, The apparatus is used in an image forming device, and the apparatus includes: The instruction receiving module is used to receive a file transfer operation instruction from the terminal device. The file transfer operation instruction is used to instruct that the target data be saved to the first storage device, which is a storage device connected to the image forming device. A data storage module is used to save the target data to the first storage device according to the file transfer operation instruction; The step of saving the target data to the first storage device according to the file transfer operation instruction includes: A data acquisition request is sent to a second storage device, which is a storage device connected to the image forming device. The second storage device is used to store the target data, and the data acquisition request is used to request the acquisition of the target data. Receive the target data sent by the second storage device; The target data is saved to the first storage device.
15. An electronic device, characterized in that, The electronic device includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to perform the method steps as described in any one of claims 1-12.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-12.
Citation Information
Patent Citations
Data transfer method and device, computer equipment and storage medium
CN115390748A
Image forming apparatus, method of storing image forming data, and non-transitory computer-readable recording medium therefor
US20200382678A1