Remote access method, electronic device, and storage medium

By automatically determining the access mode through remote access function commands, the problem of cumbersome and time-consuming remote computer access in existing technologies is solved, realizing an efficient and automated remote access method that is suitable for rapid login and data processing of multiple computers.

CN115618369BActive Publication Date: 2026-02-24SHENZHEN FULIAN FUGUI PRECISION INDUSTRY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110796010.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-14
Publication Date
2026-02-24
Estimated Expiration
2041-07-14

AI Technical Summary

Technical Problem

Existing methods for accessing remote computers require learning a great deal of knowledge and writing cumbersome program code. They are also time-consuming and labor-intensive when accessing multiple computers, lacking flexibility and efficiency.

Method used

A remote access method is provided, which automatically determines the access mode and logs into the computer by obtaining the parameter values ​​in the remote access function command, and uses the parameter values ​​to obtain and process data. It supports multiple access methods and command modes, including function mode, query command table mode and mixed mode.

Benefits of technology

It eliminates the need to develop cumbersome program code, improves the efficiency of remote access, saves development and maintenance time, and enables efficient access and automated operation of multiple computers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115618369B_ABST
    Figure CN115618369B_ABST
Patent Text Reader

Abstract

The application provides a remote access method, an electronic device and a storage medium. The method comprises the following steps: obtaining an access function instruction, wherein the access function instruction comprises a first item parameter value, a first interface parameter value, a cmdlist parameter value and a first keylist parameter value; determining an access mode of a remote computer according to the first item parameter value; determining a login mode of the remote computer according to the first interface parameter value under the determined access mode; obtaining data from the remote computer by using the cmdlist parameter value in response to an instruction of successfully logging into the remote computer; and processing the data according to the first keylist parameter value. The efficiency of remote access can be improved by the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of remote access, and more particularly to a remote access method, electronic device, and storage medium. Background Technology

[0002] Currently, remote computer access primarily relies on several methods. Firstly, SSH, TELNET, and external program calling modules are commonly used to connect to the remote computer, execute commands and operations, and process data. Calling other external programs requires extensive learning and handling of complex code. For large-scale automated testing programs, numerous test commands are used; writing these commands in the code makes maintenance difficult and inflexible. Secondly, developing remote access programs often involves scriptable remote client tools. However, these tools require learning VBA, JavaScript, TTL, and other scripting languages ​​and cannot call external programs, making them time-consuming and labor-intensive when used on multiple remote computers. Summary of the Invention

[0003] In view of the above, it is necessary to provide a remote access method, electronic device, and storage medium that can improve the efficiency of remote access.

[0004] This application provides a remote access method, the method comprising: obtaining a remote access function instruction, the remote access function instruction including a first item parameter value, a first interface parameter value, a first cmdlist parameter value, and a first keylist parameter value; determining an access mode for a remote computer based on the first item parameter value; determining a login method for the remote computer based on the first interface parameter value in the determined access mode; in response to an instruction indicating successful login to the remote computer, obtaining data from the remote computer using the first cmdlist parameter value; and processing the data based on the first keylist parameter value.

[0005] In one possible implementation, determining the access mode to the remote computer based on the first item parameter value includes: determining whether the first item parameter value is 1 or 0; when the first item parameter value is 1, using a function mode as the access mode, wherein the function mode reads all parameter values ​​in the access function instruction; when the first item parameter value is 0, using a query instruction table mode as the access mode, wherein the query instruction table mode reads parameter values ​​from a preset instruction table; when the first item parameter value is neither 1 nor 0, using a mixed mode as the access mode, wherein the mixed mode uses both the function mode and the query instruction table mode simultaneously.

[0006] In one possible implementation, the parameter values ​​in the preset instruction table include: the second keylist parameter value, the second interface parameter value, and the second item parameter value.

[0007] In one possible implementation, when the query instruction table mode is used as the access mode, the second interface parameter value is defined as the first interface parameter value. The method of determining the login method for the remote computer based on the first interface parameter value includes: determining whether the first interface parameter value is lan, ssh, or telnet; when the first interface parameter value is lan, logging into the remote computer by executing a local program; when the first interface parameter value is ssh, logging into the remote computer via Secure Shell protocol; and when the first interface parameter value is telnet, logging into the remote computer via a telecommunications network interface.

[0008] In one possible implementation, when the hybrid mode is used as the access mode, determining the method of logging into the remote computer based on the first interface parameter value includes: sequentially extracting target parameter values ​​from the access function instruction, and determining whether the target parameter value is 0; when the target parameter value is not 0, reading the target parameter value; when the target parameter value is 0, extracting the first item parameter value from the access function instruction, comparing the first item parameter value with the second item parameter value in the preset instruction table, and when a target second item parameter value that is the same as the first item parameter value is found, reading the parameter value corresponding to the target parameter in the row where the target second item parameter value is located; using the read parameter value as a new parameter value; and determining the method of logging into the remote computer based on whether the interface parameter value in the new parameter value is lan, ssh, or telnet.

[0009] In one possible implementation, when the function pattern is used as the access mode, processing the data according to the first keylist parameter value includes: determining whether the first keylist parameter value is n / a; when the first keylist parameter value is n / a, returning the data; when the first keylist parameter value is not n / a, determining whether the data contains the first keylist parameter value; when the data contains the first keylist parameter value, returning the data; when the data does not contain the first keylist parameter value, generating a return failure message.

[0010] In one possible implementation, when the query instruction table mode is used as the access mode, the second keylist parameter value is defined as the first keylist parameter value. Processing the data based on the first keylist parameter value includes: determining whether the first keylist parameter value is n / a; when the first keylist parameter value is n / a, returning the data and reading the next row of parameter values ​​from the preset instruction table; when the first keylist parameter value is not n / a, determining whether the data contains the first keylist parameter value; when the data contains the first keylist parameter value, returning the data and reading the next row of parameter values ​​from the preset instruction table; when the data does not contain the first keylist parameter value, generating a return failure message.

[0011] In one possible implementation, obtaining data from the remote computer using the first cmdlist parameter value includes: after logging into the remote computer in the access mode of using a function, executing instructions sequentially according to the first cmdlist parameter value, and obtaining the data after executing the instructions; after logging into the remote computer in the access mode of querying a command table, defining the second cmdlist parameter value as the first cmdlist parameter value, executing instructions sequentially according to the first cmdlist parameter value, and obtaining the data after executing the instructions; and after logging into the remote computer in the access mode of the mixed mode, defining the cmdlist parameter value in the new parameter value as the first cmdlist parameter value, executing instructions sequentially according to the first cmdlist parameter value, and obtaining the data after executing the instructions.

[0012] This application also provides an electronic device including a processor and a memory, wherein the processor is used to implement the remote access method when executing a computer program stored in the memory.

[0013] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the remote access method described above.

[0014] The remote access method and related equipment disclosed in this application automatically determine the login method for the remote computer by utilizing the access mode, eliminating the need to develop cumbersome program code and saving a significant amount of program research and development time. Only a single line of code is required to achieve SSH connection functionality, Telnet connection functionality, external program calling functionality, command table functionality, and table lookup functionality. Furthermore, it provides flexible and adaptable modules, allowing for multiple variations and combinations, saving program developers considerable program code maintenance time and improving the efficiency of remote access. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the structure of an electronic device for a remote access production method provided in an embodiment of this application.

[0016] Figure 2 This is a flowchart of a remote access method provided in an embodiment of this application.

[0017] Figure 3 This is an exemplary instruction table provided in the embodiments of this application.

[0018] Figure 4 This is a flowchart illustrating how the function pattern is used as the access pattern, as provided in an embodiment of this application.

[0019] Figure 5 This is a flowchart illustrating how the query instruction table pattern is used as the access mode, as provided in an embodiment of this application.

[0020] Figure 6 This is a flowchart illustrating how the hybrid mode is used as the access mode, as provided in an embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] Please see Figure 1 , Figure 1 This is a schematic diagram of an electronic device according to an embodiment of this application. (See attached diagram) Figure 1 As shown, the electronic device 1 includes, but is not limited to, a memory 11 and at least one processor 12. These components can be connected via a communication bus 13 or directly.

[0023] The electronic device 1 can be a computer, mobile phone, tablet computer, personal digital assistant (PDA), or other device with an application installed. Those skilled in the art will understand that the illustration... Figure 1 This is merely an example of electronic device 1 and does not constitute a limitation on electronic device 1. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 1 may also include input / output devices, network access devices, buses, etc.

