An object model verification method, an electronic device, and a computer-readable storage medium

By performing multi-dimensional verification of the passive and active response data of the equipment in the object model verification method, the problem of inaccurate object model verification in the existing technology is solved, and higher verification accuracy and equipment adaptability are achieved.

CN122093261APending Publication Date: 2026-05-26HANGZHOU HUACHENG SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU HUACHENG SOFTWARE TECH CO LTD
Filing Date
2026-01-27
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing object model verification methods only consider the device's feedback to verification commands, which is not accurate enough, resulting in inaccurate object model verification.

Method used

In response to a verification request, the device identifier associated with the object model data is determined, a verification instruction is generated, and the device's passive and active response data is obtained. These data are processed using various verification rules, including data format, outliers, associated attributes, integrity, frequency, and compliance verification, to generate the target verification result.

Benefits of technology

It improves the accuracy and completeness of physical model verification, ensures collaborative operation and cooperation between devices, and reduces invalid verification or misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122093261A_ABST
    Figure CN122093261A_ABST
Patent Text Reader

Abstract

This application discloses a method for verifying object models, an electronic device, and a computer-readable storage medium. In response to a received verification request, this application determines the object model data associated with the device identifier based on the device identifier in the verification request; generates a verification instruction based on preset verification configuration parameters in the object model data; sends the verification instruction to the device to be verified corresponding to the device identifier; and obtains the first verification data sent by the device to be verified in response to the verification instruction; performs verification processing on the first verification data and the second verification data actively sent by the device to be verified within a preset time period to obtain the target verification result. This improves the accuracy of the verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a method for verifying object models, an electronic device, and a computer-readable storage medium. Background Technology

[0002] In the field of the Internet of Things (IoT), the object model serves as the core carrier describing the functions, attributes, and behaviors of devices. Its correctness directly determines whether devices can operate normally and whether they can cooperate with each other. The object model is a crucial foundation for the development and access of IoT devices. Therefore, accurate verification of the object model is necessary to ensure its correctness.

[0003] Current object model verification methods involve issuing a verification command, receiving the device's response data, verifying the response data, and obtaining the verification result. This approach only considers the device's feedback to the command, resulting in insufficient accuracy. Summary of the Invention

[0004] The main technical problem addressed by this application is to provide a method for verifying physical models, an electronic device, and a computer-readable storage medium that can improve the accuracy of verification.

[0005] To address the aforementioned technical problems, this application provides a method for verifying an object model. This method is applied to an IoT platform and includes: responding to a received verification request; determining object model data associated with the device identifier based on the device identifier in the verification request; generating a verification instruction based on preset verification configuration parameters corresponding to the object model data; sending the verification instruction to the device to be verified corresponding to the device identifier; and acquiring first verification data sent by the device to be verified in response to the verification instruction; performing verification processing on the first verification data and second verification data actively sent by the device to be verified within a preset time period to obtain a target verification result.

[0006] In one embodiment, the step of verifying the first data to be verified and the second data to be verified actively sent by the device to be verified within a preset time period to obtain a target verification result includes: verifying the first data to be verified using a first verification rule to obtain a first verification result; verifying the second data to be verified using a second verification rule to obtain a second verification result; and obtaining the target verification result based on the first verification result and the second verification result.

[0007] In one embodiment, the step of performing verification processing on the first data to be verified using a first verification rule to obtain a first verification result includes: performing verification processing on the data format of the first data to be verified to obtain a data format verification result; and / or verifying the abnormal response code in the first data to be verified to obtain an anomaly value verification result; and / or performing matching verification on multiple related attributes in the first data to be verified to obtain related attribute verification results; and determining the first verification result based on the data format verification result, the anomaly value verification result, and / or the related attribute verification result.

[0008] In one embodiment, the verification instruction includes a service instruction, and the step of matching and verifying multiple associated attributes in the first data to be verified to obtain the associated attribute verification result includes: performing format verification and value range verification on each associated attribute based on the requirements for each associated attribute in the object model data to obtain candidate verification results; in response to the candidate verification results indicating that the verification is passed, determining the associated attribute verification result based on the matching result between each associated attribute and the service instruction.

[0009] In one embodiment, the step of performing verification processing on the second data to be verified using a second verification rule to obtain a second verification result includes: performing integrity verification processing on the second data to be verified to obtain an integrity verification result; and / or performing verification processing on the reporting frequency of the acquired second data to be verified to obtain a frequency verification result; and / or performing compliance verification processing on the second data to be verified to obtain a compliance verification result; and obtaining the second verification result based on the integrity verification result, the frequency verification result, and / or the compliance verification result.

[0010] In one embodiment, the step of performing integrity verification processing on the second data to be verified to obtain an integrity verification result includes: querying a target object model corresponding to the second data to be verified from a preset object model database based on the second data to be verified, and obtaining a query result; in response to the query result indicating the existence of the target object model, determining the integrity verification result based on a comparison result between the second data to be verified and the verification data template corresponding to the target object model.

[0011] In one embodiment, before the step of generating a verification instruction based on the preset verification configuration parameters corresponding to the object model data, the method further includes: grouping the object model data associated with the device identifier according to the data flow direction to obtain a first verification group and a second verification group; setting a first verification rule for the sub-data of the first verification group, and setting a second verification rule for the sub-data of the second verification group.

