Video recorder, video recorder access method and device, electronic equipment and storage medium

By generating a virtual network card in the video recorder and using a USB connection cable, the terminal device can directly establish a network connection with the video recorder, solving the problem of high access complexity in the existing technology, and achieving the effect of simple operation and direct connection.

CN120201235APending Publication Date: 2025-06-24HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311779616.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-21
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In the prior art, the process of accessing the video recorder by terminal devices is complicated, and it is necessary to build a wireless LAN or configure a display screen for the video recorder, resulting in a high operational complexity.

Method used

Connect the terminal device and the video recorder through a USB connection cable, and generate a virtual network card in the video recorder. Through the virtual network card, the terminal device creates a network connection between the video recorder and the terminal device, and directly sends the recorder recorder information to the terminal device.

Benefits of technology

Without configuring a display screen or building a wireless LAN, the terminal device can directly connect the recorder through a USB connection cable to create a network connection. It is simple to operate and reduces the complexity of the terminal device accessing the recorder.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201235A_ABST
    Figure CN120201235A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video recorder, a video recorder access method and device, electronic equipment and a storage medium, the video recorder comprises a USB interface, a processor and a memory, the USB interface is used for inserting a USB connecting line, and the USB connecting line is used for connecting the video recorder and terminal equipment; a computer program is stored in the memory; the processor is used for reading the computer program in the memory and executing the following operations: after the video recorder and the terminal equipment are connected through the USB connecting line, generating a virtual network card; and requesting the terminal equipment to create network connection between the video recorder and the terminal equipment through the USB connecting line and the virtual network card, and sending video recorder information of the video recorder to the terminal equipment through the USB connecting line and the network connection. The complexity of accessing the video recorder by the terminal equipment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of security, and in particular, to a video recorder, a method for accessing a video recorder, a device, an electronic device, and a storage medium. Background Art

[0002] A Network Video Recorder (NVR) (hereinafter referred to as a video recorder) can perform video recording and share the recorded video on the network. Before the video recorder works, it is usually necessary for a terminal device to access the video recorder to activate the video recorder and configure network parameters for the video recorder through the terminal device.

[0003] In the related art, before accessing a network device through a terminal device, a network connection needs to be established between the terminal device and the video recorder. Usually, the network connection between the terminal device and the video recorder is established in the following ways: a wireless local area network is set up for the terminal device and the video recorder so that the terminal device and the video recorder are in the same wireless local area network, and a network connection between the terminal device and the video recorder is established in this wireless local area network. Or, a display screen is configured for the video recorder, and the connection information of the video recorder is displayed through the display screen, and the terminal device establishes a network connection between the terminal device and the video recorder according to the connection information.

[0004] In the above process, before the terminal device accesses the video recorder, it is necessary to set up a wireless local area network or configure a display screen for the video recorder, and the operation process is complex, resulting in a high complexity of the terminal device accessing the video recorder. Summary of the Invention

[0005] Embodiments of the present application provide a video recorder, a method for accessing a video recorder, a device, an electronic device, and a storage medium, so as to solve the defect that the complexity of a terminal device accessing a video recorder in the prior art is relatively high.

[0006] In a first aspect, an embodiment of the present application provides a video recorder, including a Universal Serial Bus (USB) interface, a processor, and a memory. The processor is respectively connected to the USB interface and the memory. Among them,

[0007] The USB interface is used to plug in a USB connection line, and the USB connection line is used to connect the video recorder and the terminal device;

[0008] The memory stores a computer program;

[0009] The processor is configured to read the computer program in the memory and perform the following operations:

[0010] After the video recorder and the terminal device are connected through the USB connection line, generate a virtual network card;

[0011] Request the terminal device to create a network connection between the video recorder and the terminal device through the USB cable and the virtual network card, and send the video recorder information of the video recorder to the terminal device through the USB cable and the network connection.

[0012] In a possible implementation manner, requesting the terminal device to create a network connection between the video recorder and the terminal device through the USB cable and the virtual network card includes:

[0013] Send a broadcast message to the terminal device through the USB cable and the virtual network card, where the broadcast message includes the MAC address of the video recorder;

[0014] Receive multiple free IP addresses allocated by the terminal device through the USB cable and the virtual network card;

[0015] Determine a second IP address among the multiple free IP addresses, and send the second IP address to the terminal device through the USB cable and the virtual network card to create the network connection.

[0016] In a possible implementation manner, generating a virtual network card includes:

[0017] Obtain the interface type of the USB interface;

[0018] When it is determined that the interface type is a network sharing type, start the virtual network card driver;

[0019] Initialize to obtain the virtual network card through the virtual network card driver.

[0020] In a possible implementation manner, the video recorder further includes a physical network card, and the processor is further configured to:

[0021] Receive a mounted device acquisition request sent by the terminal device through the USB cable and the virtual network card;

[0022] Obtain the camera information of at least one network camera mounted under the physical network card through the virtual network card;

[0023] Send the camera information of the at least one network camera to the terminal device through the USB cable and the network connection.

[0024] In a second aspect, an access method for a video recorder provided in an embodiment of the present application is applied to a terminal device, and the method includes:

[0025] In response to the terminal device being connected to the video recorder through a USB cable, display a first page, where the first page includes a network sharing control;

[0026] In response to a triggering operation on the network sharing control, create a network connection between the terminal device and the video recorder;

[0027] Display a second page, where the second page includes a scanning control;

[0028] In response to a triggering operation on the scanning control, obtain the video recorder information of the video recorder through the USB connection line and the network connection, and display the video recorder information.

[0029] In a possible implementation manner, in response to a triggering operation on the network sharing control, creating a network connection between the terminal device and the video recorder includes:

[0030] In response to a triggering operation on the network sharing control, assign a first Internet Protocol (IP) address to the terminal device;

