Device parameter inspection method, electronic device, and computer program product

By using expression rules to automate parameter verification in the production of Bluetooth Low Energy devices, the problem of low efficiency in detecting parameters of different device formats has been solved, achieving efficient and flexible parameter matching verification, and reducing labor costs and development cycle.

CN122240466APending Publication Date: 2026-06-19SHENZHEN MINEW TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN MINEW TECH CO LTD
Filing Date
2026-02-06
Publication Date
2026-06-19

Smart Images

  • Figure CN122240466A_ABST
    Figure CN122240466A_ABST
Patent Text Reader

Abstract

This application provides a method for verifying equipment parameters, an electronic device, and a computer program product, relating to the field of equipment production testing technology. Given the problems of low efficiency, error-proneness, and high labor costs in traditional equipment parameter testing, the equipment parameter verification method proposed in this application includes: obtaining a parameter table on which the parameters programmed into the device under test (DUT) depend, the parameter table containing various parameter items of the DUT; obtaining target parameter items of the DUT from each parameter item in the parameter table based on preset expression rules; matching the broadcast parameter items of the DUT with the target parameter items to verify the correctness of the programmed parameters of the DUT; the broadcast parameter items are generated based on the programmed parameters of the DUT. Through the embodiments of this application, the efficiency and accuracy of equipment parameter verification can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of equipment production and testing technology, and in particular to a method for testing equipment parameters, electronic equipment, and computer program products. Background Technology

[0002] In the production process of Bluetooth Low Energy devices, various parameters (such as device address, serial number, etc.) need to be burned from a table into the device; the device can transmit some parameters wirelessly; the broadcast parameters are tested based on the parameters in the table to verify whether the parameters burned into the device are correct.

[0003] Currently, because the parameters in the table and the broadcast parameters are often different, the types, formats, and broadcast methods of parameters for different types of Bluetooth Low Energy devices are also different. In the process of batch generation of devices, the manual comparison of broadcast parameters with parameters in the table leads to extremely low detection efficiency, easy errors, and high labor costs. Summary of the Invention

[0004] According to various embodiments of this application, a method for testing equipment parameters, an electronic device, and a computer program product are provided, which can improve the efficiency and accuracy of equipment parameter testing.

[0005] Firstly, this application provides a method for verifying equipment parameters, the method comprising:

[0006] Obtain the parameter table on which the device under test (DUT) relies for programming parameters. The parameter table contains various parameter items of the DUT. Based on preset expression rules, obtain the target parameter items of the DUT from each parameter item in the parameter table. Match the broadcast parameter items of the DUT with the target parameter items to verify the correctness of the DUT programming parameters. The broadcast parameter items are generated based on the programming parameters of the DUT.

[0007] Using the above method, target parameter items are obtained from the parameter table based on preset expression rules and matched with broadcast parameter items generated by the device based on the programming parameters, thereby achieving automated verification of the correctness of the device programming parameters. By adapting to different parameter item acquisition methods through flexible expression rules, the verification difficulties caused by parameter formats are solved. Finally, through direct matching of broadcast parameter items and target parameter items, accurate and efficient automated verification of programming results is achieved, significantly improving the reliability and efficiency of the production testing process. It has strong ease of use and practicality.

[0008] In one possible implementation of the first aspect, obtaining the target parameter items of the device under test based on preset expression rules includes: Based on the data extraction rules, the target position of the target parameter item in the parameter table is determined, and the target data contained in the target parameter item at the target position is extracted; The expression rules include the data extraction rules.

[0009] In one possible implementation of the first aspect, obtaining the target parameter items of the device under test based on preset expression rules includes: Based on the data extraction rules, the target position of the target parameter item in the parameter table is determined, and the original data corresponding to the target parameter item at the target position is extracted; Based on the format conversion rules, the original data is converted into target data contained in the target parameter item, and the format of the target data is the same as that of the broadcast data; The expression rules include the data extraction rules and the format conversion rules.

[0010] In one possible implementation of the first aspect, obtaining the target parameter items of the device under test based on preset expression rules includes: Based on the data extraction rules, the target position of the target parameter item in the parameter table is determined, and the original data corresponding to the target parameter item at the target position is extracted; Based on data filtering rules, target fields are filtered from the original data to obtain the target data contained in the target parameter item; The expression rules include the data extraction rules and the data filtering rules.

[0011] In one possible implementation of the first aspect, obtaining the target parameter items of the device under test based on preset expression rules includes: Based on the data extraction rules, the target position of the target parameter item in the parameter table is determined, and the original data corresponding to the target parameter item at the target position is extracted; Based on data filtering rules, target fields are filtered from the original data; Based on the format conversion rules, the target field is converted into the target data contained in the target parameter item, and the format of the target data is the same as the format of the broadcast data; The expression rules include the data extraction rules, the data filtering rules, and the format conversion rules.