[0024] like Figure 2 The diagram shown is a flowchart of a preferred embodiment of the remote access method of this application. The remote access method is applied to the electronic device 1. Depending on different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. In this embodiment, the remote access method includes:

[0025] S21. Obtain remote access function instructions, wherein the remote access function instructions include a first item parameter value, a first interface parameter value, a first cmdlist parameter value, and a first keylist parameter value.

[0026] In one embodiment of this application, the user references the multi-functional remote access function `netcmds.exec` in program code. The program code includes the Python programming language. The remote access function includes a first `server ip` parameter value, a first `server user` parameter value, a first `server pwd` parameter value, a first `item` parameter value, a first `interface` parameter value, a first `cmdlist` parameter value, and a first `keylist` parameter value. The first `server ip` parameter value is the IP address of the remote computer, the first `server user` parameter value is the user account used to log in to the remote computer, the first `server pwd` parameter value is the password used to log in to the remote computer, and the first `item` parameter value, the first `interface` parameter value, the first `cmdlist` parameter value, and the first `keylist` parameter value are parameter values ​​extracted from a preset first archive database based on the IP address of the remote computer. For example, the remote access function is `netcmds.exec('172.16.222.61', 'sysadmin', 'superuser', '[ls, ps_aswww, df]', ' / var, / run', 'ssh', 1)`.

[0027] When the number of remote computers is small, multiple remote computers can be logged into by using the remote access function instructions, while avoiding cumbersome remote access program code, saving login time and improving login efficiency.

[0028] Prior to step S22, the method further includes generating an instruction table for storing a large number of parameter values ​​of the remote computer.

[0029] When accessing remote computers, especially when there are many remote computers, it is time-consuming and laborious to edit a large amount of program code for each one. Therefore, after obtaining the remote access function instructions, an instruction table can be pre-generated to store a large number of parameter values ​​for the remote computers.

[0030] In specific implementation, the second server IP parameter value, the second server user parameter value, and the second server pwd parameter value of the remote computer are obtained. Based on these values, the second item parameter value, the second interface parameter value, the second cmdlist parameter value, and the second keylist parameter value are set. It should be noted that different parameter values ​​can be set for the same remote computer. Figure 3 The instruction table shown.

[0031] S22. Determine the access mode to the remote computer based on the first item parameter value.

[0032] When the number of remote computers is small, remote access can be performed directly using the remote access function instructions. When the number of remote computers is large, the instruction list needs to be used for remote access.

[0033] In one embodiment of this application, determining the access mode to the remote computer based on the first item parameter value includes: determining whether the first item parameter value is 1 or 0; when the first item parameter value is 1, using a function mode as the access mode, wherein the function mode reads all parameter values ​​in the access function instruction; when the first item parameter value is 0, using a query instruction table mode as the access mode, wherein the query instruction table mode reads parameter values ​​from a preset instruction table; when the first item parameter value is not 1 or 0, using a mixed mode as the access mode, wherein the mixed mode uses both the function mode and the query instruction table mode simultaneously.

[0034] In one embodiment of this application, the access mode is the mode used to determine parameters when performing subsequent remote access.

[0035] S23. Under the determined access mode, determine the method of logging into the remote computer based on the first interface parameter value.

[0036] In one embodiment of this application, when the function mode is used as the access mode, the method of determining the login method of the remote computer based on the first interface parameter value includes: determining whether the first interface parameter value is lan, ssh, or telnet; when the first interface parameter value is lan, logging into the remote computer by executing a local program; when the first interface parameter value is ssh, logging into the remote computer via the Secure Shell protocol; when the first interface parameter value is telnet, logging into the remote computer via a telecommunications network interface.

[0037] In one embodiment of this application, when the query instruction table mode is used as the access mode, the second interface parameter value is defined as the first interface parameter value. The method of determining the login method for the remote computer based on the first interface parameter value includes: determining whether the first interface parameter value is lan, ssh, or telnet; when the first interface parameter value is lan, logging into the remote computer by executing a local program; when the first interface parameter value is ssh, logging into the remote computer via the Secure Shell protocol; and when the first interface parameter value is telnet, logging into the remote computer via a telecommunications network interface.

