Movatterモバイル変換


[0]ホーム

URL:


CN114090117B - A configuration method, device, equipment and storage medium - Google Patents

A configuration method, device, equipment and storage medium
Download PDF

Info

Publication number
CN114090117B
CN114090117BCN202111327762.9ACN202111327762ACN114090117BCN 114090117 BCN114090117 BCN 114090117BCN 202111327762 ACN202111327762 ACN 202111327762ACN 114090117 BCN114090117 BCN 114090117B
Authority
CN
China
Prior art keywords
field
configuration
router
configuration file
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111327762.9A
Other languages
Chinese (zh)
Other versions
CN114090117A (en
Inventor
段平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co LtdfiledCriticalShenzhen TCL New Technology Co Ltd
Priority to CN202111327762.9ApriorityCriticalpatent/CN114090117B/en
Publication of CN114090117ApublicationCriticalpatent/CN114090117A/en
Priority to PCT/CN2022/125055prioritypatent/WO2023082926A1/en
Application grantedgrantedCritical
Publication of CN114090117BpublicationCriticalpatent/CN114090117B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention provides a configuration method, a configuration device, configuration equipment and a storage medium. The configuration method comprises the steps of obtaining a configuration file of equipment to be configured, wherein the configuration file is written based on a general writing protocol, analyzing the configuration file to obtain one or more control instructions, and modifying parameters of the equipment to be configured according to the one or more control instructions. By the configuration method, the device, the equipment and the storage medium, different routers can be flexibly and conveniently adapted under the condition that software execution script program is not required to be modified, the human resource utilization rate and the working efficiency of an overall test development team are improved, and the development cost is reduced.

Description

Configuration method, device, equipment and storage medium
Technical Field
The invention belongs to the field of wireless communication, and relates to a configuration method, a device, equipment and a storage medium.
Background
Wi-Fi is a wireless local area network technology based on the IEEE 802.11 standard, and various terminals can communicate in a wireless connection mode within the effective range of radio wave coverage of a Wi-Fi router (also called a wireless router). Currently, wi-Fi routers on the market are of a wide variety of brands or types. Wi-Fi routers of various brands or types are widely applied to Wi-Fi performance tests of various intelligent electronic products and the like. In the prior art, there are generally two methods for configuring and completing performance tests for Wi-Fi routers of various brands or types:
1. And (3) purely manually operating, logging in a Wi-Fi router manager interface through a browser, completing configuration of each option, and storing and exiting. And then, performing various Wi-Fi performance tests of the intelligent electronic product through the Wi-Fi router, and repeating the operation by replacing one Wi-Fi router of another brand or type after completing one round of compatibility tests of the Wi-Fi router of one brand or type.
2. And automatically operating, automatically logging in a Wi-Fi router manager interface by executing a script program based on Selenium (a tool for testing Web application program) developed in advance, automatically configuring and modifying related parameters, and storing and exiting after completing the configuration of each parameter option of the Wi-Fi router. Then, the Wi-Fi performance test of the intelligent electronic product is started. And when the compatibility test of the Wi-Fi router of one brand or type is finished, the Wi-Fi router connected with the other brand or type is replaced, however, the new Wi-Fi router software is replaced or called at the same time to execute the script program, the new script program is operated to complete the configuration of the Wi-Fi router of the different brand or type, and the product compatibility test operation is repeated.
The Wi-Fi router has very many brands or types on the market, the scheme of manually configuring the Wi-Fi router is low in efficiency, the scheme of configuring the Wi-Fi router by the automatic control software execution script program is low in efficiency, the Wi-Fi routers with different brands or types are different in design scheme of each manufacturer, the maintenance and development workload of the execution script program for the new Wi-Fi router special software which continuously appears is very large, and each time new test requirements come, special automatic developers are required to update the adaptation script program of the Wi-Fi router, the threshold is high, the maintenance is not facilitated, and the popularization and the efficiency of automatic test work are seriously affected.
Disclosure of Invention
The invention aims to provide a configuration method, a device, equipment and a storage medium, which can separate configuration intents such as selection, parameter modification and the like of various complex function items in the configuration of a router from a software execution script program, so that the stability of the adaptation script program of the router can be ensured, the maintenance of the adaptation script is simple and convenient, and common testers can participate in automatic use case writing and execution work, thereby fully exerting the strength of a team. The method, the device, the equipment and the storage medium for configuring the router can achieve the purpose that a common tester can conveniently complete the configuration of each router without modifying software execution script programs by special developers, thereby improving the efficiency of the whole automatic test work and reducing the development cost.
The aim and the technical problems of the invention are realized by adopting the following technical proposal.
According to one aspect of the invention, the method for configuring the router comprises the steps of obtaining a configuration file of equipment to be configured, wherein the configuration file is written based on a general writing protocol, analyzing the configuration file to obtain one or more control instructions, and modifying parameters of the equipment to be configured based on the one or more control instructions.
According to another aspect of the invention, the device to be configured comprises a router, and the configuration file comprises definitions of a plurality of function items configuring the router, each definition of a function item being written based on a common writing protocol.
According to a further aspect of the invention, the universal authoring protocol comprises 6 standard fields and 1 optional field, wherein the standard fields are respectively a1 st field, a2 nd field, a3 rd field, a 4 th field, a 5 th field and a 7 th field, and the optional field is a 6 th field.
The 1 st field includes a start identifier, the 2 nd field includes an operation command, the 3 rd field includes an operation parameter, the 4 th field includes an execution command, the 5 th field includes a first delay time, the 6 th field includes a second delay time and/or a command parameter, and the 7 th field includes an explanation of a function item.
The start identifier of the 1 st field comprises an operation serial number, the 2 nd field comprises a page element positioning command, a data list constructing command of a data selector and a direct logging-in command to a target page, the 3 rd field comprises parameters related to router configuration, the 4 th field execution command is executed based on the indication of the operation parameters, and the 5 th field first delay time is preset time for the router to respond to the execution command and complete the execution of the execution command, and preferably, the time unit is seconds.
According to another aspect of the invention, the configuration file of the router and the parameters of the router are analyzed circularly, and the circulation refers to analyzing one function item in the configuration file each time to acquire a control instruction of the function item and configuring the router parameters based on the control instruction, wherein the order of the circulation analysis is determined/set based on the starting identification of the function item.
According to the further aspect of the invention, the configuration device further comprises a configuration device, wherein the configuration device comprises an acquisition module used for acquiring a configuration file of equipment to be configured, the configuration file is written based on a general writing protocol, a parsing module used for parsing the configuration file to acquire one or more control instructions, and a configuration module used for modifying parameters of the equipment to be configured according to the one or more control instructions.
According to yet another aspect of the present invention, the present invention also includes a computer-readable storage medium storing executable instructions that, when executed by a processor, cause the execution of the foregoing configuration method. The readable storage medium may be a nonvolatile memory such as a hard disk or a magnetic disk, etc., and may be applied to various terminals, may be a computer, a server, etc.
According to a further aspect of the invention also comprises a configuration device comprising a processor, storage means for storing executable instructions which, when executed by the processor, enable the aforementioned configuration method.
In summary, the invention abandons the development method of adopting one router and one software execution script program in the prior art, strips the configuration intentions such as the selection of various complex function items of the router, parameter change and the like from the software execution script program, separates and decouples the configuration intentions to form common testers instead of the developer of the software execution script program specially completing the configuration of the router, and can maintain the modified txt text document, thereby improving the utilization rate of human resources, saving time and labor and greatly saving development cost. Meanwhile, the invention abandons the traditional thinking method that all scenes use the professional computer language, in the invention, the computer language is only responsible for the development and operation of the central unified operation decoding module and the dispatch of related tasks, and the operation objects, actions and parameters executed by software are all submitted to the external configuration file to finish. The configuration file is compiled according to a general compiling protocol, so that a router configuration method is more flexible and convenient, and the configuration file generated according to the general compiling protocol is easier to maintain.
Drawings
FIG. 1 is a schematic illustration of an application scenario in which the configuration method of the present invention may be applied;
FIG. 2 is a schematic diagram of one embodiment of a configuration method provided by the present invention;
FIG. 3 is a schematic diagram of a generic authoring protocol of the present invention;
FIG. 4 is a schematic view of an embodiment of a configuration device provided by the present invention;
FIG. 5 is a schematic flow chart of the software management and control unit module structure of the present invention and
Fig. 6 is a flow chart of the software process of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purpose, the following description refers to a configuration method, device, apparatus and storage medium according to the present invention, and its specific implementation, method, steps and effects thereof, with reference to the accompanying drawings and preferred embodiments. It will be apparent that the described embodiments are merely some, but not all embodiments of the invention. As one of ordinary skill in the art can know, with the development of technology and the appearance of new scenes, the technical scheme provided by the embodiment of the invention is also applicable to similar technical problems.
While the invention may be susceptible to further details of embodiment and specific details of construction and operation for achieving the desired purpose, there is shown in the drawings a form a further embodiment which may be used herein.
The term "and/or" appearing in the present invention may be an association relationship describing the association object, and indicates that three relationships may exist, for example, a and/or B, and may indicate that a exists alone, while a and B exist together, and B exists alone. In the present invention, the character "/" generally indicates that the front and rear related objects are an or relationship.
The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules that are expressly listed or inherent to such process, method, article, or apparatus. The naming or numbering of the steps in the present invention does not mean that the steps in the method flow must be executed according to the time/logic sequence indicated by the naming or numbering, and the execution sequence of the steps in the flow that are named or numbered may be changed according to the technical purpose to be achieved, so long as the same or similar technical effects can be achieved. The division of the modules in the present invention is a logical division, and may be implemented in another manner in practical applications, for example, a plurality of modules may be combined or integrated in another system, or some features may be omitted or not implemented, and further, coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and indirect coupling or communication connection between the modules may be electrical or other similar manners, which are not limited in the present invention. The modules or sub-modules described as separate components may be physically separated or not, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present invention.
First, an application scenario to which the present invention may be applied will be described.
Referring to fig. 1, an application scenario 100 includes a configuration device and one or more devices to be configured. Alternatively, the application scenario 100 may also include a switching device connected to an external network (such as the internet), which may be the switch 101.
In the embodiment of the invention, the configuration equipment can realize the configuration of one or more equipment to be configured. In the invention, the configuration equipment can be communicated with the equipment to be configured in a wireless way, for example, a Wi-Fi6 communication protocol is adopted, and a traditional wired way can also be adopted. When the wireless communication mode is adopted, the same configuration equipment can be selectively communicated with one or more equipment to be configured. The configuration device may communicate with one or more devices to be configured (e.g., routers 102a, 102b, and 102 c) and access the internet through the connections of the switching devices and the devices to be configured. Taking the router 102a as an example, in the application scenario shown in fig. 1, the configuration of the router 102a may be performed by a configuration device connected thereto.
In some alternative embodiments, the configuration device may comprise one or more terminal devices. The terminal device may include a Mobile Station (MS), a subscriber unit (subscriber unit), a cellular phone (cellular phone), a smart phone (smart phone), a wireless data card, a Personal digital assistant (Personal DIGITAL ASSISTANT; PDA) computer, a tablet computer, a wireless modem (modem), a handheld device (handset), a laptop computer (laspiop computer), a machine type Communication (MACHINE TYPE Communication, MTC) terminal, and the like. In some other alternative embodiments, the configuration device may also be another type of electronic device that is connected as a dedicated device to the device to be configured (e.g., router 102 a) to configure it. The configuration device may include one entity device or may include a plurality of entity devices, which is not limited in the embodiment of the present invention. For example, the configuration device comprises a plurality of terminal devices, by means of which the configuration of one or more devices to be configured is jointly achieved. For example, the configuration device in the embodiment of the present invention may include at least one of the personal computer 103a, the notebook computer 103b, or the smart phone 103c shown in fig. 1. The device to be configured is an electronic device connected to the switching device, and the device to be configured may be a router. In the application scenario shown in fig. 1, one or more devices to be configured included in the system 100 may be the same type of electronic device, or may be different types of electronic devices, which is not limited in this disclosure. For example, as shown in fig. 1, system 100 may contain 3 devices to be configured, the 3 devices to be configured being router 102a, router 102b, and router 102c, respectively. The routers can be routers of the same brand and model, or routers of different brands or different models. The router may be a Wi-Fi router, or may be other types of routers. In other embodiments, the device to be configured may also be a different type of electronic device, including devices other than routers, such as switches, repeaters, and the like.
It should be understood that the type, number, etc. of devices illustrated by the application scenario shown in fig. 1 should not be construed as limiting the invention.
Based on the application scenario in fig. 1, the configuration method provided by the embodiment of the present invention is described next, as shown in fig. 2.
Fig. 2 is a schematic diagram of an embodiment of a configuration method according to an embodiment of the present invention.
An embodiment of the configuration method provided by the embodiment of the invention specifically may include the following steps S1 to S3.
Step S1, configuration equipment acquires a configuration file of equipment to be configured, wherein the configuration file is compiled based on a general compiling protocol.
In the embodiment of the invention, the general writing protocol specifically refers to a guiding framework for writing the configuration file of the equipment to be configured. The generic authoring protocol contains a concrete representation of each of a plurality of configuration items of a device to be configured. This configuration item may also be referred to as a function item of the router. In particular, the generic protocol specifies that the configuration file of the device to be configured comprises a plurality of configuration items, which may comprise one or more standard items. For example, the plurality of standard function items may include an operating method, an operating parameter, an execution command, a delay time, a remark, and the like. The plurality of configuration items may also include one or more selectable items.
By way of example, assume that the device to be configured in the embodiment of the present invention is a router device. The general writing protocol prescribes a guiding framework/standard of a configuration file of the router to be an expression of 7 function items of the router, wherein the first 6 function items are 6 standard items, which are sequentially respectively a start identifier, an operation command, an operation parameter, an execution command, a first delay time and a description of the function items, and the last function item is an optional item and is a second delay time and/or a command parameter. Thus, the configuration file of all routers in the system architecture contains the 7 functional items. The specific parameter values of the 7 function items corresponding to each router are determined by the brand and model of the router itself, etc. when the configuration file is written according to the general writing protocol.
It should be noted that, the 7 functional items are only examples, and in the practical application process, the content and the form of the configuration file specified by the general writing protocol may be set according to the practical requirement, and the example should not be construed as limiting the present invention.
In the embodiment of the invention, the configuration files of any device to be configured are written based on the general writing protocol, and the configuration files of different devices to be configured can be pre-written by a tester through the configuration device based on the general writing protocol and stored in the configuration device. Optionally, the configuration file may be in txt text document format, which is convenient for people to maintain.
In the embodiment of the invention, when the router needs to be configured, the configuration equipment firstly acquires the configuration file corresponding to the router.
And S2, the configuration equipment analyzes the configuration file to acquire one or more control instructions.
In the embodiment of the invention, the configuration file is written based on the general writing protocol, and the configuration file is analyzed after the configuration device obtains the configuration file corresponding to the device to be configured based on the protocol algorithm corresponding to the general writing protocol, so that one or more control instructions corresponding to the configuration file are obtained, and the one or more control instructions are used for indicating the device to be configured to carry out parameter modification.
And S3, the configuration equipment modifies parameters of the equipment to be configured according to the one or more control instructions.
In the embodiment of the invention, after the configuration file is analyzed by the configuration equipment to obtain one or more control instructions corresponding to the configuration file, the parameters of the equipment to be configured are modified according to the one or more control instructions. Specifically, the configuration device may send the one or more control instructions to the device to be configured, so that the device to be configured completes updating or modifying the parameter values of the function items corresponding to the configuration file.
For example, the configuration file contains 7 fields shown in fig. 3, namely, 1 st field, 2 nd field, 3 rd field, 4 th field, 5 th field, 6 th field (optional field), and 7 th field. Wherein the 1 st field comprises a start identification, the 2 nd field comprises an operation command, the 3 rd field comprises an operation parameter, the 4 th field comprises an execution command, the 5 th field comprises a first delay time, the 6 th field comprises a second delay time and/or command parameters, and the 7 th field comprises a description of a functional item. The configuration equipment analyzes the configuration file to obtain one or more control instructions. The control instructions may be operations for respective corresponding fields in the configuration file. After the equipment to be configured receives the control instruction, the parameter items of the equipment to be configured are modified/updated until all the configurations corresponding to the 7 function items are modified/updated.
In the embodiment of the invention, the configuration items such as different function items and parameters of the equipment to be configured are stripped from the software execution script program by adopting the universal programming protocol, so that the standards of the configuration files of the equipment to be configured of different brands or models under the same category are unified, the threshold of performance test is reduced, the maintenance is convenient, and the efficiency of automatic test is improved.
Based on the configuration method in fig. 2, the specific content of the general writing protocol definition configuration file in the embodiment of the present invention is described in an exemplary manner by taking the device to be configured as a router.
As shown in fig. 3, the configuration file of the generic write protocol definition router may include 6 standard fields and 1 optional field. The standard fields are 1 st field, 2 nd field, 3 rd field, 4 th field, 5 th field, 6 th field (optional field) and 7 th field, respectively. Wherein the 1 st field comprises a start identification, the 2 nd field comprises an operation command, the 3 rd field comprises an operation parameter, the 4 th field comprises an execution command, the 5 th field comprises a first delay time, the 6 th field comprises a second delay time and/or command parameters, and the 7 th field comprises a description of a functional item.
The configuration file written based on the generic writing protocol includes definitions of a plurality of rows of function items, each row of function items defining an operation router behavior, i.e., one function item. 6 to 7 fields are arranged in each row, and all row function items are accumulated to complete automatic control on demand of the router. Preferably, the 1 st and 2 nd fields are spaced apart by a chinese colon, and each field is spaced apart by a chinese comma from the 2 nd field.
The 1 st field is a fixed information field for program traversal, and is a program decoding line identification starting key. The 1 st field is the row start of each configuration item of the router steering behavior. This field is written as specified, preferably all letters lowercase, ending in a Chinese format colon.
In an embodiment of the present invention, the fixed information field may be denoted as "- -action x". Wherein, preferably, x is a natural integer.
And 2. The field designates the operation method of the line.
Preferably, the 2 nd field may include at least one of (2.1) - (2.7).
(2.1) Locating the element by id method, which can be expressed by find_by_id, call find_element_by_id () of selenium.
(2.2) Locating the element using the xpath method.
It may be expressed as find_by-xpath, calling find_element_by_xpath () of selenium.
(2.3) Locating the element using the name method.
The find_element_by_name ()'s of selenium can be called as find_by-name;
(2.4) locate the element using the class_name method.
May be represented by find by class name, fine_element calling selenium by class name ().
(2.5) Calling link_text method positioning element of selenium.
May be represented by find_by-link_text.
(2.6) Constructing a data selector data list, which may be represented by set_selector;
(2.7) direct_goto_ submenu direct login to the target page, i.e., the sub page.
3 Rd field, input parameter field.
Preferably, at least one of (3.1) to (3.5) may be included:
(3.1) positioning parameters, which can be obtained by a chrome+F12 tool, such as loginbtn;
(3.2) a selector data list, namely starting with a Chinese parentheses, and directly transcribing the specific operation item option values of the router by various data in the parentheses;
Each item is added with English double quotation marks at English comma intervals, for example, ("802.11 b/g/n", "802.11b/g", "802.11b", "802.11 g")
(3.3) Logging in the target page URL path. For example, http://192.168.5.1/html/index.html #/more/deviceinfo
(3.4) Obtaining a set VALUE from the test CASE, which can be represented by get_ AUTOTEST _case_value;
(3.5) the first half of the positioning string is temporarily generated by the router every time the page is registered.
And 4. Field 4, program execution command is required.
Preferably, at least one of (4.1) to (4.12) may be included:
(4.1) directly inputting a PASSWORD into the positioning PASSWORD box, which can be represented by an input_value_password;
(4.2) clicking the LEFT MOUSE button on the positioning element, which can be represented by a CLICK_MOUSE_LEFT_KEY;
(4.3) clicking the JS code KEY on the positioning element, which can be represented by CLICK_USE_JS_KEY, and attempting to USE the method for clicking the label with the wrong left CLICK of the mouse;
(4.4) performing a MENU-DOWN operation on the pointing element, which may be represented by menu_slide_down, equivalent to a mouse wheel-DOWN scroll effect;
(4.5) performing a MENU UP-SLIDE operation on the positioning element, which can be represented by menu_slide_up, equivalent to a mouse wheel UP-scroll effect;
(4.6) constructing a parameter SELECTOR, wherein the parameter SELECTOR can be expressed by a SELECTOR, the SELECTOR is a data transmission table for a program, the data source is a router operation item parameter table, the parameter selection determines that the data is pushed from a test case, the test case pushing data is uniformly numbered from 0 to 0 in data sequence of 0,1 and 2, the SELECTOR selects to arrange and select extracted data according to the sequence, the data extraction sequence and the pushing sequence of two sides are required to be ensured to be opposite, in other words, the input option data is required to correspond to the SELECTOR data pushing sequence when the test case is configured;
(4.7) executing JavaScript method confirmation selection on the selection ITEM according to the test case selection parameters, wherein the selection can be represented by select_item_JS, and the li list label is applicable;
(4.8) according to the test case selection parameters, performing CLICK () method to confirm the selection of the selection parameters, which can be represented by select_item_clip, and applying li list labels;
(4.9) according to the test case selection parameters, executing CLICK () method to confirm the selection of the selection parameters, which can be represented by select_option_clip, and applying OPTION drop-down list labels;
(4.10) transmitting a keyboard key data value or a character string to the positioning element, wherein the keyboard key data value or the character string can be represented by SEND_KEYS;
(4.11) clearing the VALUE of the location element, which can be represented by CLEAR;
(4.12) no command action is required to be executed for the present line operation, which can be represented by NONE.
And 5. The delay time is required after the execution command of the line is ended. The floating point number used for ensuring the complete appearance of the next line of operation information can be an integer or a decimal number. Preferably, the units are seconds.
Field 6, optional. The present line command decision may be based on the real router state decision as to whether it is needed. Preferably, at least one of (6.1) to (6.5) may be included:
(6.1) delay time 2, namely, certain special cases, such as the case that the pop-up small menu needs to be matched with clicking to wait for disappearance, need to be filled in;
(6.2) the send_keycommand parameter, i.e., when the 4 th field is the send_keycommand, fixed data needs to be transmitted. For example, the key s.ENTER may be sent back to write the string key s.ENTER in this field, where NONE is filled when the string to be sent by the SEND_KEYS command is taken from a test case, and other commands do not need to fill this field if they do not.
(6.3) NEED_CLEAR_FIRST for the case that the 4 th field is SEND_KEYS or INPUT_VALUE_PASSWORD NEEDs to directly INPUT the character string, if the router original save content NEEDs to be cleared to avoid overlapping, adding the parameter, such as a PASSWORD INPUT command, the method can also be implemented by the CLEAR of the fourth field.
(6.4) The ID NUMBER temporarily generated by the acquisition router at each log-in page may be represented by GET_DYNAMIC_NUMBER.
(6.5) The requirement program automatically generates a location ID parameter for the current find element location, which can be represented by NEED_MAKE_DYNAMIC_ID. The generation rule is as follows:
Location ID parameter = 2 nd field + ID number that the router temporarily generates each time the page is logged in.
And 7, filling remark information of the line, and describing the completion function of the line.
Based on the foregoing, a configuration file, a parsing process and a router configuration mode of a Wi-Fi router are described below by taking a certain Wi-Fi router as an example.
The Wi-Fi router correspondence profile may be as follows:
===router 1===
Wi-Fi Router model-certain Wi-Fi Router Mesh (Router Limited maximum 28 bytes)
Test item Classification Realtek
Wifi-Router-IP:192.168.31.1
Wifi-Router_Admin_Password:88888888
Admin login mode, by-passage-Password
-Action 0-: find_by-xpath,///# id= "PASSWORD" ], input_value_password,1, [ positioning PASSWORD entry box enter PASSWORD ]
-Action 1-/////x [ @ id= "btnRtSubmit" ], CLICK_MOUSE_LEFT_KEY,5, [ clicking the ok button to complete the login ]
-Action 2-//// x [ @ id = "nav" ]/ul/li [2]/a, CLICK_MOUSE_LEFT_KEY,1, [ CLICK commonly used settings ]
-Action 3-/////x [ @ id= "wifisetbsdtop" ]/div [1]/span/input, CLEAR,1, [ CLEAR WiFi name ]
-Action 4-/////x @ id = "wifisetbsdtop" ]/div [1]/span/input, send_keys,1, mesh-Brand, [ entering a new name to WiFi name ]
-Action 5-//// x [ @ id = "wifisetbsdtop" ]/div [2]/span/div, CLICK_USE_JS_KEY,5, [ CLICK encryption scheme, pop up a tag list ]
-Action 6-: find_by-link_text, get_ AUTOTEST _case_value, CLICK_USE_JS_KEY,5, [ CLICK option, complete encryption mode selection, data from test CASE ]
--action 7--:find_by-xpath,//*[@id="wifisetbsdtop"]/div[3]/span/input,INPUT_VALUE_PASSWORD,1,NEED_CLEAR_FIRST,【 Positioning 2.4G Wi-Fi password input box to input password
-Action 8- "find_by-class_name, ipt-text, MENU_SLIDE_DOWN,2, [ locator sign SLIDE Menu ]
--action 9--:find_by-xpath,/html/body/div[1]/div[2]/div[1]/div[2]/form/div[2]/div[1]/span/div,CLICK_USE_JS_KEY,2,【 Clicking channel item, popup a tag list
-Action 10- & ltfine_by-link_text, GET_ AUTOTEST _CASE_VALUE, CLICK_USE_JS_KEY,5, [ CLICK channel item, complete channel selection, data from test CASE ]
-Action 11-/////x @ id = "wifiset" ]/div [2]/span/div, click_use_js_key,5, [ CLICK on channel bandwidth item, pop up a tag list ]
-Action 12- "find_by-link_text, get_ AUTOTEST _case_value, clip_use_js_key, 5, [ CLICK option, complete channel bandwidth selection, data from test CASE ]
-Action 13-: find_by-xpath,//// x [ @ id = "wifiset50 0" ]/div 3/button/span, CLICK_MOUSE_LEFT_KEY,5, [ clicking the save button to complete the save ]
-Action 14-/find_by-xpath,/html/body/div 1/div 3/div/a 1/span, CLICK_MOUSE_LEFT_KEY,35, [ CLICK save button complete save ]
===router end 12===
Wherein the first row of functional items
-Action 0-/////x [ @ id = 'PASSWORD' ], input_value_password,1, [ positioning PASSWORD entry box enter PASSWORD ]
The function for setting the 'positioning password input box input password' is analyzed as follows:
"action 0" - "corresponds to field 1 of the generic write protocol, and indicates a start identifier of each function item, where the start identifier generally indicates a configuration operation sequence of the function items in the configuration file.
"Find_by-xpath" corresponds to field 2 of the general authoring protocol, i.e., the operation command, is a command to locate (find) a specific element.
The "///[ @ id = 'password' ]" corresponds to field 3 of the general authoring protocol, i.e., the operation parameter, indicating a positioning password input box.
"Input_value_password" corresponds to the 4 th field of the general authoring protocol, i.e., execute command to enter PASSWORD.
"1" Corresponds to field 5 of the generic write protocol, i.e., the first delay time is set, preferably in "seconds". The delay time is set based on estimating the time of the Wi-Fi router responding to the functional item, so that the Wi-Fi router has enough time to complete the execution of the functional item.
The 6 th field is not set in the function item, and the 6 th field is an optional field. In some brands or types of router configurations, some operator interfaces require a second delay time or command parameter, e.g., defining a function item as popup a window, but the window pops up a widget after being clicked, in which case the second delay time needs to be defined to process the widget.
"Positioning password input box input password" corresponds to field 7 of the general authoring protocol, i.e., remarks. This field describes in detail the function to be completed by the writing of the line of function items.
The function items set the parameter configuration operation behavior of a certain Wi-Fi router Mesh. Preferably, the configuration operation of 15 rows of function items requires traversal. The action 0 function item is analyzed by the script operation center module calling the analysis router configuration protocol algorithm module, a control instruction of the function item is generated, and then the router parameter configuration module executes the operation of the function item. After the operation of the function item of 'action 0' is finished, the function item of 'action 1' is called by a script operation center module to analyze by an analysis router configuration protocol algorithm module, a control instruction of the function item is generated, and then the operation of the function item is executed by a router parameter configuration module. In the loop, when the configuration operations of the 15 functional items are all completed, an end flag "= = = router end 1= = =" is encountered, which indicates that the configuration is all completed.
The embodiment of the invention also provides an embodiment of the configuration device, as shown in fig. 4.
Referring to fig. 4, the configuration device 40 includes an acquisition module 401, an analysis module 402, and a configuration module 403.
The acquiring module 401 is configured to acquire a configuration file of a device to be configured, where the configuration file is written based on a general writing protocol;
a parsing module 402 for parsing the configuration file acquired by the acquisition module 401 to acquire one or more control instructions, and
A configuration module 403, configured to modify parameters of the device to be configured according to the one or more control instructions parsed by the parsing module 402.
According to the configuration device provided by the embodiment of the invention, the configuration items such as different function items and parameters of the equipment to be configured can be stripped from the software execution script program by adopting the general programming protocol, so that the standards of the configuration files of the equipment to be configured of different brands or models under the same category are unified, the threshold of performance test is reduced, the maintenance is convenient, and the efficiency of automatic test is improved.
Optionally, in an alternative embodiment, the configuration apparatus 40 may further include a detection module, where the detection module is configured to detect whether the modification of the parameters of the device to be configured is complete after the configuration module 403 modifies the parameters of the device to be configured based on the one or more control instructions. And if the configuration is completed, ending the configuration.
Optionally, in an alternative embodiment, the configuration apparatus 40 may further include a writing module, configured to write the configuration files of one or more devices to be configured according to a general writing protocol before the obtaining module 401 obtains the configuration files of the devices to be configured. For example, according to a Wi-Fi router unified configuration authoring protocol (see fig. 3), a configuration file in a unified format is authored for the Wi-Fi router in an embodiment. The file format of the configuration file may be txt text format. The configuration file comprises function item formulation and parameters for configuration modification required by the Wi-Fi router and is responsible for coordination connection of actions before and after operation of each parameter;
optionally, in an alternative embodiment, the parsing module 402 is configured to parse the operation instructions and the operation parameters included in the configuration file acquired by the acquiring module 401 according to a preset software algorithm, so as to generate one or more control instructions for executing the functions defined by the function items;
Optionally, in an alternative embodiment, the configuration module 403 may include a script running unit, where the control parsing module 402 parses the configuration file to obtain one or more control instructions, and modifies or sets parameters of the device to be configured according to the one or more control instructions. The control instructions may include an operation execution command to update the Wi-Fi router parameter item.
Specifically, the configuration file may include function item formulation and parameters for configuration modification required by a device to be configured (such as a Wi-Fi router), and is responsible for action coordination connection between before and after operation of each parameter. The definition of each function item is based on a fixed rule. That is, "unified configuration write protocol" for Wi-Fi routers of various brands or types, i.e., generic write protocol. The generic authoring protocol includes 6 standard fields and 1 optional field. The standard fields are 1 st field, 2 nd field, 3 rd field, 4 th field, 5 th field, 6 th field (optional field) and 7 th field, respectively. Wherein the 1 st field comprises a start identification, the 2 nd field comprises an operation command, the 3 rd field comprises an operation parameter, the 4 th field comprises an execution command, the 5 th field comprises a first delay time, the 6 th field comprises a second delay time and/or command parameters, and the 7 th field comprises a description of a functional item. The 6 th field is selected based on specific parameter configuration requirements of various brands or types of routers.
Specifically, when the authoring module author a unified configuration file for one or more devices to be configured based on a common authoring protocol, the configuration file is typically in txt text format. The configuration file written by the writing module may be obtained by the obtaining module 401 after the writing personnel input and confirm that the configuration file is complete, and the analyzing module 402 analyzes the function items written by each row according to the general writing protocol rule in the configuration file according to the preset algorithm to obtain the corresponding control instruction.
After the parsing module 402 completes parsing, the configuration module 403 completes configuration setting or modification of Wi-Fi router parameters.
Optionally, after the obtaining module 401 obtains the configuration file of any Wi-Fi router, it may call the parsing S03 module to convert the function item in the configuration file into a corresponding executable operation control instruction, and push the corresponding router operation item parameter table according to the select of the 4 th field execution command in the function item. The parameter selection decisions are from test case pushing, and the test case pushing data starts from 0 to the data sequence of 0,1 and 2. Select selects to arrange the selected extracted data according to the sequence, and respectively completes each group of parameter configuration so as to complete the automatic test of each Wi-Fi function and performance of the intelligent terminal product.
The modules depicted in fig. 4 may be hardware modules integrated into the configuration device or software modules installed on the configuration device. The configuration device integrated with the modules described in fig. 4 or the configuration device integrated with the modules in fig. 5 may alternatively be implemented by the same entity device, or implemented jointly by a plurality of entity devices, or implemented by one logic function module in an entity device, which is not limited in any way in this embodiment of the present application. For example, the modules included in fig. 4 may be integrated into a configuration device for configuring a router. Such as the computer terminal 103a shown in fig. 1 or a dedicated configuration device. In addition, each module included in fig. 4 may be installed in a different device, and operations corresponding to each module may be executed in a distributed manner. For example, the writing module can be installed on one device to realize the initial writing of the router configuration file, and the analysis module and the configuration module can be installed on another device to realize the analysis and automatic configuration of the configuration file. The unified configuration of Wi-Fi routers of various brands or types is completed by the cooperation and combination of the modules.
Fig. 5 is a flow chart of a preferred configuration method in an embodiment of the present invention. The preferred configuration method comprises steps S100-S106, respectively:
and S100, writing a Wi-Fi router configuration file according to the general writing protocol rule. S100 is a key step for realizing automatic configuration of a Wi-Fi router;
S101, starting to perform automatic Wi-Fi router configuration based on the completed Wi-Fi router configuration file;
s102, reading a Wi-Fi router configuration file compiled according to a general compiling protocol rule;
S103, analyzing a Wi-Fi router configuration file, and generating a corresponding control instruction from one function item in the configuration file;
S104, based on the control instruction generated in the S103, operating the function item on the Wi-Fi router;
s105, judging whether all the function items in the configuration file are completed or not. If the function item in the configuration file is not completed, returning to S103, and continuing to analyze the configuration file to generate a corresponding control instruction.
S106, if all the functional items in the configuration file are completed, finishing Wi-Fi router configuration.
In this preferred embodiment, it is necessary to cycle through all the function items in the configuration file, i.e. parse one function item, perform the operation of the function item, then parse the next function item, perform the operation of the function item again, and cycle back and forth until it is ensured that the operation of each function item is performed in the order defined by the start identifier. The treatment mode of the preferred embodiment is reasonable and the treatment efficiency is high.
In another embodiment, all the functional items in the configuration file are parsed to generate all the control instructions for configuring the Wi-Fi router completely, and all the parameters of the Wi-Fi router are configured. In this embodiment a job step cut such as a cache is required.
For Wi-Fi routers of different brands or types, because the design schemes of various manufacturers, such as login methods, parameter names and various control options, are different, the function definitions of the function items in the configuration files of each router are different, and the number of the function items contained in the configuration files is also different. The configuration file analysis and router automatic configuration method example of the Wi-Fi router are provided. The router automatic configuration method is not limited to routers with specific brands and specific models, and can be applied to routers with other models.
By adopting the router automatic configuration method, the automatic analysis of the configuration files of routers with different types can be realized only by adopting the configuration files of the routers as the configuration files written according to the general writing protocol, so that the control instruction of router parameter configuration is obtained, and each functional item in the configuration files is automatically set according to the control instruction, so that the automatic configuration of the router is realized. The configuration method of executing script programs by adopting one router and one software in the prior art is avoided, the configuration efficiency of the router is greatly improved, and the problem that routers of different types are required to be configured independently by developers is solved.
The invention also provides a configuration device, as shown in fig. 6. The configuration device 60 comprises a network interface 601, a processor 602, a memory 603 and a bus system 604.
The memory 603 is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory 603 may be a random access memory (random access memory, RAM) or may be a non-volatile memory (non-volatile memory), such as at least one disk memory. Only one memory is shown in the figure, but the memory can be provided in plural as needed. Optionally, the memory 603 is a memory in the processor 602.
The memory 603 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof:
The operation instructions comprise various operation instructions for realizing various operations.
Operating system-including various system programs for implementing various basic services or handling hardware-based tasks.
The processor 602 controls the operation of the configuration device 60, optionally the processor 602 is a central processing unit (central processing unit, CPU). In a specific application, the various components of the configuration device 60 are coupled together by a bus system 604, wherein the bus system 604 optionally includes a power bus, a control bus, a status signal bus, and the like in addition to the data bus. But for clarity of illustration, the various buses are labeled as bus system 604 in the drawing. For ease of illustration, fig. 6 is drawn only schematically.
The configuration method provided by the embodiment of the present application described above is applied to the processor 602 or implemented by the processor 602.
The processor 602 may be an integrated circuit chip having data processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 602. The processor 602 described above may be a general purpose processor, a digital signal processor (DIGITAL SIGNAL processor, DSP), an Application SPECIFIC INTEGRATED Circuit (ASIC), a field programmable gate array (field programmable GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 603 and the processor 602 reads information in the memory 603 and performs the method steps performed by the configuration device in connection with its hardware.
In some implementations, the memory 603 is used to store computer-executable instructions for performing aspects of the present application and is controlled for execution by the processor 602. The processor 602 is configured to execute computer-executable instructions stored in the memory 603, thereby implementing the configuration method provided by the embodiment of the present application.
The foregoing describes a configuration method, apparatus, device and storage medium in connection with the preferred embodiments of the present invention. The method has simple implementation process, the necessary steps are completed by the cooperation of the modules of the software system, the method is convenient and quick, and manual intervention is not needed once the program is operated.
It is to be understood that the above description of aspects is intended to be illustrative only and should not be taken in a limiting sense. For purposes of explanation, numerous specific details are set forth in the foregoing description in order to provide an understanding of the present invention. However, it will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Further, the scope of the present invention is not limited to the embodiments or examples with reference to the drawings, but is only limited by the appended claims and their equivalents.
In another aspect of the invention, a computer readable storage medium is provided that stores executable instructions, software programs, and modules that when executed by a processor, cause execution of a method of configuring a router. The readable storage medium may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state memory device, etc., and may be applied to various terminals, such as computers, servers, etc.
The storage medium also includes, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magnetic-optical disks, ROMs (read-only memories), RAMs (random access memories), EPROMs (erasable programmable read-only memories), EEPROMs (electrically erasable programmable read-only memories), flash memories, magnetic cards, or optical cards. That is, a storage medium includes any medium that stores or transmits information in a form readable by a device (e.g., a computer). The storage medium may also be a read-only memory, a magnetic or optical disk, or the like.
Embodiments of the present invention also provide a computer program product which, when run on a computer, causes the computer to perform the above-described related steps to implement the method of configuring a router in the above-described embodiments.
In addition, the embodiment of the invention also provides a device, which can be a chip, a component or a module, and the device can comprise a processor and a memory which are connected, wherein the memory is used for storing computer execution instructions, and when the device runs, the processor can execute the computer execution instructions stored in the memory so that the chip can execute the method for configuring the router in the method embodiments.
The apparatus, computer storage medium, computer program product or chip provided by the present invention are used to execute the corresponding method provided above, and therefore, the advantages achieved by the present invention may refer to the advantages of the corresponding method provided above, and will not be described herein.
The above is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the invention has been described with respect to the preferred embodiments, it will be understood by those skilled in the art that various changes and modifications can be made without departing from the scope of the invention as defined by the appended claims. For example, the above embodiments are mainly described in connection with Wi-Fi routers, but the invention is not limited to the automatic configuration of Wi-Fi routers. The present invention can be realized in hardware or a combination of hardware and computer software in conjunction with the modules and steps of the examples described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. Those of ordinary skill in the art, after appreciating the inventive concepts of the present invention, may adapt the method of the present invention to other types of routers without the inventive effort. However, any simple modification, equivalent variation and modification of the above embodiments according to the technical substance of the present invention still fall within the scope of the technical solution of the present invention.

Claims (10)

CN202111327762.9A2021-11-102021-11-10 A configuration method, device, equipment and storage mediumActiveCN114090117B (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN202111327762.9ACN114090117B (en)2021-11-102021-11-10 A configuration method, device, equipment and storage medium
PCT/CN2022/125055WO2023082926A1 (en)2021-11-102022-10-13Configuration method and apparatus, and device and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111327762.9ACN114090117B (en)2021-11-102021-11-10 A configuration method, device, equipment and storage medium

Publications (2)

Publication NumberPublication Date
CN114090117A CN114090117A (en)2022-02-25
CN114090117Btrue CN114090117B (en)2024-12-03

Family

ID=80299662

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111327762.9AActiveCN114090117B (en)2021-11-102021-11-10 A configuration method, device, equipment and storage medium

Country Status (2)

CountryLink
CN (1)CN114090117B (en)
WO (1)WO2023082926A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114090117B (en)*2021-11-102024-12-03深圳Tcl新技术有限公司 A configuration method, device, equipment and storage medium
CN114826985B (en)*2022-03-182024-07-26湖南三一智能控制设备有限公司Communication protocol testing method, device, upper computer and testing system
CN118432978A (en)*2023-02-012024-08-02上海正泰智能科技有限公司 Intelligent gateway control method, device, electronic device and storage medium
CN117270956B (en)*2023-11-202024-03-15深圳鼎信通达股份有限公司Configuration method of hardware equipment, client, hardware equipment network management system and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112437463A (en)*2020-11-242021-03-02展讯半导体(成都)有限公司Terminal Wi-Fi compatibility automatic test method, device, system, equipment and medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104216707A (en)*2014-08-182014-12-17山东超越数控电子有限公司Unified management method supporting multiple management modes
CN105429809A (en)*2016-01-052016-03-23上海斐讯数据通信技术有限公司Router configuration system and router configuration method
CN108037961B (en)*2017-12-072021-01-19北京锐安科技有限公司 Application configuration method, device, server and storage medium
EP3609143A1 (en)*2018-08-062020-02-12Siemens AktiengesellschaftMethod for the automatic configuration of routers, method for data communication, control method, router, computer program and computer readable medium
CN109710508B (en)*2018-08-202024-03-15天航长鹰(江苏)科技有限公司Test method, test device, test apparatus, and computer-readable storage medium
CN109408136B (en)*2018-09-122021-06-15Oppo广东移动通信有限公司 Information processing method, device, storage medium and electronic device
EP3796167B1 (en)*2019-09-232023-05-03SAS Institute Inc.Router management by an event stream processing cluster manager
CN110928763A (en)*2019-09-292020-03-27京东数字科技控股有限公司Test method, test device, storage medium and computer equipment
CN112491645B (en)*2020-11-112022-08-30深圳数联天下智能科技有限公司Automatic test method and automatic test equipment
CN112486753B (en)*2020-12-182023-06-23展讯半导体(成都)有限公司 WiFi device automatic test method, system and readable storage medium
CN113064780B (en)*2021-03-182022-08-30深圳市吉祥腾达科技有限公司Automatic test system and method based on router product
CN114090117B (en)*2021-11-102024-12-03深圳Tcl新技术有限公司 A configuration method, device, equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112437463A (en)*2020-11-242021-03-02展讯半导体(成都)有限公司Terminal Wi-Fi compatibility automatic test method, device, system, equipment and medium

Also Published As

Publication numberPublication date
CN114090117A (en)2022-02-25
WO2023082926A1 (en)2023-05-19

Similar Documents

PublicationPublication DateTitle
CN114090117B (en) A configuration method, device, equipment and storage medium
US20190197068A1 (en)Page rendering method, device, and data storage medium
CN106569824B (en)Method and apparatus, the method and apparatus of page rendering of page data compiling
US10235280B2 (en)Automated script creation and source code generation for testing mobile devices
CN111176629B (en)Application development method and device
CN110362317B (en)Code conversion method, device and storage medium
CN109669688A (en)Based on visual software development methodology, device, terminal device and storage medium
CN109901834A (en)Document file page generation method, device, computer equipment and storage medium
CN109117372A (en)Test code generating method, device, computer equipment and storage medium
US10628291B2 (en)Programming assistance to identify suboptimal performing code and suggesting alternatives
CN102567198A (en) System and method for testing application programs in physical system environment
CN109492181A (en)Method for page jump, device, computer equipment and storage medium
CN107368420A (en)API method of testings, device and electronic equipment
CN114217789A (en) Functional component expansion method, apparatus, device, storage medium and program product
CN118573738A (en)Industrial control protocol configuration method, device, computer equipment and storage medium
CN104081347A (en)Graphical representation of an order of operations
CN118114609A (en)Chip simulation verification method, device, equipment and storage medium
CN115291935A (en)Component updating method, component updating device, equipment and storage medium
CN112667795B (en)Dialogue tree construction method and device, dialogue tree operation method, device and system
CN109683882A (en)NB-IOT terminal software development approach under visible environment based on mobile terminal
CN115469849B (en)Service processing system, method, electronic equipment and storage medium
CN108462894A (en)Direct broadcasting room broadcast processing method, device and readable storage medium storing program for executing
CN113918254B (en)Language text management method and device, storage medium and electronic equipment
CN102707934B (en)A kind of realize method and system with what form of scripts represented value-added service flow process
CN109543122B (en)Content synchronization method, device, storage medium and electronic device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp