CN110866196A - Printer network information acquisition method and device and electronic equipment - Google Patents

Printer network information acquisition method and device and electronic equipment Download PDF

Info

Publication number
CN110866196A
CN110866196A CN201811630877.3A CN201811630877A CN110866196A CN 110866196 A CN110866196 A CN 110866196A CN 201811630877 A CN201811630877 A CN 201811630877A CN 110866196 A CN110866196 A CN 110866196A
Authority
CN
China
Prior art keywords
page
information
login
link address
printer
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
CN201811630877.3A
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.)
Harbin Antian Science And Technology Group Co ltd
Harbin Antiy Technology Group Co Ltd
Original Assignee
Harbin Antian Science And Technology Group 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 Harbin Antian Science And Technology Group Co ltd filed Critical Harbin Antian Science And Technology Group Co ltd
Priority to CN201811630877.3A priority Critical patent/CN110866196A/en
Publication of CN110866196A publication Critical patent/CN110866196A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server
    • G06F3/1287Remote printer device, e.g. being remote from client or server via internet

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The embodiment of the invention discloses a method and a device for collecting printer network information and electronic equipment, relates to the technical field of network printing, and can conveniently collect printer Web information. The printer network information acquisition method comprises the following steps: logging in a login page of the printer network service, and acquiring login information and a main page link; and acquiring page information of the printer network service according to the main page link. The invention can collect printer network information without physical connection and establish an information base, and is suitable for collecting data of printers of various brands and models.

Description