[0012] In one possible implementation of the first aspect, obtaining the target parameter items of the device under test based on preset expression rules includes: Based on the data assembly rules, the target data is assembled into strings to obtain the target parameter items that meet the expected format; The expression rules include the data assembly rules.

[0013] In one possible implementation of the first aspect, matching the broadcast parameter items of the device under test with the target parameter items to verify the correctness of the parameters programmed into the device under test includes: Based on the target parameter items and the broadcast format template, generate matching rules to be matched; Based on the matching rule, search for the broadcast parameter item that matches the matching rule in the broadcast content of the device under test; If the broadcast content contains a broadcast parameter item that matches the matching rule, the match is successful; if the broadcast content does not contain a broadcast parameter item that matches the matching rule, the match fails. Based on the matching results corresponding to all target parameter items, the correctness of the parameters programmed into the device under test is verified.

[0014] In one possible implementation of the first aspect, verifying the correctness of the parameters programmed into the device under test based on the matching results corresponding to all target parameter items includes: The verification of the correctness of the parameters programmed into the device under test fails when at least one of the target parameter items does not match the broadcast parameter item. When all target parameters match their corresponding broadcast parameters, the correctness of the parameters programmed into the device under test is successfully verified.

[0015] Secondly, this application provides a device for testing equipment parameters, the device comprising: The acquisition unit is used to acquire the parameter table on which the parameters of the device under test depend, the parameter table containing each parameter item of the device under test; The processing unit is used to obtain the target parameter items of the device under test from each parameter item in the parameter table based on preset expression rules; The verification unit is used to match the broadcast parameter items of the device under test with the target parameter items to verify the correctness of the parameters programmed into the device under test; the broadcast parameter items are generated based on the programming parameters of the device under test.

[0016] Thirdly, this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in any one of the first aspects.

[0017] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any one of the first aspects.

[0018] Fifthly, this application provides a computer program product that, when run on a device, causes the device to perform the method described in any one of the first aspects above.

[0019] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the device parameter programming and verification process architecture provided in the embodiments of this application; Figure 2 A schematic diagram illustrating the implementation process of the device parameter verification method provided in this application embodiment; Figure 3 A schematic diagram of the overall equipment parameter inspection process architecture provided in the embodiments of this application; Figure 4 A schematic diagram of the multi-rule verification process provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of the equipment parameter testing device provided in the embodiments of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0022] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0024] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0026] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0027] In the mass production of Bluetooth Low Energy devices (such as Bluetooth beacons, smart bracelets, and location tags), various parameters need to be programmed from parameter tables (such as Excel spreadsheets) into the devices. The devices then transmit some of these parameters wirelessly. Traditionally, the correctness of the programmed parameters is verified by manually comparing the broadcast parameters with those in the spreadsheet, or by using a specific, fixed testing program for each type of device.

[0028] However, the parameter formats in the table often differ from those broadcast by the device. For example, the device address in the table might be a sequence, while the broadcast address might be a different sequence. Similarly, parameters in the table might be represented in decimal, while broadcast parameters might be represented in hexadecimal or other formats. Furthermore, different device models have different parameter types, formats, and broadcast methods. For instance, device model A broadcasts the Media Access Control Address (MAC) and Universally Unique Identifier (UUID), device model B broadcasts the serial number and version number, and device model C broadcasts a unique identifier. This results in extremely low efficiency, high error rates, and high labor costs for manual testing. Based on fixed testing procedures, development cycles are long, with each new device requiring an even longer development cycle. Maintenance costs are high, requiring professional personnel, and the system lacks flexibility and reusability. Even slight changes in parameter format necessitate code modifications, making it incompatible between different product types.

[0029] To address the above technical issues, this application provides a device parameter verification method. Based on preset expression rules, target parameter items are obtained from a parameter table and matched with broadcast parameter items generated by the device based on the programmed parameters, thereby automating the verification of the correctness of the programmed parameters. By using flexible expression rules to adapt to different parameter item acquisition methods, the method solves verification difficulties caused by parameter formats, etc. Finally, through direct matching of broadcast parameter items and target parameter items, accurate and efficient automated verification of the programming results is achieved, significantly improving the reliability and efficiency of the production testing process.

[0030] The following examples illustrate the application scenario architecture of this equipment parameter verification method.

[0031] Please see Figure 1 , Figure 1 This is a schematic diagram of the device parameter programming and verification process architecture provided in an embodiment of this application. Figure 1 As shown, during the manufacturing process of Bluetooth Low Energy devices (hereinafter referred to as devices or devices under test), a parameter table provides the parameters to be programmed. This parameter table can store the complete set of parameters required for each device, such as device address (e.g., MAC address), serial number (SN), universal unique identifier (UUID), major value, minor value, and other parameter items.

[0032] For example, based on the parameter table, each parameter item in the specified device row of the parameter table is written into the storage chip of the corresponding Bluetooth Low Energy device by a programming tool or programmer, ensuring that the device obtains the corresponding identity and configuration parameters and completes the personalized configuration of the device; the programming process needs to ensure the integrity and accuracy of the data written.