[0038] In one embodiment of this application, when the hybrid mode is used as the access mode, determining the method of logging into the remote computer based on the first interface parameter value includes: sequentially extracting target parameter values ​​from the access function instruction, and determining whether the target parameter value is 0; when the target parameter value is not 0, reading the target parameter value; when the target parameter value is 0, extracting the first item parameter value from the access function instruction, comparing the first item parameter value with the second item parameter value in the preset instruction table, and when a target second item parameter value that is the same as the first item parameter value is found, reading the parameter value corresponding to the target parameter in the row where the target second item parameter value is located; using the read parameter value as a new parameter value; and determining the method of logging into the remote computer based on whether the interface parameter value in the new parameter value is lan, ssh, or telnet.

[0039] By automatically determining the login method for the remote computer using the access mode, there is no need to develop cumbersome program code, saving a significant amount of program research and development time. A single line of code can provide SSH connection functionality, Telnet connection functionality, external program calling functionality, command table functionality, and table lookup functionality. Furthermore, it provides flexible modules, allowing for multiple variations and combinations, saving program developers considerable code maintenance time and improving the efficiency of remote access.

[0040] S24. In response to the instruction of successfully logging into the remote computer, obtain data from the remote computer using the first cmdlist parameter value.

[0041] In one embodiment of this application, obtaining data from the remote computer using the first cmdlist parameter value includes: after logging into the remote computer in the access mode of using a function, executing instructions sequentially according to the first cmdlist parameter value, and obtaining the data after executing the instructions; after logging into the remote computer in the access mode of querying a command table, defining the second cmdlist parameter value as the first cmdlist parameter value, executing instructions sequentially according to the first cmdlist parameter value, and obtaining the data after executing the instructions; after logging into the remote computer in the access mode of the mixed mode, defining the cmdlist parameter value in the new parameter value as the first cmdlist parameter value, executing instructions sequentially according to the first cmdlist parameter value, and obtaining the data after executing the instructions.

[0042] S25. Process the data according to the value of the first keylist parameter.

[0043] In one embodiment of this application, when the function mode is used as the access mode, processing the data according to the first keylist parameter value includes: determining whether the first keylist parameter value is n / a; when the first keylist parameter value is n / a, returning the data; when the first keylist parameter value is not n / a, determining whether the data contains the first keylist parameter value; when the data contains the first keylist parameter value, returning the data; when the data does not contain the first keylist parameter value, generating a return failure message.

[0044] In one embodiment of this application, when the query instruction table mode is used as the access mode, the second keylist parameter value is defined as the first keylist parameter value. Processing the data based on the first keylist parameter value includes: determining whether the first keylist parameter value is n / a; when the first keylist parameter value is n / a, returning the data and reading the next row of parameter values ​​in the preset instruction table; when the first keylist parameter value is not n / a, determining whether the data contains the first keylist parameter value; when the data contains the first keylist parameter value, returning the data and reading the next row of parameter values ​​in the preset instruction table; when the data does not contain the first keylist parameter value, generating a return failure message.

[0045] In one embodiment of this application, when the hybrid mode is used as the access mode, the keylist parameter value in the new parameter value is defined as the first keylist parameter value. Processing the data based on the first keylist parameter value includes: determining whether the first keylist parameter value is n / a; when the first keylist parameter value is n / a, returning the data; when the first keylist parameter value is not n / a, determining whether the data contains the first keylist parameter value; when the data contains the first keylist parameter value, returning the data; when the data does not contain the first keylist parameter value, generating a return failure message.

[0046] By utilizing the access mode, remote access can be automated by providing a solution for users without programming experience. The program automatically determines the set of instructions to be executed and the set of data content to be compared and processed.

[0047] like Figure 4 The diagram shown is a flowchart of the application using the function pattern as the access pattern.

[0048] In specific implementation, when the first item parameter value is set to 1, the function mode is used as the access mode, and all parameter values ​​are substituted. The method of logging into the remote computer is determined based on the first interface parameter value. After logging into the remote computer, the command set set by the first cmdlist parameter value will be executed. The first cmdlist parameter value supports multiple commands. When logging into the remote computer using SSH, the ls command, ps_axwww, and df command will be executed sequentially. After executing the commands, data will be retrieved. After retrieving the data, the first keylist parameter value will be checked. If the parameter is set to n / a, the data will not be processed and will be directly returned. If the first keylist parameter value is not set to n / a, and the first keylist parameter value also supports the command set and multiple string comparisons, the retrieved data will be compared to see if it contains the first keylist parameter value. If both are found, True will be returned; if one data is not found, False will be returned.