[0031] Assign a second IP address to the video recorder through a virtual network card in the video recorder to implement creating the network connection, where the virtual network card is generated after the video recorder is connected to the terminal device through the USB connection line.

[0032] In a possible implementation manner, assigning a second IP address to the video recorder through a virtual network card in the video recorder includes:

[0033] Receive a broadcast message sent by the video recorder through the virtual network card and the USB connection line, where the broadcast message includes the MAC address of the video recorder;

[0034] According to the broadcast message, determine multiple available IP addresses, and send the multiple available IP addresses to the video recorder through the USB connection line and the virtual network card;

[0035] Receive the second IP address sent by the video recorder through the virtual network card and the USB connection line, where the second IP address is selected by the video recorder from the multiple available IP addresses.

[0036] In a possible implementation manner, in response to a triggering operation on the scanning control, obtaining the video recorder information of the video recorder through the USB connection line and the network connection includes:

[0037] In response to a triggering operation on the scanning control, send a broadcast packet through the USB connection line and the network connection;

[0038] Receive the video recorder information sent by the video recorder through the USB connection line and the network connection.

[0039] In a possible implementation, the method further includes:

[0040] Performing an activation process on the video recorder through the USB connection line and the network connection; or,

[0041] Obtaining camera information of at least one network camera mounted under the physical network card of the video recorder through the USB connection line and the network connection.

[0042] In a third aspect, an access device for a video recorder provided by an embodiment of the present application is applied to a terminal device, and the device includes:

[0043] A first display module, configured to display a first page in response to the terminal device being connected to the video recorder through a USB connection line, where the first page includes a network sharing control;

[0044] A creation module, configured to create a network connection between the terminal device and the video recorder in response to a trigger operation on the network sharing control;

[0045] A second display module, configured to display a second page, where the second page includes a scan control;

[0046] A first processing module, configured to obtain video recorder information of the video recorder through the USB connection line and the network connection and display the video recorder information in response to a trigger operation on the scan control.

[0047] In a possible implementation, the creation module is specifically configured to:

[0048] In response to a trigger operation on the network sharing control, allocate a first Internet protocol IP address to the terminal device;

[0049] Allocate a second IP address to the video recorder through a virtual network card in the video recorder to create the network connection, where the virtual network card is generated after the video recorder is connected to the terminal device through the USB connection line;

[0050] And / or, the creation module is specifically configured to:

[0051] Receive a broadcast message sent by the video recorder through the virtual network card and the USB connection line, where the broadcast message includes the MAC address of the video recorder;

[0052] Determine a plurality of idle IP addresses according to the broadcast message, and send the plurality of idle IP addresses to the video recorder through the USB connection line and the virtual network card;

[0053] Receive the second IP address sent by the video recorder through the virtual network card and the USB connection line, where the second IP address is selected by the video recorder from the multiple idle IP addresses;

[0054] And / or, the first processing module is specifically configured to:

[0055] In response to a trigger operation on the scanning control, send a broadcast packet through the USB connection line and the network connection;

[0056] Receive the video recorder information sent by the video recorder through the USB connection line and the network connection;

[0057] And / or, the device further includes a second processing module, and the second processing module is specifically configured to:

[0058] Perform an activation process on the video recorder through the USB connection line and the network connection; or,

[0059] Obtain the camera information of at least one network camera mounted under the physical network card of the video recorder through the USB connection line and the network connection.

[0060] In a possible implementation manner, the creation module is specifically configured to:

[0061] In response to a trigger operation on the network sharing control, allocate a first Internet protocol IP address for the terminal device;

[0062] Allocate a second IP address for the video recorder through the virtual network card in the video recorder to implement the creation of the network connection, where the virtual network card is generated after the video recorder is connected to the terminal device through the USB connection line.

[0063] In a possible implementation manner, the creation module is specifically configured to:

[0064] Receive the broadcast message sent by the video recorder through the virtual network card and the USB connection line, where the broadcast message includes the MAC address of the video recorder;

[0065] Determine multiple idle IP addresses according to the broadcast message, and send the multiple idle IP addresses to the video recorder through the USB connection line and the virtual network card;

[0066] Receive the second IP address sent by the video recorder through the virtual network card and the USB connection line, where the second IP address is selected by the video recorder from the multiple idle IP addresses.

[0067] In a possible implementation manner, the first processing module is specifically configured to:

[0068] In response to a triggering operation on the scanning control, send a broadcast packet through the USB connection line and the network connection;

[0069] Receive the video recorder information sent by the video recorder through the USB connection line and the network connection.

[0070] In a possible implementation manner, the device further includes a second processing module, and the second processing module is specifically configured to:

[0071] Perform an activation process on the video recorder through the USB connection line and the network connection; or,

[0072] Obtain the camera information of at least one network camera mounted under the physical network card of the video recorder through the USB connection line and the network connection.

[0073] In a fourth aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor;

[0074] The memory stores computer program instructions;

[0075] The processor executes the computer program instructions stored in the memory to implement the method according to any one of the second aspects.

[0076] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer program instructions are stored, and when the computer program instructions are executed by a processor, they are used to implement the method according to any one of the second aspects.

[0077] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the method according to any one of the second aspects.

[0078] An embodiment of the present application provides a video recorder, an access method, device, electronic device and storage medium for the video recorder. The video recorder includes a USB interface, a processor and a memory. The USB interface is used to plug in a USB connection cable, and the USB connection cable is used to connect the video recorder and the terminal device. A computer program is stored in the memory. The processor is configured to read the computer program in the memory and perform the following operations: after the video recorder and the terminal device are connected through the USB connection cable, generate a virtual network card; request the terminal device to create a network connection between the video recorder and the terminal device through the USB connection cable and the virtual network card, and send the video recorder information of the video recorder to the terminal device through the USB connection cable and the network connection. In this way, there is no need to configure a display screen for the video recorder or build a wireless local area network for the terminal device and the video recorder. The terminal device can directly connect to the video recorder through the USB connection cable to create a network connection between the terminal device and the video recorder, which is simple to operate and reduces the complexity of the terminal device accessing the video recorder. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0080] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application;