[0033] For example, after the device parameters are burned in and the device is powered on, its Bluetooth Low Energy protocol stack will generate corresponding broadcast data based on the burned parameters and send it periodically via wireless means. The broadcast data may contain some key data, such as device address, UUID, major value, minor value, etc.

[0034] Accordingly, the electronic device (or testing system) acquires the broadcast data sent by the Bluetooth Low Energy device and extracts the broadcast parameter items contained in the broadcast data. Simultaneously, the electronic device retrieves the corresponding target parameter item from the original parameter table according to preset expression rules. By matching and comparing the broadcast parameter items with the target parameter items, the system verifies whether the parameters actually broadcast by the device are consistent with the parameters in the original parameter table, thereby determining the correctness of the device parameter programming process and completing product quality testing.

[0035] Based on the process architecture of the above application scenario, the specific implementation process of the device parameter verification method is described below through an example.

[0036] Please see Figure 2 , Figure 2 This is a schematic diagram illustrating the implementation process of the device parameter verification method provided in the embodiments of this application; as follows: Figure 2 As shown, the method may include the following steps: S201, Obtain the parameter table on which the parameters of the device under test depend for programming. The parameter table contains each parameter item of the device under test.

[0037] In some embodiments, during the production process of Bluetooth Low Energy devices, each device needs to be programmed with a set of specific parameters (such as device address, serial number, etc.). These parameters are pre-stored in a parameter table (such as an Excel spreadsheet) as the data source and basis for the device parameter programming operation.

[0038] For example, in the parameter table, each row corresponds to a device under test, and each column header corresponds to a parameter type, such as a MAC address column, serial number column, UUID column, etc.; each cell stores the original data of the device for that parameter item. The column header (ikey) of each column in the parameter table and the original data of the corresponding row constitute the parameter items of the device under test; wherein, based on the column header, the position of each parameter item corresponding to a specified device in the parameter table can be located.

[0039] As shown in Table 1, the names of the parameters corresponding to each column header are: MAC address, serial number (SN), universal unique identifier (UUID), major value, and device information (info); the table rows contain the original data corresponding to the column header of each device.

[0040] MAC SN UUID Major info AC1122334455 10001 e2c56db5dffb48d2b060d0f5a71096e0 11 ID: 12345, Name: John AC1122334456 10002 e2c56db5dffb48d2b060d0f5a71096e1 21 ID: 12346, Name: Yancy Table 1 The parameter table above is merely illustrative and may include other parameter items. The raw data for each parameter item can be represented by simple or composite fields. For example, the raw data for "info" is represented by a composite field of identity and name, while the raw data for other column headers is represented by simple fields. Based on the parameter table above, it is ensured that each device obtains the correct and unique parameter configuration, providing an accurate data foundation for subsequent verification of the correctness of parameter programming.

[0041] S202, based on preset expression rules, obtain the target parameter items of the device under test from each parameter item in the parameter table.

[0042] In some embodiments, the preset expression rules are predefined, configurable data conversion logic that defines how to obtain raw data from a parameter table and convert it into a format broadcast by the device. The electronic device has pre-written expression rules. After triggering the device test start signal, the electronic device reads the identifier of the device under test, triggers the verification process, parses and identifies the expression rules, and obtains the target parameter item corresponding to the device under test from the parameter table.

[0043] For example, the electronic device creates a corresponding verification task based on the identifier of the device under test (such as the MAC address), determines the corresponding row in the parameter table based on the device identifier, and obtains the corresponding verification rules based on the device model. The verification rules include the verification target (i.e. the broadcast field okey to be verified), the data source (the parameter table on which it depends), the conversion logic (the specific expression rules), and the matching requirements (such as format requirements).

[0044] Accordingly, the verification target (i.e., the name of the parameter item to be verified determined based on the broadcast field) is determined based on the verification rules corresponding to the device under test. The target parameter item corresponding to the verification target is obtained from the parameter table by parsing the corresponding expression rules. For example, the expression type is identified by recursively parsing the expression. Based on the expression type, the original data corresponding to the verification target in the parameter table is extracted, and the original data is converted into target parameter items conforming to the broadcast format of the device under test. One type of device model can correspond to a set of verification rules; that is, each product model can correspond to a set of verification rules, and expression rules can be reused for different device models.

[0045] like Figure 3 As shown, by parsing and executing expression rules, the electronic device reads the tabular parameter item MAC: AC1122 from the parameter table; converts it into the broadcast format target parameter item 5544332211AC, and performs subsequent matching verification. Figure 3 This is merely an example illustrating the process of parameter conversion based on expression rules. For different types of parameter items, the corresponding conversion methods and the representation of the conversion results will also be different.

[0046] In some embodiments, the expression rules include data extraction rules; based on the preset expression rules, the target parameter items of the device under test are obtained, including: Based on the data extraction rules, the target position of the target parameter item in the parameter table is determined, and the target data contained in the target parameter item at the target position is extracted.

