Method and device for realizing internal collection air interface data program management for embedded system, processor and storage medium thereof
By combining the SSH protocol and the SCP protocol, automated file transfer is achieved in embedded systems, solving the problem of the scp.exe tool in the Windows system requiring manual password entry, and providing a simple embedded device program management solution.
Patent Information
- Application Number
- CN202510867367.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-30
AI Technical Summary
In the prior art, the scp.exe tool in the Windows system requires manual password input and cannot automatically transfer files to a remote directory.
Use SSH protocol for login authentication, use SCP protocol for file transfer, create data transmission tunnel through SSH session, and realize automatic file management of embedded system.
It realizes the easy operation and management of embedded systems and the wide range of applicable automatic file transfer, and simplifies the program management process of embedded devices.
Smart Images

Figure CN120729578A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network optimization and drive testing, in particular to the field of drive testing software, and specifically refers to a method, device, processor and computer-readable storage medium thereof for implementing program management of internally collected air interface data in an embedded system. Background Art
[0002] The scp.exe tool on Windows can transfer files to a remote directory; however, a password must be entered each time it is run, and automatic transfer is not possible. Summary of the Invention
[0003] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a method, device, processor and computer-readable storage medium for implementing internal air interface data collection program management for embedded systems that are simple to operate, easy to manage and have a wide range of applications.
[0004] To achieve the above objectives, the present invention provides a method, device, processor, and computer-readable storage medium for implementing internal air interface data collection program management in an embedded system as follows:
[0005] The method for implementing program management for internally collecting air interface data in an embedded system is characterized in that the method comprises the following steps:
[0006] (1) The software uses the SSH protocol to request login;
[0007] (2) Password authentication on the software side;
[0008] (3) Use SCP protocol for file transfer interaction.
[0009] Preferably, the step (2) specifically includes the following steps:
[0010] (2.1) The test device sends its public key to the software;
[0011] (2.2) The software uses the username and password to encrypt and log in to the test device;
[0012] (2.3) The test device decrypts the login device and verifies the login;
[0013] (2.4) The software determines whether the program exists. If the program exists, it proceeds to step (3); otherwise, it returns information.
[0014] Preferably, the step (3) specifically includes the following steps:
[0015] (3.1) Create an scp interaction handle through ssh_scp_new;
[0016] (3.2) Initialize the scp interaction handle through ssh_scp_init;
[0017] (3.3) Open the local file through fopen, and write the data into the remote file through ssh_scp_push_file and ssh_scp_write;
[0018] (3.4) Close the scp interaction handle via ssh_scp_close.
[0019] Preferably, the step (1) is specifically as follows:
[0020] The software uses the SSH protocol to log in to the remote server based on the user name, password, remote server address, and remote directory.
[0021] The device for implementing program management for internally collecting air interface data for an embedded system has the following main features:
[0022] a processor configured to execute computer-executable instructions;
[0023] The memory stores one or more computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned method for managing the internal collection of air interface data program for the embedded system are implemented.
[0024] The main feature of the processor for implementing internal air interface data collection program management for embedded systems is that the processor is configured to execute computer-executable instructions. When the computer-executable instructions are executed by the processor, the various steps of the above-mentioned method for implementing internal air interface data collection program management for embedded systems are implemented.
[0025] The main feature of the computer-readable storage medium is that a computer program is stored thereon, and the computer program can be executed by a processor to implement the various steps of the above-mentioned method for implementing internal air interface data collection program management for an embedded system.
[0026] The method, device, processor, and computer-readable storage medium of the present invention are used to implement program management for internal air interface data collection in an embedded system. The SSH protocol is used to log in to a remote server. The SCP protocol is based on the SSH protocol. Based on the SSH session, a tunnel for transmitting data through the SCP protocol is created to interact with the SSH service process in the embedded system for file transfer. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 The present invention is a flow chart of a method for implementing program management of internally collected air interface data in an embedded system. DETAILED DESCRIPTION
[0028] In order to more clearly describe the technical content of the present invention, further description is given below in conjunction with specific embodiments.
[0029] The method for implementing internal air interface data collection program management for an embedded system of the present invention includes the following steps:
[0030] (1) The software uses the SSH protocol to request login;
[0031] (2) Password authentication on the software side;
[0032] (3) Use SCP protocol for file transfer interaction.
[0033] In a specific embodiment of the present invention, the step (2) specifically includes the following steps:
[0034] (2.1) The test device sends its public key to the software;
[0035] (2.2) The software uses the username and password to encrypt and log in to the test device;
[0036] (2.3) The test device decrypts the login device and verifies the login;
[0037] (2.4) The software determines whether the program exists. If the program exists, it proceeds to step (3); otherwise, it returns information.
[0038] In a specific embodiment of the present invention, the step (3) specifically includes the following steps:
[0039] (3.1) Create an scp interaction handle through ssh_scp_new;
[0040] (3.2) Initialize the scp interaction handle through ssh_scp_init;
[0041] (3.3) Open the local file through fopen, and write the data into the remote file through ssh_scp_push_file and ssh_scp_write;
[0042] (3.4) Close the scp interaction handle via ssh_scp_close.
[0043] In a specific embodiment of the present invention, the step (1) is specifically as follows:
[0044] The software uses the SSH protocol to log in to the remote server based on the user name, password, remote server address, and remote directory.
[0045] The device of the present invention is used to implement program management for internally collecting air interface data for an embedded system, wherein the device comprises:
[0046] a processor configured to execute computer-executable instructions;
[0047] The memory stores one or more computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned method for managing the internal collection of air interface data program for the embedded system are implemented.
[0048] The processor of the present invention is used to implement internal air interface data collection program management for embedded systems, wherein the processor is configured to execute computer-executable instructions. When the computer-executable instructions are executed by the processor, the various steps of the above-mentioned method for implementing internal air interface data collection program management for embedded systems are implemented.
[0049] The computer-readable storage medium of the present invention stores a computer program thereon, and the computer program can be executed by a processor to implement the various steps of the above-mentioned method for managing the program for collecting air interface data internally in an embedded system.
[0050] In a specific embodiment of the present invention, a drive test software user can conveniently manage the installation and upgrade of acquisition programs of multiple modules connected in SSH mode through the test software interface.
[0051] The customer configures the user name and password for logging into the embedded test device, the IP address of the embedded test device, the directory where the test program runs in the embedded test device, and the local path information of the internal program installation package of the embedded test device through the software. The software uses the configured name and password information to log in to the embedded device system using the SSH protocol, and then uses the SCP protocol to upload the internal program installation package of the embedded test device in the local path to the test program running directory in the embedded test device.
[0052] The embodiment of the method for implementing internal air interface data collection program management for an embedded system of the present invention has the following processing steps:
[0053] 1. Use libssh library ssh_new to create an ssh handle, and ssh_userauth_password uses the username and password for login authentication;
[0054] 2. ssh_scp_new creates an scp interaction handle;
[0055] 3. ssh_scp_init initializes the scp interaction handle;
[0056] 4. fopen opens the local file, ssh_scp_push_file and ssh_scp_write write the data into the remote file;
[0057] 5. ssh_scp_close closes the scp interaction handle.
[0058] This technical solution uses the SSH protocol to log in to the server, with password authentication already performed. It then uses the SCP protocol to send files to the remote server through a tunnel created within this SSH session. This technical solution is suitable for third-party embedded systems, which only require the SSH service to be enabled and support the SCP protocol. The configuration information for this technical solution is for PC client software and is not relevant to embedded devices.
[0059] The specific implementation scheme of this embodiment can be found in the relevant descriptions in the above embodiments and will not be repeated here.
[0060] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0061] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" is at least two.
[0062] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0063] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0064] Those skilled in the art will understand that all or part of the steps in the method for implementing the above-mentioned embodiment can be completed by instructing related hardware through a program, and the corresponding program can be stored in a computer-readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0065] Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing module, each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
[0066] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0067] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0068] The method, device, processor, and computer-readable storage medium of the present invention are used to implement program management for internal air interface data collection in an embedded system. The SSH protocol is used to log in to a remote server. The SCP protocol is based on the SSH protocol. Based on the SSH session, a tunnel for transmitting data through the SCP protocol is created to interact with the SSH service process in the embedded system for file transfer.
[0069] In this specification, the present invention has been described with reference to specific embodiments thereof. However, it will be apparent that various modifications and variations may be made without departing from the spirit and scope of the present invention. Accordingly, the specification and drawings are to be regarded as illustrative rather than restrictive.
Claims
1. A method for implementing internal air interface data collection program management for an embedded system, characterized in that: The method comprises the following steps: (1) The software uses the SSH protocol to request login; (2) Password authentication on the software side; (3) Use SCP protocol for file transfer interaction.
2. The method for implementing internal air interface data collection program management for an embedded system according to claim 1, characterized in that: The step (2) specifically includes the following steps: (2.1) The test device sends its public key to the software; (2.2) The software uses the username and password to encrypt and log in to the test device; (2.3) The test device decrypts the login device and verifies the login; (2.4) The software determines whether the program exists. If the program exists, it proceeds to step (3); otherwise, it returns information.
3. The method for implementing internal air interface data collection program management for an embedded system according to claim 1, characterized in that: The step (3) specifically includes the following steps: (3.1) Create an scp interaction handle through ssh_scp_new; (3.2) Initialize the scp interaction handle through ssh_scp_init; (3.3) Open the local file through fopen, and write the data into the remote file through ssh_scp_push_file and ssh_scp_write; (3.4) Close the scp interaction handle via ssh_scp_close.
4. The method for implementing internal air interface data collection program management for an embedded system according to claim 1, characterized in that: The step (1) is specifically as follows: The software uses the SSH protocol to log in to the remote server based on the user name, password, remote server address, and remote directory.
5. A device for implementing program management for internal collection of air interface data for an embedded system, characterized in that: The device comprises: a processor configured to execute computer-executable instructions; A memory storing one or more computer-executable instructions, wherein when the computer-executable instructions are executed by the processor, the steps of the method for managing an internally collected air interface data program for an embedded system as described in any one of claims 1 to 4 are implemented.
6. A processor for implementing program management for internal collection of air interface data for an embedded system, characterized in that: The processor is configured to execute computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method for managing the internal collection of air interface data program for an embedded system as described in any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium, characterized in that A computer program is stored thereon, and the computer program can be executed by a processor to implement the various steps of the method for managing an internally collected air interface data program for an embedded system as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method for upgrading embedded linux charging management terminal through wireless communication module
CN106775852A
Test environment deployment method, apparatus, computer device, and storage medium
CN109491887A
Remote file collection method and device based on embedded operating system
CN114860660A