[0012] In one embodiment, the object model data includes multiple sub-data. The step of grouping the object model data associated with the device identifier according to the data flow direction to obtain a first verification group and a second verification group includes: adding the sub-data whose data flow direction is from the IoT platform to the device to be verified to the first verification group to obtain the first verification group; and adding the sub-data whose data flow direction is from the device to be verified to the IoT platform to the second verification group to obtain the second verification group.

[0013] To address the aforementioned technical problems, this application provides an electronic device, including a memory and a processor. The memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the aforementioned object model verification method.

[0014] To address the aforementioned technical problems, this application provides a computer-readable storage medium, comprising: storing program data, wherein the program data, when executed by a processor, is used to implement the aforementioned object model verification method.

[0015] The above scheme, in response to a received verification request, determines the object model data associated with the device identifier based on the device identifier in the verification request; generates a verification command based on the preset verification configuration parameters corresponding to the object model data, sends the verification command to the device to be verified corresponding to the device identifier, and obtains the first verification data sent by the device to be verified in response to the verification command; performs verification processing on the first verification data and the second verification data actively sent by the device to be verified within a preset time period to obtain the target verification result. Therefore, by performing verification processing on the first verification data sent by the device to be verified in response to the verification command and the second verification data actively sent by the device to be verified within a preset time period, both passively responded data and actively sent data can be verified simultaneously, further ensuring the integrity of the verification and thus improving the accuracy of the verification. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly described 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, wherein:

[0017] Figure 1 This is a flowchart illustrating an exemplary embodiment of the object model verification method shown in this application; Figure 2 yes Figure 1 A flowchart illustrating an exemplary embodiment of step S130 in the object model verification method is shown. Figure 3 This is a schematic diagram of an exemplary embodiment of the IoT platform shown in this application; Figure 4 This is a timing diagram of an exemplary embodiment of the object model verification method shown in this application; Figure 5 This is a block diagram illustrating an object model verification apparatus according to an exemplary embodiment of this application; Figure 6 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application; Figure 7 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are only for explaining this application and not for limiting it. Furthermore, it should be noted that, for ease of description, only the parts related to this application are shown in the accompanying drawings, not all structures. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] First, it's important to clarify that in the Internet of Things (IoT) field, the object model, as the core carrier describing the functions, attributes, and behaviors of devices, directly determines whether devices can operate normally and whether they can cooperate with each other. The object model is a crucial foundation for IoT device development and access. Therefore, accurate verification of the object model is necessary to ensure its correctness. Current object model verification methods involve issuing a verification command, receiving the device's response data, verifying the response data, and obtaining the verification result. This method only considers the device's feedback to the command, and the verification is not accurate enough.

[0020] Based on this, this application provides a method for verifying object models, an electronic device, and a computer-readable storage medium. For details, please refer to [link / reference needed]. Figure 1 , Figure 1 This is a flowchart illustrating an exemplary embodiment of a physical model verification method shown in this application.

[0021] The execution entity of an object model verification method can be a terminal device, a server, or other processing device. The terminal device can be a computer, mobile device, terminal, computing device, vehicle-mounted device, etc. The execution entity of the object model verification method can also be an object model verification device. In some possible implementations, the object model verification method can be implemented by a processor calling computer-readable instructions stored in memory. The execution entity of the object model verification method can also be a big data cluster. A big data cluster is a computer system architecture formed by multiple computers connected through a network. The big data cluster can be deployed on a private cloud built with K8S (Kubernetes, a container orchestration engine).

[0022] Specifically, the object model verification method is applied to the Internet of Things platform. One object model verification method in this embodiment includes the following steps: Step S110: In response to receiving the verification request, determine the object model data associated with the device identifier based on the device identifier in the verification request.

[0023] A verification request refers to a request received by the IoT platform to verify the device's object model. The verification request includes the device identifier. Specifically, the IoT platform includes a simulated client, through which the input verification request is received via the simulated client's interface.

[0024] Object model data refers to abstract model data that describes the functions, attributes, and behaviors of a device. Object model data includes properties, services, and events. Properties refer to the device's status or configuration parameters, such as temperature and power consumption. Services refer to the callable functions provided by the device, such as device restart and mode switching functions. Events refer to abnormalities or critical status changes actively reported by the device, such as status anomaly notifications and data over-limit alarms.

[0025] Upon receiving a verification request, the IoT platform determines the object model data associated with the device identifier based on the device identifier in the verification request. As one example, the IoT platform includes a preset object model database. The platform determines the object model data associated with the device identifier from the preset object model database, which includes the association between preset device identifiers and preset object model data. As another example, the IoT platform determines the device to be verified corresponding to the device identifier from a preset device mapping table, which includes the correspondence between preset device identifiers and preset devices; it then obtains the attributes, services, and events of the device to be verified and identifies these attributes, services, and events as the object model data associated with the device identifier.

[0026] Step S120: Generate a verification instruction based on the preset verification configuration parameters corresponding to the object model data, send the verification instruction to the device to be verified corresponding to the device identifier, and obtain the first data to be verified sent by the device to be verified in response to the verification instruction.