[0047] For example, a data extraction rule defines a standardized function for locating and retrieving the raw data corresponding to a target parameter item from a parameter table. This data extraction rule can be implemented using the `getCell` function; for instance, a data extraction rule could be `getCell(ikey, device_id)`, where `ikey` (input key) is the name of the parameter item in the parameter table, corresponding to the column header of the parameter table, and `device_id` is the identifier of the device under test, typically a MAC address, used to locate the row identifier of the parameter table. By using the column header and row identifier in the data extraction rule, the corresponding cell is precisely located, and the raw data of that cell is read.

[0048] For different types of parameter items, the corresponding data extraction rules can include reading the main value of the device under test, reading the universal unique identifier, and reading device information, etc.; as shown in Table 2, the expressions of the data extraction rules for different devices under test and different types of parameter items, as well as the corresponding returned values, are as follows: expression MAC address Return value getCell(major) AC1122334455 "11" getCell(uuid) AC1122334455 "e2c56db5dffb48d2b060d0f5a71096e0" getCell(info) AC1122334456 ID: 12346, Name: Yancy Table 2 In one scenario, when the format of the raw data read from the positioned table cell is consistent with the device broadcast format, the read raw data can be directly used as the target data. This could be if the raw data is a pure ASCII string, or the broadcast directly uses string values, or a custom identifier with a fixed format, or parameter items that have been entered according to the broadcast format requirements during production.

[0049] For example, in verifying the URL address of the device under test, the original data corresponding to the URL column is read from the parameter table as http: / / www.minewtech.com / product. The broadcast format of this parameter item (URL address) is url=http: / / www.minewtech.com / product. By executing the data extraction rule getCell("url"), the original data "http: / / www.minewtech.com / product" is obtained, and this original data is used as the target data to be matched.

[0050] For example, in verifying the plain text device name of the device under test, the original data corresponding to the device_name column is read from the parameter table as Temperature_Sensor_V2. The broadcast format of this parameter item (device name) is name=Temperature_Sensor_V2. By executing the data extraction rule getCell("device_name"), the original data "Temperature_Sensor_V2" is obtained, which is the target data to be matched.

[0051] In some embodiments, the expression rules include data extraction rules and format conversion rules; based on the preset expression rules, the target parameter items of the device under test are obtained, including: Based on data extraction rules, the target position of the target parameter item in the parameter table is determined, and the original data corresponding to the target parameter item at the target position is extracted; based on format conversion rules, the original data is converted into the target data contained in the target parameter item, and the format of the target data is the same as the format of the broadcast data.

[0052] For example, in some application scenarios, the device under test (DUT) often stores the raw data of parameter items in little-endian format. After reading the raw data from the parameter table, byte swapping is required. Furthermore, different manufacturers' devices may use different numerical representations, which differ from the broadcast format. The format conversion rule is the logic for converting the numerical representation format of the raw data. Based on the same data extraction rule implementation principle as described above, after reading the raw data of the target parameter item, the raw data is converted into a numerical representation format consistent with the broadcast format, based on the requirements of the broadcast format, to obtain the target data to be matched.

[0053] For example, format conversion rules can be implemented using the valConvert function, and specific conversion forms can include the conversion examples shown in Table 3: model Full name Conversion instructions Input Example Output Example i2h Integer to Hex Decimal to Hexadecimal "12345" "3039" "123456" "01E240" i2hs Integer to Hex Swap Decimal → Hexadecimal → Byte Exchange "12345" "3930" "123456" "40E201" h2i Hex to Integer Hexadecimal → Decimal "3039" "12345" "01E240" "123456" h2is Hex to Integer Swap Hexadecimal → Byte Exchange → Decimal "3930" "12345" "40E201" "123456" s Swap Direct byte swap "AC1122334455" "5544332211AC" Table 3 The i2h conversion process is as follows: 12345 (decimal) → 0x3039 (hexadecimal) → "3039" (string); the i2hs conversion process is as follows: 12345 → 0x3039 → "3039" → "3930" (swapping every two characters); the s conversion process (byte swapping) is as follows: "AC|11|22|33|44|55" → "55|44|33|22|11|AC".

[0054] For example, the expression rule is valConvert(getCell(major), i2h). The rule execution process includes executing the data extraction rule getCell(major) to obtain the original data "11"; and continuing to recursively execute the data transformation rule valConvert("11", i2h) to obtain the target data "0B".

[0055] In some embodiments, the expression rules include data extraction rules and data filtering rules; based on the preset expression rules, the target parameter items of the device under test are obtained, including: Based on data extraction rules, the target position of the target parameter item in the parameter table is determined, and the original data corresponding to the target parameter item at the target position is extracted; based on data filtering rules, the target field is filtered from the original data to obtain the target data contained in the target parameter item.