[0049] like Figure 5 The diagram shown is a flowchart of the application when the query instruction table pattern is used as the access pattern.

[0050] In specific implementation, when the first item parameter value is set to 0, a query command table mode will be used, ignoring the parameters passed to the remote access function commands and referring to all values ​​set in the command table. Data from each field will be read starting from the second row of the command table. The method of logging into the remote computer will be determined based on the second interface parameter value. After logging into the remote computer, the command set set by the second cmdlist parameter value will be executed; that is, the second cmdlist parameter value supports multiple commands. When logging into the remote computer using SSH, the ls command and mount command will be executed sequentially. After executing the commands, data will be retrieved. After retrieving the data, the second keylist parameter value will be checked. If it is set to n / a, the retrieved data will not be processed, and the data will be displayed directly, and the next row of the command table will be read sequentially. If the second keylist parameter value is not set to n / a, and the second keylist parameter supports a command set, multiple string comparisons are also possible. The retrieved data will be compared to see if it contains the second keylist parameter value. If both are present, the next row of the command table will be read sequentially. If one content is not found, a failure will be displayed, and the process will stop.

[0051] like Figure 6 The diagram shown is a flowchart of the application when the hybrid mode is used as the access mode.

[0052] In specific implementation, when the first item parameter value is not 1 or 0, a mixed mode will be used, incorporating all parameters. Target parameter values ​​are extracted sequentially from the access function instructions. If the target parameter value is not 0, it is read directly; if it is 0, the first item parameter value will be used to query the query instruction table. When a target second item parameter value identical to the first item parameter value is found, the parameter value corresponding to the target parameter in the row containing the target second item parameter value is read. The interface parameter value in the new parameter value determines the login method for the remote computer. After logging into the remote computer, the instructions in the cmdlist parameter value of the new parameter value will be executed. The cmdlist parameter value in the new parameter value supports multiple instruction sets. When logging into the remote computer using SSH, the df command and ps_auxwww command will be executed sequentially. After executing the commands, data will be obtained. After obtaining the data, the keylist parameter value in the new parameter value will be checked. If it is set to n / a, it means that the obtained data will not be processed and will be directly returned. If the keylist parameter value in the new parameter value is not n / a, the obtained data will be compared to see if it contains the keylist parameter value in the new parameter value. If it does, True will be returned; otherwise, False will be returned.

[0053] Please continue reading. Figure 1 In this embodiment, the memory 11 can be the internal memory of the electronic device 1, that is, the memory built into the electronic device 1. In other embodiments, the memory 11 can also be the external memory of the electronic device 1, that is, the memory externally connected to the electronic device 1.

[0054] In some embodiments, the memory 11 is used to store program code and various data, and to enable high-speed and automatic access to programs or data during the operation of the electronic device 1.

[0055] The memory 11 may include random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0056] In one embodiment, the processor 12 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor itself may be any other conventional processor.

[0057] If the program code and various data in the memory 11 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the implementation of all or part of the processes in the methods of the above embodiments, such as the steps in the method for extending battery service life, can also be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), etc.

[0058] It is understood that the module division described above is a logical functional division, and there may be other division methods in actual implementation. Furthermore, the functional modules in the various embodiments of this application can be integrated into the same processing unit, or each module can exist physically separately, or two or more modules can be integrated into the same unit. The integrated modules described above can be implemented in hardware or in a combination of hardware and software functional modules.