[0027] Preset verification configuration parameters refer to the parameters used to verify the object model data of the device to be verified. These parameters can include the ref (Reference) encoding, data type, permissions, and value range of the object model data. Specifically, the configuration database in the IoT platform stores the correspondence between object model data and preset verification configuration parameters. The IoT platform determines the corresponding preset verification configuration parameters for the object model data from the configuration database.

[0028] Verification commands are verification commands sent by the IoT platform to the device. Verification commands can include operation commands containing abnormal values, such as the temperature rising to 100°C, operation commands containing normal values, such as the temperature adjusting to 20°C, and verification commands can also include switching operating modes, etc.

[0029] The IoT platform generates verification instructions based on preset verification configuration parameters corresponding to the object model data. As an example, in response to the sub-data being an attribute, the IoT platform selects a target value from the value range corresponding to the sub-data in the object model data, adds the target value to the preset operation instruction template corresponding to the sub-data, and obtains the verification instruction. For example, if the sub-data is temperature, a target value is selected from the value range corresponding to temperature, added to the corresponding preset temperature operation adjustment template, and the resulting verification instruction is to adjust the temperature to the target value.

[0030] As another example, in response to sub-data as a service, the IoT platform converts the verification parameters corresponding to the sub-data according to the preset conversion rules corresponding to the sub-data to obtain verification instructions.

[0031] A device to be verified is a device that awaits verification. For example, a device to be verified could be an air conditioner, a camera, etc.

[0032] The first data to be verified refers to the data sent by the device to be verified to the IoT platform in response to the verification command. The first data to be verified includes the attributes to be verified and the services to be verified. For example, in response to a temperature increase command, the device to be verified sends the current temperature obtained after the temperature increase as the first data to be verified to the IoT platform. As another example, in response to a change of operating mode command, the device to be verified sends the current temperature, current humidity, and current operating status changed after the change of operating mode as the first data to be verified to the IoT platform.

[0033] The IoT platform sends a verification command to the device to be verified corresponding to the device identifier, and obtains the first verification data sent by the device to be verified in response to the verification command. Specifically, the IoT platform establishes a communication connection with the device to be verified, sends the verification command to the device to be verified, and receives the first verification data sent by the device to be verified.

[0034] Step S130: Perform verification processing on the first data to be verified and the second data to be verified actively sent by the device to be verified within a preset time period to obtain the target verification result.

[0035] The second data to be verified refers to the data actively sent by the device to be verified to the IoT platform. The second data to be verified may include attributes to be verified and events to be verified. Specifically, the IoT platform establishes a communication connection with the device to be verified and determines the data actively sent by the device to be verified within a preset time period as the second data to be verified.

[0036] The IoT platform verifies the first data to be verified and the second data to be verified actively sent by the device to be verified within a preset time period to obtain the target verification result. Specifically, the IoT platform deletes filtered data from the first and second data to be verified according to preset filtering rules to obtain filtered first and second data to be verified; it performs verification processing based on the data type of the filtered first data to obtain the verification result corresponding to the first data to be verified; it performs verification processing based on the data type of the filtered second data to obtain the verification result corresponding to the second data to be verified; and the verification result corresponding to the first and second data to be verified is used as the target verification result.

[0037] Preset filtering rules include pre-defined filtered data that does not require verification. For example, a preset filtering rule could be used to filter data that the device should send to the IoT platform when resetting the service. Therefore, by deleting filtered data, interference with core functions can be avoided, and verification efficiency can be improved.

[0038] Data types can include bool (boolean type), int (integer type), enum (enumeration type), and array (array type), etc.

[0039] The IoT platform, responding to integer data types, sequentially selects boundary and intermediate values ​​from the value range of sub-data to generate verification instructions. These instructions are then sent to the device under test. The platform determines whether the first data to be verified sent by the device falls within the value range; if so, the verification result is considered passed; otherwise, it fails. Similarly, a target value is selected from outside the value range of the sub-data to generate a verification instruction, which is also sent to the device under test. The platform then determines whether the first data to be verified sent by the device includes a preset error code; if so, the verification result is considered passed; otherwise, it fails. Thus, by issuing verification instructions for outliers exceeding the value range and verifying whether the device under test returns a preset error code, the platform further verifies the compliance of the device's handling of abnormal scenarios.

[0040] When the IoT platform responds to data types that are enumerated, it performs a full enumeration of the values ​​in the value range corresponding to the sub-data, generates verification instructions for each value, and sends each verification instruction to the device to be verified. It then sequentially determines whether each data in the first data to be verified sent by the device to be verified is a preset traversal value. If it is, the verification result corresponding to the first data to be verified is determined to be verified as passed; otherwise, the verification fails.

[0041] The IoT platform responds to data of Boolean type by generating on and off verification instructions through switch value traversal. Each verification instruction is sent to the device to be verified. The platform determines whether the first data to be verified sent by the device to be verified represents the preset switch state. If so, the verification result corresponding to the first data to be verified is determined to be verified as verified; otherwise, the verification fails.

[0042] The IoT platform determines whether the data type of the second data to be verified is the data type required by the sub-data corresponding to the verification instruction. If so, the verification result corresponding to the second data to be verified is determined to be verified successfully; otherwise, the verification fails.