[0056] For example, the data filtering rule is based on regular expressions to extract target fields from the read raw data. In this case, the read raw data can be a composite field, such as the device information (info) corresponding to the read raw data "ID: 12346, Name: Yancy", which contains two fields. Based on the same implementation principle as the data extraction rule described above, the raw data corresponding to the target parameter item is extracted. When the raw data contains multiple content fields, the target field is further extracted using the data filtering rule to obtain the target data contained in the target parameter item.

[0057] For example, data filtering rules can be implemented using the captureRegex function. The specific extraction process using regular expressions is shown in Table 4 as an example of the filtering process:

[0058] Table 4 The process takes the original data to be processed (i.e., the original text string) and the regular expression as input parameters to the data filtering function; compiles the regular expression string into an executable matching rule; uses the compiled matching rule to search for the content of the compound pattern in the original data; when a match is found, extracts the target field marked with parentheses in the regular expression and returns it.

[0059] For example, the expression rule is captureRegex(getCell(info), "ID:\\s The rule execution process includes executing the data extraction rule getCell(info) to obtain the original data "ID: 12345, Name: John"; and then recursively executing the data filtering rule captureRegex("ID: 12345, Name: John", "ID: \\s (\\d+)"), and the target data "12345" is obtained.

[0060] In some embodiments, the expression rules include data extraction rules, data filtering rules, and format conversion rules; based on the preset expression rules, the target parameter items of the device under test are obtained, including: Based on data extraction rules, the target position of the target parameter item in the parameter table is determined, and the original data corresponding to the target parameter item at the target position is extracted; based on data filtering rules, the target field is filtered from the original data; based on format conversion rules, the target field is converted into the target data contained in the target parameter item, and the format of the target data is the same as the format of the broadcast data.

[0061] For example, if the extracted raw data is a composite field and the numerical representation format is inconsistent with the broadcast format, after executing the data extraction rules, the data filtering rules and format conversion rules must be executed in sequence. The implementation principle of the rule execution is the same as that in the above embodiment.

[0062] For example, the expression rule for the device under test is valConvert(captureRegex(getCell(info),'TempSensor:ID=(\d+)' ), 'i2h'). The rule execution process includes executing the data extraction rule getCell(info) to extract the raw data from the into column of the parameter table; recursively executing the data filtering rule captureRegex(..., 'TempSensor:ID=(\d+)') to extract the temperature sensor's identification ID number from the raw data of info; and recursively executing the format conversion rule valConvert(..., 'i2h') to convert the extracted decimal ID to hexadecimal to obtain the target data.

[0063] In the above embodiments, the target data can be data that is directly matched with the broadcast parameter items, or data that is to be used to generate a matching pattern.

[0064] In some embodiments, the expression rules further include data assembly rules; based on the preset expression rules, the target parameter items of the device under test are obtained, including: based on the data assembly rules, string assembly is performed on the target data to obtain target parameter items that meet the expected format.

[0065] For example, the data assembly rule is the logic of constructing complex matching patterns by adding fixed content before and after the string of target data. That is, the process of adding the context of broadcast format requirements to the target data, and packaging the extracted, filtered and / or filtered plain data values ​​into a complete format that can be accurately matched with the device broadcast parameter items.

[0066] For example, data assembly rules can be implemented using the `strConcat` function, such as `strConcat(value, prefix, suffix)`, where `value` is the original data to be packaged, `prefix` is the prefix part of the broadcast format, and `suffix` is the suffix part of the broadcast format. By adding the fixed format required by the broadcast protocol to the target data using the data assembly function, the uniqueness of the data in the broadcast is ensured. It can also automatically handle special characters in regular expressions, generating regular expression patterns that can be directly used for matching. The specific process of packaging target data based on the data assembly function is illustrated in Table 5.

[0067] Table 5 The data assembly function receives three input parameters: an input string, a prefix string, and a suffix string. The input string is the target data obtained in the above embodiments. The prefix string is a fixed-format prefix determined according to the target broadcast field (okey) and the broadcast protocol, used to identify the start boundary and field identifier of the data in the broadcast. For example, the prefix string is "\\[omajor=", indicating that the part starting with "[omajor=" is matched. The suffix string is a fixed-format suffix determined according to the target broadcast field and the broadcast protocol, used to identify the end boundary of the data in the broadcast. For example, "\\]" indicates that the part ending with "]" is matched.

[0068] For example, for the expression rule strConcat(valConvert(getCell(major), i2h), "^", "$"), the rule execution process includes executing the data extraction rule getCell(major) to obtain the original data "11"; continuing to recursively execute the format conversion rule valConvert("11", i2h) to obtain the format-converted target data "0B"; and continuing to recursively execute the data assembly rule strConcat("0B", "^", "$") to obtain the target parameter item "^0B$" that conforms to the broadcast format. This target parameter item is a regular expression.

[0069] For example, regarding the expression rule strConcat(valConvert(captureRegex(getCell(info),"ID:\s (\d+)"), i2h), "", "$"), The rule execution process includes executing the data extraction rule getCell(info) to obtain the original data "ID: 12345, Name: John"; and then recursively executing the data filtering rule captureRegex(...,"ID:\\s (\\d+)") retrieves the target field "12345" from the intermediate data; the format conversion rule valConvert("12345", i2h) is then executed to retrieve the target data "3039"; the data assembly rule strConcat("3039", "", "$") is then executed to retrieve the target parameter item "3039$" that conforms to the broadcast format.

[0070] The outermost function in the expression rules is identified by the electronic device, the parameter list is extracted, and each function is executed from the inside out through recursive parsing to obtain the final target parameter item to be matched.

[0071] S203, Match the broadcast parameter items of the device under test with the target parameter items to verify the correctness of the parameters programmed into the device under test; the broadcast parameter items are generated based on the programmed parameters of the device under test.

[0072] In some embodiments, the broadcast parameter item is the actual content broadcast by the device under test (DUT). The electronic device obtains the broadcast format template corresponding to the broadcast parameter item, such as "[omajor=" and "]". For different target parameter items of different DUTs, corresponding matching rules are generated, such as "[omajor=0B]", which are used to indicate the search for and precise matching of the broadcast parameter item corresponding to the matching rule in the broadcast content. For example, if the generated matching rule is "[omajor=0B]", and the broadcast parameter item in the broadcast content (ostring) is [major=0B], then there is no match if the field name is missing the letter 'o', indicating that there is an error in the programming of this parameter item; if the broadcast parameter item in the broadcast content is [omajor=0B], then the match is successful, indicating that the parameter item is programmed correctly.

[0073] In some embodiments, matching the broadcast parameter items of the device under test (DUT) with the target parameter items to verify the correctness of the parameters programmed into the DUT includes: Based on the target parameter items and broadcast format template, a matching rule to be matched is generated; based on the matching rule, the broadcast parameter items that are the same as the matching rule are searched in the broadcast content of the device under test; if there is a broadcast parameter item that is the same as the matching rule in the broadcast content, the match is successful; if there is no broadcast parameter item that is the same as the matching rule in the broadcast content, the match fails; based on the matching results corresponding to all target parameter items, the correctness of the parameters burned into the device under test is verified.

[0074] For example, the electronic device executes a preset expression rule and generates a matching rule, such as omajor =valConvert(getCell(major), i2h). By executing this, omajor="0B" is obtained (assuming the value of the major column is 11). The regular expression is generated, and "omajor = 0B" is searched in the broadcast content ostring for corresponding matching verification.

[0075] For example, the representation of broadcast parameter items is shown below, such as the broadcast content (ostring) of the device under test AC1122334455: {ib}[omajor = 10][ominor = 11][uuid = e2c56db5dffb48d2b060d0f5a71096e0]; {url} [url = http: / / www.minewtech.com / ]; {uid} [namespace = 00112233445566778899][instance = abcde00500f2]; {tlm}[battery=3162][temperature=27.00].

[0076] In some embodiments, the correctness of the parameters programmed into the device under test is verified based on the matching results corresponding to all target parameter items, including: The verification of the correctness of the parameters programmed into the device under test fails when at least one target parameter does not match the broadcast parameter; the verification of the correctness of the parameters programmed into the device under test succeeds when all target parameter items match the corresponding broadcast parameter items.

[0077] For example, such as Figure 4 As shown, multiple different parameter items can be matched and verified simultaneously for the same device under test. Different parameter items can correspond to different matching rules, such as rule 1 corresponding to omajor = getCell(major), rule 2 corresponding to uuid = getCell(uuid), and rule 3 corresponding to id = captureRegex(...), etc. If any parameter item of the device under test fails to match, the correctness verification of the programmed parameters fails; if all target parameter items match successfully, the correctness verification of the programmed parameters passes.

[0078] For example, for the MAC address of the device under test: AC1122334455, the rule list includes: 1. omajor = getCell(major), which executes to get omajor = 11; 2. uuid = valConvert(getCell(uuid), s), which executes to get uuid = e0961...; the broadcast content is [omajor = 11][uuid = e0961...]. After comparison, it completely matches the broadcast parameter items in the two rules and the broadcast content, and the correctness of the burned parameters is verified.

[0079] This application embodiment, through a simple combination of expression rules, can adapt to various complex parameter format conversion needs without modifying program code; new products can be supported simply by configuring expressions, demonstrating high flexibility. This application embodiment supports nested function calls, enabling the construction of complex data processing flows to meet various special requirements. This application embodiment can automatically generate regular expressions for precise matching, supporting batch verification and significantly improving production efficiency. This application embodiment also provides a graphical interface, supporting dynamic addition / deletion of rules. This application embodiment can also perform real-time format checks, issuing alerts when errors occur, lowering the barrier to entry; ordinary production personnel can use it after simple training. This application embodiment has strong versatility; one system can support all models of low-power Bluetooth devices and can be extended to other scenarios requiring parameter matching and verification.

[0080] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0081] Corresponding to the device parameter verification method provided in the above embodiments, such as Figure 5 The diagram shown is a structural schematic of the device parameter testing apparatus provided in this application embodiment; for ease of explanation, only the parts related to this application embodiment are shown.