[0081] Figure 2 A schematic flowchart of an access method for a video recorder provided by an embodiment of the present application;

[0082] Figure 3 A schematic diagram of the interface of a display screen provided by an embodiment of the present application;

[0083] Figure 4 Another schematic diagram of the interface of a display screen provided by an embodiment of the present application;

[0084] Figure 5 A schematic diagram of the structure of a video recorder provided by an embodiment of the present application;

[0085] Figure 6 Another schematic flowchart of an access method for a video recorder provided by an embodiment of the present application;

[0086] Figure 7 Another schematic flowchart of an access method for a video recorder provided by an embodiment of the present application;

[0087] Figure 8Schematic flowchart of another method for accessing a video recorder provided by an embodiment of the present application;

[0088] Figure 9 Schematic flowchart of yet another method for accessing a video recorder provided by an embodiment of the present application;

[0089] Figure 10 Schematic structural diagram of an apparatus for accessing a video recorder provided by an embodiment of the present application;

[0090] Figure 11 Schematic structural diagram of another apparatus for accessing a video recorder provided by an embodiment of the present application;

[0091] Figure 12 Schematic structural diagram of an electronic device provided by an embodiment of the present application.

[0092] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and more detailed descriptions will be provided hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed embodiments

[0093] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0094] It should be noted that although terms such as "first" and "second" are used in the embodiments of the present application to describe various pieces of information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. Optionally, without departing from the scope of the present application, the first piece of information may also be referred to as the second piece of information, and similarly, the second piece of information may also be referred to as the first piece of information.

[0095] It should be understood that the terms "comprising" and "including" indicate the presence of the previously mentioned features, steps, and operations, but do not exclude the presence, appearance, or addition of one or at least one other feature, step, or operation. The term "and / or" used in the present application can be interpreted inclusively, or means any one or any combination. Optionally, "A and / or B" means "any one of the following: A; B; A and B". Additionally, the character " / " in this text generally indicates an "or" relationship between the associated objects before and after.

[0096] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties. Moreover, the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards, and corresponding operation entrances are provided for users to choose to authorize or reject.

[0097] Figure 1 This is a schematic diagram of an application scenario provided for the embodiments of this application. Please refer to Figure 1 , Figure 1 It may include a terminal device 101 and a network video recorder 102 (hereinafter referred to as a video recorder).

[0098] Among them, the terminal device 101 can be implemented in various forms. For example, the terminal device 101 may include devices such as mobile phones, tablet computers, laptop computers, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), wearable devices, smart bracelets, etc.

[0099] The video recorder 102 can be used for storage and forwarding in a network video monitoring system. The video recorder 102 can access multiple network cameras (IP cameras, IPCs), and perform decoding and display, video recording storage, network transmission, etc. on the video signals and / or audio signals transmitted by each network camera. Among them, the system in the video recorder 102 can be developed based on Linux or based on Windows, which is not limited here.

[0100] In the related art, before accessing a network device through a terminal device, a network connection needs to be established between the terminal device and the video recorder. Usually, the network connection between the terminal device and the video recorder is established in the following ways: Set up a wireless local area network for the terminal device and the video recorder so that the terminal device and the video recorder are in the same wireless local area network, and establish a network connection between the terminal device and the video recorder in this wireless local area network. Or, configure a display screen for the video recorder, display the connection information of the video recorder through the display screen, and the terminal device establishes a network connection between the terminal device and the video recorder according to this connection information.

[0101] In the above process, before the terminal device accesses the video recorder, it is necessary to set up a wireless local area network or configure a display screen for the video recorder, and the operation process is complex, resulting in a relatively high complexity for the terminal device to access the video recorder.

[0102] To solve the above technical problems, an embodiment of the present application provides a video recorder and a method for accessing a video recorder. The terminal device is connected to the video recorder through a USB cable, and a network connection between the terminal device and the video recorder is created. Through the USB cable and the network connection, the video recorder sends the video recorder information of the video recorder to the terminal device. In this way, there is no need to configure a display screen for the video recorder or set up a wireless local area network for the terminal device and the video recorder. The terminal device can directly connect to the video recorder through the USB cable to create a network connection between the terminal device and the video recorder, with simple operation and reduced complexity of accessing the video recorder by the terminal device.

[0103] Next, the technical solutions shown in the present application will be described in detail through specific embodiments. It should be noted that the following several embodiments can exist independently or be combined with each other. For the same or similar content, it will not be repeated in different embodiments.

[0104] Figure 2 The flowchart of a method for accessing a video recorder provided by an embodiment of the present application. The execution subject of the embodiment of the present application can be a terminal device or a control device provided in the terminal device. The control device can be implemented by software or by a combination of software and hardware. Refer to Figure 2 , the method includes:

[0105] S201. In response to the connection of the terminal device to the video recorder through the USB cable, display a first page.

[0106] The first page can be used for the user to select the purpose of the USB connection. The first page can include a network sharing control. The network sharing control can be used to implement the network connection between the terminal device and the device connected through the USB cable.

[0107] When the terminal device detects that the terminal device is connected to the video recorder through the USB cable, in response to the connection between the terminal device and the video recorder, display the first page.

[0108] Next, in combination with Figure 3 , an explanation of the display of the first page will be given.

[0109] Figure 3 The interface schematic diagram of a display screen provided by an embodiment of the present application. Please refer to Figure 3 , including the interface.