Printer network information acquisition method and device and electronic equipment
Technical Field
The invention relates to the technical field of network printing, in particular to a printer network information acquisition method and device and electronic equipment.
Background
With the widespread application of internet technology, printers, which are commonly used office equipment, inevitably need to be accessed to a wide area or local area network. Therefore, the printer also provides corresponding Web mode access and management functions, so that the printer information can be conveniently viewed and managed through a network without any physical connection to the printer. With the increasing number of printer manufacturers, printers with different brands and models have increased difficulty in collecting printer Web information.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for collecting printer network information, and an electronic device, which can conveniently collect printer Web information.
In a first aspect, an embodiment of the present invention provides a method for acquiring network information of a printer, including:
logging in a login page of the printer network service, and acquiring login information and a main page link;
and acquiring page information of the printer network service according to the main page link.
With reference to the first aspect, in a first implementable manner of the first aspect, the acquiring page information of the printer web service according to the home page link includes:
generating a page link address list including the main page link address;
requesting a page corresponding to a page link address in the page link address list;
acquiring page information of a return page;
extracting a sub-page link address from the currently acquired page information;
judging whether the currently extracted sub-page link address exists in the page link address list or not;
and if the currently extracted sub-page link address does not exist in the page link address list, adding the new link address into the page link address list.
With reference to the first implementable manner of the first aspect, in a second implementable manner of the first aspect, the obtaining page information of the return page includes:
judging whether the returned page is a dynamic page or not;
if the return page is a dynamic page, dynamically acquiring page frame information of the return page;
requesting dynamic page information according to the currently acquired page frame information;
and acquiring page information from the dynamic page after the dynamic page is loaded.
With reference to the first aspect, in a third implementable manner of the first aspect, the logging in the login page of the printer network service, acquiring login information and a home page link, includes:
receiving a login page link address of a printer network service;
accessing the link address of the login page and opening the login page;
obtaining login page information and identifying the type of the login page;
sending the user account to the printer network service for login verification in a request mode corresponding to the login page type;
receiving a login success message returned by the printer network service;
and obtaining Cookie information generated by login and a main page link after login.
With reference to the first aspect, in a fourth implementable manner of the first aspect, after acquiring the page information of the printer network service, the method further includes:
creating a data storage folder corresponding to the brand and the model of the printer, and creating an external resource folder in the data storage folder;
generating page information of the printer network service into a page file, and storing the page file in the data storage folder;
searching the referenced external resource file link address from the page information of the printer network service;
and downloading the corresponding external resource file and storing the external resource file into the external resource folder according to the searched external resource file link address.
In a second aspect, an embodiment of the present invention provides a printer network information acquisition apparatus, including:
the login module is used for logging in a login page of the printer network service and acquiring login information and a main page link;
and the information acquisition module is used for acquiring the page information of the printer network service according to the main page link.
With reference to the second aspect, in a first implementable manner of the second aspect, the information obtaining module includes:
the list generation submodule is used for generating a page link address list comprising the main page link address;
the request submodule is used for requesting a page corresponding to a page link address in the page link address list;
the page information acquisition submodule is used for acquiring the page information of the returned page requested by the request submodule;
the information extraction submodule is used for extracting a subpage link address from the currently acquired page information;
the judging submodule is used for judging whether the currently extracted sub-page link address exists in the page link address list or not;
and the list updating submodule is used for adding the currently extracted sub-page link address into the page link address list when the judgment result of the judging submodule is negative.
With reference to the first implementable manner of the second aspect, in a second implementable manner of the second aspect, the page information obtaining sub-module includes:
the judging unit is used for judging whether the return page is a dynamic page or not;
the page frame acquiring unit is used for dynamically acquiring the page frame information of the returned page when the judgment result of the judging unit is yes;
the request unit is used for requesting dynamic page information according to the page frame information currently acquired by the page frame acquisition unit;
and the page information acquisition unit is used for acquiring the page information from the dynamic page after the dynamic page requested by the request unit is loaded.
With reference to the second aspect, in a third implementable manner of the second aspect, the login module includes:
the input submodule is used for receiving a login page link address of the printer network service;
the access submodule is used for accessing the link address of the login page and opening the login page;
the page type identification submodule is used for acquiring login page information and identifying the type of the login page;
the sending submodule is used for sending the user account to the printer network service for login verification in a request mode corresponding to the login page type;
the receiving submodule is used for receiving a login success message returned by the printer network service;
and the login information acquisition submodule is used for acquiring the Cookie information generated by login and the link of the main page after login.
With reference to the second aspect, in a fourth possible implementation manner of the second aspect, the apparatus further includes:
the system comprises a folder creating module, a data saving folder creating module and a resource creating module, wherein the folder creating module is used for creating a data saving folder corresponding to the brand and the model of the printer and creating an external resource folder in the data saving folder;
the page file storage module is used for generating the page information of the printer network service acquired by the information acquisition module into a page file and storing the page file in the data storage folder;
the searching module is used for searching the referred external resource file link address from the page information of the printer network service acquired by the information acquisition module;
and the downloading module is used for downloading the corresponding external resource file and storing the external resource file into the external resource folder according to the external resource file link address searched by the searching module.
In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor reads the executable program codes stored in the memory to run programs corresponding to the executable program codes, and is used for executing the printer network information acquisition method in any one of the foregoing embodiments.
According to the printer network information acquisition method, the printer network information acquisition device and the electronic equipment, page information returned by the printer Web request is acquired by logging in a log-in page of the printer Web service, so that the printer Web information can be conveniently collected, and the printer network information acquisition method, the printer network information acquisition device and the electronic equipment are more real, accurate, detailed and reliable compared with other printer information sources. The printer link information can be retrieved according to the acquired page information, the page link and the information such as key texts, style sheets, JavaScript scripts and pictures in the page information are collected, a data base line database of detailed information of printers of various brands and models can be established, and basic data is accumulated for the development of related security application software and hardware of the printers in the next step. Along with the increase of the brand and the model of the printer of collection, can improve the printer and detect and the discernment and the support degree that the protection instrument printed to each brand and model, also can provide data support for the quick retrieval of printer function, interface.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a first embodiment of a method for collecting network information of a printer according to the present invention;
FIG. 2 is a flowchart of a preferred embodiment of step S101;
FIG. 3 is a flowchart of the preferred embodiment of step S102;
FIG. 4 is a flowchart of a second embodiment of a method for collecting network information of a printer according to the present invention;
FIG. 5 is a flowchart of a third embodiment of a method for collecting network information of a printer according to the present invention;
FIG. 6 is a flow chart of a method of adapting the make and model of a printer;
FIG. 7 is a schematic structural diagram of a first embodiment of a network information collecting device of a printer according to the present invention;
fig. 8 is a schematic structural diagram of the information obtaining module 12 in fig. 7;
fig. 9 is a schematic structural diagram of the page information obtaining sub-module 123;
FIG. 10 is a schematic diagram of a structure of the login module 11 in FIG. 7;
FIG. 11 is a schematic structural diagram of a second embodiment of a network information collection device of a printer according to the present invention;
fig. 12 is a schematic structural diagram of an embodiment of an electronic device according to the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and 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 invention.
Fig. 1 is a flowchart of a first embodiment of a method for acquiring network information of a printer according to the present invention, as shown in fig. 1, the method of this embodiment may include:
step S101, logging in a login page of the printer network service, and acquiring login information and a main page link;
in this embodiment, a user accesses a login page of a printer Web service to acquire login information and a home page link of the printer Web service. Preferably, as shown in fig. 2, the present step may specifically include the following steps S201 to S205:
step S201, receiving a login page link address of printer network service;
in this step, the user can directly input the login page link address of the printer Web service to be detected in the detection tool provided by the invention.
Step S202, accessing the link address of the login page and opening the login page;
step S203, obtaining login page information and identifying the type of the login page;
in this step, login page information of the printer is acquired, and the printer login page type (for example, Form or http basic) is intelligently determined.
Step S204, sending the user account to the printer network service for login verification in a request mode corresponding to the login page type;
in the step, the user fills in the printer Web administrator password, and if the user does not fill in the printer Web administrator password, the detection tool provided by the invention can retrieve the related default password list from the database according to the brand and the model of the printer to carry out adaptive login.
And step S205, receiving a login success message returned by the printer network service.
And S206, acquiring Cookie information generated by login and a main page link after login.
In this embodiment, if the user account logs in successfully, the printer network service returns Cookie information to the request end, returns a home page link to the request end, and obtains and temporarily stores the Cookie information and the home page link address of the printer network service.
And step S102, acquiring page information of the printer network service according to the main page link.
In this step, if the main page of the printer Web service is linked, the main page of the printer Web service can be opened, and all page information of the printer Web service is acquired after the main page is loaded. Here, the Web page information mainly includes: HTML, CSS style sheets, JS scripts, and data (some CSS style sheets, JS scripts are referenced in the page as a facade resource file and are not contained in the current page information).
In a preferred embodiment, as shown in FIG. 3, step 102 may include the steps of:
s301, generating a page link address list including the main page link address and temporarily storing the page link address list;
step S302, requesting a page corresponding to the Nth page link address in the page link address list;
the initial value of N is 1, and when the request is made, page link addresses which are not requested are requested from the page link address list according to the sequence from front to back. In the first execution of the method provided by the present invention, the printer Web service returns the home page upon starting to request the 1 st page link address in the page link address list, i.e. the home page link address stored in the page link address list in step 301.
Step S303, page information of a return page is obtained;
in this embodiment, if the step S302 requests the nth page link address in the page link address list, the step acquires and temporarily stores page information corresponding to the nth page link address.
As an optional embodiment, because the Web page has a static page and a dynamic page, and data of the dynamic page is requested back in multiple times, the method for obtaining page information of the returned page may include the following steps:
(1) judging whether the returned page is a dynamic page or not, and if the returned page is the dynamic page, dynamically acquiring page frame information of the returned page;
the method comprises the steps of obtaining page frame information according to a main page link, carrying out intelligent analysis on the page frame information, and judging whether the page type is an HTML (hypertext markup language) file, an XML (extensive makeup language) file, a CGI (common gateway interface) file and the like.
(2) Requesting dynamic page information according to the currently acquired page frame information;
in this step, a request is made for page dynamic information according to the parsed page frame information, for example: XML files, XSL files, JSON files, DAT files, etc.
(3) After the dynamic page is loaded, acquiring page information from the dynamic page;
(4) and if the returned page is a static page, directly acquiring page information from the static page and temporarily storing the page information.
Step S304, extracting a sub-page link address from the currently acquired page information;
in the step, the currently acquired page information is intelligently analyzed, the sub-page link address in the current page is identified and extracted, and the meaningless, cross-domain access and logout links are filtered, for example, 5 sub-page link addresses are finally extracted.
Step S305, judging whether the currently extracted sub-page link address exists in the page link address list or not; if yes, go to step S307, otherwise, go to step S306,
in this step, if the currently extracted sub-page link address has a record in the page link address list, it is not necessary to operate the currently extracted sub-page link address. This step can filter out duplicate link addresses that appear in different sub-pages under the main page link.
Step S306, adding the new link address into the page link address list;
in this step, if the sub-page link address extracted in step S304 does not exist in the page link address list, the currently extracted new link address without record is added to the page link address list and arranged at the end of the original page link address list.
In step S307, N is made N +1, and the process returns to step S302.
In this step, after adding 1 to the value of N, the process returns to step S302 to request the page corresponding to the nth page link address in the page link address list.
In the embodiment shown in fig. 3, a page link address list corresponding to the current printer is generated, page information is obtained by linking addresses in the page link address list one by one in a recursive manner, repeated links are filtered, and all the obtained page information is temporarily stored until a main page of the printer Web service and all sub-page links and page information below the main page are obtained.
Fig. 4 is a flowchart of a second embodiment of a method for acquiring printer network information according to the present invention, where the method of this embodiment is further configured to store collected printer network information on the basis of the first embodiment, and as shown in fig. 4, the method of this embodiment may include:
step S401, logging in a login page of the printer network service, and acquiring login information and a main page link.
In this embodiment, the specific implementation method of step S401 is similar to that of step S101, and is not described herein again.
And step S402, acquiring page information of the printer network service according to the main page link.
In this embodiment, the specific implementation method of step S402 is similar to that of step S102, and is not described herein again.
Step S403, creating a data saving folder corresponding to the printer brand and model, and creating an external resource folder in the data saving folder.
In this embodiment, a data saving folder corresponding to the current printer brand and model is created in the database, and an external resource folder is created in the data saving folder. The data saving folder is used for storing acquired network information data (including login information of printer network service, a page link address list, page information and the like) of the printer, and the external resource folder is used for saving external resource files corresponding to external resource links recorded in a main page and all sub-pages of the current printer.
And S404, generating page information of the printer network service into a page file, and storing the page file in the data storage folder.
Step S405, searching the referenced external resource file link address from the page information of the printer network service.
As mentioned above, the Web page information mainly includes: HTML, CSS style sheets, JS scripts and data, and some CSS style sheets and JS scripts are referenced appearance resource files in the page and are not contained in the current page information, and the step searches for the link addresses of the referenced resource files such as the CSS style sheets, the JavaScript scripts and the pictures except the HTML.
Step S406, downloading the corresponding external resource file according to the searched external resource file link address and storing the external resource file in the external resource folder.
In the second embodiment of the invention, the network service of the printer is logged in to obtain the login information and the main page link, the main page is linked through the main page, all the page information of the network service of the printer is obtained, all the page information is generated into the page file for storage, the link address of the external resource file is obtained from the page information, and the external resource file is downloaded and stored. The printer information can be quickly acquired and collected without any physical connection to the printer. The intelligent network connection printer has the advantages that page analysis and data acquisition and storage are intelligently carried out on all printers supporting network connection, information data storage is carried out according to the brands and the models of the printers during storage, and a user can conveniently extract and arrange corresponding data packets of the printers of all brands and models according to collected data.
Fig. 5 is a flowchart of a third embodiment of the method for acquiring network information of a printer according to the present invention, and the method of the present embodiment is further configured to save data in the data saving folder in a database and generate a corresponding database script on the basis of the second embodiment. As shown in fig. 5, the method of this embodiment may include:
step S501, logging in a login page of the printer network service, and acquiring login information and a main page link.
And step S502, acquiring page information of the printer network service according to the main page link.
Step S503, creating a data saving folder corresponding to the brand and the model of the printer, and creating an external resource folder in the data saving folder.
Step S504, generating the page information of the printer network service into a page file, and storing the page file in the data storage folder.
And step S505, searching the referenced external resource file link address from the page information of the printer network service.
And S506, downloading the corresponding external resource file according to the searched external resource file link address and storing the external resource file in the external resource folder.
In this embodiment, the specific implementation method of steps S501 to S506 is similar to that of steps S401 to S406, and is not described herein again.
And step S507, storing the login information, the page link address list and the page information of the printer network service into a database.
Step S508, a database script file related to the login information, the page link address list, and the page information of the printer web service saved this time is generated.
For example: and generating an SQL database script file related to the login information, the page link address list and the page information of the printer network service saved at this time.
And step S509, saving the database script file into a data saving folder.
In the third embodiment, the established printer detailed information database can provide data support for the rapid retrieval of functions and interfaces provided by the printer.
In an alternative embodiment, after step S509 in fig. 5, the method may further include: the method comprises the steps of encrypting the data storage folder according to a preset encryption method, compressing the encrypted file, hiding the extension of the obtained compressed file, and assigning a new extension for the compressed file. The embodiment further encrypts the stored data file and disguises the data file through a packer, so that the safety of the stored printer network information can be further improved.
In an alternative embodiment, before logging in to the login page of the printer network service, the brand and model of the current printer may be adapted, as shown in fig. 6, and the method for adapting the brand and model of the printer may include the following steps:
step S601, receiving a printer brand model adaptation request;
step S602, providing a pre-stored printer brand and model list;
step S603, receiving a selection of a printer brand and model in the printer brand and model list, or receiving a newly added printer brand and model and storing the newly added printer brand and model in the printer brand and model list.
In this embodiment, a user initiates a request for adapting a brand and a model of a printer, and provides a pre-stored list of the brand and the model of the printer to a current user, and if the list of the brand and the model of the printer is provided with a brand and a model of the printer that the current user wants to acquire information, the user directly selects the brand and the model of the printer from the list of the brand and the model of the printer, and if the list of the brand and the model of the printer does not have a brand and a model that the current user wants to acquire information, the user can manually input and add a new brand and a new model of the printer, and after receiving the brand and the model of the printer newly added by the user, the user stores the brand and the new.
After adapting the brand and model of the printer, the method provided by the invention can firstly inquire whether the database has the stored data corresponding to the brand and model of the printer, and if so, can directly provide the stored network information data of the printer of the brand and model to the user. And if the database does not contain the stored data corresponding to the brand and the model of the printer, starting to execute the step of logging in the login page of the printer network service and the subsequent steps so as to collect the network information of the current printer, wherein a data storage folder corresponding to the brand and the model of the printer directly added by the user at this time is created in the step S403. Of course, when the database is queried to have the stored data corresponding to the brand and model of the printer, the user may also be provided with relevant information, such as information about the acquisition and storage time of the data, and if the user does not want to use the previously stored data, the new network information data of the printer corresponding to the brand and model of the printer may also be acquired again by using the method of the fourth or fifth embodiment. Or, according to a preset updating time period, reminding a user to regularly adopt the method provided by the invention to collect network information data of printers of various brands and models, and updating corresponding data in the database.
For example, a "three high" (high value, high threat, high confrontation) customer needs to purchase a printer for confidential use and support a particular function. By adopting the method provided by the embodiment of the invention, the corresponding printer brand and model can be quickly searched in the collected printer detailed information base, the safety of the printer is evaluated by combining with subsequently developed detection and protection products, and the optimal scheme selected by the printer is given to a client.
Corresponding to the method provided by the invention, the invention also provides a printer network information acquisition device. Fig. 7 is a schematic structural diagram of a first embodiment of a network information acquisition device of a printer according to the present invention, and as shown in fig. 7, the device of the present embodiment may include:
the login module 11 is used for logging in a login page of the printer network service and acquiring login information and a main page link;
and the information acquisition module 12 is configured to acquire page information of the printer network service according to the main page link.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of the information obtaining module 12 in fig. 7, and as shown in fig. 8, the information obtaining module 12 may include:
a list generating submodule 121 configured to generate a page link address list including the main page link address;
the request submodule 122 is configured to request a page corresponding to a page link address in the page link address list;
the page information obtaining sub-module 123 is configured to obtain page information of a returned page requested by the request sub-module 122;
an information extraction submodule 124, configured to extract a sub-page link address from currently acquired page information;
a judging submodule 125, configured to judge whether the currently extracted sub-page link address exists in the page link address list;
and the list updating sub-module 126 is configured to, if the determination result of the determining sub-module 125 is negative, add the currently extracted sub-page link address to the page link address list.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 3, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 9 is a schematic structural diagram of the page information obtaining sub-module 123, and as shown in fig. 9, the page information obtaining sub-module 123 may include:
a judging unit 21 configured to judge whether the return page is a dynamic page;
a page frame obtaining unit 22, configured to, when the determination result of the determining unit 21 is yes, dynamically obtain page frame information of the returned page;
a request unit 23, configured to request dynamic page information according to the page frame information currently acquired by the page frame acquisition unit 22;
the page information obtaining unit 24 is configured to obtain page information from the dynamic page after the dynamic page requested by the requesting unit 23 is loaded, and is further configured to obtain page information from the current static page if the determination result of the determining unit 21 is negative.
Fig. 10 is a schematic structural diagram of the login module 11 in fig. 7, and as shown in fig. 10, the login module 11 may include:
an input sub-module 111 for receiving a login page link address of the printer web service;
the access submodule 112 is used for accessing the link address of the login page and opening the login page;
a page type identification submodule 113, configured to acquire login page information and identify a login page type;
a sending sub-module 114, configured to send a user account to the printer network service for login verification in a request manner corresponding to the login page type;
a receiving submodule 115, configured to receive a login success message returned by the printer web service;
and the login information acquisition submodule 116 is configured to acquire Cookie information generated by login and a link of the main page after the login.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 11 is a schematic structural diagram of a second embodiment of a network information acquisition device of a printer according to the present invention, and as shown in fig. 11, the device of this embodiment may further include, on the basis of the structure of the device shown in fig. 7:
a folder creation module 13, configured to create a data saving folder corresponding to the brand and model of the printer, and create an external resource folder in the data saving folder;
a page file storage module 14, configured to generate the page information of the printer network service acquired by the information acquisition module 12 into a page file, and store the page file in the data saving folder;
a search module 15, configured to search for a referenced external resource file link address from the page information of the printer web service acquired by the information acquisition module 12;
and the downloading module 16 is configured to download the corresponding external resource file and store the external resource file in the external resource folder according to the link address of the external resource file found by the searching module 15.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 4, and the implementation principle and the technical effect are similar, which are not described herein again.
Corresponding to the method for acquiring network information of a printer provided by the embodiment of the present invention, an embodiment of the present invention further provides an electronic device, fig. 12 is a schematic structural diagram of an embodiment of the electronic device of the present invention, and a flow of the embodiment shown in fig. 1 of the present invention may be implemented, and as shown in fig. 12, the electronic device may include: the device comprises a shell 31, a processor 32, a memory 33, a circuit board 34 and a power circuit 35, wherein the circuit board 34 is arranged inside a space enclosed by the shell 31, and the processor 32 and the memory 33 are arranged on the circuit board 34; a power supply circuit 35 for supplying power to each circuit or device of the electronic apparatus; the memory 33 is used for storing executable program codes; the processor 32 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 33, for executing the printer network information acquisition method of any of the foregoing embodiments.
The above electronic devices exist in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio and video playing modules (such as an iPod), handheld game consoles, electronic books, and intelligent toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with data interaction function.
The invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program is used for implementing the steps of the network information collection method of the printer in any one of the foregoing embodiments when being executed by a processor.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. A printer network information acquisition method is characterized by comprising the following steps:
logging in a login page of the printer network service, and acquiring login information and a main page link;
and acquiring page information of the printer network service according to the main page link.
2. The printer network information acquisition method according to claim 1, wherein said acquiring page information of the printer network service according to the home page link comprises:
generating a page link address list including the main page link address;
requesting a page corresponding to a page link address in the page link address list;
acquiring page information of a return page;
extracting a sub-page link address from the currently acquired page information;
judging whether the currently extracted sub-page link address exists in the page link address list or not;
and if the currently extracted sub-page link address does not exist in the page link address list, adding the new link address into the page link address list.
3. The printer network information collecting method according to claim 2, wherein said acquiring page information of the return page comprises:
judging whether the returned page is a dynamic page or not;
if the return page is a dynamic page, dynamically acquiring page frame information of the return page;
requesting dynamic page information according to the currently acquired page frame information;
and acquiring page information from the dynamic page after the dynamic page is loaded.
4. The printer network information acquisition method of claim 1, wherein the logging in a login page of a printer network service, acquiring login information and a home page link, comprises:
receiving a login page link address of a printer network service;
accessing the link address of the login page and opening the login page;
obtaining login page information and identifying the type of the login page;
sending the user account to the printer network service for login verification in a request mode corresponding to the login page type;
receiving a login success message returned by the printer network service;
and obtaining Cookie information generated by login and a main page link after login.
5. The printer network information collecting method according to claim 1, further comprising, after acquiring page information of the printer network service:
creating a data storage folder corresponding to the brand and the model of the printer, and creating an external resource folder in the data storage folder;
generating page information of the printer network service into a page file, and storing the page file in the data storage folder;
searching the referenced external resource file link address from the page information of the printer network service;
and downloading the corresponding external resource file and storing the external resource file into the external resource folder according to the searched external resource file link address.
6. A printer network information acquisition device, comprising:
the login module is used for logging in a login page of the printer network service and acquiring login information and a main page link;
and the information acquisition module is used for acquiring the page information of the printer network service according to the main page link.
7. The printer network information acquisition device according to claim 6, wherein the information acquisition module includes:
the list generation submodule is used for generating a page link address list comprising the main page link address;
the request submodule is used for requesting a page corresponding to a page link address in the page link address list;
the page information acquisition submodule is used for acquiring the page information of the returned page requested by the request submodule;
the information extraction submodule is used for extracting a subpage link address from the currently acquired page information;
the judging submodule is used for judging whether the currently extracted sub-page link address exists in the page link address list or not;
and the list updating submodule is used for adding the currently extracted sub-page link address into the page link address list when the judgment result of the judging submodule is negative.
8. The printer network information acquisition device according to claim 7, wherein the page information acquisition sub-module includes:
the judging unit is used for judging whether the return page is a dynamic page or not;
the page frame acquiring unit is used for dynamically acquiring the page frame information of the returned page when the judgment result of the judging unit is yes;
the request unit is used for requesting dynamic page information according to the page frame information currently acquired by the page frame acquisition unit;
and the page information acquisition unit is used for acquiring the page information from the dynamic page after the dynamic page requested by the request unit is loaded.
9. The printer network information acquisition device according to claim 6, wherein the login module comprises:
the input submodule is used for receiving a login page link address of the printer network service;
the access submodule is used for accessing the link address of the login page and opening the login page;
the page type identification submodule is used for acquiring login page information and identifying the type of the login page;
the sending submodule is used for sending the user account to the printer network service for login verification in a request mode corresponding to the login page type;
the receiving submodule is used for receiving a login success message returned by the printer network service;
and the login information acquisition submodule is used for acquiring the Cookie information generated by login and the link of the main page after login.
10. The printer network information acquisition apparatus according to claim 6, further comprising:
the system comprises a folder creating module, a data saving folder creating module and a resource creating module, wherein the folder creating module is used for creating a data saving folder corresponding to the brand and the model of the printer and creating an external resource folder in the data saving folder;
the page file storage module is used for generating the page information of the printer network service acquired by the information acquisition module into a page file and storing the page file in the data storage folder;
the searching module is used for searching the referred external resource file link address from the page information of the printer network service acquired by the information acquisition module;
and the downloading module is used for downloading the corresponding external resource file and storing the external resource file into the external resource folder according to the external resource file link address searched by the searching module.
11. An electronic device, characterized in that the electronic device comprises: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the client; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the printer network information acquisition method of any one of the preceding claims 1 to 5.
CN201811630877.3A 2018-12-28 2018-12-28 Printer network information acquisition method and device and electronic equipment Pending CN110866196A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811630877.3A CN110866196A (en) 2018-12-28 2018-12-28 Printer network information acquisition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811630877.3A CN110866196A (en) 2018-12-28 2018-12-28 Printer network information acquisition method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN110866196A true CN110866196A (en) 2020-03-06

