Page remote control method and device
By receiving remote control instructions and using page configuration files to obtain operation numbers, the problems of complexity and high cost of remote control in the prior art are solved, and efficient control of different test instruments is achieved.
Patent Information
- Application Number
- CN202411916215.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-22
AI Technical Summary
The prior art In remote control in the field of testing and measurement, specific drivers and dependency environments are required, and new control programs are required to be developed every time a new test instrument is introduced, which increases development complexity and cost.
A method and device for remote control of pages are provided, by receiving remote control instructions, obtaining page operations corresponding to the instructions, using page configuration files to obtain operation numbers, and sending the number to the page control unit to perform corresponding control.
There is no need to reconfigure the page, you can control different instruments by simply modifying the scripts and configurations, simplifying the development process and reducing development costs.
Smart Images

Figure CN119861961A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of page display, and in particular to a method and device for remotely controlling a page. Background Art
[0002] Currently in the field of testing and measurement, test instruments such as desktop oscilloscopes and digital meters can be remotely controlled with the help of various bus technologies such as GPIB, serial ports, and networks. In actual applications, the computer as the control center can remotely control these test instruments as slave devices by writing corresponding programs. It can also access these instruments through web pages, monitor their status in real time, and perform some basic control and configuration tasks.
[0003] However, no matter which remote control method is adopted, specific drivers and dependent environments need to be installed on the web remote control instrument. Since the control software of different test instruments are often incompatible, a new set of control programs must be developed whenever a new test instrument is introduced, which undoubtedly increases the complexity and cost of development.
[0004] Therefore, there is an urgent need to develop a page remote control method and device to solve one or more of the above-mentioned problems. Summary of the invention
[0005] In view of this, in order to solve the above technical problems or part of the technical problems, an embodiment of the present invention provides a page remote control method and device.
[0006] In a first aspect, the present application provides a page remote control method, the method comprising:
[0007] Receive remote control instructions from the page;
[0008] Obtaining the page operation corresponding to the remote control instruction;
[0009] In the case where the page configuration file records the page operation, obtaining an operation number corresponding to the page operation in the page configuration file;
[0010] The operation number is sent to the page control unit so that the page control unit executes the page control corresponding to the operation number.
[0011] In a possible implementation, the method further includes:
[0012] In the case where the page configuration file does not record the page operation, determining whether the page operation is an implementable operation;
[0013] When the page operation is an implementable operation, the page operation is sequentially compared with each custom operation recorded in the page configuration file to obtain a comparison result set;
[0014] An operation number of the page operation is determined according to the comparison result set.
[0015] In a possible implementation, determining the operation number of the page operation according to the comparison result includes:
[0016] When the first comparison result exists in the comparison result set, obtaining a custom operation set corresponding to the first comparison result, and determining an operation number of the page operation according to the custom operation set;
[0017] When there is a second comparison result in the comparison result set, selecting a target custom operation from the custom operations corresponding to the second comparison result, and determining the operation number of the page operation according to the target custom operation;
[0018] The target custom operation is the custom operation with the highest similarity to the page operation.
[0019] In a possible implementation, determining the operation number of the page operation according to the custom operation set includes:
[0020] Obtaining the operation number of each custom operation in the custom operation set and the operation sequence of the page operation corresponding to each custom operation;
[0021] Determine the operation number of the page operation according to the operation sequence and the operation number of each custom operation;
[0022] The operation number sequence of the page operation includes the operation number of each custom operation.
[0023] In a possible implementation, determining the operation number of the page operation according to the target customized operation includes:
[0024] Obtaining the corresponding relationship between the target custom operation and the page operation;
[0025] According to the corresponding relationship, determining a conversion operation of updating the target custom operation to a page operation;
[0026] Performing numbering processing on the conversion operation to obtain a conversion number of the conversion operation;
[0027] Get the operation number of the target custom operation;
[0028] Determine the operation number of the page operation according to the conversion number and the operation number of the target custom operation;
[0029] The operation number of the page operation includes the operation number of the target custom operation corresponding to the page operation and the conversion number.
[0030] In a possible implementation manner, determining the operation number of the page operation according to the comparison result further includes:
[0031] When there is only the third comparison result in the comparison result set, numbering the page operation to obtain an operation number of the page operation;
[0032] The page operation and the operation number of the page operation are correspondingly stored in the page configuration file.
[0033] In a possible implementation, the method further includes:
[0034] Obtaining historical operation information of the page;
[0035] Obtaining all customized operations of the page from the historical operation information;
[0036] Determine the corresponding operation position of each custom operation on the page;
[0037] According to the operation position, each custom operation is numbered in sequence to obtain an operation number of each custom operation;
[0038] All the custom operations of the page and the operation number of each custom operation are correspondingly stored in the page configuration file.
[0039] In a possible implementation, after acquiring all customized operations of the page from the historical operation information, the method further includes:
[0040] Determine in turn whether the custom operation of the page is an implementable operation;
[0041] In the case where all the custom operations on the page are implementable operations, performing the step of determining the operation position corresponding to each custom operation on the page;
[0042] When there is an unimplementable operation among the custom operations on the page, the unimplementable custom operation is analyzed to obtain a reason why the custom operation is unimplementable, and the reason is fed back to the operation end.
[0043] In a possible implementation, the method further includes:
[0044] When the page operation is an unfeasible operation, analyzing the page operation to obtain a reason why the page operation is unfeasible;
[0045] The reasons for the impracticability are fed back to the operation end.
[0046] In a second aspect, the present application provides a page remote control device, the device comprising:
[0047] A receiving module, used for receiving remote control instructions of a page;
[0048] An operation acquisition module, used to acquire the page operation corresponding to the remote control instruction;
[0049] A number acquisition module, used for acquiring an operation number corresponding to the page operation in the page configuration file when the page configuration file records the page operation;
[0050] The execution module is used to send the operation number to the page control unit so that the page control unit executes the page control corresponding to the operation number.
[0051] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, after receiving the remote control instruction, obtains the page operation corresponding to the control instruction, and then obtains the operation number corresponding to the page operation through the record information of the original page configuration file. It only needs to change the script and configuration to achieve control of different instruments, without the need to re-perform complex page reconfiguration, thereby reducing development costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0054] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0055] Figure 1 A flowchart of a page remote control method provided in an embodiment of the present application;
[0056] Figure 2A flowchart of another page remote control method provided in an embodiment of the present application;
[0057] Figure 3 A schematic diagram of a process for determining an operation number provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of another process for determining an operation number provided in an embodiment of the present application
[0059] Figure 5 A schematic diagram of the structure of a page remote control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0061] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0062] In order to solve the technical problem that in the process of remote monitoring of instruments in the prior art, it is necessary to install specific drivers and dependent environments on the web remote control instruments, and each time a new test instrument is introduced, a new set of control programs must be developed, which increases the complexity and cost of development, the present application provides a remote page control method and device, which can automatically obtain the page operation corresponding to the control instruction after receiving the remote control instruction; then, using the record information in the pre-configured page configuration file, the system can identify the operation number corresponding to the page operation, so that the maintenance personnel only need to make simple modifications to the script and configuration to achieve control of different instruments without the need for tedious page reconfiguration work, which greatly simplifies the development process and effectively reduces development costs.
[0063] Figure 1 A flowchart of a page remote control method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method specifically includes:
[0064] S101, receiving a remote control instruction of a page;
[0065] All the programs required by the test instrument run in the operating system of the instrument's embedded controller, which is generally Linux. WEB services are implemented through BOA servers and CGI programs. Sh scripts, configuration files, and configuration parsing programs need to be added. The sh scripts and configuration files can be modified through the WEB page, and then the scripts can be executed to allow the instrument to complete the test.
[0066] Among them, the CGI program is developed in C language and is used to implement various pages and functions of the WEB web page, such as instrument information status query page, network configuration modification page, sh script and configuration file modification page, custom command execution page, help page, etc.
[0067] In this embodiment, the remote controller receives the remote control instruction of the page, further processes the received control instruction, and calls the corresponding page control program according to the instruction content.
[0068] S102, obtaining a page operation corresponding to the remote control instruction;
[0069] In this embodiment, the remote control instructions record user-defined page control commands and parameters. These instructions are transmitted to the remote controller of the instrument through the network. The CGI program in the controller parses these instructions and calls the corresponding page control program according to the instruction content to realize remote operation of the test instrument.
[0070] For example, users can set test parameters, start test processes, view test results, etc. through the web interface. In addition, the remote controller also includes a security verification mechanism to ensure that only authorized users can send control commands, thereby ensuring the safety and reliability of the test process.
[0071] S103, when the page configuration file records the page operation, obtaining the operation number corresponding to the page operation in the page configuration file;
[0072] In this embodiment, the page configuration file records detailed information of the page operation, including the operation number, operation name, operation parameters, and display method of the operation results, etc. The page configuration file serves as the basis for the remote controller to perform remote operations, ensuring the accuracy and efficiency of the operation.
[0073] Furthermore, the configuration file also supports dynamic updates, allowing the remote control function to adapt to changing test requirements and user needs. In this way, users can flexibly define and modify page operations to meet specific test scenarios and needs.
[0074] S104: Send the operation number to a page control unit, so that the page control unit executes page control corresponding to the operation number.
[0075] The page control unit is responsible for receiving the operation number and executing the corresponding page control instruction according to the number.
[0076] Specifically, the page control unit has a built-in intelligent parsing module that can accurately parse the operation number and convert it into a specific page operation action.
[0077] In addition, the page control unit also has a self-diagnosis function, which can monitor its own status in real time to ensure stability and reliability when executing remote control instructions; when encountering abnormal situations, the page control unit can issue an alarm in time and take preset emergency measures to prevent possible system failures or data loss.
[0078] In this embodiment, after the operation number is determined, the operation number is sent to the page control unit, and the page control unit executes the control of the page according to the operation parameters corresponding to the operation number.
[0079] The page remote control method provided in the embodiment of the present application receives the remote control instruction of the page, obtains the page operation recorded in the control instruction, and then analyzes the page configuration file. When the page configuration file records the page operation, the operation number corresponding to the page operation in the page configuration file is obtained, and the operation number is sent to the page control unit. Finally, the page control unit executes the corresponding page control according to the operation number to realize remote control.
[0080] When the remote control command is captured, the remote control command is first parsed to obtain the page operation information contained therein, and then the page configuration file is deeply analyzed and interpreted to determine whether the page operation has a corresponding record in the configuration file; if the page configuration file does record the page operation, the operation number corresponding to the page operation is further extracted; once the operation number is successfully extracted, the operation number is sent to the page control unit; after receiving the operation number, the page control unit will perform precise page control operations according to the operation number, thereby achieving the goal of remote control. Maintenance personnel only need to make simple modifications to the script and configuration to achieve control of different instruments, without the need for tedious page reconfiguration, which greatly simplifies the development process and effectively reduces development costs.
[0081] In addition, during the execution of remote control operations, the page control unit will continuously monitor the execution status of the operation to ensure that each step of the operation is completed accurately and without error according to the predetermined logic. If any abnormality is encountered during the execution process, the page control unit will immediately start the fault diagnosis program, analyze the cause of the fault, and try to automatically repair it according to the cause of the fault. If the problem cannot be solved automatically, the page control unit will record a detailed error log and send an alarm to the maintenance personnel through the network for timely manual intervention. In addition, the page remote control process is also designed with user authority management to ensure that only authorized users can send remote control instructions, thereby enhancing the security of the system and enabling the remote controller to complete remote control tasks efficiently and safely, greatly improving the convenience of operation and the reliability of the system.
[0082] In an optional solution of the embodiment of the present invention, the method further includes:
[0083] In the case where the page configuration file does not record the page operation, determining whether the page operation is an implementable operation;
[0084] When the page operation is an implementable operation, the page operation is sequentially compared with each custom operation recorded in the page configuration file to obtain a comparison result set;
[0085] An operation number of the page operation is determined according to the comparison result set.
[0086] In this embodiment, when processing the page configuration file, since the page operations recorded in the page configuration file are those that are considered to be actually executable, when the page operation corresponding to the remote control instruction is not recorded in the page configuration file, it is necessary to first evaluate the feasibility of the page operation, that is, analyze the rationality of the page design, including whether the layout is intuitive and easy to use, whether the functions are clear and unambiguous, and whether the user interface is friendly. Secondly, it is necessary to consider the feasibility of technical implementation, such as whether the currently popular and stable technology stack is used, and whether it can support possible future expansion and maintenance.
[0087] Only when the page operation is an implementable operation can the next step of processing be continued. Then, the implementable page operation is compared and analyzed with all the custom operations recorded in the page configuration file in turn to determine the correspondence between the page operation and each custom operation in the page configuration file. The specific operation number of the page operation is inferred through the correspondence, and finally the operation number is used as the key to execute a specific page operation, so that the remote control instruction can be accurately mapped to the corresponding page operation.
[0088] Figure 2 A flowchart of another page remote control method provided in an embodiment of the present application is shown as follows: Figure 2 As shown, the method specifically includes:
[0089] S201: when there is a first comparison result in the comparison result set, obtaining a custom operation set corresponding to the first comparison result, and determining an operation number of the page operation according to the custom operation set;
[0090] S202: if there is a second comparison result in the comparison result set, select a target custom operation from the custom operations corresponding to the second comparison result, and determine the operation number of the page operation according to the target custom operation;
[0091] The target custom operation is the custom operation with the highest similarity to the page operation.
[0092] In this embodiment, the page operation corresponding to the remote control instruction is compared with the custom operation recorded in the configuration file to obtain a comparison result;
[0093] When the comparison result shows that there are multiple custom operations that are identical to the page operation part in the configuration file, and the multiple custom operations can complete the page operation by adding them together, the operation numbers of the corresponding custom operation sets are combined to determine the operation number of the page operation.
[0094] When the comparison result shows that there is a custom operation in the configuration file that is highly similar to the page operation, the operation number of the page operation may be determined by making changes according to the corresponding custom operation.
[0095] The page remote control method provided in the embodiment of the present application is improved on the basis of the existing custom operations according to the correspondence between the page operations and the custom operations already in the configuration file to adapt to different remote control requirements. By analyzing the characteristics of the page operations and matching them with the custom operations in the configuration file, the most suitable operation template is found to complete the remote control task more efficiently. This not only improves the flexibility of remote control, but also reduces the complexity of users in performing remote operations, allowing users to operate more intuitively without having to have an in-depth understanding of the complex configuration file content.
[0096] Figure 3 A schematic diagram of a flow chart for determining an operation number provided in an embodiment of the present application, such as Figure 3 As shown, the method specifically includes:
[0097] S301, obtaining the operation number of each custom operation in the custom operation set, and the operation sequence of the page operation corresponding to each custom operation;
[0098] In this embodiment, after determining the custom operation set corresponding to the page operation in the custom configuration, firstly obtain the operation number of each custom operation in the custom operation set and the operation sequence of the page operation corresponding to each custom operation in the custom operation set;
[0099] S302, determining the operation number of the page operation according to the operation sequence and the operation number of each custom operation;
[0100] The operation number sequence of the page operation includes the operation number of each custom operation.
[0101] In this embodiment, the number of each operation on the page is clearly specified according to the described operation steps and the specific number of each custom operation; wherein the numbering sequence of the operations on the page will include the corresponding numbers of all custom operations to ensure that each step has a clear identification.
[0102] Exemplarily, when it is determined that custom operation A, custom operation B, and custom operation C correspond to the page operation in the configuration file, custom operation B, custom operation A, and custom operation C are merged in sequence to make them consistent with the page operation carried by the remote control instruction; at this time, the operation numbers of custom operation A, custom operation B, and custom operation C are obtained, and the operation numbers of custom operation B, custom operation A, and custom operation C are merged in sequence as the operation numbers of the page operation.
[0103] For example, the operation numbers of custom operation A, custom operation B, and custom operation C are 001, 002, and 003 respectively. At this time, 002-001-003 is used as the number of the page operation, so that when the page operation is executed, custom operation B, custom operation A, and custom operation C are executed in sequence.
[0104] The operation number determination method provided in the embodiment of the present application can automatically identify and match the custom operation numbers in the configuration file, and through specific algorithm logic, combine these numbers into a complete operation sequence in a predetermined order, thereby obtaining the operation number of the page operation, so that the custom operations corresponding to the custom operations can be implemented in sequence according to the operation number, and the page operation can be completed, so that the remote control instructions can be executed accurately and without error.
[0105] Figure 4 A schematic diagram of another process for determining an operation number provided in an embodiment of the present application is as follows: Figure 4 As shown, the method specifically includes:
[0106] S401, obtaining a correspondence between the target custom operation and the page operation;
[0107] In this embodiment, after determining the target sub-defined operation with the highest similarity to the page operation, the corresponding relationship between the target sub-defined operation and the page operation is obtained;
[0108] After determining the target sub-defined operation with the highest similarity to the page operation, the corresponding relationship between the target sub-defined operation and the page operation is further obtained.
[0109] Specifically, the target custom operation is a series of page operations in the historical page operation process. The process of determining the correspondence between the target sub-defined operation and the page operation first requires an in-depth analysis of the specific operation objects involved in the page operation to determine the similarity between these operation objects, and then further evaluates the similarity of the page operations with the same operation objects in terms of specific operation logic.
[0110] S402: According to the corresponding relationship, determine a conversion operation of updating the target custom operation to a page operation;
[0111] In this embodiment, according to the acquired correspondence between the target customized operation and the page operation, a specific operation for converting from the target customized operation to the page operation is further determined.
[0112] S403, performing numbering processing on the conversion operation to obtain a conversion number of the conversion operation;
[0113] In addition to recording the details of various custom operations and the operation numbers corresponding to these operations, the configuration file also includes a detailed description of the conversion process between operations and the unique conversion number corresponding to each conversion process.
[0114] In this embodiment, after obtaining the specific operation of converting the target custom operation to the page operation, the conversion operation is numbered, and then the conversion operation and the conversion number corresponding to the conversion operation are recorded in the configuration file.
[0115] S404, obtaining the operation number of the target custom operation;
[0116] S405, determining the operation number of the page operation according to the conversion number and the operation number of the target custom operation;
[0117] The operation number of the page operation includes the operation number of the target custom operation corresponding to the page operation and the conversion number.
[0118] In this embodiment, after determining the conversion number and the operation number of the mother-daughter defined operation, the operation number of the page operation is inferred.
[0119] For example, after determining that the target custom operation A undergoes deletion conversion, a page operation can be obtained; the operation number of custom operation A is 001, and the deletion conversion is 11, from which it can be inferred that the operation number of the page operation is 001(11), where the content in () is the conversion number corresponding to the page operation.
[0120] The operation numbering method provided in the embodiment of the present application can automatically identify and match the target custom operation in the configuration file, and then obtain the conversion number corresponding to the target custom operation in the process of converting the target custom operation into the page operation, and further obtain the operation number of the page operation according to the conversion number and the operation number of the target custom operation, implement the custom operation corresponding to the custom operation, complete the page operation, so that the remote control instruction can be executed accurately and without error.
[0121] In an optional solution of the embodiment of the present invention, determining the operation number of the page operation according to the comparison result further includes:
[0122] When there is only the third comparison result in the comparison result set, numbering the page operation to obtain an operation number of the page operation;
[0123] The page operation and the operation number of the page operation are correspondingly stored in the page configuration file.
[0124] In this embodiment, if there are only custom operations in the configuration file whose similarity does not meet the preset similarity requirement, that is, there is only the third comparison result in the comparison result set; according to the operation numbers of the custom operations already in the configuration file, according to the numbering rules of the custom operations in the configuration file, the page operations are numbered to obtain the operation numbers of the page operations, and the operation numbers are stored in the page configuration file accordingly to ensure the uniqueness and continuity of the numbers and avoid numbering conflicts in subsequent operations.
[0125] In an optional solution of the embodiment of the present invention, the method further includes:
[0126] Obtaining historical operation information of the page;
[0127] Obtaining all customized operations of the page from the historical operation information;
[0128] Determine the corresponding operation position of each custom operation on the page;
[0129] According to the operation position, each custom operation is numbered in sequence to obtain an operation number of each custom operation;
[0130] All the custom operations of the page and the operation number of each custom operation are correspondingly stored in the page configuration file.
[0131] In this embodiment, firstly, all historical operation information recorded since the creation of the page is obtained; by analyzing and screening, the user-defined operations on the page are extracted from the historical operation information; further, the specific operation positions corresponding to the page operations on the page are determined; then, according to the operation positions of each customized operation on the page, each customized operation is numbered in turn according to the logical order of the operation positions to obtain the operation numbers of all customized operations; finally, all customized operations on the page and their corresponding operation numbers are orderly stored in the page configuration file to ensure that in the subsequent page operation and management process, each customized operation can be quickly and accurately located, thereby improving the efficiency and accuracy of page operations.
[0132] In an optional solution of the embodiment of the present invention, after acquiring all customized operations of the page from the historical operation information, the method further includes:
[0133] Determine in turn whether the custom operation of the page is an implementable operation;
[0134] In the case where all the custom operations on the page are implementable operations, performing the step of determining the operation position corresponding to each custom operation on the page;
[0135] When there is an unimplementable operation among the custom operations on the page, the unimplementable custom operation is analyzed to obtain a reason why the custom operation is unimplementable, and the reason is fed back to the operation end.
[0136] In this embodiment, after all custom operations of the page are obtained from the historical operation information, each custom operation listed on the page is checked in turn to see whether it is an operation that can be actually executed; once it is confirmed that all custom operations on the page are implementable, the step of determining the operation position corresponding to each custom operation on the page is immediately executed; however, if it is found during the checking process that there are custom operations that cannot be implemented on the page, then the unimplementable operations are deeply analyzed to find out the specific reasons that lead to the inability to implement the operations, and these reasons are fed back to the operation end in detail so that corresponding solutions can be taken.
[0137] For example, if a custom operation cannot be implemented because of the lack of necessary permissions, the user will be prompted to obtain the corresponding permissions; if it is because the operating environment does not meet specific requirements, such as the lack of necessary software or hardware support, a clear prompt message will also be given. In addition, if it is because the operating steps are wrong or incomplete, correct operating instructions or suggestions will be provided to ensure that the user can understand and correct the problem. In this way, users can promptly understand and solve the problem of custom operations being unable to be implemented, thereby improving the efficiency and accuracy of remote control.
[0138] In an optional solution of the embodiment of the present invention, the method further includes:
[0139] When the page operation is an unfeasible operation, analyzing the page operation to obtain a reason why the page operation is unfeasible;
[0140] The reasons for the impracticability are fed back to the operation end.
[0141] In this embodiment, when operations on a page cannot be executed, it is first necessary to conduct a detailed analysis of these operations to determine the specific reasons why the operations cannot be implemented; after the analysis is completed, these reasons why the operations cannot be implemented are fed back to the operation end in detail so that the operation end can understand the situation and take corresponding measures.
[0142] Exemplarily, the custom command execution page is used to execute various custom commands. There are multiple custom function buttons on the page, such as funtion1, funtion2, funtion3... After pressing one of the custom function buttons, the CGI program uses the system() function to start the sh script and pass the function number to the script, for example "system("var / www / cgi-bin / fun.sh 1")".
[0143] The sh script and configuration file modification page can directly modify the contents of the sh script and configuration file.
[0144] The sh script is used to respond to different custom functions and perform different operations according to the passed in funtion, such as calling the configuration parsing program and passing the function number to be parsed. It can also directly execute other Linux system commands. The sh script can be written in the following format:
[0145]
[0146] fi
[0147] The configuration file is used to define multiple control flows. You can directly use standard commands such as SCPI or customize other commands. The configuration parser parses the file and executes the corresponding control flow according to the incoming function number. The example is as follows:
[0148] function1:
[0149] *IDN?
[0150] *CLS
[0151] OUT 1V
[0152] Sleep 10
[0153] OUT 0V
[0154] end
[0155] funtion2:
[0156] Write 1234
[0157] Read?
[0158] end
[0159] …
[0160] The configuration parser parses the configuration file according to the function number sent by the script, and then performs the corresponding operation. According to the process, it can directly communicate with the instrument's control service program or perform other operations, such as sending commands to the VXI-11 service, sending commands to the socket server, storing test results, etc. The function flow can be flexibly configured through the configuration file.
[0161] For example: set a signal source through the web page to output voltage for 60 seconds and then stop outputting and shut down.
[0162] First, modify the script to add function 1 to implement this process. The sh script is as follows:
[0163] function=$1 / / Get function number
[0164]
[0165] Write the specific process in the configuration file:
[0166]
[0167] After modifying the above files, enter the custom command execution page and click the "funtion1" button, the lower computer instrument will automatically execute the function 1 process.
[0168] Figure 5 A schematic diagram of the structure of a page remote control device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the device specifically includes:
[0169] Receiving module 501, used for receiving remote control instructions of a page;
[0170] An operation acquisition module 502 is used to acquire the page operation corresponding to the remote control instruction;
[0171] A number acquisition module 503 is used to acquire the operation number corresponding to the page operation in the page configuration file when the page configuration file records the page operation;
[0172] The execution module 504 is used to send the operation number to the page control unit so that the page control unit executes the page control corresponding to the operation number.
[0173] In a possible implementation, the device further includes a judgment module 505, which is used to judge whether the page operation is an implementable operation when the page configuration file does not record the page operation; when the page operation is an implementable operation, the page operation is sequentially compared with each custom operation recorded in the page configuration file to obtain a comparison result set; and according to the comparison result set, the operation number of the page operation is determined.
[0174] In a possible implementation, the judgment module 505 is further used to, when there is a first comparison result in the comparison result set, obtain a custom operation set corresponding to the first comparison result, and determine the operation number of the page operation according to the custom operation set; when there is a second comparison result in the comparison result set, select a target custom operation from the custom operations corresponding to the second comparison result, and determine the operation number of the page operation according to the target custom operation; wherein the target custom operation is the custom operation with the highest similarity to the page operation.
[0175] In a possible implementation, the judgment module 505 is further used to obtain the operation number of each custom operation in the custom operation set, and the operation sequence of the page operation corresponding to each custom operation; determine the operation number of the page operation according to the operation sequence and the operation number of each custom operation; wherein the operation number sequence of the page operation includes the operation number of each custom operation.
[0176] In a possible implementation, the judgment module 505 is further used to obtain the correspondence between the target custom operation and the page operation; determine, based on the correspondence, a conversion operation to update the target custom operation to the page operation; perform numbering on the conversion operation to obtain a conversion number of the conversion operation; obtain the operation number of the target custom operation; determine the operation number of the page operation based on the conversion number and the operation number of the target custom operation; wherein the operation number of the page operation includes the operation number of the target custom operation corresponding to the page operation and the conversion number.
[0177] In a possible implementation, the judgment module 505 is also used to, when there is only the third comparison result in the comparison result set, perform numbering on the page operation to obtain the operation number of the page operation; and store the page operation and the operation number of the page operation in a corresponding manner in a page configuration file.
[0178] In one possible implementation, the device further includes a numbering module 506, which is used to obtain historical operation information of the page; obtain all custom operations of the page from the historical operation information; determine the operation position corresponding to each custom operation on the page; number each custom operation in turn according to the operation position to obtain an operation number of each custom operation; and store all custom operations of the page and the operation number of each custom operation in a corresponding manner in a page configuration file.
[0179] In a possible implementation, the numbering module 506 is also used to determine in turn whether the custom operations of the page are feasible operations; when all the custom operations of the page are feasible operations, perform the step of determining the operation position corresponding to each custom operation on the page; when there are unfeasible operations among the custom operations of the page, analyze the unfeasible custom operations to obtain the reasons for the unfeasibility of the custom operations, and feed back the unfeasibility reasons to the operation end.
[0180] In a possible implementation, the judgment module 505 is further configured to analyze the page operation to obtain a reason why the page operation is not feasible when the page operation is not feasible; and feed back the reason to the operation end.
[0181] The page remote control device provided in this embodiment can be as follows Figure 5 The page shown in the remote control device can be executed as follows Figure 1-4 All the steps of remote control on the page are implemented Figure 1-4 The technical effect of remote control on the page shown, please refer to Figure 1-4 For the sake of brevity, the relevant description is not repeated here.
[0182] The device embodiments described above are merely illustrative, wherein the device components described as separate components may or may not be physically separated, and the components displayed as device components may or may not be physical device components, that is, they may be located in one place, or may be distributed on multiple network device components. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0183] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0184] It should be understood that the terms used in the text are only for the purpose of describing specific example embodiments, and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used in the text may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0185] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A page remote control method, characterized in that: include: Receive remote control instructions from the page; Obtaining the page operation corresponding to the remote control instruction; In the case where the page configuration file records the page operation, obtaining an operation number corresponding to the page operation in the page configuration file; The operation number is sent to the page control unit so that the page control unit executes the page control corresponding to the operation number.
2. The method according to claim 1, characterized in that The method further comprises: In the case where the page configuration file does not record the page operation, determining whether the page operation is an implementable operation; When the page operation is an implementable operation, the page operation is sequentially compared with each custom operation recorded in the page configuration file to obtain a comparison result set; An operation number of the page operation is determined according to the comparison result set.
3. The method according to claim 2, characterized in that Determining the operation number of the page operation according to the comparison result includes: When the first comparison result exists in the comparison result set, obtaining a custom operation set corresponding to the first comparison result, and determining an operation number of the page operation according to the custom operation set; When there is a second comparison result in the comparison result set, selecting a target custom operation from the custom operations corresponding to the second comparison result, and determining the operation number of the page operation according to the target custom operation; The target custom operation is the custom operation with the highest similarity to the page operation.
4. The method according to claim 3, characterized in that The step of determining the operation number of the page operation according to the custom operation set includes: Obtaining the operation number of each custom operation in the custom operation set and the operation sequence of the page operation corresponding to each custom operation; Determine the operation number of the page operation according to the operation sequence and the operation number of each custom operation; The operation number sequence of the page operation includes the operation number of each custom operation.
5. The method according to claim 3, characterized in that: The step of determining the operation number of the page operation according to the target custom operation includes: Obtaining the corresponding relationship between the target custom operation and the page operation; According to the corresponding relationship, determining a conversion operation of updating the target custom operation to a page operation; Performing numbering processing on the conversion operation to obtain a conversion number of the conversion operation; Get the operation number of the target custom operation; Determine the operation number of the page operation according to the conversion number and the operation number of the target custom operation; The operation number of the page operation includes the operation number of the target custom operation corresponding to the page operation and the conversion number.
6. The method according to claim 3, characterized in that The step of determining the operation number of the page operation according to the comparison result further includes: When there is only the third comparison result in the comparison result set, numbering the page operation to obtain an operation number of the page operation; The page operation and the operation number of the page operation are correspondingly stored in the page configuration file.
7. The method according to claim 1, characterized in that The method further comprises: Obtaining historical operation information of the page; Obtaining all customized operations of the page from the historical operation information; Determine the corresponding operation position of each custom operation on the page; According to the operation position, each custom operation is numbered in sequence to obtain an operation number of each custom operation; All the custom operations of the page and the operation number of each custom operation are correspondingly stored in the page configuration file.
8. The method according to claim 7, characterized in that After acquiring all customized operations of the page from the historical operation information, the method further includes: Determine in turn whether the custom operation of the page is an implementable operation; In the case where all the custom operations on the page are implementable operations, performing the step of determining the operation position corresponding to each custom operation on the page; When there is an unimplementable operation among the custom operations on the page, the unimplementable custom operation is analyzed to obtain a reason why the custom operation is unimplementable, and the reason is fed back to the operation end.
9. The method according to claim 2, characterized in that: The method further comprises: When the page operation is an unfeasible operation, analyzing the page operation to obtain a reason why the page operation is unfeasible; The reasons why the implementation cannot be implemented are fed back to the operation end.
10. A page remote control device, characterized in that: include: A receiving module, used for receiving remote control instructions of a page; An operation acquisition module, used to acquire the page operation corresponding to the remote control instruction; A number acquisition module, used for acquiring an operation number corresponding to the page operation in the page configuration file when the page configuration file records the page operation; The execution module is used to send the operation number to the page control unit so that the page control unit executes the page control corresponding to the operation number.