Test method and device of network camera and storage medium
By obtaining the terminal hardware identification and pushing the terminal network identification, establishing a virtual address data channel, the connection problem in network camera testing is solved, and a faster and more economical test process is achieved.
Patent Information
- Application Number
- CN202510146167.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-13
AI Technical Summary
In the entire production test of network cameras, some devices do not have wired network ports, resulting in longer test cycles and increased costs, and manual pre-configuration is required to establish connections.
By obtaining the terminal hardware identification of the test terminal, a communication request is generated to obtain a virtual address, and the terminal network identification is pushed to the network camera through audio communication, and a data channel is established for testing.
Shorten the test cycle, reduce the testing cost, avoid manual preconfiguration steps, and improve the testing efficiency.
Smart Images

Figure CN119996648A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to but is not limited to the field of equipment testing technology, and in particular to a testing method, equipment and storage medium for a network camera. Background Art
[0002] At present, network cameras are usually connected to the local area network through a wired interface during production testing, and production testing tools complete the test through the local area network connection device. However, some network cameras do not retain wired network ports. The traditional solution is to power on the network camera and dial up to connect to the public network, and then establish a connection with the production testing tool at the corresponding workstation through a transit server for production testing. However, before the connection is established, relevant pre-configuration needs to be performed manually, which lengthens the test cycle and increases the test cost. Summary of the invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] The embodiments of the present application provide a network camera testing method, device and storage medium, which can shorten the testing cycle and reduce the testing cost.
[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a testing method for a network camera, which is applied to a test terminal. The testing method for the network camera includes: obtaining a terminal hardware identifier of the test terminal, generating a first communication request based on the terminal hardware identifier, and sending the first communication request to a management server, wherein the first communication request is used to instruct the management server to send the terminal network identifier and a first virtual address of the test terminal to the test terminal in response to the first communication request; pushing the terminal network identifier to the network camera through an audio communication method, so that the network camera generates a second communication request based on the terminal network identifier and the device identifier of the network camera, and sending the second communication request to the management server, wherein the second communication request is used to instruct the management server to send a second virtual address to the network camera in response to the second communication request; when the test terminal and the network camera are both verified on a signaling server, the network camera is tested through a data channel between the test terminal and the network camera, wherein the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address.
[0006] In some embodiments, after the test terminal and the network camera are both verified by the signaling server, before the network camera is tested through the data channel between the network camera, the testing method of the network camera also includes: accessing the signaling server; when the test terminal is verified by the signaling server, forwarding the first public network address of the test terminal to the network camera through the signaling server, and receiving the second public network address of the network camera forwarded by the signaling server, wherein the second public network address is sent by the network camera after the network camera is verified by the signaling server, the first public network address is used to associate with the first virtual address, and the second public network address is used to associate with the second virtual address.
[0007] In some embodiments, the first communication request is also used to instruct the management server to send a first access authorization code to the test terminal in response to the first communication request, and the second communication request is also used to instruct the management server to send a second access authorization code to the network camera in response to the second communication request. The testing of the network camera through the data channel with the network camera includes: sending the first virtual address to the second public network address, so that the network camera generates a device login request based on the first virtual address, the second virtual address and the second access authorization code; receiving the device login request sent by the network camera, and determining the login status of the network camera based on the first access authorization code and the device login request; when the login status is successful, testing the network camera through the data channel with the network camera.
[0008] In some embodiments, the testing method of the network camera also includes: determining whether the heartbeat connection with the network camera is normal; when it is determined that the heartbeat connection is normal, determining that the state of the data channel is a connected state, or, when it is determined that the heartbeat connection is abnormal, determining that the state of the data channel is a disconnected state; uploading the state of the data channel to the management server.
[0009] To achieve the above-mentioned purpose, the second aspect of an embodiment of the present application proposes a testing method for a network camera, which is applied to a network camera, and the testing method for the network camera includes: receiving a terminal network identifier pushed by a test terminal through an audio communication method; generating a second communication request based on the terminal network identifier and the device identifier of the network camera, and sending the second communication request to a management server, so that the management server sends a second virtual address to the network camera in response to the second communication request; wherein, after the test terminal and the network camera both pass login verification on a signaling server, the test terminal tests the network camera through a data channel between the test terminal and the network camera, and the data channel is jointly established by the test terminal based on a first virtual address and by the network camera based on the second virtual address; wherein the terminal network identifier and the first virtual address are both sent by the management server to the test terminal in response to a first communication request, and the first communication request is generated by the test terminal based on the terminal hardware identifier of the test terminal.
[0010] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes a testing method for a network camera, which is applied to a management server, and the testing method for the network camera includes: receiving a first communication request sent by a test terminal, and sending a terminal network identifier and a first virtual address of the test terminal to the test terminal in response to the first communication request, wherein the first communication request is generated by the test terminal based on the terminal hardware identifier; receiving a second communication request sent by the network camera, and sending a second virtual address to the network camera in response to the second communication request, wherein the second communication request is generated by the network camera based on the terminal network identifier and the device identifier of the network camera, and the terminal network identifier is pushed to the network camera by the test terminal through audio communication; wherein, after the test terminal and the network camera both pass the login verification on the signaling server, the test terminal tests the network camera through a data channel between the test terminal and the network camera, and the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address.
[0011] In some embodiments, sending the terminal network identifier and the first virtual address of the test terminal to the test terminal in response to the first communication request includes: parsing based on the first communication request to obtain the terminal hardware identifier; generating the terminal network identifier of the test terminal based on the terminal hardware identifier, and assigning a first virtual address to the test terminal; storing the terminal network identifier and the first virtual address in association with each other, and sending the terminal network identifier and the first virtual address to the test terminal.
[0012] In some embodiments, sending a second virtual address to the network camera in response to the second communication request includes: parsing based on the second communication request to obtain the terminal network identifier and the device identifier; determining the virtual address interval to which the terminal network identifier is assigned, determining an unassigned second virtual address in the virtual address interval, and assigning the second virtual address to the network camera corresponding to the device identifier; and sending the second virtual address to the network camera.
[0013] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the network camera testing method described in the first aspect when executing the computer program.
[0014] To achieve the above-mentioned purpose, the fifth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program. When the computer program is executed by a processor, it implements the testing method of the network camera described in the first aspect above.
[0015] The embodiments of the present application include at least the following beneficial effects: obtaining the terminal hardware identification of the test terminal, then generating a first communication request based on the terminal hardware identification, and sending the first communication request to the management server, so that the management server sends the terminal network identification and the first virtual address of the test terminal to the test terminal in response to the first communication request, and then pushing the terminal network identification to the network camera through audio communication, so that the network camera generates a second communication request based on the terminal network identification and the device identification of the network camera, and sending the second communication request to the management server, so that the management server sends the second virtual address to the network camera in response to the second communication request. Therefore, after the test terminal and the network camera are both verified in the signaling server, the test terminal can jointly establish a data channel with the network camera based on the first virtual address and the network camera can jointly establish a data channel with the network camera based on the second virtual address. Since the first virtual address and the second virtual address can both be used as the address of a party participating in the test in the local area network, the test data originally transmitted through the local area network can be transmitted through the above-mentioned data channel. Therefore, the test system originally tested based on the local area network can be directly tested through the above-mentioned data channel without the need to develop new test tools, which can shorten the test cycle and reduce the test cost.
[0016] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0018] Figure 1 A schematic diagram of an optional flow chart of the network camera testing method provided in an embodiment of the present application being applied to a testing terminal;
[0019] Figure 2 An optional flowchart of public network mapping provided in an embodiment of the present application;
[0020] Figure 3 A schematic diagram of an optional process of logging into a test terminal provided in an embodiment of the present application;
[0021] Figure 4 An optional specific flow chart of the heartbeat mechanism provided in the embodiment of the present application;
[0022] Figure 5 A schematic diagram of an optional flow chart of the network camera testing method provided in the embodiment of the present application applied to a network camera;
[0023] Figure 6 An optional flow chart of the network camera testing method provided in the embodiment of the present application applied to a management server;
[0024] Figure 7 A schematic diagram of an optional process for parsing a first communication request provided in an embodiment of the present application;
[0025] Figure 8 A schematic diagram of an optional process for parsing a second communication request provided in an embodiment of the present application;
[0026] Fig. 9 A schematic diagram of an optional architecture of a production test system provided in an embodiment of the present application;
[0027] Fig.10 A schematic diagram of an optional architecture of a production test system provided in an embodiment of the present application when there are multiple stations and multiple users;
[0028] Fig.11 An optional flow chart of the overall test process provided in the embodiment of the present application;
[0029] Fig.12 A schematic diagram of an optional structure of a network camera test device provided in an embodiment of the present application applied to a test terminal;
[0030] Fig.13 A schematic diagram of an optional structure of a network camera test device provided in an embodiment of the present application applied to a network camera;
[0031] Fig.14 An optional structural diagram of a network camera testing device provided in an embodiment of the present application applied to a management server;
[0032] Fig.15 A schematic diagram of an optional hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0034] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object such as target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. Among them, the target object can be a user. In addition, when the embodiment of the present application needs to obtain the target object attribute information, the target object's separate permission or separate consent will be obtained by means of a pop-up window or jumping to a confirmation page, etc., and after the separate permission or separate consent of the target object is clearly obtained, the necessary target object-related data for enabling the normal operation of the embodiment of the present application will be obtained.
[0035] In the description of this application, “several” means one or more, “more” means more than two, “greater than”, “less than”, “exceed”, etc. are understood to exclude the number, and “above”, “below”, “within”, etc. are understood to include the number.
[0036] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0037] At present, network cameras are usually connected to the local area network through a wired interface during production testing, and production testing tools complete the test through the local area network connection device. However, some network cameras do not retain wired network ports. The traditional solution is to power on the network camera and dial up to connect to the public network, and then establish a connection with the production testing tool at the corresponding workstation through a transit server for production testing. However, before the connection is established, relevant pre-configuration needs to be performed manually, which lengthens the test cycle and increases the test cost.
[0038] In response to the problems of lengthening test cycles and increasing test costs, the present application provides a network camera testing method, device and storage medium, which are applied to test terminals. The network camera testing method includes: obtaining a terminal hardware identifier of the test terminal, generating a first communication request based on the terminal hardware identifier, and sending the first communication request to a management server, wherein the first communication request is used to instruct the management server to send the terminal network identifier and a first virtual address of the test terminal to the test terminal in response to the first communication request; pushing the terminal network identifier to the network camera through an audio communication method, so that the network camera can generate a second communication request based on the terminal network identifier and the device identifier of the network camera, and sending the second communication request to the management server, wherein the second communication request is used to instruct the management server to send a second virtual address to the network camera in response to the second communication request; when the test terminal and the network camera are both verified on a signaling server, the network camera is tested through a data channel between the test terminal and the network camera, wherein the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address. According to the scheme provided in the embodiment of the present application, the terminal hardware identification of the test terminal is obtained, and then a first communication request is generated based on the terminal hardware identification, and the first communication request is sent to the management server, so that the management server sends the terminal network identification and the first virtual address of the test terminal to the test terminal in response to the first communication request, and then the terminal network identification is pushed to the network camera through audio communication, so that the network camera generates a second communication request based on the terminal network identification and the device identification of the network camera, and sends the second communication request to the management server, so that the management server sends the second virtual address to the network camera in response to the second communication request. Therefore, when the test terminal and the network camera are both verified in the signaling server, the test terminal can establish a data channel with the network camera based on the first virtual address and the network camera can establish a data channel with the network camera based on the second virtual address. Since the first virtual address and the second virtual address can both be used as the address of a party participating in the test in the local area network, the test data originally transmitted through the local area network can be transmitted through the above-mentioned data channel. Therefore, the test system originally tested based on the local area network can be directly tested through the above-mentioned data channel without the need to develop new test tools, which can shorten the test cycle and reduce the test cost.
[0039] The network camera testing method, apparatus, device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the network camera testing method in the embodiments of the present application is described.
[0040] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0041] like Figure 1 As shown, Figure 1 An optional flow chart of a network camera testing method provided in an embodiment of the present application, the network camera testing method can be executed by a server, or can also be executed by a test terminal, or can also be executed by a server in cooperation with a test terminal, and the network camera testing method includes but is not limited to the following steps S110 to S130:
[0042] Step S110: acquiring a terminal hardware identifier of the test terminal, generating a first communication request based on the terminal hardware identifier, and sending the first communication request to a management server.
[0043] Step S120: Push the terminal network identifier to the network camera through audio communication, so that the network camera generates a second communication request based on the terminal network identifier and the device identifier of the network camera, and sends the second communication request to the management server.
[0044] Step S130: After both the test terminal and the network camera are verified in the signaling server, the network camera is tested through the data channel between the test terminal and the network camera.
[0045] The first communication request is used to instruct the management server to send the terminal network identifier and the first virtual address of the test terminal to the test terminal in response to the first communication request, and the second communication request is used to instruct the management server to send the second virtual address to the network camera in response to the second communication request.
[0046] The data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address.
[0047] Among them, the test terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc. The test terminal can include a PC virtual LAN tool and a whole machine production test tool. The PC virtual LAN tool includes a first virtual network module and a management module. The first virtual network module is used to perform communication tasks between the test terminal and the network camera and between the test terminal and the server. The management module is used to establish a connection between the test terminal and the network camera and between the test terminal and the server. The whole machine production test tool is used to issue production test instructions between the test terminal and the network camera.
[0048] Among them, the Internet Protocol Camera (IPC) refers to a camera device that transmits video and audio based on the Internet Protocol (IP). The network camera may include a second virtual network module and a production test module. The second virtual network module is used to perform communication tasks between the test terminal and the network camera and between the network camera and the server. The production test module is used to establish connections between network cameras and between network cameras and between network cameras and servers, and the production test module is also used to execute production test instructions between the test terminal and the network camera.
[0049] Specifically, the terminal hardware identifier is used to characterize the test terminal in the hardware dimension. The terminal hardware identifier is a unique identifier of the test terminal in the hardware dimension. The terminal hardware identifier is usually assigned by the manufacturer or service provider. For example, the terminal hardware identifier may include the CPU central processing unit (CPU) serial number and MAC (Media Access Control Address, Ethernet address) of the test terminal.
[0050] Specifically, the terminal hardware identifier is used to characterize the test terminal in the network dimension. The terminal network identifier is the unique identifier of the test terminal in the network dimension. For example, the terminal network identifier may include the whole machine factory user identifier and the unique workstation index. The whole machine factory user identifier is used to characterize each user account that logs into the test terminal, and the unique workstation index is used to characterize the production and testing workstation in the actual test environment.
[0051] It should be noted that the test terminal will also push the production test mode identifier to the network camera through audio communication. After receiving the production test mode identifier, the network camera enters the production test mode to cooperate with the test terminal for testing. During the test process, since the network camera can be provided with wireless communication modules such as wireless network cards and cellular communication modules for connecting to the network, the wireless communication module can be used to access the network to cooperate with the test terminal for testing.
[0052] It can be understood that by playing audio to push the terminal network identifier to the network camera, the network camera automatically recognizes the audio information to enter the production test mode and join the virtual LAN of the corresponding production test station, without the need for manual intervention, effectively improving the production test efficiency.
[0053] It should be noted that each production and testing workstation is equipped with a corresponding virtual LAN, and the virtual LANs of each workstation are independent of each other. The first virtual address is used to determine the LAN IP address of the test terminal in the virtual LAN of the production and testing workstation, and the second virtual address is used to determine the LAN IP address of the network camera in the virtual LAN of the production and testing workstation. The IP addresses corresponding to the two ends of the data channel between the test terminal and the network camera are the first virtual address and the second virtual address respectively.
[0054] Based on this, the terminal hardware identification of the test terminal is obtained, and then a first communication request is generated based on the terminal hardware identification, and the first communication request is sent to the management server, so that the management server sends the terminal network identification and the first virtual address of the test terminal to the test terminal in response to the first communication request, and then the terminal network identification is pushed to the network camera through audio communication, so that the network camera can generate a second communication request based on the terminal network identification and the device identification of the network camera, and send a second communication request to the management server, so that the management server sends the second virtual address to the network camera in response to the second communication request. Therefore, when the test terminal and the network camera are both verified in the signaling server, the test terminal can establish a data channel with the network camera based on the first virtual address and the network camera can establish a data channel with the network camera based on the second virtual address. Since the first virtual address and the second virtual address can both be used as the address of a party participating in the test in the local area network, the test data originally transmitted through the local area network can be transmitted through the above-mentioned data channel. Therefore, the test system originally tested based on the local area network can be directly tested through the above-mentioned data channel without the need to develop new test tools, which can shorten the test cycle and reduce the test cost.
[0055] In one possible implementation, the process of the test terminal testing the network camera is as follows: the test terminal generates a test instruction and obtains a test file, sends the test instruction and the test file to the network camera, the network camera executes the test instruction based on the test file to obtain the test result, the network camera generates a test response information based on the test result, and finally sends the test response information to the test terminal, and the test terminal determines the next test instruction and test file based on the test response information.
[0056] In addition, refer to Figure 2 In one embodiment, after the test terminal and the network camera are both verified by the signaling server, before testing the network camera through the data channel between the network camera, the network camera testing method also includes but is not limited to the following steps:
[0057] Step S210: accessing a signaling server.
[0058] Step S210: after the test terminal passes the verification of the signaling server, the first public network address of the test terminal is forwarded to the network camera through the signaling server, and the second public network address of the network camera forwarded by the signaling server is received.
[0059] The second public network address is sent by the network camera after the network camera passes the verification of the signaling server, the first public network address is used to associate with the first virtual address, and the second public network address is used to associate with the second virtual address.
[0060] Among them, the management server will also allocate a signaling server and a transit server based on the terminal hardware identification. The signaling server can be part of a P2P (peer-to-peer, P2P) server. The test terminal sends the terminal hardware identification to the signaling server, and the signaling server verifies the terminal hardware identification based on a preset identification verification format; similarly, the network camera sends the device identification to the signaling server, and the signaling server verifies the device identification based on a preset identification verification format.
[0061] It should be noted that when the test terminal passes the signaling server verification, the test terminal sends the first public network address and the first mapping port to the signaling server; when the network camera also passes the signaling server verification, the network camera sends the second public network address and the second mapping port to the signaling server.
[0062] Among them, when the test terminal is verified by the signaling server, the signaling server will also forward the first mapping port of the test terminal to the network camera through the signaling server, and forward the first mapping port of the test terminal to the network camera through the signaling server. It should be noted that the test terminal and the network camera are in different local area networks, and due to the existence of NAT (Network Address Translation) equipment or firewalls, the test terminal and the network camera can achieve intranet penetration through the P2P server. For example, the test terminal can access the network camera, thereby leaving a mapping table entry about the second public network address and the second mapping port in the NAT device of the test terminal, so that the information sent by the network camera can pass through the NAT device of the test terminal and reach the test terminal. Similarly, the information sent by the network camera can pass through the NAT device of the network camera through the same mechanism to reach the network camera. The embodiments of the present disclosure are not limited here.
[0063] Among them, when the intranet penetration fails, the information between the network camera and the test terminal can be transmitted through the assigned transit server.
[0064] Based on this, by exchanging the public network addresses of the test terminal and the network camera through the signaling server, point-to-point communication between the test terminal and the network camera can be achieved, thereby avoiding forwarding all information through the transit server, which can effectively improve communication efficiency and reduce communication delays.
[0065] In addition, refer to Figure 3 In one embodiment, the first communication request is further used to instruct the management server to send a first access authorization code to the test terminal in response to the first communication request, and the second communication request is further used to instruct the management server to send a second access authorization code to the network camera in response to the second communication request. Testing the network camera through the data channel between the network camera includes but is not limited to the following steps:
[0066] Step S310: sending the first virtual address to the second public network address, so that the network camera generates a device login request based on the first virtual address, the second virtual address and the second access authorization code.
[0067] Step S320: receiving a device login request sent by the network camera, and determining the login status of the network camera based on the first access authorization code and the device login request.
[0068] Step S330: When the login status is successful, the network camera is tested through the data channel between the network camera and the network camera.
[0069] The test terminal can test multiple network cameras at the same time, and the test terminal can broadcast the first virtual address to multiple second public network addresses.
[0070] Among them, the generation of the device login request also requires the device identification and the MAC address of the network camera. Therefore, the device identification, data frame, first virtual address, second virtual address and second access authorization code can be parsed from the device login request, and then the test terminal associates the device login request with the connection session of the network camera that sends the device login request. Subsequently, the connection session can be indexed by the content parsed from the device login request, for example, the connection session can be indexed by the second virtual address parsed from the login information.
[0071] It should be noted that the first access authorization code is the original access authorization code sent to the test terminal, and the second access authorization code is the original access authorization code sent to the network camera. The original access authorization code is randomly generated by the management server. When the first access authorization code is consistent with the second access authorization code, the login status of the network camera is determined to be a successful login, and the test instructions of the test terminal can reach the network camera through the data channel between the test terminal and the network camera; when the first access authorization code is inconsistent with the second access authorization code, the login status of the network camera is determined to be a failed login.
[0072] Based on this, the first virtual address is sent to the second public network address, so that the network camera can generate a device login request based on the first virtual address, the second virtual address and the second access authorization code, and then receive the device login request sent by the network camera, and determine the login status of the network camera based on the first access authorization code and the device login request. When the login status is successful, the network camera is tested through the data channel between the network camera, which can ensure the legitimacy of the identity of the network camera logged into the test terminal, prevent the test terminal from connecting to an illegal network camera, and improve the robustness of the test system.
[0073] In addition, refer to Figure 4 In one embodiment, the method for testing a network camera further includes but is not limited to the following steps:
[0074] Step S410, determining whether the heartbeat connection with the network camera is normal.
[0075] Step S420, when it is determined that the heartbeat connection is normal, the state of the data channel is determined to be a connected state, or when it is determined that the heartbeat connection is abnormal, the state of the data channel is determined to be a disconnected state.
[0076] Step S430: Upload the status of the data channel to the management server.
[0077] The network camera sends a device identification to the test terminal in a first heartbeat cycle, so that the test terminal can determine that the heartbeat connection with the network camera is normal.
[0078] It should be noted that the tool connection status is the connection status between the test terminal and the signaling server, and the tool connection status includes the connected state and the disconnected state; the device connection status is the connection status between the test terminal and the network camera, and the device connection status is consistent with the status of the data channel.
[0079] The test terminal sends the tool connection status, the device connection status between the test terminal and each network camera, and the device identification of each network camera to the management server in the second heartbeat cycle.
[0080] It should be noted that when the test terminal does not send information to the management server within the second heartbeat cycle, the tool connection state is disconnected, and the test terminal disconnects from each network camera to prevent a sudden increase in the load of the transit server.
[0081] It should be noted that the second heartbeat cycle may be greater than the first heartbeat cycle, which is not limited in the embodiments of the present disclosure.
[0082] Based on this, determine whether the heartbeat connection with the network camera is normal. When the heartbeat connection is normal, determine that the state of the data channel is connected, or when the heartbeat connection is abnormal, determine that the state of the data channel is disconnected. Then upload the state of the data channel to the management server, which can improve the efficiency of the management server in identifying faults, trigger corresponding recovery measures earlier, and reduce the losses that may be caused by potential faults.
[0083] In addition, refer to Figure 5 The present application also provides a network camera testing method, which is applied to the network camera. The network camera testing method includes but is not limited to the following steps:
[0084] Step S510: receiving a terminal network identifier pushed by a test terminal through an audio communication method.
[0085] Step S520: Generate a second communication request based on the terminal network identifier and the device identifier of the network camera, and send the second communication request to the management server, so that the management server sends a second virtual address to the network camera in response to the second communication request.
[0086] Among them, when the test terminal and the network camera have passed the login verification in the signaling server, the test terminal tests the network camera through the data channel between the test terminal and the network camera, and the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address.
[0087] The terminal network identifier and the first virtual address are both sent by the management server to the test terminal in response to a first communication request, and the first communication request is generated by the test terminal based on the terminal hardware identifier of the test terminal.
[0088] It should be noted that the network camera can be a card-insertion network camera. After the network camera enters the production test mode, it is necessary to first test the connection signal and network connection, dual-card switching, etc. After the test is completed, try to connect to the public network.
[0089] Based on this, when the test terminal and the network camera have passed the verification in the signaling server, the test terminal can jointly establish a data channel with the network camera based on the first virtual address and the network camera can jointly establish a data channel with the network camera based on the second virtual address. Since both the first virtual address and the second virtual address can be used as the address of the party participating in the test in the local area network, the test data originally transmitted through the local area network can be transmitted through the above-mentioned data channel. Therefore, the test system originally based on the local area network can be tested directly through the above-mentioned data channel without the need to develop new test tools, which can shorten the test cycle and reduce the test cost.
[0090] In addition, refer to Figure 6The present application also provides a network camera testing method, which is applied to a management server. The network camera testing method includes but is not limited to the following steps:
[0091] Step S610: receiving a first communication request sent by a test terminal, and sending a terminal network identifier and a first virtual address of the test terminal to the test terminal in response to the first communication request.
[0092] Step S620: receiving a second communication request sent by the network camera, and sending a second virtual address to the network camera in response to the second communication request.
[0093] The first communication request is generated by the test terminal based on the terminal hardware identifier.
[0094] The second communication request is generated by the network camera based on the terminal network identifier and the device identifier of the network camera, and the terminal network identifier is pushed to the network camera by the test terminal through audio communication.
[0095] Among them, when the test terminal and the network camera have passed the login verification in the signaling server, the test terminal tests the network camera through the data channel between the test terminal and the network camera, and the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address.
[0096] Based on this, when the test terminal and the network camera have passed the verification in the signaling server, the test terminal can jointly establish a data channel with the network camera based on the first virtual address and the network camera can jointly establish a data channel with the network camera based on the second virtual address. Since both the first virtual address and the second virtual address can be used as the address of the party participating in the test in the local area network, the test data originally transmitted through the local area network can be transmitted through the above-mentioned data channel. Therefore, the test system originally based on the local area network can be tested directly through the above-mentioned data channel without the need to develop new test tools, which can shorten the test cycle and reduce the test cost.
[0097] In addition, refer to Figure 7 In one embodiment, sending the terminal network identifier and the first virtual address of the test terminal to the test terminal in response to the first communication request includes but is not limited to the following steps:
[0098] Step S710: performing analysis based on the first communication request to obtain a terminal hardware identifier.
[0099] Step S720: Generate a terminal network identifier of the test terminal based on the terminal hardware identifier, and allocate a first virtual address to the test terminal.
[0100] Step S730: associate and store the terminal network identifier and the first virtual address, and send the terminal network identifier and the first virtual address to the test terminal.
[0101] Among them, the production and test station is equipped with a test terminal, and a unique station index is generated based on the relationship between the terminal hardware identifier and the production and test station. The whole machine factory user identifier is the identifier of the user account that logs into the test terminal, and then the unique station index and the whole machine factory user identifier are combined into a terminal network identifier.
[0102] Among them, a production and test station can be equipped with multiple test terminals, each test terminal can log in to a different user account, and the combination of the unique station index and the user identification of the whole machine factory of the same production and test station can be a combination of 001 and 1, a combination of 001 and 2, and a combination of 001 and 3, which is not limited to the embodiments of the present disclosure.
[0103] Among them, one user account can log in to the test terminals of multiple different workstations. At this time, the combination of the unique workstation index and the whole machine factory user identification corresponding to the same user account can be a combination of 001 and 1, a combination of 002 and 1, and a combination of 003 and 1. The present disclosed embodiment is not limited here.
[0104] The first virtual address may be fixed, such as 10.1.1.10, or may be dynamically allocated within a predetermined interval, which is not limited in the embodiments of the present disclosure.
[0105] Among them, the test equipment is also provided with a test information database, which associates and stores the terminal network identifier and the first virtual address in the test information database; in addition, the first access authorization code, the address of the signaling server and the address of the transit server are associated and stored in the test information database based on the terminal network identifier.
[0106] Based on this, the terminal network identifier of the test terminal is generated based on the terminal hardware identifier, and a first virtual address is assigned to the test terminal so that the corresponding test terminal can be determined through the terminal network identifier. The terminal network identifier and the first virtual address are then associated and stored, and the terminal network identifier and the first virtual address are sent to the test terminal, which is conducive to the efficient flow of data in the test system to improve the test efficiency.
[0107] In addition, refer to Figure 8 In one embodiment, sending the second virtual address to the network camera in response to the second communication request includes but is not limited to the following steps:
[0108] Step S810: performing analysis based on the second communication request to obtain a terminal network identifier and a device identifier.
[0109] Step S820, determining the virtual address interval to which the terminal network identifier is allocated, determining an unallocated second virtual address in the virtual address interval, and allocating the second virtual address to the network camera corresponding to the device identifier.
[0110] Step S830: Send the second virtual address to the network camera.
[0111] Among them, the management server queries the tool connection status corresponding to the terminal network identifier according to the terminal network identifier. If the tool connection status is normal, the virtual address interval assigned to the terminal network identifier is determined, and the unassigned second virtual address is determined in the virtual address interval. The second virtual address is allocated to the network camera corresponding to the device identifier. For example, the virtual address interval assigned to the terminal network identifier is from 10.1.1.11 to 10.1.1.200, and it can be allocated starting from 10.1.1.11. Whenever a second virtual address is allocated, the host number of the currently allocated second virtual address is increased by one to obtain a new second virtual address to be allocated. If the above-mentioned second virtual address to be allocated is occupied, the host number of the above-mentioned second virtual address to be allocated is increased by one to obtain a new second virtual address to be allocated again. The second virtual address to be allocated is determined from 10.1.1.11 in a loop. If it is not allocated, the current second virtual address to be allocated can be allocated.
[0112] Based on this, the dynamic allocation of virtual addresses is realized. Since a test terminal is usually connected to multiple network cameras, the dynamic allocation of virtual addresses can improve the utilization rate of each virtual address in the virtual address range, save network resources, avoid URL conflicts, and reduce the probability of failures.
[0113] Among them, reference Fig. 9The connection architecture of the production and testing system is as follows: the cloud production and testing system is the management server, the P2P server is the signaling server, the Relay server is equivalent to the aforementioned transfer server, the PC virtual LAN server is equivalent to the aforementioned test terminal, the IPC is equivalent to the aforementioned network camera, IPC A and IPC B are both network cameras, IPC A and IPC B are different network cameras, and the TUN / P2P module is a virtual network module. For example, user A logs in to the test terminal at production and testing station 1, IPC A and IPC B and the test terminal are all in the virtual LAN of production and testing station 1, the test terminal is provided with a TUN / P2P module, a management module and a whole machine production and testing tool, the above-mentioned whole machine production and testing tool can also be called a LAN production and testing tool, the network camera is provided with a TUN / P2P module and a production and testing module, the production and testing modules and the management modules of IPC A and IPC B are all connected to the management server based on the HTTP (Hypertext Transfer Protocol) protocol, the TUN / P2P modules of IPCA, IPC B and the test terminal are all connected to the signaling server, and IPC A, IPC B and the TUN / P2P modules of the test terminal are all connected to the transfer server for communication, and the TUN / P2P module of IPC A is connected to the TUN / P2P module of the test terminal for communication based on the P2P protocol.
[0114] Among them, the virtual network module exists in the computer's operating system kernel. The virtual network module includes TUN (Tunnel Device) and TAP (Tap Adapter). Different from hardware devices, these virtual network devices are all implemented in software and provide the software running on the operating system with the same functions as the hardware network devices. TAP is equivalent to Ethernet device, and TUN is equivalent to network layer device.
[0115] Among them, reference Fig.10, the connection architecture between the test terminal and the network camera at each workstation and the management server is as follows: user A logs in to the test terminal at production test workstation A, IPC A, IPC B and IPC C are respectively connected to the test terminal of production test workstation A through P2P protocol, and IPC A, IPC B and IPC C are respectively connected to the management server through HTTP protocol; similarly, user A logs in to the test terminal at production test workstation B, IPC A, IPC B and IPC C are respectively connected to the test terminal of production test workstation B through P2P protocol, and IPC A, IPC B and IPC C are respectively connected to the management server through HTTP protocol; user B logs in to the test terminal at production test workstation B, IPC A, IPC B and IPC C are respectively connected to the test terminal of production test workstation B through P2P protocol, and IPC A, IPC B and IPC C are respectively connected to the management server through HTTP protocol; user B logs in to the test terminal at production test workstation A, IPC A, IPC B and IPC C are respectively connected to the test terminal of production test workstation B through P2P protocol, and IPC A, IPC B and IPC C are respectively connected to the management server through HTTP protocol; user B logs in to the test terminal at production test workstation A, IPC A, IPC B and IPC C are respectively connected to the test terminal of production test workstation B through P2P protocol, and IPC A, IPC B and IPC C are respectively connected to the management server through HTTP protocol C is connected to the test terminal of the production test station A based on the P2P protocol, and IPC A, IPC B and IPC C are connected to the management server based on the HTTP protocol.
[0116] Among them, reference Fig.11 ,The test process is as follows: IPC is a network camera, PC virtual LAN tool is the test terminal, the cloud production ,testing system is the management server, the P2P server is the signaling server, and the forwarding server is the ,transit server;
[0117] The user logs in to the test terminal, and the test terminal sends the user's terminal login request to the management server. If the login is successful, the management server returns the successful login information to the test terminal. The test terminal sends the PC hardware unique ID, i.e., the terminal hardware identification, to the management server, and then the management server generates a workstation unique network ID, i.e., the terminal network identification, the original access authorization code, and the virtual LAN IP, i.e., the first virtual address, and allocates the addresses of the P2P server and the forwarding server, and returns the information generated by the above management server to the test terminal;
[0118] The test terminal then logs in to the P2P server and reports the tool connection status to the management server, which then updates the tool status of the test terminal.
[0119] Then the test terminal sets the virtual LAN IP, i.e., the first virtual address, and continuously plays the audio carrying the terminal network identifier;
[0120] Then the network camera is powered on, the network camera recognizes the audio with the terminal network identifier, parses the terminal network identifier, and tests the external network signal of the dual cards and connects to the external network;
[0121] Then the network camera sends the terminal network identification, device identification and MAC address of the network camera to the management server, and the management server generates an original access authorization code and a virtual LAN IP, i.e., a second virtual address, and allocates the addresses of the P2P server and the forwarding server, and returns the information generated by the management server to the network camera;
[0122] Then the network camera sets the second virtual address, logs in to the P2P server, and then establishes a P2P connection with the test terminal based on the P2P server;
[0123] Then the network camera sends a device login request to the test terminal;
[0124] The test terminal can parse the device login request to obtain the second access authorization code, the device identifier, the MAC address of the network camera, and the second virtual address;
[0125] The device connection status is then reported to the management server, which stores or updates the tool status of the test terminal;
[0126] Then the test terminal periodically sends the heartbeat information and the device identifications of all currently connected network cameras to the management server, and the management server updates the device connection status of all network cameras currently connected to the test terminal in real time.
[0127] Then enter the LAN production test process, the whole machine production test tool of the test terminal performs the whole machine production test function test on the network camera, and uploads the test results to the management server;
[0128] When the LAN production test process is completed, the P2P connection between the network camera and the test terminal is disconnected, the test terminal reports the device connection status to the management server, the management server updates the device connection status, and releases the disconnected second virtual address.
[0129] In addition, refer to Fig.12 The present application also provides a network camera testing device 1200, which is applied to a testing terminal and includes:
[0130] The acquisition module 1210 is used to acquire the terminal hardware identification of the test terminal, generate a first communication request based on the terminal hardware identification, and send the first communication request to the management server, wherein the first communication request is used to instruct the management server to send the terminal network identification and the first virtual address of the test terminal to the test terminal in response to the first communication request;
[0131] The push module 1220 is used to push the terminal network identifier to the network camera through audio communication, so that the network camera generates a second communication request based on the terminal network identifier and the device identifier of the network camera, and sends the second communication request to the management server, wherein the second communication request is used to instruct the management server to send a second virtual address to the network camera in response to the second communication request;
[0132] The test module 1230 is used to test the network camera through the data channel between the network camera and the test terminal after both the test terminal and the network camera are verified in the signaling server, wherein the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address.
[0133] It can be understood that the specific implementation of the network camera testing device 1200 is basically the same as the specific embodiment of the network camera testing method applied to the test terminal, and will not be repeated here.
[0134] In addition, refer to Fig.13 The present application also provides a network camera testing device 1300, which is applied to a network camera and includes:
[0135] The parsing module 1310 is configured to receive the terminal network identifier of the test terminal pushed by the test terminal through an audio communication method;
[0136] The request module 1320 is used to generate a second communication request based on the terminal network identifier and the device identifier of the network camera, and send the second communication request to the management server, so that the management server sends a second virtual address to the network camera in response to the second communication request;
[0137] Wherein, after both the test terminal and the network camera pass the login verification on the signaling server, the test terminal tests the network camera through a data channel between the test terminal and the network camera, wherein the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address;
[0138] The terminal network identifier and the first virtual address are both sent by the management server to the test terminal in response to a first communication request, and the first communication request is generated by the test terminal based on the terminal hardware identifier of the test terminal.
[0139] It can be understood that the specific implementation of the network camera testing device 1300 is substantially the same as the specific implementation of the network camera testing method applied to the network camera described above, and will not be described in detail herein.
[0140] In addition, refer to Fig.14 The present application also provides a network camera testing device 1400, which is applied to a management server and includes:
[0141] A first response module 1410 is configured to receive a first communication request sent by a test terminal, and send a terminal network identifier and a first virtual address of the test terminal to the test terminal in response to the first communication request, wherein the first communication request is generated by the test terminal based on the terminal hardware identifier;
[0142] A second response module 1420 is used to receive a second communication request sent by the network camera, and send a second virtual address to the network camera in response to the second communication request, wherein the second communication request is generated by the network camera based on the terminal network identifier and the device identifier of the network camera, and the terminal network identifier is pushed to the network camera by the test terminal through audio communication;
[0143] Among them, when the test terminal and the network camera have passed the login verification on the signaling server, the test terminal tests the network camera through the data channel between the test terminal and the network camera, and the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address.
[0144] It can be understood that the specific implementation of the network camera testing device 1400 is basically the same as the specific implementation of the network camera testing method applied to the management server mentioned above, and will not be repeated here.
[0145] In addition, refer to Fig.15 , Fig.15 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0146] The processor 1501 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0147] The memory 1502 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1502 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1502, and the processor 1501 calls and executes the test method of the network camera in the embodiment of the present application.
[0148] Input / output interface 1503, used to implement information input and output;
[0149] Communication interface 1504, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0150] A bus 1505 that transmits information between the various components of the device (e.g., the processor 1501, the memory 1502, the input / output interface 1503, and the communication interface 1504);
[0151] The processor 1501 , the memory 1502 , the input / output interface 1503 and the communication interface 1504 are connected to each other in communication within the device via the bus 1505 .
[0152] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned network camera testing method.
[0153] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a virtual local area network, a mobile communication network, and combinations thereof.
[0154] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0155] It can be understood by those skilled in the art that Figures 1 to 15 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.
[0156] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0157] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0158] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0159] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0160] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0161] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0162] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0163] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0164] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for testing a network camera, characterized in that: Applied to the test terminal, the test method of the network camera includes: Obtaining a terminal hardware identifier of the test terminal, generating a first communication request based on the terminal hardware identifier, and sending the first communication request to a management server, wherein the first communication request is used to instruct the management server to send the terminal network identifier and a first virtual address of the test terminal to the test terminal in response to the first communication request; Pushing the terminal network identifier to the network camera through audio communication, so that the network camera generates a second communication request based on the terminal network identifier and the device identifier of the network camera, and sends the second communication request to the management server, wherein the second communication request is used to instruct the management server to send a second virtual address to the network camera in response to the second communication request; After the test terminal and the network camera are both verified in the signaling server, the network camera is tested through a data channel between the network camera and the test terminal, wherein the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address.
2. The method for testing a network camera according to claim 1, characterized in that: After the test terminal and the network camera are both verified by the signaling server, before the network camera is tested through the data channel between the test terminal and the network camera, the network camera testing method further includes: Access the signaling server; After the test terminal is verified by the signaling server, the first public network address of the test terminal is forwarded to the network camera through the signaling server, and the second public network address of the network camera forwarded by the signaling server is received, wherein the second public network address is sent by the network camera after the network camera is verified by the signaling server, the first public network address is used to associate with the first virtual address, and the second public network address is used to associate with the second virtual address.
3. The method for testing a network camera according to claim 2, characterized in that: The first communication request is further used to instruct the management server to send a first access authorization code to the test terminal in response to the first communication request, and the second communication request is further used to instruct the management server to send a second access authorization code to the network camera in response to the second communication request. The testing of the network camera through the data channel with the network camera includes: Sending the first virtual address to the second public network address, so that the network camera generates a device login request based on the first virtual address, the second virtual address and the second access authorization code; receiving the device login request sent by the network camera, and determining the login status of the network camera based on the first access authorization code and the device login request; When the login status is successful, the network camera is tested via a data channel between the network camera and the network camera.
4. The method for testing a network camera according to claim 1, characterized in that: The testing method of the network camera also includes: Determine whether the heartbeat connection with the network camera is normal; When it is determined that the heartbeat connection is normal, determining that the state of the data channel is a connected state, or when it is determined that the heartbeat connection is abnormal, determining that the state of the data channel is a disconnected state; The status of the data channel is uploaded to the management server.
5. A method for testing a network camera, characterized in that: Applied to a network camera, the testing method of the network camera includes: Receiving the terminal network identifier of the test terminal pushed by the test terminal through an audio communication method; generating a second communication request based on the terminal network identifier and the device identifier of the network camera, and sending the second communication request to the management server, so that the management server sends a second virtual address to the network camera in response to the second communication request; Wherein, after both the test terminal and the network camera pass the login verification on the signaling server, the test terminal tests the network camera through a data channel between the test terminal and the network camera, wherein the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address; The terminal network identifier and the first virtual address are both sent by the management server to the test terminal in response to a first communication request, and the first communication request is generated by the test terminal based on the terminal hardware identifier of the test terminal.
6. A method for testing a network camera, characterized in that: Applied to a management server, the network camera testing method includes: receiving a first communication request sent by a test terminal, and sending a terminal network identifier and a first virtual address of the test terminal to the test terminal in response to the first communication request, wherein the first communication request is generated by the test terminal based on the terminal hardware identifier; Receiving a second communication request sent by the network camera, and sending a second virtual address to the network camera in response to the second communication request, wherein the second communication request is generated by the network camera based on the terminal network identifier and the device identifier of the network camera, and the terminal network identifier is pushed to the network camera by the test terminal through audio communication; Among them, when the test terminal and the network camera have passed the login verification on the signaling server, the test terminal tests the network camera through the data channel between the test terminal and the network camera, and the data channel is jointly established by the test terminal based on the first virtual address and by the network camera based on the second virtual address.
7. The method for testing a network camera according to claim 6, characterized in that: The sending the terminal network identifier and the first virtual address of the test terminal to the test terminal in response to the first communication request includes: Performing analysis based on the first communication request to obtain the terminal hardware identifier; Generate a terminal network identifier of the test terminal based on the terminal hardware identifier, and allocate a first virtual address to the test terminal; The terminal network identifier and the first virtual address are stored in association with each other, and the terminal network identifier and the first virtual address are sent to the test terminal.
8. The method for testing a network camera according to claim 7, characterized in that: The sending a second virtual address to the network camera in response to the second communication request comprises: Performing analysis based on the second communication request to obtain the terminal network identifier and the device identifier; Determine a virtual address interval to which the terminal network identifier is assigned, determine an unassigned second virtual address in the virtual address interval, and assign the second virtual address to the network camera corresponding to the device identifier; A second virtual address is sent to the network camera.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the network camera method according to any one of claims 1 to 8 when executing the computer program.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the network camera testing method according to any one of claims 1 to 8 is implemented.