CN112449003A - Printing equipment network communication connection method and device and electronic equipment - Google Patents

Printing equipment network communication connection method and device and electronic equipment Download PDF

Info

Publication number
CN112449003A
CN112449003A CN202011127869.4A CN202011127869A CN112449003A CN 112449003 A CN112449003 A CN 112449003A CN 202011127869 A CN202011127869 A CN 202011127869A CN 112449003 A CN112449003 A CN 112449003A
Authority
CN
China
Prior art keywords
network address
network
printing
data output
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011127869.4A
Other languages
Chinese (zh)
Inventor
陈统伟
陈丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202011127869.4A priority Critical patent/CN112449003A/en
Publication of CN112449003A publication Critical patent/CN112449003A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application discloses a network communication connection method of printing equipment, belongs to the technical field of network communication, and is beneficial to improving the efficiency of restoring network communication. The method comprises the following steps: the method comprises the steps of obtaining an original network address of a printing device and a first network address of a printing data output device which are located in the same local area network, adding a second network address to the printing data output device when the original network address and the first network address are in different network segments, and controlling the printing data output device to be in network communication connection with the printing device through the second network address; otherwise, controlling the printing data output equipment to carry out network communication connection with the printing equipment through the first network address. According to the network communication connection method for the printing equipment, the network communication with the printing equipment is recovered by controlling the printing data output equipment to establish the network connection based on the original IP address of the printing equipment, and the efficiency of recovering the network communication is improved.

Description