[0110] Please refer to the interface. In response to the connection of the terminal device to the video recorder via a USB cable, the first page is displayed on the interface. The first page includes only a charging control, a file transfer control, a photo transfer control, a network sharing control, and a Musical Instrument Digital Interface (MIDI) control. The user can click on the corresponding control. If the user clicks on the network sharing control, the terminal device enables the network sharing function.

[0111] S202. In response to the triggering operation on the network sharing control, create a network connection between the terminal device and the video recorder.

[0112] The triggering operation can include a click operation, a double-click operation, a swipe operation, etc., which are not limited here.

[0113] The terminal device can detect the triggering operation of the user on the network sharing control. In response to this triggering operation, start the driver program to create a network connection between the terminal device and the video recorder.

[0114] Among them, the driver program can be a Remote Network Driver Interface Specification (RNDIS) driver, which is not limited here.

[0115] Optionally, the network connection between the terminal device and the video recorder can be created in the following way: In response to the triggering operation on the network sharing control, assign a first Internet Protocol (IP) address to the terminal device; assign a second IP address to the video recorder through the virtual network card in the video recorder to achieve the creation of the network connection.

[0116] Among them, the first IP address can be an IP address automatically obtained by the terminal device.

[0117] For example, the terminal device assigns a first IP address of 192.168.4.215 to itself.

[0118] The virtual network card can be generated after the video recorder is connected to the terminal device via a USB cable. The virtual network card can simulate the function of a physical network card through the application program of the video recorder, enabling the virtual machine to be interconnected with the external network.

[0119] The second IP address can be an IP address selected by the video recorder from multiple idle IP addresses sent by the terminal device.

[0120] For example, the second IP address can be 192.168.4.256.

[0121] S203. Display the second page.

[0122] The second page may include a scanning control. The scanning control can be used to discover devices that can be interconnected. The scanning control can scan devices within the same local area network, or can also scan devices connected to the network through a USB connection cable.

[0123] An application program interconnected with the video recorder can be launched, the scanning device function of the application program interconnected with the video recorder can be opened, and the second page can be displayed.

[0124] S204. In response to a triggering operation on the scanning control, obtain the video recorder information of the video recorder through a USB connection cable and a network connection, and display the video recorder information.

[0125] The video recorder information may include the serial number of the video recorder, the model of the video recorder, the name of the video recorder, etc., which are not limited herein.

[0126] In response to a triggering operation on the scanning control, the scanning control can be turned on, the video recorder information of at least one video recorder within the same local area network or connected by a USB connection cable can be obtained, and the video recorder information can be displayed in the scanning list.

[0127] Next, in conjunction with Figure 4 , an explanation will be given on how the terminal device obtains the video recorder information of the video recorder through a USB connection cable and a network connection in response to a triggering operation on the scanning control, and displays the video recorder information.

[0128] Figure 4 This is another schematic diagram of the interface of the display screen provided by the embodiment of the present application. Please refer to Figure 4 , which includes interface 401 and interface 402.

[0129] Please refer to interface 401. The second page is displayed in interface 401, and the second page includes a scanning control. The user can trigger the scanning control, and the terminal device turns on the device scanning function.

[0130] Please refer to interface 402. In interface 402, the terminal device obtains the video recorder information of the video recorder within the same local area network or connected by a USB connection cable in response to a triggering operation on the scanning control, and displays the video recorder information. The user can trigger the selection control corresponding to the video recorder to perform a connection operation on the corresponding video recorder. Among them, the information of video recorder 1, the information of video recorder 2, the information of video recorder 3, and the selection controls corresponding to each video recorder are displayed in interface 402, so that the user can select the video recorder to be connected and perform a connection.

[0131] Optionally, after the video recorder information is displayed, the information in the video recorder can be accessed and set, specifically in the following ways: Activate the video recorder through a USB cable and network connection; or, through a USB cable and network connection, obtain the camera information of at least one network camera mounted under the physical network card of the video recorder.

[0132] Among them, the activation process may include logging in user information, activating the video recorder device, etc.

[0133] The physical network card can be used for the network connection between the video recorder and the network camera, enabling the video recorder to obtain the camera information of the network camera.

[0134] For example, the cloud account of the video recorder can be logged in through a USB cable and network connection.

[0135] For another example, through the physical network card of the video recorder, the camera information of at least one network camera mounted under the physical network card can be cached in the buffer area of the video recorder, and through a USB cable and network connection, the camera information of at least one network camera can be obtained from the buffer area. Among them, the camera information may include captured picture information, video information, etc.

[0136] Among them, the process of S201 - S202 is the process of the terminal device establishing a network connection with the video recorder, and the process of S203 - S204 is the process of the terminal device scanning and connecting to the video recorder. The above two processes can be independent processes or related processes, which are not limited here.

[0137] The access method of the video recorder provided in this embodiment, by responding to the connection of the terminal device to the video recorder through a USB cable, displaying the first page, responding to the trigger operation on the network sharing control, creating a network connection between the terminal device and the video recorder, displaying the second page, responding to the trigger operation on the scanning control, obtaining the video recorder information of the video recorder through a USB cable and network connection, and displaying the video recorder information. In this way, there is no need to configure a display screen for the video recorder or build a wireless local area network for the terminal device and the video recorder. The terminal device can directly connect to the video recorder through a USB cable, create a network connection between the terminal device and the video recorder, with simple operation and reduced complexity of the terminal device accessing the video recorder.

[0138] Next, in combination with Figure 5 , the structure of the video recorder will be further described.

[0139] Figure 5 It is a schematic structural diagram of a video recorder provided in an embodiment of the present application. Refer to Figure 5 , Figure 5It can be a video recorder, which may include a USB interface, a processor, and a memory.

[0140] The USB interface can be used to plug in a USB connection cable, and the USB connection cable can be used to connect the video recorder and the terminal device.

[0141] The memory may store a computer program.