[0043] The IoT platform verifies the first data to be verified and the second data to be verified actively sent by the device to be verified within a preset time period to obtain the target verification result. Specifically, the IoT platform determines whether the first and second data to be verified are within the corresponding value range and whether the data types meet the requirements. If so, the target verification result is determined to be verified as passed; otherwise, the verification fails.

[0044] As can be seen, in response to a received verification request, the device model data associated with the device identifier is determined based on the device identifier in the verification request; a verification command is generated based on the preset verification configuration parameters corresponding to the device model data, and the verification command is sent to the device to be verified corresponding to the device identifier; the first data to be verified sent by the device to be verified in response to the verification command is obtained; the first data to be verified and the second data to be verified actively sent by the device to be verified within a preset time period are verified to obtain the target verification result. Therefore, by verifying the first data to be verified sent by the device to be verified in response to the verification command and the second data to be verified actively sent by the device to be verified within a preset time period, both passively responded data and actively sent data can be verified simultaneously, further improving the completeness of the verification and thus improving the accuracy of the verification.

[0045] Based on the above embodiments, please refer to Figure 2 , Figure 2 yes Figure 1 The illustrated flowchart shows an exemplary embodiment of step S130 in the object model verification method. Specifically, step S130, which verifies the first data to be verified and the second data to be verified actively sent by the received device to be verified within a preset time period to obtain the target verification result, includes the following steps: Step S210: Perform verification processing on the first data to be verified using the first verification rule to obtain the first verification result.

[0046] The first verification rule refers to the rule for verifying the data sent by the device in response to the verification command. The first verification rule may include at least one of data format verification, outlier verification, and associated attribute matching verification.

[0047] The IoT platform uses a first verification rule to verify the first data to be verified and obtains a first verification result. The steps include: verifying the data format of the first data to be verified to obtain a data format verification result; and / or verifying the abnormal response code in the first data to be verified to obtain an abnormal value verification result; and / or matching and verifying multiple related attributes in the first data to be verified to obtain related attribute verification results; and determining the first verification result based on the data format verification result, the abnormal value verification result, and / or the related attribute verification result.

[0048] The IoT platform verifies the data format of the first data to be verified, obtaining a data format verification result. The object model data includes multiple sub-data, each corresponding to at least one verification instruction. The first data to be verified includes multiple first sub-data to be verified, with corresponding relationships between them. The IoT platform determines whether the data format of each first sub-data to be verified meets the data format of its corresponding sub-data. If so, the data format verification result for the first sub-data to be verified is considered passed; otherwise, the verification fails, and the data format verification result for each first sub-data to be verified is taken as the data format verification result. The first sub-data to be verified can be an exception response code, an attribute to be verified, etc. The attribute to be verified can be an associated attribute.

[0049] The IoT platform verifies the abnormal response codes in the first set of data to be verified, and obtains the abnormal value verification result. The abnormal response code sent by the device to be verified in response to the verification command is an attribute in the sub-data of the object model data corresponding to the verification command. The IoT platform determines whether the abnormal response code is consistent with the preset error code of the corresponding attribute. If they are consistent, the abnormal value verification result is determined to be a successful verification; otherwise, the verification fails.

[0050] The IoT platform performs matching and verification on multiple associated attributes in the first set of data to be verified, and obtains the associated attribute verification results. As an example, the device to be verified sends multiple associated attributes in response to the verification command. The sub-data corresponding to the verification command is a service. The IoT platform determines whether there is a matching relationship between multiple associated attributes and the corresponding service based on a preset service attribute matching relationship table. If so, the associated attribute verification result is determined to be verified as passed; otherwise, the verification fails. The preset service attribute matching relationship table stores the matching relationships between preset services and multiple preset associated attributes.

[0051] As another example, the verification instruction includes a service instruction. The IoT platform performs matching verification on multiple related attributes in the first data to be verified to obtain the related attribute verification result. The steps include: performing format verification and value range verification on each related attribute based on the requirements for each related attribute in the object model data to obtain candidate verification results; responding to the candidate verification results indicating that the verification is passed, and determining the related attribute verification result based on the matching result between each related attribute and the service instruction.

[0052] Specifically, the IoT platform determines whether the data format of each associated attribute is the target format required by each associated attribute and whether each associated attribute is within the value range required by each associated attribute. If so, the candidate verification result is determined to be a successful verification; otherwise, the verification fails.

[0053] The IoT platform determines whether there is a matching relationship between multiple associated attributes and the services corresponding to the service instructions based on a preset service attribute matching relationship table. If so, the matching result indicates a successful match; otherwise, the match fails. If the candidate verification result indicates that the verification passed and the matching result indicates that the match was successful, the associated attribute verification result is determined to be a successful verification; otherwise, the verification fails.

[0054] In one embodiment, when the sub-data is an attribute, the IoT platform needs to verify the schema and abnormal boundary values ​​of the sub-data and generate verification instructions corresponding to the attribute. The schema of the sub-data includes value range, data type, etc. When the sub-data is a service, the IoT platform generates verification instructions corresponding to the service, obtains multiple associated attributes sent by the device to be verified in response to the verification instructions, and verifies whether the service matches the multiple associated attributes.