[0082] The equipment parameter testing device includes: The acquisition unit 51 is used to acquire the parameter table on which the parameters of the device under test are based, the parameter table containing each parameter item of the device under test; Processing unit 52 is used to obtain the target parameter items of the device under test from each parameter item in the parameter table based on preset expression rules; Verification unit 53 is used to match the broadcast parameter items of the device under test with the target parameter items to verify the correctness of the parameters programmed into the device under test; the broadcast parameter items are generated based on the programming parameters of the device under test.

[0083] In one possible implementation, the processing unit 52 is further configured to determine the target position of the target parameter item in the parameter table based on data extraction rules, and extract the target data contained in the target parameter item at the target position; The expression rules include the data extraction rules.

[0084] In one possible implementation, the processing unit 52 is further configured to determine the target position of the target parameter item in the parameter table based on data extraction rules, and extract the original data corresponding to the target parameter item at the target position; Based on the format conversion rules, the original data is converted into target data contained in the target parameter item, and the format of the target data is the same as that of the broadcast data; The expression rules include the data extraction rules and the format conversion rules.

[0085] In one possible implementation, the processing unit 52 is further configured to determine the target position of the target parameter item in the parameter table based on data extraction rules, and extract the original data corresponding to the target parameter item at the target position; Based on data filtering rules, target fields are filtered from the original data to obtain the target data contained in the target parameter item; The expression rules include the data extraction rules and the data filtering rules.