Printing equipment network communication connection method and device and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of network communication, in particular to a printing equipment network communication connection method, a printing equipment network communication connection device, electronic equipment and a computer readable storage medium.
Background
In the catering industry, most of dish order printing devices used in kitchens are Internet access printers, and in order to facilitate connection with printing data output devices (such as cash register terminals) in front of catering merchants, the Internet access printers are usually set to be fixed IP addresses (Internet Protocol addresses). Because the net mouth printer of catering kitchen belongs to professional printing equipment, installation and configuration are comparatively complicated, and the net mouth printer is usually configured and connected by printer installer during installation. In the using process of the printer, due to the change of the network environment in the merchant store, the network segment of the printing data output equipment is changed, so that the network port printer and the printing data output equipment (such as a cash register terminal) are not in the same network segment, and the printing data output equipment cannot be normally connected with the network port printer. In the prior art, a method commonly adopted to solve the problem that a portal printer and a print data output device cannot be normally connected when not in the same network segment is as follows: and directly connecting the internet port printer and the printing data output equipment through a network cable by using an IP address modification tool provided by an internet port printer manufacturer, modifying the IP address of the internet port printer into the same network segment with the IP address of the printing data output equipment through a P address modification tool, and then finishing the connection of the printing data output equipment and the internet port printer.
Therefore, in order to enable a network port printer and a printing data output device which are not in the same network segment to be in network connection normally in the prior art, the network port printer needs to be directly connected to the printing data output device through a network cable to be modified, the network port printer is generally arranged in a kitchen, the printing data output device is generally arranged in a foreground, and the operation of modifying the IP address of the network port printer is very inconvenient and low in efficiency.
Disclosure of Invention
The embodiment of the application provides a network communication connection method for printing equipment, which is beneficial to improving the efficiency of recovering normal network communication.
In order to solve the above problem, in a first aspect, an embodiment of the present application provides a printing device network communication connection method, including:
the method comprises the steps of obtaining an original network address of a printing device and obtaining a first network address of a printing data output device, wherein the printing device and the printing data output device are located in the same local area network;
determining whether the original network address and the first network address are in different network segments;
responding to the situation that the original network address and the first network address are in different network segments, adding a second network address for the printing data output equipment, and controlling the printing data output equipment to be in network communication connection with the printing equipment through the second network address so as to set a network address for the printing equipment and/or be in network communication connection with the printing equipment; alternatively, the first and second electrodes may be,
and in response to the original network address and the first network address being in the same network segment, controlling the printing data output equipment to perform network communication connection with the printing equipment through the first network address so as to set a network address for the printing equipment and/or perform network communication connection with the printing equipment.
In a second aspect, an embodiment of the present application provides a printing device network communication connection apparatus, including:
the system comprises a network address acquisition module, a data transmission module and a data transmission module, wherein the network address acquisition module is used for acquiring an original network address of a printing device and acquiring a first network address of a printing data output device, and the printing device and the printing data output device are positioned in the same local area network;
a network segment determining module, configured to determine whether the original network address and the first network address are in different network segments;
the first network connection module is used for responding that the original network address and the first network address are in different network segments, adding a second network address for the printing data output equipment, and controlling the printing data output equipment to be in network communication connection with the printing equipment through the second network address so as to set a network address for the printing equipment and/or be in network communication connection with the printing equipment; alternatively, the first and second electrodes may be,
and the second network connection module is used for controlling the printing data output equipment to perform network communication connection with the printing equipment through the first network address in response to the original network address and the first network address being in the same network segment, so as to set a network address for the printing equipment and/or perform network communication connection with the printing equipment.
In a third aspect, an embodiment of the present application further discloses an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the network communication connection method of the printing device according to the embodiment of the present application is implemented.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, provides the steps of the network communication connection method for a printing device disclosed in the present application.
According to the network communication connection method of the printing equipment, the original network address of the printing equipment is obtained, and the first network address of the printing data output equipment is obtained, wherein the printing equipment and the printing data output equipment are located in the same local area network; determining whether the original network address and the first network address are in different network segments; responding to the situation that the original network address and the first network address are in different network segments, adding a second network address for the printing data output equipment, and controlling the printing data output equipment to be in network communication connection with the printing equipment through the second network address so as to set a network address for the printing equipment and/or be in network communication connection with the printing equipment; or, in response to that the original network address and the first network address are in the same network segment, the printing data output device is controlled to perform network communication connection with the printing device through the first network address so as to set a network address for the printing device and/or perform network communication connection with the printing device, which is beneficial to improving the efficiency of recovering normal network communication.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart of a network communication connection method of a printing device according to a first embodiment of the present application;
FIG. 2 is a schematic diagram of a network address setting interface of a printing device according to an embodiment of the present application;
FIG. 3 is another flowchart of a network communication connection method for a printing device according to a first embodiment of the present application;
FIG. 4 is a schematic diagram of a network communication connection device of a second embodiment of the present application;
FIG. 5 is a second schematic diagram of a network communication connection device of a printing apparatus according to a second embodiment of the present application;
FIG. 6 schematically shows a block diagram of an electronic device for performing a method according to the present application; and
fig. 7 schematically shows a storage unit for holding or carrying program code implementing a method according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
As shown in fig. 1, a method for connecting network communication of a printing device disclosed in an embodiment of the present application includes: step 110 to step 140.
In step 110, an original network address of the printing device is obtained, and a first network address of the printing data output device is obtained.
The network address described in the embodiments of the present application refers to an IP address. Wherein the printing device and the print data output device are located in the same local area network. For example, the printing apparatus and the print data output apparatus are physically connected to the same router or ethernet switch.
The printing device in the embodiment of the present application may be a network printer set in a kitchen of a restaurant, or other electronic devices with a printing function. The print data output device described in the embodiment of the present application may be a computing processing device with a built-in print driver, such as a cash register and an ordering terminal that are provided at a restaurant front desk.
In an application scenario of the application, taking a printing device as an internet access printer arranged at a kitchen of a restaurant and a printing data output device as a cash register arranged at a front desk of the restaurant as an example, the cash register sends ordering data or side dish data such as menus to the internet access printer arranged at the kitchen through a network, and the internet access printer prints out the menus or the side dish data for the kitchen to use for side dish and dish serving. In this application scenario, when the portal printer is installed, the portal printer and the cash register are connected in the same lan (for example, connected to the same lan switch), and the IP address of the portal printer and the IP address of the cash register are located in the same network segment, so that the portal printer and the cash register can directly communicate through the configured IP addresses to complete transmission of print data.
When the network environment of a restaurant changes, if the IP address of the cash register changes, the cash register and the internet access printer may not be able to establish a network connection normally, so that the cash register may not send print data to the internet access printer. For example, the original network address of the internet-access printer is "192.168.1.3", the original network address of the cash register is "192.168.1.2", and then the IP address of the cash register is modified to "192.168.2.2", and since the IP address of the internet-access printer and the modified IP address of the cash register are located in different network segments, the cash register cannot be connected to the internet-access printer after the IP address of the cash register is modified. At this time, the IP address of the portal printer needs to be reset.
In some embodiments of the present application, the IP address of the portal printer may be reconfigured by a printer driver pre-installed in the cash register, such as a print assistant of the operating system of the cash register.
It is known that when a printer is connected to a network, it is first required to configure the printer with an IP address, and then the printer may be accessed by other devices within the local area network via the network. In the prior art, the method for configuring the IP address for the printer includes: operating the printer and setting an IP address through a setting interface or a key on the printer, wherein the printer is required to be provided with the operating interface or the key; alternatively, the IP address of the printer is set by setting software provided by the printer manufacturer, and in this case, the computing device running the setting software needs to be directly connected to the printer via a network cable. The network port printer of the kitchen of the restaurant is not provided with an interface generally, and a professional equipment maintenance worker is required to operate the network port printer in a mode of directly connecting the network cable, so that the operation is very inconvenient, and the efficiency of recovering the network communication between the printing data output equipment and the printing equipment is reduced.
According to the network communication connection method of the printing equipment, the printing equipment IP address setting interface is displayed on the printing data output equipment, and the original network address (namely the IP address of the printing equipment in the network at present) and the modified IP address of the printing equipment are obtained through the IP address setting interface. In some embodiments of the present application, for a printing device without an operation interface, information such as an original network address of the printing device may be printed out in a printing device page manner, and the original network address of the printing device is input to a 210 field in an IP address setting interface as shown in fig. 2. When the print data output device detects a confirmation operation to modify the print device through the IP address setting interface (e.g., the user triggers the button 230 in fig. 2), the print data output device obtains the original network address of the print device by reading data input by a corresponding field (e.g., the field 210) of the IP address setting interface.
In some embodiments of the present application, as shown in fig. 3, when obtaining the original network address of the printing device, the method further includes:
step 150, acquiring the modified network address of the printing device.
And displaying a printing equipment IP address setting interface on the printing data output equipment, wherein the interface is shown in FIG. 2, and acquiring the modified IP address of the printing equipment through the IP address setting interface. The user may enter a modified IP address for the printing device. In some embodiments of the present application, when the user does not know how to print the modified IP address of the device, the modified IP address field (e.g., 220 field in fig. 2) may also be left empty. When the print data output device detects a confirmation operation to modify the print device through the IP address setting interface (e.g., the user triggers the button 230 in fig. 2), the print data output device obtains the modified IP address of the print device by reading data input by a corresponding field (e.g., a 220 field) of the IP address setting interface.
In some embodiments of the present application, the IP address of the local machine (i.e., the cash register), i.e., the first network address of the print data output device, may be acquired through an interface provided by an operating system of the cash register.
Step 120, determining whether the original network address and the first network address are in different network segments.
After the original network address of the printing device (such as a network printer) and the first network address of the printing data output device (such as a cash register) are obtained, whether the original network address and the first network address are in the same network segment is further judged through the matching relation of IP addresses, and what technical means is adopted to communicate with the printing device is determined according to the judgment result. For example, if the original network address and the first network address are in different network segments, step 130 is executed, otherwise, step 140 is executed.
In the specific implementation of the present application, it may be determined whether the original network address and the first network address are in different network segments by using a method in the prior art, which is not described herein again.
Step 130, in response to that the original network address and the first network address are in different network segments, adding a second network address to the printing data output device, and controlling the printing data output device to perform network communication connection with the printing device through the second network address, so as to set an IP address for the printing device and/or perform network communication connection with the printing device.
And the second network address and the first network address are positioned in the same network segment.
In the prior art, when an original network address of the printing device (such as a network printer) and the first network address (i.e. the current IP address) of the print data output device (such as a cash register) are not in the same network segment, the printing device and the print data output device cannot perform network communication.
In some embodiments of the application, the adding, in response to that the original network address and the first network address are in different network segments, a second network address to the print data output apparatus, and controlling the print data output apparatus to perform network communication connection with the print apparatus through the second network address, so as to perform setting of a network address to the print apparatus and/or network communication connection with the print apparatus, includes: responding to the original network address and the first network address being in different network segments, and adding a second network address which is in the same network segment with the original network address to the printing data output equipment; in response to the fact that the modified network address is invalid, controlling the printing data output equipment to be in network communication connection with the printing equipment through the second network address and the original network address; or, in response to the modified network address being a valid value, controlling the print data output device to perform network communication with the printing device through the second network address, and modifying the network address of the printing device to the modified network address; and then controlling the printing data output equipment to carry out network communication connection with the printing equipment through the first network address and the modified network address.
Firstly, in order to establish a network connection between the print data output apparatus and the printing apparatus, in the embodiment of the present application, an IP address, that is, a second network address is added to the print data output apparatus, and the second network address and the first network address are located in the same network segment. For example, when the original network address of the printing apparatus is "192.168.1.3", and the first network address of the printing data output apparatus is "192.168.2.2", a second network address in the same network segment as the original network address may be added to the printing data output apparatus, for example, "192.168.1.1", so that the second network address of the printing data output apparatus (i.e., "192.168.1.1" as mentioned above) and the original network address of the printing apparatus (i.e., "192.168.1.3" as mentioned above) are in the same network segment, and the printing data output apparatus may be network-connected to the printing apparatus through the second network address.
In some embodiments of the present application, said adding a second network address in the same network segment as the original network address to the print data output device includes: and acquiring a second network address (such as 192.168.1.1) which is in the same network segment with the original network address for the printing data output equipment by calling an instruction of statically allocating the network address in an operating system of the printing data output equipment. For example, an IP address in the same network segment as the original network address of the portal printer is allocated to the cash register through a Windows static IP address allocation instruction of the cash register.
The printing data output device and the printing device can carry out network communication by setting an IP address which is in the same network segment with the original network address of the printing device for the printing data output device. Next, the IP address of the printing apparatus may be further set according to the printing apparatus IP address setting information input by the user to perform subsequent print data transmission.
In specific implementation of the application, aiming at different setting conditions of the modified IP address of the printing equipment, the printing equipment network communication connection method executes different program flows so as to realize normal network communication between the printing data output equipment and the printing equipment.
In some embodiments of the present application, it is first necessary to determine whether the modified IP address of the printing device is a valid IP address, and then, according to a determination result of whether the modified IP address of the printing device is valid, execute a corresponding computer code through the print data output device to implement normal network communication between the print data output device and the printing device by using a corresponding network communication connection.
Specific embodiments of the network communication connection method of the printing apparatus disclosed in the present application are described below with respect to different setting situations of IP addresses, respectively.
In the first case, the modified IP address is an invalid value.
For example, when the user does not input any IP address in the modified IP address field of the IP address setting interface of the printing apparatus, that is, the obtained modified IP address is empty (e.g., the modified IP address is "NULL, NULL"), the user may be defaulted to desire to communicate through the original network address of the printing apparatus. That is, the print data output apparatus makes a network communication connection with the printing apparatus via the second network address (as aforementioned "192.168.1.1") and the original network address (as aforementioned "192.168.1.3") to transmit print data.
Up to this point, the print data output apparatus can perform normal network communication with the printing apparatus.
In the second case, the modified IP address is a valid value.
For example, when the user inputs an IP address "192.168.2.3" in the modified IP address field of the IP address setting interface of the printing apparatus, that is, the obtained modified IP address is a valid IP address (for example, the modified IP address is "192.168.2.3"), the user may consider that the user desires to modify the IP address of the printing apparatus to "192.168.2.3", and access the network through the modified IP address to receive the print data. The print data output apparatus first makes a network communication connection with the printing apparatus via the second network address (as aforementioned "192.168.1.1") and the original network address (as aforementioned "192.168.1.3"), and sends an instruction to set an IP address to the printing apparatus, and sets the IP address of the printing apparatus to "192.168.2.3"; after the IP address setting of the printing apparatus is successful, the IP address of the printing apparatus is "192.168.2.3" within the same network segment as the first network address of the print data output apparatus (e.g., "192.168.2.2" as described above), and thus, the print data output apparatus can then make a network connection with the printing apparatus through the first network address (e.g., "192.168.2.2" as described above) to transmit print data.
In some embodiments of the application, the modifying the network address of the printing device to the modified network address includes: acquiring model information of the printing equipment; traversing a preset corresponding relation between the printing equipment model and a network address setting instruction, and acquiring the network address setting instruction corresponding to the model information; and modifying the network address of the printing equipment into the modified network address by calling the network address setting instruction corresponding to the model information. For example, the print data output device performs network connection with the printing device through a second network address, acquires model information of the printing device, and then determines a network address setting instruction corresponding to the acquired model information according to a correspondence between a printing device model preset in a traversal program code and a network address setting instruction; and then, the printing data output equipment sends a network address setting instruction to the printing equipment through the network connection between the second network address and the original network address, wherein the network address setting instruction carries the modified network address. And the printing equipment modifies the local network address into the modified network address according to the received network address setting instruction.
In other embodiments of the present application, the print data output device may further automatically try IP address setting instructions of printing devices of different brands until the IP address modification of the printing device is successful or all the preset IP address modification instructions of the printing device are tried.
At this point, the IP address modification of the printing apparatus is completed, and the print data output apparatus can perform normal network communication with the printing apparatus.
And 140, in response to that the original network address and the first network address are in the same network segment, controlling the printing data output device to perform network communication connection with the printing device through the first network address so as to set a network address for the printing device and/or perform network communication connection with the printing device.
In some embodiments of the application, the controlling, in response to that the original network address and the first network address are in the same network segment, the print data output device to perform network communication connection with the printing device through the first network address to perform network address setting and/or network communication connection with the printing device includes: responding to the invalid value of the modified network address, and controlling the printing data output equipment to be in network communication connection with the printing equipment through the first network address and the original network address; or, in response to the modified network address being a valid value, controlling the print data output device to perform network communication with the printing device through the first network address, and modifying the network address of the printing device to the modified network address; and then controlling the printing data output equipment to carry out network communication connection with the printing equipment through the first network address and the modified network address.
The print data output apparatus can perform network communication with the printing apparatus when the original network address of the printing apparatus and the first network address (i.e., the current IP address) of the print data output apparatus are in the same network segment, for example, the first network address of the print data output apparatus is "192.168.2.2" and the original network address of the printing apparatus is "192.168.2.100". If the IP address of the printing equipment is reset, the printing data output equipment adopts corresponding technical means to realize normal network communication with the printing equipment according to the IP address setting condition of the printing equipment so as to execute printing data transmission.
Specific embodiments of the network communication connection method of the printing apparatus disclosed in the present application are described below with respect to different setting situations of IP addresses, respectively.
In the first case, the modified IP address is an invalid value.
For example, when the user does not input any IP address in the modified IP address field of the IP address setting interface of the printing apparatus, that is, the obtained modified IP address is empty (e.g., the modified IP address is "NULL, NULL"), the user may be defaulted to desire to communicate through the original network address of the printing apparatus. That is, the print data output apparatus makes a network communication connection with the printing apparatus through the first network address (as aforementioned "192.168.2.2") and the original network address (as aforementioned "192.168.2.100") to transmit print data.
To this end, the print data output apparatus may perform normal network communication with the printing apparatus to transmit print data.
In the second case, the modified IP address is a valid value.
For example, when the user inputs an IP address "192.168.2.3" in the modified IP address field of the IP address setting interface of the printing apparatus, that is, the obtained modified IP address is a valid IP address (for example, the modified IP address is "192.168.2.3"), the user may consider that the user desires to modify the IP address of the printing apparatus to "192.168.2.3", and access the network through the modified IP address to receive the print data. The print data output apparatus first makes a network communication connection with the printing apparatus via the first network address (as aforementioned "192.168.2.2") and the original network address (as aforementioned "192.168.2.100"), sends an instruction to set an IP address to the printing apparatus, sets the IP address of the printing apparatus to "192.168.2.3"; after the IP address setting of the printing apparatus is successful, the IP address of the printing apparatus is "192.168.2.3" within the same network segment as the first network address of the print data output apparatus (e.g., "192.168.2.2" as described above), and thus, the print data output apparatus can then make a network connection with the printing apparatus through the first network address (e.g., "192.168.2.2" as described above) to transmit print data.
In some embodiments of the present application, the specific implementation of modifying the IP address of the printing device to the modified IP address is as described above, and details are not repeated here.
At this point, the IP address modification of the printing apparatus is completed, and the print data output apparatus can perform normal network communication with the printing apparatus.
According to the network communication connection method of the printing equipment, the original network address of the printing equipment is obtained, and the first network address of the printing data output equipment is obtained, wherein the printing equipment and the printing data output equipment are located in the same local area network; determining whether the original network address and the first network address are in different network segments; responding to the situation that the original network address and the first network address are in different network segments, adding a second network address for the printing data output equipment, and controlling the printing data output equipment to be in network communication connection with the printing equipment through the second network address so as to set a network address for the printing equipment and/or be in network communication connection with the printing equipment; or, in response to that the original network address and the first network address are in the same network segment, the printing data output device is controlled to perform network communication connection with the printing device through the first network address so as to set a network address for the printing device and/or perform network communication connection with the printing device, which is beneficial to improving the efficiency of recovering normal network communication.
According to the network communication connection method for the printing equipment, under the condition that the network address of the printing equipment and the network address of the printing data output equipment are not in the same network segment, the printing equipment and the printing data output equipment do not need to be directly connected through a network cable, the network communication between the printing data output equipment and the printing equipment can be realized only by ensuring that the printing equipment and the printing data output equipment are in the same local area network (for example, the same router is connected), and the network address of the printing equipment can be modified. For part of printing equipment which can not modify the network address, the network communication between the printing data output equipment and the printing equipment can be realized by a technical means of increasing the network address of the printing data output equipment, the operation is simple, the network address before and after the modification of the printing equipment is filled in through a network address configuration interface, the efficiency of recovering the normal network communication and the efficiency of modifying the network address of the printing equipment are improved, and the normal network communication between the network port printing equipment and the printing data output equipment is ensured.
Furthermore, when the network address of the printing equipment is modified, even the original network address of the printing equipment is only needed to be input, the network communication between the printing data output equipment and the printing equipment can be realized, and a user does not need to have related professional ability, so that the operation is simple and efficient.
Example two
As shown in fig. 4, a network communication connection device for a printing apparatus according to an embodiment of the present application includes:
a network address obtaining module 410, configured to obtain an original network address of a printing device, and obtain a first network address of a print data output device, where the printing device and the print data output device are located in a same local area network;
a network segment determining module 420, configured to determine whether the original network address and the first network address are in different network segments;
the first network connection module 430 is configured to, in response to that the original network address and the first network address are in different network segments, add a second network address to the print data output device, and control the print data output device to perform network communication connection with the print device through the second network address, so as to perform network address setting on the print device and/or network communication connection with the print device; alternatively, the first and second electrodes may be,
and a second network connection module 440, configured to, in response to that the original network address and the first network address are in the same network segment, control the print data output device to perform network communication connection with the printing device through the first network address, so as to perform network address setting on the printing device and/or network communication connection with the printing device.
In some embodiments of the present application, the network address obtaining module 410 is further configured to obtain a modified network address of the printing device;
accordingly, as shown in fig. 5, the first network connection module 430 further includes:
the network address increasing submodule 4301 is configured to increase, in response to that the original network address and the first network address are in different network segments, a second network address in the same network segment as the original network address for the print data output apparatus;
the first communication submodule 4302 is configured to, in response to that the modified network address is an invalid value, control the print data output device to perform network communication connection with the printing device through the second network address and the original network address; and/or the presence of a gas in the gas,
the second communication submodule 4303 is configured to, in response to that the modified network address is an effective value, control the print data output device to perform network communication with the printing device through the second network address, and modify the network address of the printing device to the modified network address; and then controlling the printing data output equipment to carry out network communication connection with the printing equipment through the first network address and the modified network address.
In some embodiments of the present application, said adding a second network address in the same network segment as the original network address to the print data output device includes: and acquiring a second network address which is in the same network segment with the original network address for the printing data output equipment by calling an instruction of statically allocating the network address in an operating system of the printing data output equipment.
In some embodiments of the present application, as shown in fig. 5, the second network connection module 440 further includes:
a third communication sub-module 4401, configured to, in response to the modified network address being an invalid value, control the print data output device to perform network communication connection with the printing device through the first network address and the original network address; and/or the presence of a gas in the gas,
a fourth communication sub-module 4402, configured to, in response to the modified network address being a valid value, control the print data output device to perform network communication with the printing device through the first network address, and modify the network address of the printing device to the modified network address; and then controlling the printing data output equipment to carry out network communication connection with the printing equipment through the first network address and the modified network address.
In some embodiments of the application, the modifying the network address of the printing device to the modified network address includes:
acquiring model information of the printing equipment;
traversing a preset corresponding relation between the printing equipment model and a network address setting instruction, and acquiring the network address setting instruction corresponding to the model information;
and modifying the network address of the printing equipment into the modified network address by calling the network address setting instruction corresponding to the model information.
The network communication connection device for the printing device disclosed in the embodiment of the present application is used to implement the network communication connection method for the printing device described in the second embodiment of the present application, and specific implementation manners of each module of the device are not described again, and reference may be made to specific implementation manners of corresponding steps in the method embodiments.
The network communication connection device of the printing equipment, disclosed by the embodiment of the application, is used for acquiring an original network address of the printing equipment and acquiring a first network address of printing data output equipment, wherein the printing equipment and the printing data output equipment are positioned in the same local area network; determining whether the original network address and the first network address are in different network segments; responding to the situation that the original network address and the first network address are in different network segments, adding a second network address for the printing data output equipment, and controlling the printing data output equipment to be in network communication connection with the printing equipment through the second network address so as to set a network address for the printing equipment and/or be in network communication connection with the printing equipment; or, in response to that the original network address and the first network address are in the same network segment, the printing data output device is controlled to perform network communication connection with the printing device through the first network address so as to set a network address for the printing device and/or perform network communication connection with the printing device, which is beneficial to improving the efficiency of recovering normal network communication.
The network communication connection device for the printing equipment, disclosed by the embodiment of the application, can realize the network communication between the printing data output equipment and the printing equipment and can complete the modification of the network address of the printing equipment without directly connecting the printing equipment and the printing data output equipment through a network cable under the condition that the network address of the printing equipment and the network address of the printing data output equipment are not in the same network segment and only by ensuring that the printing equipment and the printing data output equipment are in the same local area network (if the same router is connected). For part of printing equipment which can not modify the network address, the network communication between the printing data output equipment and the printing equipment can be realized by a technical means of increasing the network address of the printing data output equipment, the operation is simple, the network address before and after the modification of the printing equipment is filled in through a network address configuration interface, the efficiency of recovering the normal network communication and the efficiency of modifying the network address of the printing equipment are improved, and the normal network communication between the network port printing equipment and the printing data output equipment is ensured.
Furthermore, when the network address of the printing equipment is modified, even the original network address of the printing equipment is only needed to be input, the network communication between the printing data output equipment and the printing equipment can be realized, and a user does not need to have related professional ability, so that the operation is simple and efficient.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The above detailed description is provided for the network communication connection method and apparatus of the printing device, and the specific examples are applied herein to explain the principle and the implementation of the present application, and the above descriptions of the embodiments are only used to help understand the method and a core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in an electronic device according to embodiments of the present application. The present application may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
For example, fig. 6 illustrates an electronic device that may implement a method according to the present application. The electronic device can be a PC, a mobile terminal, a personal digital assistant, a tablet computer and the like. The electronic device conventionally comprises a processor 610 and a memory 620 and program code 630 stored on said memory 620 and executable on the processor 610, said processor 610 implementing the method described in the above embodiments when executing said program code 630. The memory 620 may be a computer program product or a computer readable medium. The memory 620 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 620 has a storage space 6201 for program code 630 of a computer program for performing any of the method steps described above. For example, the storage space 6201 for the program code 630 may include respective computer programs for implementing the various steps in the above method, respectively. The program code 630 is computer readable code. The computer programs may be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. The computer program comprises computer readable code which, when run on an electronic device, causes the electronic device to perform the method according to the above embodiments.
The embodiment of the application also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the computer program realizes the steps of the network communication connection method of the printing device according to the first embodiment of the application.
Such a computer program product may be a computer-readable storage medium that may have memory segments, memory spaces, etc. arranged similarly to the memory 620 in the electronic device shown in fig. 6. The program code may be stored in a computer readable storage medium, for example, compressed in a suitable form. The computer readable storage medium is typically a portable or fixed storage unit as described with reference to fig. 7. Typically, the storage unit comprises computer readable code 630 ', said computer readable code 630' being code read by a processor, which when executed by the processor implements the steps of the method described above.
Reference herein to "one embodiment," "an embodiment," or "one or more embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Moreover, it is noted that instances of the word "in one embodiment" are not necessarily all referring to the same embodiment.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A printing device network communication connection method, comprising:
the method comprises the steps of obtaining an original network address of a printing device and obtaining a first network address of a printing data output device, wherein the printing device and the printing data output device are located in the same local area network;
determining whether the original network address and the first network address are in different network segments;
responding to the situation that the original network address and the first network address are in different network segments, adding a second network address for the printing data output equipment, and controlling the printing data output equipment to be in network communication connection with the printing equipment through the second network address so as to set a network address for the printing equipment and/or be in network communication connection with the printing equipment; alternatively, the first and second electrodes may be,
and in response to the original network address and the first network address being in the same network segment, controlling the printing data output equipment to perform network communication connection with the printing equipment through the first network address so as to set a network address for the printing equipment and/or perform network communication connection with the printing equipment.
2. The method according to claim 1, wherein the obtaining of the original network address of the printing device further comprises:
acquiring a modified network address of the printing device;
the step of responding to the original network address and the first network address being in different network segments, adding a second network address to the printing data output device, and controlling the printing data output device to perform network communication connection with the printing device through the second network address so as to execute the step of setting the network address for the printing device and/or performing network communication connection with the printing device, includes:
responding to the original network address and the first network address being in different network segments, and adding a second network address which is in the same network segment with the original network address to the printing data output equipment;
in response to the fact that the modified network address is invalid, controlling the printing data output equipment to be in network communication connection with the printing equipment through the second network address and the original network address; alternatively, the first and second electrodes may be,
in response to that the modified network address is an effective value, controlling the printing data output equipment to perform network communication with the printing equipment through the second network address, and modifying the network address of the printing equipment into the modified network address; and then controlling the printing data output equipment to carry out network communication connection with the printing equipment through the first network address and the modified network address.
3. The method of claim 2, wherein said step of adding a second network address to said print data output device in the same network segment as said original network address comprises:
and acquiring a second network address which is in the same network segment with the original network address for the printing data output equipment by calling an instruction of statically allocating the network address in an operating system of the printing data output equipment.
4. The method according to claim 1, wherein the obtaining of the original network address of the printing device further comprises:
acquiring a modified network address of the printing device;
the step of controlling the printing data output device to perform network communication connection with the printing device through the first network address in response to the original network address being in the same network segment as the first network address so as to set a network address for the printing device and/or perform network communication connection with the printing device includes:
responding to the invalid value of the modified network address, and controlling the printing data output equipment to be in network communication connection with the printing equipment through the first network address and the original network address; alternatively, the first and second electrodes may be,
in response to that the modified network address is an effective value, controlling the printing data output equipment to perform network communication with the printing equipment through the first network address, and modifying the network address of the printing equipment into the modified network address; and then controlling the printing data output equipment to carry out network communication connection with the printing equipment through the first network address and the modified network address.
5. The method according to any one of claims 2 to 4, wherein the step of modifying the network address of the printing device to the modified network address comprises:
acquiring model information of the printing equipment;
traversing a preset corresponding relation between the printing equipment model and a network address setting instruction, and acquiring the network address setting instruction corresponding to the model information;
and modifying the network address of the printing equipment into the modified network address by calling the network address setting instruction corresponding to the model information.
6. A printing device network communication connection apparatus, comprising:
the system comprises a network address acquisition module, a data transmission module and a data transmission module, wherein the network address acquisition module is used for acquiring an original network address of a printing device and acquiring a first network address of a printing data output device, and the printing device and the printing data output device are positioned in the same local area network;
a network segment determining module, configured to determine whether the original network address and the first network address are in different network segments;
the first network connection module is used for responding that the original network address and the first network address are in different network segments, adding a second network address for the printing data output equipment, and controlling the printing data output equipment to be in network communication connection with the printing equipment through the second network address so as to set a network address for the printing equipment and/or be in network communication connection with the printing equipment; alternatively, the first and second electrodes may be,
and the second network connection module is used for controlling the printing data output equipment to perform network communication connection with the printing equipment through the first network address in response to the original network address and the first network address being in the same network segment, so as to set a network address for the printing equipment and/or perform network communication connection with the printing equipment.
7. The apparatus of claim 6,
the network address acquisition module is further used for acquiring the modified network address of the printing equipment;
the first network connection module further comprises:
the network address increasing submodule is used for responding to the situation that the original network address and the first network address are in different network segments, and increasing a second network address which is in the same network segment with the original network address for the printing data output equipment;
the first communication submodule is used for responding to the invalid value of the modified network address and controlling the printing data output equipment to be in network communication connection with the printing equipment through the second network address and the original network address; alternatively, the first and second electrodes may be,
the second communication submodule is used for responding to the fact that the modified network address is an effective value, controlling the printing data output equipment to carry out network communication with the printing equipment through the second network address, and modifying the network address of the printing equipment into the modified network address; and then controlling the printing data output equipment to carry out network communication connection with the printing equipment through the first network address and the modified network address.
8. The apparatus of claim 6,
the network address acquisition module is further used for acquiring the modified network address of the printing equipment;
the second network connection module further includes:
the third communication sub-module is used for responding to the invalid value of the modified network address and controlling the printing data output equipment to be in network communication connection with the printing equipment through the first network address and the original network address; alternatively, the first and second electrodes may be,
a fourth communication sub-module, configured to, in response to the modified network address being an effective value, control the print data output device to perform network communication with the printing device via the first network address, and modify the network address of the printing device to the modified network address; and then controlling the printing data output equipment to carry out network communication connection with the printing equipment through the first network address and the modified network address.
9. An electronic device comprising a memory, a processor, and program code stored on the memory and executable on the processor, wherein the processor implements the printing device network communication connection method of any one of claims 1 to 5 when executing the program code.
10. A computer-readable storage medium having stored thereon program code, characterized in that the program code realizes the steps of the printing device network communication connection method according to any one of claims 1 to 5 when executed by a processor.
CN202011127869.4A 2020-10-19 2020-10-19 Printing equipment network communication connection method and device and electronic equipment Pending CN112449003A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011127869.4A CN112449003A (en) 2020-10-19 2020-10-19 Printing equipment network communication connection method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011127869.4A CN112449003A (en) 2020-10-19 2020-10-19 Printing equipment network communication connection method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112449003A true CN112449003A (en) 2021-03-05