Family

ID=69651909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811630877.3A Pending CN110866196A (en) 2018-12-28 2018-12-28 Printer network information acquisition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110866196A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112214182A (en) * 2020-09-11 2021-01-12 哈尔滨安天科技集团股份有限公司 Printer identification method and device, electronic equipment and storage medium
CN112214181A (en) * 2020-09-02 2021-01-12 哈尔滨安天科技集团股份有限公司 Printer WEB information extraction method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1452088A (en) * 2002-03-29 2003-10-29 兄弟工业株式会社 Service providing system using dedicated web page to provide service
CN1637699A (en) * 2003-12-24 2005-07-13 富士施乐株式会社 Information collection method and system
US20050262438A1 (en) * 2004-05-21 2005-11-24 John Armstrong Methods and apparatus for recording web information
US20090119329A1 (en) * 2007-11-02 2009-05-07 Kwon Thomas C System and method for providing visibility for dynamic webpages
CN101770351A (en) * 2009-01-06 2010-07-07 佳能株式会社 Print system, print server, control method thereof, and program
CN103179164A (en) * 2011-12-23 2013-06-26 宇龙计算机通信科技(深圳)有限公司 Method and communication terminal of storing page information
CN103186670A (en) * 2013-03-27 2013-07-03 中金数据系统有限公司 Method and system for integrally acquiring webpage information
CN103618649A (en) * 2013-12-03 2014-03-05 北京人民在线网络有限公司 Website data acquisition method and device
CN106547913A (en) * 2016-11-25 2017-03-29 网易(杭州)网络有限公司 The collection classifying feedback method of page info, apparatus and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1452088A (en) * 2002-03-29 2003-10-29 兄弟工业株式会社 Service providing system using dedicated web page to provide service
CN1637699A (en) * 2003-12-24 2005-07-13 富士施乐株式会社 Information collection method and system
US20050262438A1 (en) * 2004-05-21 2005-11-24 John Armstrong Methods and apparatus for recording web information
US20090119329A1 (en) * 2007-11-02 2009-05-07 Kwon Thomas C System and method for providing visibility for dynamic webpages
CN101770351A (en) * 2009-01-06 2010-07-07 佳能株式会社 Print system, print server, control method thereof, and program
CN102646030A (en) * 2009-01-06 2012-08-22 佳能株式会社 Print system, print server, control method thereof, and program
CN103179164A (en) * 2011-12-23 2013-06-26 宇龙计算机通信科技(深圳)有限公司 Method and communication terminal of storing page information
CN103186670A (en) * 2013-03-27 2013-07-03 中金数据系统有限公司 Method and system for integrally acquiring webpage information
CN103618649A (en) * 2013-12-03 2014-03-05 北京人民在线网络有限公司 Website data acquisition method and device
CN106547913A (en) * 2016-11-25 2017-03-29 网易(杭州)网络有限公司 The collection classifying feedback method of page info, apparatus and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112214181A (en) * 2020-09-02 2021-01-12 哈尔滨安天科技集团股份有限公司 Printer WEB information extraction method and device, electronic equipment and storage medium
CN112214181B (en) * 2020-09-02 2023-02-28 安天科技集团股份有限公司 Printer WEB information extraction method and device, electronic equipment and storage medium
CN112214182A (en) * 2020-09-11 2021-01-12 哈尔滨安天科技集团股份有限公司 Printer identification method and device, electronic equipment and storage medium
CN112214182B (en) * 2020-09-11 2023-09-05 安天科技集团股份有限公司 Printer identification method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110245069B (en) Page version testing method and device and page display method and device
WO2016101635A1 (en) Method, apparatus and device for synchronizing login status, and computer storage medium
KR101340036B1 (en) Method for generating Electronic Content Guide and apparatus therefor
US10324896B2 (en) Method and apparatus for acquiring resource
CN105379195B (en) Information sharing method and equipment
CN102546668B (en) Method, device and system for counting unique visitors
CN103617267B (en) Socialized extension search method, device and system
CN106649446B (en) Information pushing method and device
JP2002108870A (en) System and method for processing information
WO2013044569A1 (en) Network user identification method and application server thereof
CN107870860A (en) Bury a checking system and method
US20140020079A1 (en) Method for providing network service and apparatus thereof
JP2011170757A (en) Management server for inputting personal information, client terminal, personal information input system, and program
CN104410546A (en) Testing method and device of real-time processing system
CN112231609A (en) Method, device and storage medium for rapidly rendering map based on WebGIS map
CN104090887A (en) Music search method and device
US20150304156A1 (en) Method and apparatus for generating resource address, and system thereof
CN111143650B (en) Method, device, medium and electronic equipment for acquiring page data
CN110866196A (en) Printer network information acquisition method and device and electronic equipment
JP5709448B2 (en) Access analysis device, access analysis method, and access analysis program
KR101265164B1 (en) System for providing shorten URL browsing with branding , method thereof, and web client thereof
CN113055348B (en) Cross-platform data request method and device and electronic equipment
CN105740453B (en) Information-pushing method and device
US20140108619A1 (en) Information providing system and method for providing information
CN114039801B (en) Short link generation method, short link analysis system, short link analysis equipment and storage medium

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
CB02 Change of applicant information

Address after: 150028 building 7, innovation and entrepreneurship square, science and technology innovation city, Harbin high tech Industrial Development Zone, Heilongjiang Province (No. 838, Shikun Road)

Applicant after: Antan Technology Group Co.,Ltd.

Address before: 150028 building 7, innovation and entrepreneurship square, science and technology innovation city, Harbin high tech Industrial Development Zone, Heilongjiang Province (No. 838, Shikun Road)

Applicant before: Harbin Antian Science and Technology Group Co.,Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20200306

RJ01 Rejection of invention patent application after publication