[0142] The processor can be used to read the computer program in the memory and perform related operations.

[0143] Next, in conjunction with Figure 6 , the related operations performed by the processor will be further described.

[0144] Figure 6 FIG. is a schematic flow chart of another access method for a video recorder provided by an embodiment of the present application. Based on the above embodiment, refer to Figure 6 , for a detailed description of this method. The method includes:

[0145] S601. After the video recorder and the terminal device are connected by a USB connection cable, generate a virtual network card.

[0146] The virtual network card can simulate the function of a physical network card through an application program, enabling the virtual machine to be interconnected with an external network.

[0147] After the video recorder and the terminal device are connected by a USB connection cable, the video recorder can start the virtual network card driver program and generate a virtual network card through the virtual network card driver program.

[0148] Optionally, the virtual network card can be generated in the following manner: obtain the interface type of the USB interface; when it is determined that the interface type is a network sharing type, start the virtual network card driver program; and initialize to obtain the virtual network card through the virtual network card driver program.

[0149] Among them, the interface type of the USB interface may include a network sharing type, an external device type, and so on.

[0150] For example, assume that the terminal device determines that the interface type of the USB interface is a network sharing type in response to a trigger operation on a network sharing control, and the video recorder generates a virtual network card.

[0151] S602. Request the terminal device to create a network connection between the video recorder and the terminal device through the USB connection cable and the virtual network card.

[0152] The video recorder can enable the Dynamic Host Configuration Protocol (DHCP) function and request the terminal device to create a network connection between the video recorder and the terminal device through a USB connection line and a virtual network card.

[0153] S603. Send the video recorder information of the video recorder to the terminal device through the USB connection line and the network connection.

[0154] The video recorder information may include the serial number of the video recorder, the model of the video recorder, the name of the video recorder, etc., which are not limited herein.

[0155] It is possible to obtain the broadcast packet sent by the terminal device through the USB connection line and the network connection, and send the video recorder information of the video recorder to the terminal device through the USB connection line and the network connection according to the broadcast packet.

[0156] Among them, the broadcast packet can be used to obtain the device information of all devices in the same network segment.

[0157] For the implementation content of each step in the embodiments of the present application, reference may be made to the description of the corresponding steps or operations in the above method embodiments, and the repeated content will not be elaborated.

[0158] The access method of the video recorder provided in this embodiment, after connecting the video recorder and the terminal device through the USB connection line, generates a virtual network card, requests the terminal device to create a network connection between the video recorder and the terminal device through the USB connection line and the virtual network card, and sends the video recorder information of the video recorder to the terminal device through the USB connection line and the network connection. In this way, there is no need to configure a display screen for the video recorder or build a wireless local area network for the terminal device and the video recorder. The terminal device can directly connect to the video recorder through the USB connection line to create a network connection between the terminal device and the video recorder, with simple operation and reduced complexity of accessing the video recorder by the terminal device.

[0159] Next, in combination with Figure 7 the embodiments shown, the process (S602) of requesting the terminal device to create a network connection between the video recorder and the terminal device through the USB connection line and the virtual network card will be further described in detail.

[0160] Figure 7 It is a schematic flowchart of another access method of the video recorder provided in the embodiments of the present application. On the basis of the above embodiments, reference can be made to Figure 7 , and this method will be described in detail. This method includes:

[0161] S701. The video recorder sends a broadcast message to the terminal device through the USB connection line and the virtual network card.

[0162] Broadcast messages can be used for a video recorder to obtain an IP address.

[0163] Broadcast messages can include the MAC address of the video recorder.

[0164] The MAC address can be used to determine the address of the network device location.

[0165] Optionally, the broadcast message can also include the source IP address. Among them, the source IP address is the default address when the IP is missing. For example, the source IP address is 0.0.0.0.

[0166] The video recorder can obtain the MAC address of the video recorder, generate a broadcast message including the MAC address through a USB cable and a virtual network card, and send the broadcast message to the terminal device.

[0167] For example, assume that the MAC address of the video recorder is 00:1A:2B:3C:4D:5E. The broadcast message sent by the video recorder can include the MAC address 00:1A:2B:3C:4D:5E of the video recorder and the source IP address 0.0.0.0, so that other devices in the same network segment can know that the video recorder has no valid IP address at this time and needs to assign an IP address to the video recorder.

[0168] S702. The terminal device determines multiple idle IP addresses according to the broadcast message.

[0169] The idle IP address can represent an IP address that is idle in a certain network segment.

[0170] The terminal device can obtain all IP addresses in the network segment where the terminal device is located according to the broadcast message and determine multiple idle IP addresses.

[0171] For example, multiple idle IP addresses can be represented by Table 1:

[0172] Table 1

[0173] Idle IP address Content Idle IP address 1 192.168.4.156 Idle IP address 2 192.168.4.178 Idle IP address 3 192.168.4.196

[0174] S703. The terminal device sends multiple idle IP addresses to the video recorder through a USB cable and a virtual network card.

[0175] The terminal device combines multiple idle IP addresses for processing, generates address allocation information, and sends the address allocation information to the video recorder through a USB cable and a virtual network card.

[0176] S704. The video recorder determines a second IP address among multiple idle IP addresses.

[0177] The second IP address can be the IP address determined by the video recorder for itself.

[0178] The video recorder can obtain the address allocation information sent from the terminal device, parse and process the address allocation information to obtain multiple free IP addresses, and the video recorder can determine the second IP address from the multiple free IP addresses.

[0179] For example, assume that the video recorder selects the free IP address 2 from the 3 free IP addresses in Table 1 above, that is, determines 192.168.4.178 as the IP address of the video recorder.

[0180] S705. The video recorder sends the second IP address to the terminal device through the USB cable and the virtual network card to create a network connection.