[0086] In one possible implementation, the processing unit 52 is further configured to determine the target position of the target parameter item in the parameter table based on data extraction rules, and extract the original data corresponding to the target parameter item at the target position; Based on data filtering rules, target fields are filtered from the original data; Based on the format conversion rules, the target field is converted into the target data contained in the target parameter item, and the format of the target data is the same as the format of the broadcast data; The expression rules include the data extraction rules, the data filtering rules, and the format conversion rules.

[0087] In one possible implementation, the processing unit 52 is further configured to perform string assembly on the target data based on data assembly rules to obtain the target parameter item that meets the expected format; wherein the expression rules include the data assembly rules.

[0088] In one possible implementation, the verification unit 53 is further configured to fail the verification of the correctness of the parameters programmed into the device under test when at least one broadcast parameter item does not match the target parameter item. The correctness of the parameters programmed into the device under test is successfully verified when all broadcast parameters match the corresponding target parameters.

[0089] This application embodiment, through simple expression combinations, can adapt to various complex parameter format conversion needs without modifying program code; new products can be supported simply by configuring expressions, demonstrating high flexibility. This application embodiment supports nested function calls, enabling the construction of complex data processing flows to meet various special requirements. This application embodiment can automatically generate regular expressions for precise matching, supporting batch verification and significantly improving production efficiency. This application embodiment also provides a graphical interface, supporting dynamic addition / deletion of rules. This application embodiment can also perform real-time format checks, issuing alerts when errors occur, lowering the barrier to entry; ordinary production personnel can use it after simple training. This application embodiment has strong versatility; one system can support all models of low-power Bluetooth devices and can be extended to other scenarios requiring parameter matching and verification.

[0090] Figure 6 A schematic diagram of the hardware structure of electronic device 6 is shown.

[0091] like Figure 6 As shown, the electronic device 6 of this embodiment includes: at least one processor 61 ( Figure 6Only one is shown in the diagram), and a memory 62 stores a computer program 63 that can run on the processor 61. When the processor 61 executes the computer program 63, it implements the steps in the above method embodiments, for example... Figure 2 S201 to S203 are shown. Alternatively, when the processor 61 executes the computer program 63, it implements the functions of each module / unit in the above-described device embodiments.

[0092] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 6. In other embodiments of this application, the electronic device 6 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0093] The electronic device 6 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will understand that... Figure 6 This is merely an example of electronic device 6 and does not constitute a limitation on electronic device 6. It may include more or fewer components than shown, or combine certain components, or different components. For example, the server may also include input sending devices, network access devices, buses, etc.

[0094] The processor 61 mentioned above can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0095] The processor 61 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 61 is a cache memory. This memory can store instructions or data that the processor 61 has just used or that are used repeatedly. If the processor 61 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 61, and thus improves the efficiency of the system.

[0096] In some embodiments, the aforementioned memory 62 may be an internal storage unit of the electronic device 6, such as a hard disk or memory. The memory 62 may also be an external storage device of the electronic device 6, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 6. Furthermore, the memory 62 may include both internal and external storage units of the electronic device 6. The memory 62 is used to store operating systems, applications, bootloaders, data, and other programs, such as program code for computer programs. The memory 62 can also be used to temporarily store data that has been sent or is about to be sent.