[0055] In one embodiment, the IoT platform precisely sends verification instructions to the device to be verified based on preset verification configuration parameters, targeting each sub-data. For example, it sends instructions for normal or abnormal values ​​of attributes or for calling services. After receiving the verification instructions, the device to be verified returns first data to be verified. This first data may include a status code, such as "Success 200" or "Parameter Error 400," and may also include business data, such as the current attribute value and response format. The IoT platform performs multi-dimensional verification on the first data to be verified according to the first verification rules. Specifically, the IoT platform checks whether the format of the parameters sent in the verification instructions is compliant, such as whether an int type is an integer or an enum type is within the selectable values. It also verifies whether the abnormal response code is a preset error code, such as whether the device returns a preset error code when sending parameters exceeding the value range. Simultaneously, for service-type verification, it supplements the verification with a matching check of associated attributes. For example, when calling the "Region Detection" service, it checks whether the associated attributes sent by the device to be verified are consistent with the associated attributes that match the current detection range of the device to be verified.

[0056] The IoT platform determines the first verification result based on the data format verification result, the outlier verification result, and / or the associated attribute verification result.

[0057] In the first embodiment, the data format of the first data to be verified is verified to obtain a data format verification result; or the abnormal response code in the first data to be verified is verified to obtain an abnormal value verification result; or multiple related attributes in the first data to be verified are matched and verified to obtain a related attribute verification result; and the data format verification result, the abnormal value verification result, or the related attribute verification result is used as the first verification result.

[0058] In the second embodiment, the data format of the first data to be verified is verified to obtain a data format verification result; and the abnormal response code in the first data to be verified is verified to obtain an abnormal value verification result; the data format verification result and the abnormal value verification result are used as the first verification result.

[0059] In the third embodiment, the data format of the first data to be verified is verified to obtain a data format verification result; and multiple related attributes in the first data to be verified are matched and verified to obtain a related attribute verification result; the data format verification result and the related attribute verification result are used as the first verification result.

[0060] In the fourth embodiment, the abnormal response code in the first data to be verified is verified to obtain the abnormal value verification result; and multiple related attributes in the first data to be verified are matched and verified to obtain the related attribute verification result; the abnormal value verification result and the related attribute verification result are used as the first verification result.

[0061] In the fifth embodiment, the data format of the first data to be verified is verified to obtain a data format verification result; the abnormal response code in the first data to be verified is verified to obtain an abnormal value verification result; and multiple related attributes in the first data to be verified are matched and verified to obtain related attribute verification results; the data format verification result, the abnormal value verification result, and the related attribute verification result are used as the first verification result.

[0062] Step S220: Perform verification processing on the second data to be verified using the second verification rule to obtain the second verification result.

[0063] The second verification rule refers to the rule for verifying the data actively sent by the device to be verified. The second verification rule may include at least one of integrity verification, frequency verification, and compliance verification.

[0064] The second data to be verified can include attribute data, such as real-time temperature and operating mode, as well as event information, such as device offline alarms and firmware update completion. Specifically, the IoT platform monitors the device to be verified in real time and obtains the second data to be verified by overriding the device's proactive reporting, such as triggered by a status change; or the IoT platform actively retrieves the second data to be verified, such as through a timed request.

[0065] The IoT platform uses a second verification rule to verify the second data to be verified and obtain a second verification result. The steps include: performing integrity verification on the second data to be verified to obtain an integrity verification result; and / or performing verification on the reporting frequency of the acquired second data to be verified to obtain a frequency verification result; and / or performing compliance verification on the second data to be verified to obtain a compliance verification result; and obtaining a second verification result based on the integrity verification result, the frequency verification result, and / or the compliance verification result.

[0066] The IoT platform performs integrity verification on the second data to be verified, and obtains the integrity verification result. Specifically, the IoT platform queries the preset object model database for the target object model corresponding to the second data to be verified, and obtains the query result. If the query result indicates that the target object model exists, the integrity verification result is determined to be verified as passed; otherwise, the verification fails and the second data to be verified is regarded as a redundant object model of the device to be verified. The preset object model database stores the correspondence between preset data to be verified and preset object models.

[0067] As an example, the IoT platform performs integrity verification processing on the second data to be verified and obtains the integrity verification result, including: querying the target object model corresponding to the second data to be verified from the preset object model database based on the second data to be verified, and obtaining the query result; in response to the query result indicating the existence of the target object model, determining the integrity verification result based on the comparison result between the second data to be verified and the verification data template corresponding to the target object model.

[0068] Specifically, the IoT platform compares each of the second sub-data to be verified in the second data to be verified with the verification data template corresponding to the target object model. If each of the second sub-data to be verified is consistent with the data in the verification data template, the integrity verification result is determined to be verified as passed; otherwise, the verification fails. Missing data that exists in the verification data template but does not exist in the second data to be verified are determined as unrealized object models. The preset object model database stores the correspondence between preset data to be verified and preset object models.

[0069] The IoT platform verifies the reporting frequency of the acquired second data to be verified, and obtains the frequency verification result. For example, the IoT platform determines the reporting frequency of the second data to be verified as the ratio between the number of reports of the second data to be verified within a preset time period and the preset time period. If the reporting frequency is within the preset frequency range, the frequency verification result is determined to be a successful verification; otherwise, the verification fails.