[0181] The video recorder can generate response information according to the second IP address, and send the response information to the terminal device through the USB cable and the virtual network card, so that the terminal device can determine the second IP address of the video recorder and create a network connection.

[0182] For the implementation content of each step in the embodiments of the present application, reference may be made to the description of the corresponding steps or operations in the above method embodiments, and repeated content will not be elaborated.

[0183] The access method of the video recorder provided in this embodiment is as follows: the video recorder sends a broadcast message to the terminal device through the USB cable and the virtual network card, the terminal device determines multiple free IP addresses according to the broadcast message, sends the multiple free IP addresses to the video recorder through the USB cable and the virtual network card, the video recorder determines the second IP address from the multiple free IP addresses, and sends the second IP address to the terminal device through the USB cable and the virtual network card to create a network connection. In this way, there is no need to configure a display screen for the video recorder or build a wireless local area network for the terminal device and the video recorder. The terminal device can directly connect to the video recorder through the USB cable, allocate an IP address to the video recorder, and create a network connection between the terminal device and the video recorder, which is simple to operate and reduces the complexity of the terminal device accessing the video recorder.

[0184] Next, in combination with Figure 8 the following embodiments, the process (S204) of obtaining the video recorder information of the video recorder through the USB cable and the network connection in response to the trigger operation on the scanning control is further described in detail.

[0185] Figure 8 It is a schematic flowchart of another access method of the video recorder provided in the embodiments of the present application. On the basis of the above embodiments, reference may be made to Figure 8 for a detailed description of this method. The execution subject of the embodiments of the present application can be the terminal device or the processor provided in the terminal device. This method includes:

[0186] S801. In response to a trigger operation on the scanning control, send a broadcast packet via a USB cable and a network connection.

[0187] In response to a trigger operation on the scanning control, generate a broadcast packet for device discovery, and send the broadcast packet to all devices in the same network segment via a USB cable and a network connection.

[0188] Among them, the broadcast packet may include multiple fields.

[0189] For example, the multiple fields may include a search target field, etc., and the search target field may specify the device type to be searched.

[0190] S802. Receive the video recorder information sent by the video recorder via a USB cable and a network connection.

[0191] The video recorder information may include an IP address, a device model, a device name, etc.

[0192] After receiving the search broadcast packet sent by the terminal device, the video recorder may obtain the video recorder information, perform message processing on the video recorder information to generate device response information, and send the device response information to the terminal device via a USB cable and a network connection. The terminal device receives the device response information, parses and processes the device response information to obtain the video recorder information sent by the video recorder, and completes the process of device discovery.

[0193] For the implementation content of each step in the embodiments of the present application, reference may be made to the description of the corresponding steps or operations in the above method embodiments, and repeated content will not be elaborated.

[0194] In the access method of the video recorder provided in this embodiment, the terminal device responds to a trigger operation on the scanning control, sends a broadcast packet via a USB cable and a network connection, and receives the video recorder information sent by the video recorder via a USB cable and a network connection. In this way, there is no need to configure a display screen for the video recorder or build a wireless local area network for the terminal device and the video recorder. The terminal device can directly connect to the video recorder via a USB cable to obtain the video recorder information, with simple operation and reduced complexity of accessing the video recorder by the terminal device.

[0195] The above Figure 2 — Figure 8 The illustrated embodiment is a process of network connection and information interaction between the video recorder and the terminal device. After the network connection and information interaction between the video recorder and the terminal device, the terminal device can access the video recorder. Next, with reference to the Figure 9 illustrated embodiment, an example of the process of the terminal device accessing the video recorder will be described.

[0196] Figure 9Schematic flowchart of another method for accessing a video recorder provided by an embodiment of the present application. Based on the above embodiments, reference may be made to Figure 9 for a detailed description of this method. The execution subject of the embodiment of the present application may be a video recorder or a processor provided in the video recorder. The method includes:

[0197] S901. Receive a mounted device acquisition request sent by a terminal device through a USB connection line and a virtual network card.

[0198] The mounted device may be a device connected to the video recorder through a network. The mounted device acquisition request may be used to request information about the devices connected to the video recorder. The mounted device acquisition request may include the identifier of the terminal device and access permission information.

[0199] The terminal device may generate a mounted device acquisition request in response to a trigger operation by the user to obtain the mounted device, and send the mounted device acquisition request to the video recorder through the USB connection line and the virtual network card. The video recorder receives the mounted device acquisition request sent by the terminal device and performs an authentication process on the mounted device acquisition request.

[0200] S902. Obtain camera information of at least one network camera mounted under a physical network card through the virtual network card.

[0201] The network camera may be used to transmit video images recorded by the camera through the network. The camera information may include device type information, location information, and video information.

[0202] The video recorder may obtain the camera information of at least one network camera mounted under the physical network card, store the camera information of the at least one network camera in the shared buffer of the video recorder, and the video recorder may obtain the camera information of the at least one network camera stored in the shared buffer through the virtual network card.

[0203] S903. Send the camera information of at least one network camera to the terminal device through the USB connection line and the network connection.

[0204] The video recorder may compress the camera information of the at least one network camera and send the compressed camera information of the at least one network camera to the terminal device through the USB connection line and the network connection. The terminal device receives the camera information of the at least one network camera and displays the camera information of the at least one network camera on the terminal device.

[0205] For the implementation content of each step in the embodiment of the present application, reference may be made to the description of the corresponding step or operation in the above method embodiment, and repeated content will not be elaborated.

[0206] The access method of the video recorder provided in this embodiment receives the mounting device acquisition request sent by the terminal device through the USB connection line and the virtual network card, obtains the camera information of at least one network camera mounted under the physical network card through the virtual network card, and sends the camera information of at least one network camera to the terminal device through the USB connection line and the network connection. In this way, there is no need to configure a display screen for the video recorder or build a wireless local area network for the terminal device and the video recorder. The terminal device can directly obtain the camera information mounted under the video recorder through the USB connection line, with simple operation and reduced complexity of the terminal device accessing the video recorder.

