CN113032659B - Information processing method for device information, electronic device and medium - Google Patents

Information processing method for device information, electronic device and medium Download PDF

Info

Publication number
CN113032659B
CN113032659B CN202110274124.9A CN202110274124A CN113032659B CN 113032659 B CN113032659 B CN 113032659B CN 202110274124 A CN202110274124 A CN 202110274124A CN 113032659 B CN113032659 B CN 113032659B
Authority
CN
China
Prior art keywords
network card
information
target network
electronic device
query request
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.)
Active
Application number
CN202110274124.9A
Other languages
Chinese (zh)
Other versions
CN113032659A (en
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110274124.9A priority Critical patent/CN113032659B/en
Publication of CN113032659A publication Critical patent/CN113032659A/en
Application granted granted Critical
Publication of CN113032659B publication Critical patent/CN113032659B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The disclosure discloses an information processing method for equipment information, electronic equipment, media and products, and relates to the fields of intelligent search, information flow and the like. The information processing method for the device information comprises the following steps: generating indication information in response to receiving a query request for equipment information of the electronic equipment, wherein the electronic equipment comprises at least one network card, and the indication information indicates a target network card in the at least one network card, which receives the query request; determining a target network card from at least one network card of the electronic equipment based on the indication information; acquiring network card information of a target network card and attribute information of electronic equipment as equipment information; and transmitting the equipment information by using the target network card.

Description

Information processing method for device information, electronic device and medium
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to the fields of intelligent searching, information streaming, and the like, and more particularly, to an information processing method for device information, an electronic device, a medium, and a program product.
Background
In a local area network, an upper computer generally queries device information of electronic devices located in the local area network by sending a query request, where sending the query request may include sending a broadcast packet. However, in the related art, when the electronic device receives a query request from the host computer, the electronic device generates reply information based on the device information and transmits the reply information to the host computer. Because the device information contained in the reply information sent by the electronic device is usually inaccurate, the upper computer cannot learn the accurate device information based on the reply information.
Disclosure of Invention
The present disclosure provides an information processing method for device information, an electronic device, a storage medium, and a program product.
According to an aspect of the present disclosure, there is provided an information processing method for device information, including: generating indication information in response to receiving a query request for equipment information of electronic equipment, wherein the electronic equipment comprises at least one network card, and the indication information indicates a target network card in the at least one network card, which receives the query request; determining the target network card from at least one network card of the electronic equipment based on the indication information; acquiring network card information of the target network card and attribute information of the electronic equipment as equipment information; and transmitting the equipment information by using the target network card.
According to another aspect of the present disclosure, there is provided an electronic device including: a processor; a memory communicatively coupled to the processor; and at least one network card communicatively coupled to the processor, each of the at least one network card configured to receive a query request; the memory stores instructions executable by the processor to enable the processor to perform the information processing method for device information.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the above-described information processing method for device information.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above-described information processing method for device information.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 schematically illustrates an information processing method for device information and an application scenario of an electronic device according to an embodiment of the present disclosure;
fig. 2 schematically illustrates a flowchart of an information processing method for device information according to an embodiment of the present disclosure;
fig. 3 schematically illustrates a flowchart of an information processing method for device information according to another embodiment of the present disclosure;
fig. 4 schematically illustrates a timing chart of an information processing method for device information according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a schematic diagram of information processing for device information according to an embodiment of the present disclosure; and
fig. 6 schematically illustrates a block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In a local area network, an upper computer generally inquires about device information of electronic devices located in the local area network by sending an inquiry request. For example, the host computer may transmit a UDP broadcast packet (query request) based on a user data packet protocol (User Datagram Protocol, UDP). And when the electronic equipment receives the broadcast packet, the equipment information of the electronic equipment is returned to the upper computer so as to realize that the upper computer searches the electronic equipment in the local area network.
Illustratively, the electronic device includes, but is not limited to, an embedded camera, a computer, a cell phone, and the like. The upper computer includes, but is not limited to, a server, a computer, a server cluster, etc.
When the electronic device has a network card, the electronic device generally receives a query request from the host computer through the network card. The electronic equipment responds to the received inquiry request to take the equipment information as a reply packet, and sends the reply packet to the upper computer through the network card, so that the upper computer analyzes the reply packet to obtain the equipment information of the electronic equipment. The device information includes, for example, network card information of a network card and attribute information of the electronic device. After the upper computer obtains the equipment information, subsequent information interaction can be performed with the electronic equipment based on the equipment information.
When the electronic device has a plurality of network cards, the problem that the upper computer can not accurately know the device information of the electronic device exists. An embodiment of the electronic device having a plurality of network cards will be described below with reference to fig. 1.
Fig. 1 schematically illustrates an information processing method for device information and an application scenario of an electronic device according to an embodiment of the present disclosure. It should be noted that fig. 1 illustrates only an example of an application scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments, or scenarios.
As shown in fig. 1, an application scenario 100 of an embodiment of the present disclosure includes, for example, an electronic device 110 and a host computer 120. The electronic device 110 includes, for example, a processor 111, a memory 112, a first network card 113, a second network card 112, and a third network card 115.
The electronic device 110 may receive the query request QR from the host computer through any one of the first network card 113, the second network card 114, and the third network card 115. After receiving the query request QR, the electronic device 110 acquires the device information DI from the memory 112 in response to the query request QR through the processor 111, and transmits the device information D1 to the host computer 120.
In one embodiment, regardless of which network card the electronic device 110 receives the query request QR, the electronic device 110 replies with a default network card. Taking the default network card as the first network card 113 as an example, the electronic device 110 responds to the query request received through any one of the first network card 113, the second network card 114 and the third network card 115, and sends device information DI to the upper computer through the default first network card 113, where the device information DI includes, for example, the network card information of the default first network card 113 and attribute information of the electronic device 110, so that the device information DI cannot indicate which network card the electronic device 110 receives the query request QR, and the upper computer 120 cannot perform information interaction with the electronic device 110 subsequently based on the device information DI.
For example, when the electronic device 110 receives the query request from the host computer 120 through the second network card 114, the host computer 120 generally has a requirement for information interaction with the electronic device 110 through the second network card 114. Since the electronic device 110 sends the device information DI to the host computer 120 through the default first network card 113 for the query request QR, the device information DI includes at least the network card information of the first network card 113, but the device information D1 does not include the network card information of the second network card 114, which results in that the device information DI received by the host computer 120 is not accurate enough, that is, the device information D1 cannot indicate the network card information of the network card actually used by the electronic device 110 to receive the query request QR. Thus, the host computer 120 cannot subsequently transmit information to the second network card 114 of the electronic device 110 based on the device information DI.
In another embodiment, the electronic device 110 sends the device information DI over all network cards no matter which network card receives the inquiry request QR. For example, after the electronic device 110 receives the inquiry request through the second network card 114, the electronic device 110 sends the device information DI through the first network card 113, sends the device information DI through the second network card 114, and sends the device information DI through the third network card 115, which results in that the electronic device sends the device information D1 multiple times and the host computer receives multiple device information D1. In addition, even if the host computer 120 can learn the network card information of each network card of the electronic device based on the received device information DI, the host computer 120 cannot learn which network card the electronic device 110 receives the query request QR.
In another embodiment, if the first bits of the IP address of each of the plurality of network cards of the electronic device 110 are consistent, the plurality of networks corresponding to the plurality of network cards may be regarded as an intranet, and the device information DI may be sent to the upper computer 120 for the query request QR through the intranet.
For example, the IP address of the first network card 113 is 192.168.23.2, the IP address of the second network card 114 is 192.169.24.2, and the IP address of the third network card 115 is 192.169.23.3. If the first bits (192) of the IP addresses of the network cards are consistent, the subnet mask of each network card may be set to 255.0.0.0, so that the networks corresponding to the network cards may be regarded as an intranet, and the device information DI may be sent to the upper computer 120 through the intranet. However, when the electronic device 110 transmits the device information DI through the intranet, it is difficult to ensure that the network card that transmits the device information DI and the network card that receives the query request QR are the same, if the device information DI is transmitted through the default network card among the plurality of network cards.
In view of this, an embodiment of the present disclosure provides an information processing method for device information, including: in response to receiving a query request for device information of an electronic device, generating indication information, wherein the electronic device comprises at least one network card, and the indication information indicates a target network card in the at least one network card, which receives the query request. Then, a target network card is determined from at least one network card of the electronic device based on the indication information. And then, acquiring network card information of the target network card and attribute information of the electronic equipment as equipment information, and transmitting the equipment information by using the target network card.
The embodiment of the present disclosure provides an information processing method for device information, and the information processing method for device information according to an exemplary embodiment of the present disclosure is described below with reference to fig. 2 to 5 in conjunction with the application scenario of fig. 1. The information processing method of the embodiment of the present disclosure is performed by, for example, the electronic device 110 shown in fig. 1.
Fig. 2 schematically illustrates a flowchart of an information processing method for device information according to an embodiment of the present disclosure.
As shown in fig. 2, the information processing method 200 for device information of the embodiment of the present disclosure may include, for example, operations S201 to S204.
In operation S201, in response to receiving a query request for device information of an electronic device, indication information is generated.
In operation S202, a target network card is determined from at least one network card of the electronic device based on the instruction information.
In operation S203, network card information of the target network card and attribute information of the electronic device are obtained as device information.
In operation S204, the device information is transmitted using the target network card.
For example, the electronic device includes at least one network card, and the indication information indicates a target network card in the at least one network card that receives the query request. The query request is, for example, a request sent by the upper computer, and the upper computer searches the electronic devices in the local area network through the query request. The electronic device includes a plurality of network cards, and when the host computer sends a query request, the electronic device can receive the query request through one of the plurality of network cards, for example, a target network card.
After the electronic equipment receives the inquiry request through the target network card, the indication information is generated and stored. And then, determining the target network card from the plurality of network cards based on the indication information. After the target network card is determined, the electronic equipment acquires the network card information of the target network card and the attribute information of the equipment as equipment information, and sends the equipment information to the upper computer through the target network card. The upper computer knows attribute information of the electronic equipment and network card information of the target network card for receiving the inquiry request based on the equipment information, so that the upper computer can conveniently conduct information interaction with the electronic equipment based on the network card information of the target network card.
The network card information of the target network card includes, for example, an IP address of the target network card, gateway information of a network where the target network card is located, a mask of the target network card, and the like. The attribute information of the electronic device includes, for example, device type information, device serial number, and the like of the electronic device.
In an embodiment of the disclosure, after receiving the query request, the electronic device generates indication information for indicating the target network card. And then determining a target network card from the plurality of network cards based on the indication information, and sending the network card information of the target network card and the attribute information of the electronic equipment to the upper computer as equipment information, so that the upper computer completes searching for the electronic equipment based on the equipment information. In addition, the upper computer can also know the target network card used by the electronic device for receiving the inquiry request through the device information, so that the upper computer can perform information interaction with the electronic device through the target network card. It can be understood that the electronic device determines the target network card for receiving the query request and replies the information about the target network card to the upper computer, so that the upper computer can accurately search the electronic device, and the situation that the electronic device repeatedly sends the device information to the upper computer through all the network cards according to the query request is avoided.
Fig. 3 schematically illustrates a flowchart of an information processing method for device information according to another embodiment of the present disclosure.
As shown in fig. 3, the information processing method 300 for device information of the embodiment of the present disclosure may include, for example, operations S301 to S309.
In operation S301, in response to receiving a query request for device information of an electronic device, indication information is generated.
In operation S302, a target network card is determined from at least one network card of the electronic device based on the indication information.
In operation S303, network card information of the target network card and attribute information of the electronic device are obtained as device information.
In operation S304, the device information is transmitted using the target network card.
According to an embodiment of the present disclosure, before performing operation S301, for example, operations S305 to S306 are first performed.
In operation S305, a first functional object is created.
In operation S306, it is determined whether a query request is received using the first function object.
If it is determined that the query request is received using the first function object, operation S301 is performed. If not, operation S306 is performed in return.
In an embodiment of the present disclosure, the first functional object can identify, for example, which network card of the plurality of network cards the electronic device receives the query request through after the electronic device receives the query request. For example, when the first functional object identifies that the electronic device receives the query request through the target network card of the plurality of network cards, the first functional object may generate indication information based on the network card information of the target network card and store the indication information. The indication information indicates that the electronic device receives the query request through the target network card.
After operation S302, for example, operations S307 to S308 are performed. After operation S303, for example, operation S309 is performed.
In operation S307, a second functional object is created.
In operation S308, an association relationship between the second function object and the address information of the target network card is created.
In operation S309, the device information is transmitted to the target network card using the second function object based on the association relationship.
After the target network card is determined, the electronic device creates a second functional object different from the first functional object, and creates an association relationship between the second functional object and address information of the target network card. Namely, the electronic equipment binds the address information of the second functional object and the target network card to obtain an association relation. And then, the second function object is instructed to operate based on the association relationship, for example, the second function object is instructed to determine the address information of the bound target network card according to the association relationship, and the second function object is instructed to send the device information to the target network card based on the address information of the target network card.
The first and second functional objects may be, for example, different types of objects. The processor of the electronic device implements the object-related function by indicating or controlling the first functional object or the second functional object.
For example, the first functional object includes a first type socket (socket), which includes a high-level socket. A high-level socket may perform related operations through a high-level socket interface, which may be understood, for example, as a function or program code, which may be executed by a processor of an electronic device. The advanced socket has a function of generating indication information indicating the target network card after the target network card of the electronic device receives the inquiry request. The indication information may also be referred to as additional control information. Illustratively, advanced sockets include, for example, sendmsg interfaces and recvmsg interfaces, which support the sending and receiving of information.
For example, the second functional object includes a second type socket (socket), which includes a normal socket. A generic socket may perform the relevant operations through a generic socket interface, which may be understood, for example, as a function or program code, which may be executed by a processor of an electronic device. The common socket may be a Berkeley socket (Berkeley sockets).
In the embodiment of the application, the target network card receiving the inquiry request is identified through the first functional object, and then the equipment information is sent to the identified target network card through the second functional object, so that the equipment information is sent to the upper computer through the target network card. It can be understood that, by the mutual coordination of the first functional object and the second functional object, the network card for receiving the inquiry request by the electronic device and the network card for sending the device information are the same network card (target network card). The upper computer can learn the network card information of the target network card used by the electronic device for receiving the inquiry request based on the device information, so that the network card information based on the target network card and the electronic device can conveniently carry out information interaction.
Fig. 4 schematically illustrates a timing diagram of an information processing method for device information according to an embodiment of the present disclosure.
As shown in fig. 4, the information processing method for device information of the embodiment of the present disclosure may include, for example, operations S401 to S413. The information processing method is performed by, for example, the electronic device 410 and the host computer 420 in cooperation with each other.
In an embodiment of the present disclosure, an electronic device includes, for example, a plurality of ports. The plurality of ports includes at least a first port and a second port different from the first port. Ports generally include logical ports and physical ports. The first port and the second port of the embodiments of the present disclosure may be logical ports, for example. Logical ports refer to ports for differentiated services, for example. The paragraphs include, for example, a port 80 for browsing web services (port number of port 80), a port 21 for FTP services (port number of port 21), and so on.
In operation S401, the electronic device 410 creates a first functional object.
In operation S402, the upper computer 420 transmits a query request.
In operation S403, the electronic device 410 receives a query request for device information of the electronic device via the target network card.
In operation S404, the electronic device 410 forwards the query request from the target network card to the first port.
In operation S405, the electronic device 410 listens to the first port using the first function object to determine whether a query request is received at the first port.
In operation S406, the electronic apparatus 410 generates indication information using the first function object in case the first function object determines that the query request has been received at the first port.
Illustratively, the first functional object of the electronic device 410 is bound to, for example, the first port. The electronic device 410 may monitor whether a query request is received at the first port through the first functional object.
In operation S407, the electronic device 410 determines a target network card from at least one network card of the electronic device based on the instruction information.
In operation S408, the electronic device 410 creates a second functional object.
In operation S409, the electronic device 410 creates an association relationship between the second function object, the address information of the target network card, and the port information of the second port of the electronic device.
In operation S410, the electronic device 410 obtains network card information of the target network card and attribute information of the electronic device as device information.
In operation S411, the electronic device 410 transmits device information to the second port using the second function object based on the association relationship.
In operation S412, the electronic device 410 forwards the device information from the second port to the target network card based on the association relationship.
In operation S413, the electronic device 410 transmits device information using the target network card
The port information of the second port includes, for example, a port number of the second port. In addition, the upper computer can monitor whether the device information from the electronic device is received through the designated port.
According to the embodiment of the disclosure, the electronic device receives the query request and sends the device information through different ports, so that the problem of port conflict is solved. For example, the first port is bound with the first functional object, the second port is bound with the second functional object and the target network card, so that different functions are realized through different ports, and the problem that port information is blocked or untimely in processing due to the fact that the same port is used for receiving a query request and sending equipment information is avoided.
Fig. 5 schematically illustrates a schematic diagram of information processing for device information according to an embodiment of the present disclosure.
As shown in fig. 5, an embodiment of the present disclosure includes, for example, an electronic device 510 and a host computer 520.
The electronic device 510 includes, for example, a processor 511, a memory 512, a plurality of network cards, a plurality of functional objects, and a plurality of ports. The plurality of network cards includes, for example, a first network card 513, a second network card 514, and a third network card 515. The plurality of functional objects includes, for example, a first functional object 516 and a second functional object 517. The plurality of ports includes, for example, a first port 518 and a second port 519. The plurality of network cards are, for example, physical network cards, the plurality of functional objects are, for example, logical objects, and the plurality of ports are, for example, logical ports.
For example, after the electronic device 510 receives the query request QR from the host computer 520 through the first network card 513, the first network card 513 forwards the query request QR to the first port 518. After the first function object 516 monitors that the query request QR is received at the first port 518, the indication information INS is generated with the first function object 516. The processor 511 determines the first network card 513 as a target network card based on the indication information INS. The processor 511 then acquires the device information DI from the memory 512, and instructs the second functional object 517 to transmit the device information DI to the second port 519 based on the association relationship. The second port 519 transfers the device information DI to the first network card 513 (target network card), and the device information DI is transmitted to the host computer 520 by the first network card 513.
In embodiments of the present disclosure, the network card includes, for example, but is not limited to, a WiFi network card, a wired network card.
The functions performed by the various devices or modules in the electronic device 510 will be further described below in conjunction with fig. 5.
According to an embodiment of the present disclosure, the electronic device 510 comprises at least a processor 511, a memory 512 communicatively coupled to the processor 511, and at least one network card 513, 514, 515 communicatively coupled to the processor 511. Each of the at least one network cards 513, 514, 515 is configured to receive a query request. The memory 512 stores instructions executable by the processor 511, the instructions being executable by the processor 511 to enable the processor 511 to perform: in response to receiving a query request for device information of the electronic device 510, generating indication information indicating a target network card of the at least one network card 513, 514, 515 that received the query request; determining a target network card from at least one network card 513, 514, 515 of the electronic device 510 based on the indication information; acquiring network card information of a target network card and attribute information of the electronic equipment 510 as equipment information; and transmitting the device information by using the target network card.
According to an embodiment of the present disclosure, the processor 511 is further configured to perform, before generating the indication information in response to receiving the query request for the device information of the electronic device 510: a first function object 516 is created and a determination is made as to whether a query request was received using the first function object 516. Generating the indication information in response to receiving the query request for the device information of the electronic device 510 includes: in the event that a query request is determined to be received using the first function object 516, indication information is generated using the first function object 516.
According to an embodiment of the present disclosure, the electronic device 510 further includes a first port 518; the processor 511 is further configured to perform: the query request for device information of the electronic device 510 is received via the target network card, from which the query request is forwarded to the first port 518. Generating the indication information in response to receiving the query request for the device information of the electronic device 510 includes: in the event that first function object 516 determines that a query request has been received at first port 518, indication information is generated using first function object 516.
Determining whether a query request is received using the first functional object 516, in accordance with an embodiment of the present disclosure, includes: first port 518 is listened to with first function object 516 to determine whether a query request is received at first port 518.
The processor 511 is further configured to perform, after determining the target network card from the at least one network card 513, 514, 515 of the electronic device 510 based on the indication information, according to an embodiment of the present disclosure: and creating a second function object 517, creating an association relationship between the second function object 517 and address information of the target network card, and transmitting the device information to the target network card by using the second function object 517 based on the association relationship.
The electronic device 510 also includes a second port 519 in accordance with an embodiment of the present disclosure. Creating an association relationship between the second function object 517 and address information of the target network card includes: an association relationship among the second function object 517, address information of the target network card, and port information of the second port 519 is created.
According to an embodiment of the present disclosure, based on the association relationship, transmitting the device information to the target network card using the second function object 517 includes: the device information is transmitted to the second port 519 by the second function object 517 based on the association relationship, and the device information is transferred from the second port 519 to the target network card based on the association relationship.
According to an embodiment of the present disclosure, the first functional object 516 includes a first type of socket word.
According to an embodiment of the present disclosure, the second functional object 517 includes a second-type socket word.
According to an embodiment of the present disclosure, the network card information of the target network card includes at least one of: the IP address of the target network card, the gateway information of the network where the target network card is located, and the mask of the target network card.
Fig. 6 schematically illustrates a block diagram of an electronic device according to an embodiment of the disclosure.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. The electronic device 600 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the respective methods and processes described above, for example, an information processing method for device information. For example, in some embodiments, the information processing method for device information may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the information processing method for device information described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the information processing method for the device information by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (17)

1. An information processing method for device information, comprising:
generating indication information in response to receiving a query request for equipment information of electronic equipment, wherein the electronic equipment comprises at least one network card, and the indication information indicates a target network card in the at least one network card, which receives the query request;
determining the target network card from at least one network card of the electronic equipment based on the indication information;
acquiring network card information of the target network card and attribute information of the electronic equipment as equipment information; and
transmitting the equipment information by using the target network card;
the method further includes, prior to generating the indication information in response to receiving the query request for device information of the electronic device:
creating a first functional object;
determining, with the first functional object, whether the query request is received;
wherein the generating of the indication information in response to receiving the query request for the device information of the electronic device includes: generating the indication information by using the first function object under the condition that the first function object is used for determining that the query request is received;
wherein the electronic device includes a first port; the method further comprises the steps of:
receiving a query request of equipment information of the electronic equipment through the target network card;
forwarding the query request from the target network card to the first port;
wherein the generating of the indication information in response to receiving the query request for the device information of the electronic device includes: the indication information is generated with the first functional object in case the first functional object determines that the query request has been received at the first port.
2. The method of claim 1, wherein the determining, with the first functional object, whether the query request was received comprises:
monitoring the first port with the first function object to determine whether the query request is received at the first port.
3. The method of claim 1, further comprising, after determining the target network card from at least one network card of the electronic device based on the indication information:
creating a second functional object;
establishing an association relationship between the second functional object and the address information of the target network card; and
and based on the association relation, the second function object is utilized to send the equipment information to the target network card.
4. The method of claim 3, wherein the electronic device comprises a second port; the creating the association relationship between the second functional object and the address information of the target network card includes:
and creating an association relationship among the second functional object, the address information of the target network card and the port information of the second port.
5. The method of claim 4, wherein the sending the device information to the target network card using the second function object based on the association comprises:
based on the association relation, the equipment information is sent to the second port by using the second functional object; and
and forwarding the equipment information from the second port to the target network card based on the association relation.
6. The method of claim 1, wherein the first functional object comprises a first type socket.
7. A method according to claim 3, wherein the second functional object comprises a socket of a second type.
8. The method of any of claims 1-7, wherein the network card information of the target network card includes at least one of:
the IP address of the target network card, the gateway information of the network where the target network card is located, and the mask of the target network card.
9. An electronic device, comprising:
a processor;
a memory communicatively coupled to the processor; and
at least one network card communicatively coupled to the processor, each of the at least one network card configured to receive a query request; wherein,,
the memory stores instructions executable by the processor to enable the processor to perform:
generating indication information in response to receiving a query request for equipment information of electronic equipment, wherein the indication information indicates a target network card in the at least one network card which receives the query request;
determining the target network card from at least one network card of the electronic equipment based on the indication information;
acquiring network card information of the target network card and attribute information of the electronic equipment as equipment information; and
transmitting the equipment information by using the target network card;
the processor is further configured to execute, prior to generating the indication information in response to receiving a query request for device information of the electronic device:
creating a first functional object;
determining, with the first functional object, whether the query request is received;
wherein the generating of the indication information in response to receiving the query request for the device information of the electronic device includes: generating the indication information by using the first function object under the condition that the first function object is used for determining that the query request is received;
wherein the electronic device further comprises a first port; the processor is further configured to perform:
receiving a query request of equipment information of the electronic equipment through the target network card;
forwarding the query request from the target network card to the first port;
wherein the generating of the indication information in response to receiving the query request for the device information of the electronic device includes: the indication information is generated with the first functional object in case the first functional object determines that the query request has been received at the first port.
10. The electronic device of claim 9, wherein the determining, with the first functional object, whether the query request was received comprises:
monitoring the first port with the first function object to determine whether the query request is received at the first port.
11. The electronic device of claim 9, the processor further to execute, after determining the target network card from at least one network card of the electronic device based on the indication information:
creating a second functional object;
establishing an association relationship between the second functional object and the address information of the target network card; and
and based on the association relation, the second function object is utilized to send the equipment information to the target network card.
12. The electronic device of claim 11, wherein the electronic device further comprises a second port; the creating the association relationship between the second functional object and the address information of the target network card includes:
and creating an association relationship among the second functional object, the address information of the target network card and the port information of the second port.
13. The electronic device of claim 12, wherein the sending the device information to the target network card using the second function object based on the association comprises:
based on the association relation, the equipment information is sent to the second port by using the second functional object; and
and forwarding the equipment information from the second port to the target network card based on the association relation.
14. The electronic device of claim 9, wherein the first functional object comprises a first type socket.
15. The electronic device of claim 11, wherein the second functional object comprises a second type socket.
16. The electronic device of any of claims 9-15, wherein the network card information of the target network card includes at least one of:
the IP address of the target network card, the gateway information of the network where the target network card is located, and the mask of the target network card.
17. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202110274124.9A 2021-03-12 2021-03-12 Information processing method for device information, electronic device and medium Active CN113032659B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110274124.9A CN113032659B (en) 2021-03-12 2021-03-12 Information processing method for device information, electronic device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110274124.9A CN113032659B (en) 2021-03-12 2021-03-12 Information processing method for device information, electronic device and medium

Publications (2)

Publication Number Publication Date
CN113032659A CN113032659A (en) 2021-06-25
CN113032659B true CN113032659B (en) 2023-08-04

Family

ID=76469499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110274124.9A Active CN113032659B (en) 2021-03-12 2021-03-12 Information processing method for device information, electronic device and medium

Country Status (1)

Country Link
CN (1) CN113032659B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107070790A (en) * 2016-12-16 2017-08-18 浙江宇视科技有限公司 A kind of route learning method and routing device
CN108777722A (en) * 2018-04-25 2018-11-09 广州视源电子科技股份有限公司 Multisystem group-net communication method, apparatus, mobile terminal and storage medium
CN112272192A (en) * 2020-11-18 2021-01-26 北京知道未来信息技术有限公司 Domain name blasting method and device, storage medium and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7509509B2 (en) * 2006-02-13 2009-03-24 International Business Machines Corporation Method and mechanism for cataloguing information on devices in a computing system
TWI523464B (en) * 2014-01-27 2016-02-21 台達電子工業股份有限公司 Network card capable of searching ability, monitoring device including the network card and searching method used for the network card and the monitoring device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107070790A (en) * 2016-12-16 2017-08-18 浙江宇视科技有限公司 A kind of route learning method and routing device
CN108777722A (en) * 2018-04-25 2018-11-09 广州视源电子科技股份有限公司 Multisystem group-net communication method, apparatus, mobile terminal and storage medium
CN112272192A (en) * 2020-11-18 2021-01-26 北京知道未来信息技术有限公司 Domain name blasting method and device, storage medium and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种移动IP协议链路层部分的设计与实现;张大伟, 朱明峰, 田霖;计算机工程与应用(31);全文 *
基于Lpc2290的智能家庭网关系统的设计及实现;伍艮常;;组合机床与自动化加工技术(06);全文 *

Also Published As

Publication number Publication date
CN113032659A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN108268328B (en) Data processing device and computer
CN113626224B (en) NFC data interaction method and device, electronic equipment and storage medium
US9094483B2 (en) System and method for collecting and evaluating statistics to establish network connections
US11916740B2 (en) K8S-based service deployment method and apparatus, device, and medium
US20170289243A1 (en) Domain name resolution method and electronic device
CN115022279B (en) Intranet penetration method and device
CN114338594A (en) ARP (Address resolution protocol) response-substituting method, device, equipment and storage medium in Kubernetes environment
CN110784336A (en) Multi-device intelligent timing delay scene setting method and system based on Internet of things
CN108388372B (en) Method, device and equipment for self-adapting touch data and storage medium
CN111224878B (en) Route forwarding method and device, electronic equipment and storage medium
WO2019015040A1 (en) Signal strength based frequency point selection method and internet of things terminal
US10992635B2 (en) Establishing connection between different overlay networks using edge application gateway
US20210399986A1 (en) Data communication method, server device, client device and medium
US20150319069A1 (en) Method, Apparatus, and System for Identifying Abnormal IP Data Stream
CN113032659B (en) Information processing method for device information, electronic device and medium
CN116450554A (en) Interrupt processing method, root complex device and electronic device
CN109120731B (en) Universal communication method, system and device
CN113660134B (en) Port detection method, device, electronic device and storage medium
CN113010285B (en) Method, apparatus, device, medium, and article for processing data
CN113691937B (en) Method for determining position information, cloud mobile phone and terminal equipment
CN112910910B (en) Method, device, equipment and storage medium for processing OPCDA protocol message
CN114598532A (en) Connection establishing method, device, electronic equipment and storage medium
US11303572B2 (en) Methods and systems for accounting for data usage in MPTCP
US9634987B2 (en) Obtaining a MAC address from an external source
CN112714420A (en) Network access method and device of wifi hotspot providing equipment and electronic equipment

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
GR01 Patent grant
GR01 Patent grant