[0070] The IoT platform performs compliance verification on the second data to be verified and obtains the compliance verification result. For example, the IoT platform determines whether the second data to be verified is within the preset reported data range. If it is, the platform determines that the second data to be verified is within the corresponding value range. If it is, the compliance verification result is determined to be passed; otherwise, the verification fails.

[0071] In one embodiment, the IoT platform acquires attribute data and event information reported by the device to be verified through a real-time detection mechanism to obtain second verification data, and conducts a full-dimensional verification against the object model data of the device to be verified. Specifically, the IoT platform determines whether there are any object model items that should have been reported but were not, obtaining an integrity verification result, such as the "humidity" attribute defined by the IoT platform not being reported. The IoT platform determines whether the reporting frequency of the second verification data meets the configuration requirements, obtaining a frequency verification result, such as whether it is reported at 1 minute / time. The IoT platform determines whether there are any illegal refs not defined by the IoT platform in the second verification data, such as the non-existent ref=9999, and verifies whether the value range of the reported data is within the range specified by the object model, such as whether the temperature attribute exceeds the defined range of 0-100℃, obtaining a compliance verification result.

[0072] The IoT platform obtains a second verification result based on the integrity verification result, frequency verification result, and / or compliance verification result.

[0073] In the first embodiment, the IoT platform performs integrity verification on the second data to be verified to obtain an integrity verification result; or performs verification on the reporting frequency of the acquired second data to be verified to obtain a frequency verification result; or performs compliance verification on the second data to be verified to obtain a compliance verification result; and uses the integrity verification result, frequency verification result, or compliance verification result as the second verification result.

[0074] In the second embodiment, the IoT platform performs integrity verification processing on the second data to be verified to obtain an integrity verification result; and performs verification processing on the reporting frequency of the acquired second data to be verified to obtain a frequency verification result; and uses the integrity verification result and the frequency verification result as the second verification result.

[0075] In the third embodiment, the IoT platform performs integrity verification on the second data to be verified to obtain an integrity verification result; and performs compliance verification on the second data to be verified to obtain a compliance verification result; and uses the integrity verification result and the compliance verification result as the second verification result.

[0076] In the fourth embodiment, the IoT platform performs verification processing on the reporting frequency of the acquired second data to be verified to obtain a frequency verification result; and performs compliance verification processing on the second data to be verified to obtain a compliance verification result; and uses the frequency verification result and the compliance verification result as the second verification result.

[0077] In the fifth embodiment, the IoT platform performs integrity verification on the second data to be verified to obtain an integrity verification result; performs verification on the reporting frequency of the acquired second data to be verified to obtain a frequency verification result; and performs compliance verification on the second data to be verified to obtain a compliance verification result; and uses the integrity verification result, frequency verification result, and compliance verification result as the second verification result.

[0078] Step S230: Obtain the target verification result based on the first verification result and the second verification result.

[0079] As an example, the IoT platform uses the first verification result and the second verification result as the target verification result. As another example, if the IoT platform responds to the fact that at least one of the first verification result and the second verification result fails, it determines that the target verification result has failed; if the IoT platform responds to the fact that both the first verification result and the second verification result pass, it determines that the target verification result has passed.

[0080] As can be seen, by verifying the first and second data to be verified through multiple verification methods, the verification rules are refined and the device adaptability is improved. This solves the problems of single verification logic and insufficient scenario coverage in existing technologies, and improves the accuracy of verification and adaptability to different devices, reducing invalid verification or false judgments. On the one hand, attribute association matching verification enables collaborative verification of service calls and associated attributes, ensuring the logical validity when multiple attributes are modified synchronously, and avoiding linkage configuration errors caused by single operation verification. On the other hand, integrity verification can solve the technical problem of existing technologies that only verify the device's own object model and cannot detect missed or false alarms. It breaks through the boundary of existing technologies that only focus on verifying the device's own object model, and can proactively identify the mismatch between the device side and the platform side's full object model, ensuring the consistency of the object model from the root and avoiding device malfunctions caused by differences between the two ends.

[0081] Before the IoT platform generates verification instructions based on the preset verification configuration parameters corresponding to the object model data, the method further includes: grouping the object model data associated with the device identifier according to the data flow direction to obtain a first verification group and a second verification group; setting a first verification rule for the sub-data of the first verification group, and setting a second verification rule for the sub-data of the second verification group.

[0082] The object model data includes multiple sub-data. The IoT platform groups the object model data associated with the device identifier according to the data flow direction to obtain the first verification group and the second verification group. The steps include: adding the sub-data with the data flow direction from the IoT platform to the device to be verified to the first verification group to obtain the first verification group; adding the sub-data with the data flow direction from the device to be verified to the IoT platform to the second verification group to obtain the second verification group.

[0083] In one embodiment, the IoT platform identifies the attributes or events proactively reported by the device as the uplink verification group, i.e., the second verification group. Proactive reporting includes periodic requests from the IoT platform, and may also include reporting triggered by changes in device status. The IoT platform identifies the writable attributes and callable services sent by the device to be verified in response to instructions sent by the IoT platform as the downlink verification group, i.e., the first verification group.