[0207] Figure 10 It is a schematic structural diagram of an access device for a video recorder provided in an embodiment of the present application. Please refer to Figure 10 The device 1000 includes a first display module 1001, a creation module 1002, a second display module 1003, and a first processing module 1004, where

[0208] The first display module 1001 is configured to display a first page in response to the connection of the terminal device to the video recorder through a Universal Serial Bus (USB) connection line. The first page includes a network sharing control.

[0209] The creation module 1002 is configured to create a network connection between the terminal device and the video recorder in response to a trigger operation on the network sharing control.

[0210] The second display module 1003 is configured to display a second page, and the second page includes a scan control.

[0211] The first processing module 1004 is configured to obtain the video recorder information of the video recorder through the USB connection line and the network connection in response to a trigger operation on the scan control, and display the video recorder information.

[0212] In a possible implementation manner, the creation module 1002 is specifically configured to:

[0213] In response to a trigger operation on the network sharing control, allocate a first Internet Protocol (IP) address to the terminal device;

[0214] Allocate a second IP address to the video recorder through the virtual network card in the video recorder to create the network connection. The virtual network card is generated after the video recorder is connected to the terminal device through the USB connection line;

[0215] And / or, the creation module 1002 is specifically configured to:

[0216] Receive the broadcast message sent by the video recorder through the virtual network card and the USB connection line, where the broadcast message includes the MAC address of the video recorder;

[0217] Determine multiple idle IP addresses according to the broadcast message, and send the multiple idle IP addresses to the video recorder through the USB connection line and the virtual network card;

[0218] Receive the second IP address sent by the video recorder through the virtual network card and the USB connection line, where the second IP address is selected by the video recorder from the multiple idle IP addresses;

[0219] And / or, the first processing module 1004 is specifically configured to:

[0220] In response to the trigger operation on the scanning control, send a broadcast packet through the USB connection line and the network connection;

[0221] Receive the video recorder information sent by the video recorder through the USB connection line and the network connection;

[0222] And / or, the device further includes a second processing module, and the second processing module is specifically configured to:

[0223] Perform an activation process on the video recorder through the USB connection line and the network connection; or,

[0224] Obtain the camera information of at least one network camera mounted under the physical network card of the video recorder through the USB connection line and the network connection.

[0225] In a possible implementation manner, the creation module 1002 is specifically configured to:

[0226] In response to the trigger operation on the network sharing control, allocate a first Internet protocol IP address to the terminal device;

[0227] Allocate a second IP address to the video recorder through the virtual network card in the video recorder to create the network connection, where the virtual network card is generated after the video recorder is connected to the terminal device through the USB connection line.

[0228] In a possible implementation manner, the creation module 1002 is specifically configured to:

[0229] Receive the broadcast message sent by the video recorder through the virtual network card and the USB connection line, where the broadcast message includes the MAC address of the video recorder;

[0230] Determine multiple idle IP addresses according to the broadcast message, and send the multiple idle IP addresses to the video recorder through the USB cable and the virtual network card;

[0231] Receive a second IP address sent by the video recorder through the virtual network card and the USB cable, where the second IP address is selected by the video recorder from the multiple idle IP addresses.

[0232] In a possible implementation manner, the first processing module 1004 is specifically configured to:

[0233] In response to a trigger operation on the scanning control, send a broadcast packet through the USB cable and the network connection;

[0234] Receive the video recorder information sent by the video recorder through the USB cable and the network connection.

[0235] Figure 11 This is a schematic structural diagram of another access device for a video recorder provided by an embodiment of the present application. On the basis of the Figure 10 shown embodiment, please refer to Figure 11 , the device further includes a second processing module 1005, and the second processing module 1005 is specifically configured to:

[0236] Perform an activation process on the video recorder through the USB cable and the network connection; or,

[0237] Obtain the camera information of at least one network camera mounted under the physical network card of the video recorder through the USB cable and the network connection.

[0238] Figure 12 This is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Please refer to Figure 12 , the electronic device 1200 may include: a memory 1201, a processor 1202, and a transceiver 1203.

[0239] The memory 1201 is used to store program instructions;

[0240] The processor 1202 is used to execute the program instructions stored in the memory to enable the electronic device 20 to execute the above method.

[0241] The transceiver 1203 may include: a transmitter and / or a receiver. The transmitter may also be referred to as a sender, a transmitter, a transmission port, or a transmission interface, etc. Similar descriptions, and the receiver may also be referred to as a receiver, a receiving port, or a receiving interface, etc. Similar descriptions. Exemplarily, the memory 1201, the processor 1202, and the transceiver 1203 are interconnected with each other through a bus 1204.

[0242] The embodiments of the present application further provide a computer program product, which can be executed by a processor. When the computer program product is executed, the above method can be implemented.

[0243] The access device, electronic device, computer-readable storage medium and computer program product of the video recorder in the embodiments of the present application can execute the technical solutions shown in the embodiments of the above access method of the video recorder. The implementation principles and beneficial effects are similar, and will not be elaborated here.

[0244] All or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a readable memory. When the program is executed, it executes the steps including the above method embodiments; and the foregoing memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid state drive, magnetic tape, floppy disk, optical disc, and any combination thereof.

[0245] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate for implementing in the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the function specified in one block or multiple blocks.

[0246] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements in the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the function specified in one block or multiple blocks.

[0247] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the steps for the functions specified in one process or a plurality of processes and / or blocks Figure 1 one process or a plurality of processes and / or blocks Figure 1 in one block or a plurality of blocks.