[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.

Claims

1. A method of remote access, characterized by, The remote access method comprises the following steps: acquiring a remote access function instruction, wherein the remote access function instruction comprises a first item parameter value, a first interface parameter value, a first cmdlist parameter value and a first keylist parameter value; determining an access mode of a remote computer according to the first item parameter value; determining a login mode of the remote computer according to the first interface parameter value under the determined access mode; acquiring data from the remote computer by using the first cmdlist parameter value in response to a login instruction of the remote computer; processing the data according to the first keylist parameter value.

2. The remote access method of claim 1, wherein, The step of determining the access mode of the remote computer according to the first item parameter value comprises the following steps: judging whether the first item parameter value is 1 or 0; when the first item parameter value is 1, using a function mode as the access mode, wherein the function mode is reading all parameter values in the remote access function instruction; when the first item parameter value is 0, using a query instruction table mode as the access mode, wherein the query instruction table mode is reading parameter values in a preset instruction table; when the first item parameter value is neither 1 nor 0, using a mixed mode as the access mode, wherein the mixed mode is simultaneously using the function mode and the query instruction table mode.

3. The remote access method of claim 2, wherein, The parameter values in the preset instruction table comprise a second keylist parameter value, a second interface parameter value and a second item parameter value.

4. The remote access method of claim 3, wherein, When the query instruction table mode is used as the access mode, the second interface parameter value is defined as the first interface parameter value, and the step of determining the login mode of the remote computer according to the first interface parameter value comprises the following steps: judging whether the first interface parameter value is lan or ssh or telnet; when the first interface parameter value is lan, logging into the remote computer by executing a local program; when the first interface parameter value is ssh, logging into the remote computer by using a secure shell protocol; when the first interface parameter value is telnet, logging into the remote computer by using a telecommunication network interface.

5. The remote access method of claim 3, wherein, When the mixed mode is used as the access mode, the step of determining the login mode of the remote computer according to the first interface parameter value comprises the following steps: extracting target parameter values from the remote access function instruction in sequence, and judging whether the parameter value of the target parameter is 0; when the target parameter value currently extracted is not 0, reading the target parameter value; When the currently extracted target parameter value is 0, the first item parameter value in the access function instruction is extracted, and the first item parameter value is compared with the second item parameter value in the preset instruction table. When a target second item parameter value that is the same as the first item parameter value is found, the parameter value corresponding to the target parameter in the row where the target second item parameter value is located is read. Use the read parameter value as the new parameter value; The method of logging into the remote computer is determined based on whether the interface parameter value in the new parameter value is lan, ssh, or telnet.

6. The remote access method of claim 3, wherein, When the function pattern is used as the access pattern, processing the data according to the first keylist parameter value includes: Determine if the value of the first keylist parameter is n / a; When the value of the first keylist parameter is n / a, the data is returned. When the value of the first keylist parameter is not n / a, determine whether the data contains the value of the first keylist parameter. If the data contains the value of the first keylist parameter, return the data. If the data does not contain the value of the first keylist parameter, generate a message indicating that the return failed.

7. The remote access method of claim 3, wherein, When the query instruction table mode is used as the access mode, the second keylist parameter value is defined as the first keylist parameter value, and the data processing according to the first keylist parameter value includes: Determine if the value of the first keylist parameter is n / a; When the value of the first keylist parameter is n / a, the data is sent back and the next row of parameter values ​​in the preset instruction table is read. When the value of the first keylist parameter is not n / a, it is determined whether the data contains the value of the first keylist parameter. When the data contains the value of the first keylist parameter, the data is sent back and the next row of parameter values ​​in the preset instruction table is read. When the data does not contain the value of the first keylist parameter, a message indicating that the data was sent back is generated.

8. The remote access method of claim 5, wherein, The step of obtaining data from the remote computer using the first cmdlist parameter value includes: After logging into the remote computer in the access mode of the function mode, the instructions are executed sequentially according to the first cmdlist parameter value, and the data is obtained after the instructions are executed. After logging into the remote computer in the access mode of query instruction table mode, the second cmdlist parameter value is defined as the first cmdlist parameter value, and instructions are executed sequentially according to the first cmdlist parameter value. After executing the instructions, the data is obtained. After logging into the remote computer in the mixed access mode, the cmdlist parameter value in the new parameter value is defined as the first cmdlist parameter value. Instructions are executed sequentially according to the first cmdlist parameter value, and the data is obtained after the instructions are executed.

9. An electronic device, comprising: The electronic device includes a processor and a memory, the processor being configured to execute a computer program stored in the memory to implement the remote access method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which, when executed by a processor, implements the remote access method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data access method and first electronic equipment

    CN108429623A

  • Host access system and method

    CN111212077A