Family

ID=74735605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011127869.4A Pending CN112449003A (en) 2020-10-19 2020-10-19 Printing equipment network communication connection method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112449003A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004013662A (en) * 2002-06-10 2004-01-15 Canon Inc Information processing device, information processing method and control program
US20050200883A1 (en) * 2004-02-20 2005-09-15 Michael Mannion Printer and method for configuring the same
CN107329713A (en) * 2017-06-27 2017-11-07 福州汇思博信息技术有限公司 The Method of printing and system of a kind of cross-network segment
CN108874330A (en) * 2018-07-05 2018-11-23 美味不用等(上海)信息科技股份有限公司 A kind of method and device of automatic connection printer
CN110992044A (en) * 2019-11-12 2020-04-10 北京三快在线科技有限公司 Data processing method and device, electronic equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004013662A (en) * 2002-06-10 2004-01-15 Canon Inc Information processing device, information processing method and control program
US20050200883A1 (en) * 2004-02-20 2005-09-15 Michael Mannion Printer and method for configuring the same
CN107329713A (en) * 2017-06-27 2017-11-07 福州汇思博信息技术有限公司 The Method of printing and system of a kind of cross-network segment
CN108874330A (en) * 2018-07-05 2018-11-23 美味不用等(上海)信息科技股份有限公司 A kind of method and device of automatic connection printer
CN110992044A (en) * 2019-11-12 2020-04-10 北京三快在线科技有限公司 Data processing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN107251069B (en) Near field communication payment method and terminal
CN105335309B (en) A kind of data transmission method and computer
CN109684008A (en) Card rendering method, device, terminal and computer readable storage medium
EP3208723A1 (en) Usb wireless network card configuration method, host, usb wireless network card and communication system
CN111880901A (en) Network configuration method, device, equipment and readable storage medium
CN112083971B (en) Component processing method, device and storage medium
CN111542035A (en) Cloud service connection method, system and related equipment
CN115114219B (en) PCI-E topology method, device, equipment and storage medium
CN110135940B (en) Kitchen order display device and method
CN108023905B (en) Internet of things application system and method
CN110018978B (en) Data transmission method and system
CN111078424A (en) Information interaction method and device, computer equipment and storage medium
CN117407065A (en) Network card pre-start control method, device, equipment, system and storage medium
CN112449003A (en) Printing equipment network communication connection method and device and electronic equipment
CN111338699A (en) Computer mainboard initialization method and device, computer equipment and storage medium
EP3709687A1 (en) Electronic device and method for managing an ic card with multiple sim profiles
CN115150268A (en) Network configuration method and device of Kubernetes cluster and electronic equipment
CN114726905A (en) Method, device, equipment and storage medium for accessing Tbox network to Android system
CN110324345B (en) Server login method and device, storage medium and terminal
JP6412641B2 (en) Communication link transmission method, apparatus and terminal
CN113849267A (en) Virtual display method, system, terminal and storage medium for display card
CN113703676B (en) Calling method, device, equipment and medium for double live volumes
CN113568858B (en) Equipment management method, device and storage medium
CN116627682B (en) Remote industrial information detection method and device based on shared memory
CN107728962B (en) Software deployment method and device based on shared printer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210305