Printer Bluetooth security network distribution method and device, and printer
By judging the status of the terminal device based on its IP address and positioning data in the printer, and performing network distribution when the distance and verification conditions are met, the problem of low security of the existing Bluetooth distribution network is solved and the security of the distribution network is improved.
Patent Information
- Application Number
- CN202310202203.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-06
- Publication Date
- 2024-09-06
AI Technical Summary
The existing Bluetooth network distribution method has low security problems in enterprise-level printers, and hackers may use the network to disguise Bluetooth for network distribution and steal print files.
By implementing a Bluetooth secure network configuration method in the printer, it is determined based on the IP address and positioning data of the terminal device whether it is a network-equipped device or an unequipped device. If it is an unequipped device, the network is configured based on distance information. Network configuration is only performed when the device distance is smaller than the preset value, and random codes and matching codes are used for verification during network configuration.
It improves the security of Bluetooth distribution network, prevents hackers from disguising Bluetooth to perform network distribution and steal files, and ensures that network distribution can only be performed when the device is close and verified.
Smart Images

Figure CN118612892A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of printers, and in particular to a printer Bluetooth secure network configuration method, device, and printer. Background Art
[0002] Printers are currently common devices. In order to facilitate users to print, existing printer network configuration modes generally include Bluetooth configuration, WIFI configuration and other methods.
[0003] However, taking Bluetooth network configuration as an example, the current network configuration method is generally relatively simple, which only requires turning on Bluetooth between the terminal and the printer to achieve network configuration. However, this network configuration method is not safe, especially for enterprise-level printers, hackers may disguise Bluetooth for network configuration through the network and steal printer print files.
[0004] In summary, the existing technology has the problem of low security of Bluetooth network configuration. Summary of the invention
[0005] The purpose of this application is to provide a printer Bluetooth secure network configuration method, device, and printer to solve the problem of low Bluetooth network configuration security in the prior art.
[0006] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a printer Bluetooth secure network configuration method, characterized in that the method is applied to a printer and includes:
[0008] When receiving a network configuration instruction from a terminal device, obtaining the IP address of the terminal device;
[0009] Determine whether the terminal device is a network-connected device according to the IP address;
[0010] If yes, generate a random code for printing at that time, and send the random code to the terminal device, so that the terminal device sends the file to be printed carrying the random code;
[0011] If not, obtain the positioning data of the terminal device, and obtain the distance information to the terminal device according to the positioning data;
[0012] When the distance information is less than a preset value, a matching code is sent to the terminal device, and when a matching code carrying an IP address fed back by the terminal device is received, network configuration is achieved with the terminal device.
[0013] Optionally, the step of acquiring positioning data of the terminal device, and acquiring distance information to the terminal device based on the positioning data includes:
[0014] Sending a test instruction to the terminal device, and obtaining a response instruction fed back by the terminal device;
[0015] The distance information to the terminal device is determined according to the time difference between the test instruction and the response instruction.
[0016] Optionally, when the distance information is less than a preset value, sending a matching code to the terminal device, and upon receiving a matching code carrying an IP address fed back by the terminal device, the step of implementing network configuration with the terminal device includes:
[0017] When the distance information is less than a first preset value, a matching code is sent to the terminal device, and when a matching code carrying an IP address fed back by the terminal device is received, a confirmation page is displayed; when key information in response to the confirmation interface is received, network configuration is implemented with the terminal device;
[0018] When the distance information is less than the second preset value and greater than the first preset value, a matching code is sent to the terminal device, and when a matching code carrying an IP address fed back by the terminal device is received and the IP address matches the preset IP address, network configuration is implemented with the terminal device.
[0019] Optionally, the step of generating a random code for printing at that time and sending the random code to the terminal device includes:
[0020] Generate a printing instruction, wherein the terminal of the printing instruction is a random code.
[0021] Optionally, after the step of sending the random code to the terminal device, the method further includes:
[0022] When receiving files to be printed from at least two terminal devices, obtaining the number of pages of each file to be printed and the corresponding IP address;
[0023] The printing order is determined according to the priority of the IP address of the file to be printed and the difference between the number of pages of the file to be printed.
[0024] Optionally, the method further comprises:
[0025] Get the priority of the file to be printed;
[0026] The step of determining the printing order according to the difference between the priority of the IP address of the file to be printed and the number of pages of the file to be printed comprises:
[0027] The printing order is determined according to the priority of the IP address, the priority of the file to be printed, and the number of pages of the file to be printed.
[0028] Optionally, the step of determining the printing order according to the priority of the IP address, the priority of the file to be printed, and the number of pages of the file to be printed includes:
[0029] When the priorities of the files to be printed are equal, the printing order is determined according to the priorities of the IP addresses and the difference in the number of pages of the files to be printed;
[0030] When the priorities of the files to be printed are not equal, the printing order is determined according to the priorities of the IP addresses and the number of pages of the files to be printed.
[0031] Optionally, after the step of sending the random code to the terminal device, the method further includes:
[0032] When receiving files to be printed from at least two terminal devices, obtaining an estimated printing time of each file to be printed and a printing deadline of each file to be printed;
[0033] The printing order is determined according to the estimated printing time of each file to be printed and the printing deadline of each file to be printed.
[0034] In a second aspect, an embodiment of the present application further provides a printer Bluetooth secure network configuration device, which is applied to a printer, and the device includes:
[0035] A signal receiving unit, configured to obtain an IP address of a terminal device when receiving a network configuration instruction from the terminal device;
[0036] A judgment unit, determining whether the terminal device is a network-connected device according to the IP address;
[0037] A signal processing unit, used for generating a random code for printing at this time when the terminal device is a network-connected device, and sending the random code to the terminal device, so that the terminal device sends a file to be printed carrying the random code;
[0038] The signal processing unit is further used to obtain positioning data of the terminal device when the terminal device is an unconnected device, and obtain distance information from the terminal device based on the positioning data;
[0039] The signal processing unit is also used to send a matching code to the terminal device when the distance information is less than a preset value, and to implement network configuration with the terminal device upon receiving the matching code carrying the IP address fed back by the terminal device.
[0040] In a third aspect, the present application also provides an electronic printer, including:
[0041] A memory for storing one or more programs;
[0042] processor;
[0043] When the one or more programs are executed by the processor, the above-mentioned printer Bluetooth secure network configuration method is implemented.
[0044] Compared with the prior art, this application has the following effects:
[0045] The present application provides a printer Bluetooth secure network configuration method, device, and printer, which are applied to the printer. When receiving a network configuration instruction from a terminal device, the IP address of the terminal device is obtained, and whether the terminal device is a network-configured device is determined based on the IP address. If yes, a random code for printing is generated, and the random code is sent to the terminal device, so that the terminal device sends a file to be printed carrying the random code; if not, the positioning data of the terminal device is obtained, and the distance information from the terminal device is obtained based on the positioning data; when the distance information is less than a preset value, a matching code is sent to the terminal device, and when the matching code with the IP address fed back by the terminal device is received, the network configuration is achieved with the terminal device. Since different strategies are implemented for network-configured devices and unconfigured devices during network configuration, and network configuration is performed based on random codes or distances each time a network is configured, the network configuration security is higher.
[0046] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A schematic diagram of a module of an electronic device provided in an embodiment of the present application.
[0049] Figure 2 An exemplary flow chart of a printer Bluetooth secure networking method provided in an embodiment of the present application.
[0050] Figure 3 A schematic diagram of the modules of the printer Bluetooth secure network configuration device provided in the embodiment of the present application. In the figure: 100 - electronic device; 101 - processor; 102 - memory; 103 - communication interface; 200 - printer Bluetooth secure network configuration device; 210 - signal receiving unit; 220 - judgment unit; 230 - signal processing unit. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0052] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0053] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0054] It should be noted that, in this document, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0055] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0056] As described in the background technology, the existing technology has the problem of low security when performing Bluetooth network configuration. In view of this, in order to solve this technical problem, this application provides a printer Bluetooth secure network configuration method, which improves network configuration security by executing different network configuration strategies for configured devices and unconfigured devices.
[0057] It should be noted that the printer Bluetooth secure network configuration method provided in this application can be applied to printers. Figure 1 A schematic structural block diagram of a printer 100 provided in an embodiment of the present application is shown. Figure 1 As shown, the printer 100 includes a memory 102, a processor 101 and a communication interface 103, and the memory 102, the processor 101 and the communication interface 103 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0058] The memory 102 can be used to store software programs and modules, such as program instructions or modules corresponding to the printer Bluetooth secure network configuration device provided in the embodiment of the present application. The processor 101 executes various functional applications and data processing by executing the software programs and modules stored in the memory 102, thereby executing the steps of the printer Bluetooth secure network configuration method provided in the embodiment of the present application. The communication interface 103 can be used to communicate signaling or data with other node devices.
[0059] Among them, the memory 102 can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable programmable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0060] The processor 101 may be an integrated circuit chip with signal processing capability. The processor 101 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0061] Understandably, Figure 1 The structure shown is for illustration only. The printer 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0062] The printer 100 is used as an exemplary execution entity to exemplarily illustrate the printer Bluetooth secure network configuration method provided in the embodiment of the present application.
[0063] As an implementation, see Figure 1 The printer Bluetooth secure network configuration method includes:
[0064] S102, when receiving a network configuration instruction from a terminal device, obtaining an IP address of the terminal device;
[0065] S104, determine whether the terminal device is a network-connected device based on the IP address; if yes, execute S106, if not, execute S108.
[0066] S106, generating a random code for printing at the time, and sending the random code to the terminal device, so that the terminal device sends the file to be printed carrying the random code;
[0067] S108, obtaining positioning data of the terminal device, and obtaining distance information from the terminal device based on the positioning data;
[0068] S110, when the distance information is less than a preset value, sending a matching code to the terminal device, and upon receiving the matching code carrying the IP address fed back by the terminal device, implementing network configuration with the terminal device.
[0069] The terminal device described in this application includes but is not limited to smart devices such as mobile phones and computers, which can be connected to the printer through Bluetooth. When network connection is required, the terminal device first sends a network connection instruction, and after receiving the network connection instruction, the printer can parse the IP address of the terminal device and the network connection request from the network connection instruction.
[0070] After obtaining the IP address and network configuration request of the terminal device, the printer can determine whether the terminal device is a configured device or an unconfigured device. A configured device means that the network configuration process has been performed between the terminal device and the printer before this network configuration, and an unconfigured device means that this is the first network configuration between the terminal device and the printer.
[0071] When it is an unconfigured device, the entire configuration process needs to be executed. First, the printer sends a positioning request to the terminal device, and then the terminal device feeds back the positioning data, so that the printer can obtain the distance between the two. Whether it is an enterprise-level printer or a home-level printer, when executing Bluetooth configuration, the distance between the terminal device and the printer is relatively close. When a hacker disguises Bluetooth configuration through the network, the distance between the terminal used by the hacker and the printer is far. Therefore, only when the distance between the two is less than the preset value, for example, less than 10m, the printer will send a matching code to the terminal device. After receiving the matching code, the terminal device feeds back a matching code carrying the IP address to the printer, and the network is configured with the terminal device. Of course, after the configuration is completed, the printer will also store the IP address.
[0072] If it is a network-configured device, there is no need to perform the network configuration process again. Instead, the printer generates a random code for printing and sends the random code to the terminal device. When printing, the terminal device sends the random code and the file to be printed. After receiving the random code, the printer prints the file to be printed.
[0073] This application implements different strategies for unconfigured devices and configured devices, thereby achieving the effect of improving the security of network configuration.
[0074] In another scenario, during the network configuration process, it may not be a hacker attack, but rather adjacent users implementing Bluetooth network configuration. For example, for enterprise-level printers, Enterprise A and Enterprise B are located adjacent to each other, such as left and right or top and bottom in space. Then, it may be possible that employees of Enterprise B can easily use the terminal to implement Bluetooth network configuration with the printer of Enterprise A, resulting in the inability to ensure the security of network configuration.
[0075] Therefore, whether it is an unconfigured device or a configured device, when a file needs to be printed, the printer will also send a code to be parsed to the terminal device. The same decoding rules are stored between the printer and the terminal device, so that the terminal device decodes the code to be parsed and sends the parsing code to the printer. If the parsing code is the same as the parsing code of the printer, printing can be performed. If they are different, the code to be parsed is resent. If the parsing is successful for multiple times, or the parsing code sent by the terminal device is not received, the direct network configuration with the terminal device is released to ensure that the printer will not be interfered with.
[0076] Among them, the decoding rules can be implemented according to the attributes of the terminal device. For example, a set of decoding rules can be executed for each enterprise. On this basis, the terminal device can determine the user's enterprise by binding through the OA system and DingTalk system, and then determine the decoding rules based on the enterprise to achieve decoding, ensuring that for enterprise-level printers, only employees of the enterprise can realize network configuration with the device.
[0077] As an implementation method, the steps of obtaining positioning data of a terminal device and obtaining distance information from the terminal device based on the positioning data include:
[0078] Send a test command to the terminal device and obtain a response command fed back by the terminal device;
[0079] The distance information to the terminal device is determined based on the time difference between the test command and the response command.
[0080] In the present application, the distance between the terminal device and the printer can be determined by the time difference between the test command and the response command. This method can determine the precise distance between the terminal device and the printer with higher measurement accuracy, providing a basis for subsequent network configuration according to different distances.
[0081] In one implementation, when the distance information is less than a preset value, a matching code is sent to the terminal device, and when the matching code carrying the IP address fed back by the terminal device is received, the steps of implementing network configuration with the terminal device include:
[0082] When the distance information is less than the first preset value, a matching code is sent to the terminal device, and when a matching code carrying an IP address is received from the terminal device, a confirmation page is displayed; when key information in response to the confirmation interface is received, network configuration is implemented with the terminal device;
[0083] When the distance information is less than the second preset value and greater than the first preset value, a matching code is sent to the terminal device, and when a matching code carrying an IP address fed back by the terminal device is received and the IP address matches the preset IP address, network configuration is implemented with the terminal device.
[0084] The first preset value is smaller than the second preset value. For example, the first preset value may be set to 2 m, and the second preset value may be set to 50 m.
[0085] When the distance information is less than the first preset value, the two are close to each other. At this time, after the terminal device feeds back the matching code, a confirmation page can be displayed on the printer. Since the terminal device is close to the printer at this time, it means that the employee is near the printer at this time, and the network configuration can be achieved by the employee clicking the confirmation page to complete the authentication. This method ensures that the operation is completed by a person near the printer, and the operation can be performed directly on the printer. For enterprise-level printers, it indicates that the person is an employee of the enterprise, which improves the security of network configuration.
[0086] In actual applications, when the employee's workstation is relatively far from the printer, it is obviously inconvenient if the employee needs to go to the printer for confirmation every time printing. Therefore, when the distance information is less than the second preset value and greater than the first preset value, a matching code is sent to the terminal device, and when the matching code with the IP address fed back by the terminal device is received and the IP address matches the preset IP address, network configuration is achieved with the terminal device.
[0087] For example, the IP addresses of electronic terminals used by all employees can be stored in the printer and then matched. Alternatively, the company IP can be stored. When the IP address of the terminal device belongs to the company IP, it is determined that the network can be configured with the printing device.
[0088] As an implementation method, the steps of generating a random code for printing at the time and sending the random code to a terminal device include:
[0089] Generate a printing instruction, wherein the terminal of the printing instruction is a random code.
[0090] Furthermore, after the Bluetooth network configuration is implemented, when printing files, if multiple files need to be printed at the same time, the printing order needs to be sorted.
[0091] In one implementation, after the step of sending the random code to the terminal device, the method further includes:
[0092] When files to be printed are received from at least two terminal devices, the number of pages of each file to be printed and the corresponding IP address are obtained.
[0093] The printing order is determined according to the priority of the IP address of the file to be printed and the difference in the number of pages of the file to be printed.
[0094] In the prior art, printing is generally performed in chronological order. For example, when terminal device A and terminal device B need to print files at the same time, if terminal device A sends the files to be printed to the printer first, the printer will first print the files of terminal device A and then print the files of terminal device B. However, this method may not meet the usage requirements in actual applications. For example, when terminal device A prints more files and terminal device B prints fewer files, the files of terminal device B can be printed first.
[0095] On this basis, the printing order can be determined based on the priority of the IP address of the file to be printed and the difference in the number of pages of the file to be printed. Among them, a specific department or a specific person can be determined based on the IP address, and then the priority of their IP address can be determined. For example, the person corresponding to a certain IP address is an emergency process personnel, and the files he needs to print are relatively urgent, so his priority is relatively high; or, the person corresponding to a certain IP address is a manager, and the importance of his files is relatively high, so his priority is also relatively high.
[0096] Therefore, specifically, when the priority of any file to be printed is higher than that of other files, and the number of printed pages is less than the preset value of other files, the file to be printed is ranked first. For example, when there are files to be printed a and b to be printed, the number of printed pages of a is 10 pages less than that of b, and the priority of the IP address corresponding to a is higher, then even if file to be printed b is sent to the printer first, the printer will print file to be printed a first.
[0097] In one implementation, the method further includes:
[0098] Get the priority of the file to be printed;
[0099] The step of determining the printing order according to the priority of the IP address of the file to be printed and the difference between the number of pages of the file to be printed includes:
[0100] The printing order is determined based on the priority of the IP address, the priority of the file to be printed, and the number of pages of the file to be printed.
[0101] Among them, the priority of printing files can be divided into multiple levels, such as normal, urgent, and expedited. When the user prints a file, the priority of the file can also be selected. For example, if the file can be printed before noon, its priority can be selected as normal; or, when the currently printed file is also urgently needed, its priority can be selected as expedited, which is not limited here. Then, the printer will determine the printing order based on the priority of the IP address, the priority of the file to be printed, and the number of pages of the file to be printed. It should be noted that this application will only sort the files to be printed, and for the files being printed, just continue printing until the printing is completed.
[0102] Specifically, when the priorities of the files to be printed are equal, the printing order is determined according to the priorities of the IP addresses and the difference in the number of pages of the files to be printed.
[0103] For example, when the priority of the files to be printed a and b are both urgent, it is necessary to determine the difference between the priority of the IP address and the number of pages of the files to be printed. If one of the target files has a higher priority than the other files, and the number of pages is much lower than the other files, the target file will be printed first. If the two files have the same level or the number of pages is similar, they will be printed in chronological order.
[0104] When the priorities of the files to be printed are not equal, the printing order is determined according to the priorities of the IP addresses and the number of pages of the files to be printed.
[0105] When the priorities of the files to be printed are not equal, if the priorities differ by two levels or more, the file with the higher priority will be printed first; if the priorities differ by one level, the file with fewer pages will be printed first. For example, the priority of file a to be printed is lower than that of file b to be printed, but file a to be printed only prints 1 page, while file b to be printed needs to print 20 pages, so file a will be printed first. Of course, in actual applications, more complex and accurate sorting can be performed in combination with the priority of the IP address, the priority of the file to be printed, and the number of file pages, which is not limited here.
[0106] As an implementation manner, after the step of sending the random code to the terminal device, the method further includes:
[0107] When receiving files to be printed from at least two terminal devices, obtaining an estimated printing time of each file to be printed and a printing deadline of each file to be printed;
[0108] The printing order is determined according to the estimated printing time of each file to be printed and the printing deadline of each file to be printed.
[0109] In this embodiment, the printing order can also be determined based on the priority of the IP address, the priority of the file to be printed, and the number of file pages, combined with the estimated printing time of each file to be printed and the printing deadline of each file to be printed. The printing deadline refers to the time point at which the file needs to be printed. For example, for a file to be printed, although its level is relatively low, its deadline is one minute later, so the file needs to be printed first.
[0110] Based on the above implementation, please refer to Figure 3 The embodiment of the present application also provides a printer Bluetooth secure network configuration device 200, which is applied to a printer, and the device includes:
[0111] The signal receiving unit 210 is used to obtain the IP address of the terminal device when receiving a network configuration instruction from the terminal device.
[0112] The judgment unit 220 determines whether the terminal device is a network-connected device according to the IP address.
[0113] The signal processing unit 230 is used to generate a random code for printing at this time when the terminal device is a network-connected device, and send the random code to the terminal device, so that the terminal device sends a file to be printed carrying the random code;
[0114] The signal processing unit 230 is further used to obtain positioning data of the terminal device when the terminal device is an unconnected device, and obtain distance information from the terminal device based on the positioning data;
[0115] The signal processing unit 230 is further configured to send a matching code to the terminal device when the distance information is less than a preset value, and to implement network configuration with the terminal device upon receiving a matching code carrying an IP address fed back by the terminal device.
[0116] It can be understood that the above-mentioned printer Bluetooth secure network configuration method can be executed through the above-mentioned virtual unit.
[0117] In summary, the present application provides a printer Bluetooth secure network configuration method. When receiving a network configuration instruction from a terminal device, the IP address of the terminal device is obtained, and whether the terminal device is a network-configured device is determined based on the IP address. If yes, a random code for printing is generated, and the random code is sent to the terminal device, so that the terminal device sends a file to be printed carrying the random code; if not, the positioning data of the terminal device is obtained, and the distance information from the terminal device is obtained based on the positioning data; when the distance information is less than a preset value, a matching code is sent to the terminal device, and when the matching code carrying the IP address is received from the terminal device, the network configuration is achieved with the terminal device. Since different strategies are implemented for network-configured devices and unconfigured devices during network configuration, and network configuration is performed based on random codes or distances each time a network is configured, the network configuration security is higher.
[0118] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment or a part of a code, and the module, program segment or a part of a code includes one or more executable instructions for implementing a specified logical function.
[0119] It should also be noted that in some alternative implementations, the functions marked in the blocks may also occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved.
[0120] It should also be noted that each box in the block diagram and / or flowchart, and combinations of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0121] In addition, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0122] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk. Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, so the scope of protection of the present invention should be based on the scope defined by the claims.
Claims
1. A printer Bluetooth secure network configuration method, characterized in that: Applied to a printer, the method comprises: When receiving a network configuration instruction from a terminal device, obtaining the IP address of the terminal device; Determine whether the terminal device is a network-connected device according to the IP address; If yes, generate a random code for printing at that time, and send the random code to the terminal device, so that the terminal device sends the file to be printed carrying the random code; If not, obtain the positioning data of the terminal device, and obtain the distance information to the terminal device according to the positioning data; When the distance information is less than a preset value, a matching code is sent to the terminal device, and when a matching code carrying an IP address fed back by the terminal device is received, network configuration is achieved with the terminal device.
2. The printer Bluetooth secure network configuration method according to claim 1, characterized in that: The steps of obtaining the positioning data of the terminal device and obtaining the distance information to the terminal device according to the positioning data include: Sending a test instruction to the terminal device, and obtaining a response instruction fed back by the terminal device; The distance information to the terminal device is determined according to the time difference between the test instruction and the response instruction.
3. The printer Bluetooth secure network configuration method according to claim 1, characterized in that: When the distance information is less than a preset value, sending a matching code to the terminal device, and upon receiving the matching code carrying the IP address fed back by the terminal device, the steps of implementing network configuration with the terminal device include: When the distance information is less than a first preset value, a matching code is sent to the terminal device, and when a matching code carrying an IP address fed back by the terminal device is received, a confirmation page is displayed; when key information in response to the confirmation interface is received, network configuration is implemented with the terminal device; When the distance information is less than the second preset value and greater than the first preset value, a matching code is sent to the terminal device, and when a matching code carrying an IP address fed back by the terminal device is received and the IP address matches the preset IP address, network configuration is implemented with the terminal device.
4. The printer Bluetooth secure network configuration method according to claim 1, characterized in that: The step of generating a random code for printing at the time and sending the random code to the terminal device comprises: A printing instruction is generated, wherein the header of the printing instruction is a random code.
5. The printer Bluetooth secure network configuration method according to claim 1, characterized in that: After the step of sending the random code to the terminal device, the method further includes: When receiving files to be printed from at least two terminal devices, obtaining the number of pages of each file to be printed and the corresponding IP address; The printing order is determined according to the priority of the IP address of the file to be printed and the difference between the number of pages of the file to be printed.
6. The printer Bluetooth secure network configuration method according to claim 5, characterized in that: The method further comprises: Get the priority of the file to be printed; The step of determining the printing order according to the difference between the priority of the IP address of the file to be printed and the number of pages of the file to be printed comprises: The printing order is determined according to the priority of the IP address, the priority of the file to be printed, and the number of pages of the file to be printed.
7. The printer Bluetooth secure network configuration method according to claim 5, characterized in that: The step of determining the printing order according to the priority of the IP address, the priority of the file to be printed, and the number of pages of the file to be printed comprises: When the priorities of the files to be printed are equal, the printing order is determined according to the priorities of the IP addresses and the difference in the number of pages of the files to be printed; When the priorities of the files to be printed are not equal, the printing order is determined according to the priorities of the IP addresses and the number of pages of the files to be printed.
8. The printer Bluetooth secure network configuration method according to claim 1, characterized in that: After the step of sending the random code to the terminal device, the method further includes: When receiving files to be printed from at least two terminal devices, obtaining an estimated printing time of each file to be printed and a printing deadline of each file to be printed; The printing order is determined according to the estimated printing time of each file to be printed and the printing deadline of each file to be printed.
9. A printer Bluetooth secure network configuration device, characterized in that: Applied to a printer, the device comprises: A signal receiving unit, configured to obtain an IP address of a terminal device when receiving a network configuration instruction from the terminal device; A judgment unit, determining whether the terminal device is a network-connected device according to the IP address; A signal processing unit, used for generating a random code for printing at this time when the terminal device is a network-connected device, and sending the random code to the terminal device, so that the terminal device sends a file to be printed carrying the random code; The signal processing unit is further used to obtain positioning data of the terminal device when the terminal device is an unconnected device, and obtain distance information from the terminal device based on the positioning data; The signal processing unit is also used to send a matching code to the terminal device when the distance information is less than a preset value, and to implement network configuration with the terminal device upon receiving the matching code carrying the IP address fed back by the terminal device.
10. An electronic printer, characterized in that: include: A memory for storing one or more programs; processor; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 8 is implemented.