[0097] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0098] It should be noted that the structure of the above-mentioned electronic device is only illustrative and may include other physical structures depending on the application scenario. The physical structure of the electronic device is not limited here.

[0099] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0100] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0101] This application provides a computer program product that, when run on a server, enables the server to execute the steps described in the above-described method embodiments.

[0102] If the integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0103] The electronic devices, computer storage media, and computer program products provided in the embodiments of this application are all used to execute the methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects corresponding to the methods provided above, and will not be repeated here.

[0104] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0105] It should be understood that the above description is merely to help those skilled in the art better understand the embodiments of this application, and is not intended to limit the scope of the embodiments of this application. Based on the examples given above, those skilled in the art can obviously make various equivalent modifications or changes. For example, some steps in the various embodiments of the above detection method may be unnecessary, or new steps may be added. Alternatively, any combination of two or more of the above embodiments may be used. Such modifications, changes, or combinations also fall within the scope of the embodiments of this application.

[0106] It should also be understood that the methods, situations, categories, and classifications of embodiments in this application are for the convenience of description only and should not constitute a special limitation. Various methods, categories, situations, and features in embodiments can be combined without contradiction.

[0107] It should also be understood that, in the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced by each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.

[0108] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0109] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0110] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0111] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

[0112] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for testing equipment parameters, characterized in that, The method includes: Obtain the parameter table on which the parameters of the device under test are based, the parameter table containing each parameter item of the device under test; Based on preset expression rules, the target parameter items of the device under test are obtained from each parameter item in the parameter table. The broadcast parameter items of the device under test are matched with the target parameter items to verify the correctness of the parameters programmed into the device under test; the broadcast parameter items are generated based on the programmed parameters of the device under test.

2. The method according to claim 1, characterized in that, The process of obtaining the target parameter items of the device under test based on preset expression rules includes: Based on the data extraction rules, the target position of the target parameter item in the parameter table is determined, and the target data contained in the target parameter item at the target position is extracted; The expression rules include the data extraction rules.

3. The method according to claim 1, characterized in that, The process of obtaining the target parameter items of the device under test based on preset expression rules includes: Based on the data extraction rules, the target position of the target parameter item in the parameter table is determined, and the original data corresponding to the target parameter item at the target position is extracted; Based on the format conversion rules, the original data is converted into target data contained in the target parameter item, and the format of the target data is the same as that of the broadcast data; The expression rules include the data extraction rules and the format conversion rules.

4. The method according to claim 1, characterized in that, The process of obtaining the target parameter items of the device under test based on preset expression rules includes: Based on the data extraction rules, the target position of the target parameter item in the parameter table is determined, and the original data corresponding to the target parameter item at the target position is extracted; Based on data filtering rules, target fields are filtered from the original data to obtain the target data contained in the target parameter item; The expression rules include the data extraction rules and the data filtering rules.

5. The method according to claim 1, characterized in that, The process of obtaining the target parameter items of the device under test based on preset expression rules includes: Based on the data extraction rules, the target position of the target parameter item in the parameter table is determined, and the original data corresponding to the target parameter item at the target position is extracted; Based on data filtering rules, target fields are filtered from the original data; Based on the format conversion rules, the target field is converted into the target data contained in the target parameter item, and the format of the target data is the same as that of the broadcast data; The expression rules include the data extraction rules, the data filtering rules, and the format conversion rules.

6. The method according to any one of claims 2 to 5, characterized in that, The process of obtaining the target parameter items of the device under test based on preset expression rules includes: Based on the data assembly rules, the target data is assembled into strings to obtain the target parameter items that meet the expected format; The expression rules include the data assembly rules.

7. The method according to any one of claims 1 to 5, characterized in that, Matching the broadcast parameters of the device under test (DUT) with the target parameters to verify the correctness of the parameters programmed into the DUT includes: Based on the target parameter items and the broadcast format template, generate matching rules to be matched; Based on the matching rule, search for the broadcast parameter item that matches the matching rule in the broadcast content of the device under test; If the broadcast content contains a broadcast parameter item that matches the matching rule, the match is successful; if the broadcast content does not contain a broadcast parameter item that matches the matching rule, the match fails. Based on the matching results corresponding to all target parameter items, the correctness of the parameters programmed into the device under test is verified.

8. The method according to claim 7, characterized in that, Based on the matching results corresponding to all target parameter items, the correctness of the parameters programmed into the device under test is verified, including: The verification of the correctness of the parameters programmed into the device under test fails when at least one of the target parameter items does not match the broadcast parameter item. When all target parameters match their corresponding broadcast parameters, the correctness of the parameters programmed into the device under test is successfully verified.

9. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method of any one of claims 1 to 8.

10. A computer program product, characterized in that, When the computer program product is run on the device, it causes the device to perform the method according to any one of claims 1 to 8.