[0084] The IoT platform sets first verification rules for the sub-data of the first verification group. Specifically, the first verification rules include filtering rules, parameter conversion rules, verification strategies, and response verification rules. Among them, the response verification rules include data format verification, outlier verification, and related attribute matching verification. The IoT platform sets corresponding verification instructions for each sub-data of the first verification group, sets the verification parameter generation rules in the verification instructions, and sets corresponding data format verification, outlier verification, and related attribute matching verification.

[0085] In one embodiment, the sub-data is an attribute, and the steps for verifying the read and write permissions of the attribute include: when verifying the normal value of the attribute, it is necessary to read back the format and value range to ensure that the verification command is normal; when verifying the abnormal value of the attribute, it is necessary to verify whether the returned abnormal response code is a preset error code; when verifying the read permission of the attribute, only the readback format is verified.

[0086] In another embodiment, the sub-data is a service, and the service is configured with parameter validation, associated attribute matching validation, normal value validation, and abnormal value validation. First, the validation parameters in the service command are validated. After compliance is verified, if associated attributes need to be verified, the matching relationship is first obtained. Then, the response code sent by the device to be validated in response to the service command is verified to see if it matches the expected code, such as "success 10000". A preset error code is returned if it fails. When the service issues a service command that requires multi-attribute linkage, such as issuing a service command for switching operating modes that requires simultaneous verification of temperature, humidity, and operating status, multiple associated attributes sent by the device to be validated are first received. Schema validation is performed on the associated attributes to confirm whether multiple associated attributes match the service command, forming a closed-loop validation mechanism between the service and associated attributes. Compared to isolated validation of a single operation, this method is more accurate.

[0087] The IoT platform sets second verification rules for the sub-data of the second verification group. Specifically, the second verification rules include filtering rules and reporting result verification rules, which include integrity verification, frequency verification, and compliance verification. The IoT platform sets corresponding integrity verification, frequency verification, and compliance verification for each sub-data in the second verification group.

[0088] The IoT platform also includes: compiling the verification results of the first data to be verified and the verification of the second data to be verified into a verification report, and indicating whether the verification passed or failed and the reasons for failure.

[0089] In one embodiment, combined with Figure 3 As shown, the IoT platform includes a simulated client and a service layer. The IoT platform scans the devices through the simulated client, adds the object model data of device 1, device 2, and simulated device 3, and adds the object model devices of each device to the service layer of the IoT platform. The object model verification rule configuration layer in the service layer configures verification rules for each object model data. After the simulated client layer receives the verification request, the application service of the service layer connects to at least one of the real device 1, real device 2, or simulated device 3 in the device set based on the device identifier in the verification request, and performs uplink verification on the uplink verification group and downlink verification on the downlink verification group respectively.

[0090] Combination Figure 4 As shown, in the basic information generation stage, the IoT platform creates basic information, such as object models and device identifiers, through the management backend, maintains the association between device identifiers and object models, sets verification rules for object models, and saves the above information to the IoT platform's service layer. In the simulated client device association stage, after logging in, the simulated client adds the object model of a real or simulated device, and establishes a communication connection between the IoT platform and the device after successful addition. In the device object model verification stage, after receiving a verification request, the simulated client initiates an object model verification request to the service layer. The service layer obtains the object model data based on the device identifier; generates a verification instruction based on the preset verification configuration parameters in the object model data, sends the downlink verification group's verification instruction to the device, and the device responds by sending the first data to be verified to the IoT platform. The IoT platform verifies the first data to be verified; the device actively sends the second data to be verified to the IoT platform; the IoT platform verifies the second data to be verified; and the verification results of the first and second data to be verified are output as the target verification result.

[0091] Figure 5 This is a block diagram illustrating an object model verification apparatus according to an exemplary embodiment of this application. Figure 5As shown, the exemplary object model verification device 500 includes: an object model data determination module 510, a first data to be verified acquisition module 520, and a verification module 530. Specifically: The object model data determination module 510 is used to determine the object model data associated with the device identifier based on the device identifier in the verification request in response to receiving a verification request.

[0092] The first data to be verified acquisition module 520 is used to generate a verification instruction based on the preset verification configuration parameters in the object model data, send the verification instruction to the device to be verified corresponding to the device identifier, and acquire the first data to be verified sent by the device to be verified in response to the verification instruction.

[0093] The verification module 530 is used to perform verification processing on the first data to be verified and the second data to be verified actively sent by the device to be verified within a preset time period to obtain the target verification result.

[0094] In this exemplary object model verification device, in response to a received verification request, the device model data associated with the device identifier is determined based on the device identifier in the verification request; a verification instruction is generated based on preset verification configuration parameters in the object model data, and the verification instruction is sent to the device to be verified corresponding to the device identifier; and the first data to be verified sent by the device to be verified in response to the verification instruction is obtained; the first data to be verified and the second data to be verified actively sent by the device to be verified within a preset time period are verified to obtain the target verification result. Therefore, by verifying the first data to be verified sent by the device to be verified in response to the verification instruction and the second data to be verified actively sent by the device to be verified within a preset time period, both passively responded data and actively sent data can be verified simultaneously, further ensuring the integrity of the verification and thus improving the accuracy of the verification.