[0248] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A video recorder, characterized in that, It includes a Universal Serial Bus (USB) interface, a processor, and a memory. The processor is respectively connected to the USB interface and the memory. Among them, the USB interface is used to plug in a USB connection cable, and the USB connection cable is used to connect the video recorder and the terminal device; a computer program is stored in the memory; the processor is used to read the computer program in the memory and perform the following operations: generate a virtual network card after the video recorder and the terminal device are connected through the USB connection cable; request the terminal device to create a network connection between the video recorder and the terminal device through the USB connection cable and the virtual network card, and send the video recorder information of the video recorder to the terminal device through the USB connection cable and the network connection.

2. The video recorder according to claim 1, characterized in that, Requesting the terminal device to create a network connection between the video recorder and the terminal device through the USB connection cable and the virtual network card includes: sending a broadcast message including the MAC address of the video recorder to the terminal device through the USB connection cable and the virtual network card; receiving multiple free IP addresses assigned by the terminal device through the USB connection cable and the virtual network card; determine a second IP address among the multiple free IP addresses, and send the second IP address to the terminal device through the USB connection cable and the virtual network card to create the network connection.

3. The video recorder according to claim 1 or 2, characterized in that, Generating a virtual network card includes: obtaining the interface type of the USB interface; starting the virtual network card driver program when it is determined that the interface type is a network sharing type; initializing to obtain the virtual network card through the virtual network card driver program.

4. The video recorder according to any one of claims 1 to 3, characterized in that The video recorder further includes a physical network card, and the processor is further used to: receive a mounted device acquisition request sent by the terminal device through the USB connection cable and the virtual network card; obtain the camera information of at least one network camera mounted under the physical network card through the virtual network card; send the camera information of the at least one network camera to the terminal device through the USB connection cable and the network connection.

5. A method for accessing a video recorder, characterized in that, When applied to a terminal device, the method includes: display a first page in response to the terminal device being connected to the video recorder through the USB connection cable. The first page includes a network sharing control; create a network connection between the terminal device and the video recorder in response to a trigger operation on the network sharing control; display a second page, and the second page includes a scan control; obtain the video recorder information of the video recorder through the USB connection cable and the network connection and display the video recorder information in response to a trigger operation on the scan control.

6. The method according to claim 5, characterized in that Creating a network connection between the terminal device and the video recorder in response to a trigger operation on the network sharing control includes: allocating a first Internet Protocol (IP) address for the terminal device in response to a trigger operation on the network sharing control; Assign a second IP address to the video recorder through the virtual network card in the video recorder to create the network connection. The virtual network card is generated after the video recorder is connected to the terminal device through the USB cable.

7. The method according to claim 6, wherein Assigning a second IP address to the video recorder through the virtual network card in the video recorder includes: Receiving a broadcast message sent by the video recorder through the virtual network card and the USB cable. The broadcast message includes the MAC address of the video recorder. Determining multiple available IP addresses according to the broadcast message, and sending the multiple available IP addresses to the video recorder through the USB cable and the virtual network card. Receiving the second IP address sent by the video recorder through the virtual network card and the USB cable. The second IP address is selected by the video recorder from the multiple available IP addresses.

8. The method according to any one of claims 5 to 7, characterized in that, In response to a trigger operation on the scanning control, obtaining the video recorder information of the video recorder through the USB cable and the network connection, including: In response to a trigger operation on the scanning control, sending a broadcast packet through the USB cable and the network connection. Receiving the video recorder information sent by the video recorder through the USB cable and the network connection.

9. The method according to any one of claims 5-8, characterized in that, The method further includes: Performing an activation process on the video recorder through the USB cable and the network connection; or, Obtaining the camera information of at least one network camera mounted under the physical network card of the video recorder through the USB cable and the network connection.

10. An access device for a video recorder, characterized in that, Applied to a terminal device, the apparatus includes: A first display module, configured to display a first page in response to the terminal device being connected to the video recorder through the USB cable. The first page includes a network sharing control. A creation module, configured to create a network connection between the terminal device and the video recorder in response to a trigger operation on the network sharing control. A second display module, configured to display a second page, where the second page includes a scanning control. A first processing module, configured to obtain the video recorder information of the video recorder through the USB cable and the network connection in response to a trigger operation on the scanning control, and display the video recorder information.

11. The device according to claim 10, characterized in that, The creation module is specifically configured to: In response to a trigger operation on the network sharing control, assign a first Internet Protocol (IP) address to the terminal device. Assign a second IP address to the video recorder through the virtual network card in the video recorder to create the network connection. The virtual network card is generated after the video recorder is connected to the terminal device through the USB cable. And / or, the creation module is specifically configured to: Receive a broadcast message sent by the video recorder through the virtual network card and the USB cable. The broadcast message includes the MAC address of the video recorder. Determine multiple available IP addresses according to the broadcast message, and send the multiple available IP addresses to the video recorder through the USB cable and the virtual network card. Receive the second IP address sent by the video recorder through the virtual network card and the USB connection line, where the second IP address is selected by the video recorder from the multiple idle IP addresses; And / or, the first processing module is specifically configured to: In response to a trigger operation on the scanning control, send a broadcast packet through the USB connection line and the network connection; Receive the video recorder information sent by the video recorder through the USB connection line and the network connection; And / or, the device further includes a second processing module, and the second processing module is specifically configured to: Activate the video recorder through the USB connection line and the network connection; or, Obtain the camera information of at least one network camera mounted under the physical network card of the video recorder through the USB connection line and the network connection.

12. An electronic device, characterized in that, Comprising: A memory, a processor, and a transceiver; Wherein, the memory stores computer program instructions; The processor executes the computer program instructions stored in the memory to implement the method according to any one of claims 5-9.

13. A computer-readable storage medium, characterized in that, Computer program instructions are stored in the computer-readable storage medium, and when the computer program instructions are executed by a processor, they are used to implement the method according to any one of claims 5-9.