[0095] The functions of each module can be found in the embodiment of the object model verification method, and will not be repeated here.

[0096] To implement the object model verification method of the above embodiments, this application proposes another electronic device, please refer to [link / reference needed]. Figure 6 , Figure 6 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application.

[0097] Electronic device 600 includes memory 601 and processor 602, wherein memory 601 and processor 602 are coupled together. In a specific implementation scenario, electronic device 600 may include, but is not limited to, microcomputers and servers. In addition, electronic device 600 may also include mobile devices such as laptops and tablets, without limitation.

[0098] The memory 601 is used to store program data, and the processor 602 is used to execute the program data to implement the physical model verification method of the above embodiment.

[0099] In this embodiment, processor 602 can also be referred to as CPU (Central Processing Unit). Processor 602 may be an integrated circuit chip with signal processing capabilities. Processor 602 can also be a general-purpose processor, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The general-purpose processor can be a microprocessor, or processor 602 can be any conventional processor.

[0100] This application also provides a computer-readable storage medium, such as Figure 7 As shown, the computer-readable storage medium 700 is used to store program data 701, which, when executed by the processor, is used to implement the object model verification method as described in the method embodiments of this application.

[0101] The methods involved in the embodiments of the model verification method of this application, when implemented as software functional units and sold or used as independent devices, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software device. This computer software device is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0102] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

[0103] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, apparatus, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, apparatus, or devices. The term "and / or" is merely a description of the association of related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, "many" in this document means two or more. In addition, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of elements, such as including at least one of A, B, and C, and may mean including any one or more elements selected from the set consisting of A, B, and C.

Claims

1. A method for verifying a physical model, characterized in that, The object model verification method is applied to an IoT platform, and the method includes: In response to receiving a verification request, the object model data associated with the device identifier is determined based on the device identifier in the verification request; A verification instruction is generated based on the preset verification configuration parameters corresponding to the object model data, the verification instruction is sent to the device to be verified corresponding to the device identifier, and the first data to be verified sent by the device to be verified in response to the verification instruction is obtained. The first data to be verified and the second data to be verified actively sent by the device to be verified within a preset time period are verified to obtain the target verification result.

2. The method according to claim 1, characterized in that, The step of verifying the first data to be verified and the second data to be verified actively sent by the device to be verified within a preset time period to obtain the target verification result includes: The first verification rule is used to verify the first data to be verified, and a first verification result is obtained. The second verification rule is used to verify the second data to be verified, and the second verification result is obtained. The target verification result is obtained based on the first verification result and the second verification result.

3. The method according to claim 2, characterized in that, The step of performing verification processing on the first data to be verified using the first verification rule to obtain the first verification result includes: The data format of the first data to be verified is validated to obtain the data format validation result; and / or The abnormal response codes in the first data to be verified are verified to obtain the abnormal value verification results; and / or Perform matching and verification on multiple related attributes in the first data to be verified to obtain the related attribute verification results; The first verification result is determined based on the data format verification result, the outlier verification result, and / or the associated attribute verification result.

4. The method according to claim 3, characterized in that, The verification instruction includes a service instruction, and the step of matching and verifying multiple associated attributes in the first data to be verified to obtain the associated attribute verification result includes: Based on the requirements for each associated attribute in the object model data, format verification and value range verification are performed on each associated attribute to obtain alternative verification results. In response to the candidate verification result indicating that the verification is passed, the verification result of the associated attribute is determined based on the matching result between the obtained associated attributes and the service instruction.

5. The method according to claim 2, characterized in that, The step of performing verification processing on the second data to be verified using the second verification rule to obtain the second verification result includes: Perform integrity verification processing on the second data to be verified to obtain the integrity verification result; and / or The reported frequency of the acquired second data to be verified is verified to obtain the frequency verification result; and / or Perform compliance verification on the second data to be verified to obtain the compliance verification result; The second verification result is obtained based on the integrity verification result, the frequency verification result, and / or the compliance verification result.

6. The method according to claim 5, characterized in that, The step of performing integrity verification processing on the second data to be verified to obtain the integrity verification result includes: Based on the second data to be verified, query the target object model corresponding to the second data to be verified from the preset object model database to obtain the query result; In response to the query result indicating the existence of the target object model, the integrity verification result is determined based on the comparison result between the second data to be verified and the verification data template corresponding to the target object model.

7. The method according to claim 1, characterized in that, Before the step of generating a verification instruction based on the preset verification configuration parameters corresponding to the object model data, the method further includes: The object model data associated with the device identifier is grouped according to the data flow direction to obtain a first verification group and a second verification group; Set a first verification rule for the sub-data of the first verification group, and set a second verification rule for the sub-data of the second verification group.

8. The method according to claim 7, characterized in that, The object model data includes multiple sub-data. The step of grouping the object model data associated with the device identifier according to the data flow direction to obtain a first verification group and a second verification group includes: The sub-data whose data flow direction is from the IoT platform to the device to be verified is added to the first verification group to obtain the first verification group; The sub-data whose data flow direction is from the device to be verified to the IoT platform is added to the second verification group to obtain the second verification group.

9. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to perform the method as claimed in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, include: The system stores program data, which, when executed by a processor, is used to implement the method as described in any one of claims 1-8.