CN111106899B - Data verification method and device in Internet of things, computer equipment and storage medium - Google Patents

Data verification method and device in Internet of things, computer equipment and storage medium Download PDF

Info

Publication number
CN111106899B
CN111106899B CN201911295202.2A CN201911295202A CN111106899B CN 111106899 B CN111106899 B CN 111106899B CN 201911295202 A CN201911295202 A CN 201911295202A CN 111106899 B CN111106899 B CN 111106899B
Authority
CN
China
Prior art keywords
data
verified
mode rule
json mode
json
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911295202.2A
Other languages
Chinese (zh)
Other versions
CN111106899A (en
Inventor
单宏杰
明朗
余海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Envision Innovation Intelligent Technology Co Ltd
Envision Digital International Pte Ltd
Original Assignee
Shanghai Envision Innovation Intelligent Technology Co Ltd
Envision Digital International Pte Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Envision Innovation Intelligent Technology Co Ltd, Envision Digital International Pte Ltd filed Critical Shanghai Envision Innovation Intelligent Technology Co Ltd
Priority to CN201911295202.2A priority Critical patent/CN111106899B/en
Publication of CN111106899A publication Critical patent/CN111106899A/en
Application granted granted Critical
Publication of CN111106899B publication Critical patent/CN111106899B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a data verification method and device in the Internet of things, computer equipment and a storage medium, and relates to the technical field of the Internet of things. The method comprises the following steps: when data to be verified are received, acquiring a JSON mode rule of a device model to which access devices corresponding to the data to be verified belong; cutting a JSON mode rule segment for describing the data to be verified from the JSON mode rule according to the data to be verified; and verifying the data to be verified by utilizing the JSON mode rule segment. By the method, in the data verification process in the Internet of things, aiming at the characteristic of fragment periodic transmission of scene data of the Internet of things, the data to be detected is detected by adopting the JSON mode rule fragment corresponding to the data to be detected, so that the waste of verification resources is reduced, and the verification efficiency is improved.

Description

Data verification method and device in Internet of things, computer equipment and storage medium
Technical Field
The application relates to the technical field of the internet of things, in particular to a data verification method and device in the internet of things, computer equipment and a storage medium.
Background
With the large-scale popularization of the internet of things technology, information interaction between objects and between people is more and more frequent, and in the information interaction process, subsequent data operation is often influenced by errors occurring in a data access layer, so that the verification of the data access layer is particularly important.
In the related art, a proprietary non-open definition mode (custom schema) is generally adopted to define the data specification, and a complete schema of a device is used to check the data fragments in the checking process.
In the related art, in the internet of things, data transmission is performed periodically by using data fragments and is not simultaneously transmitted, and the data fragments are verified by using a complete schema of the device in the verification process, so that the waste of verification resources is caused in the verification process, and the verification efficiency is influenced.
Disclosure of Invention
The embodiment of the application provides a data verification method, a device, computer equipment and a storage medium in the Internet of things, which can improve and reduce the waste of verification resources in the verification process and improve the verification efficiency, and the technical scheme is as follows:
in one aspect, a data verification method in the internet of things is provided, where the method is performed by a data verification server, and the method includes:
when data to be verified is received, acquiring a JSON mode rule of a device model to which access equipment belongs, wherein the access equipment is equipment corresponding to the data to be verified;
cutting out a corresponding JSON mode rule segment from the JSON mode rule according to the data to be verified, wherein the JSON mode rule segment is a JSON mode rule describing the data to be verified;
and verifying the data to be verified by utilizing the JSON mode rule segment.
In one aspect, a data verification device in the internet of things is provided, and the device is applied to a data verification server, and the device includes:
the access device comprises an acquisition module, a verification module and a verification module, wherein the acquisition module is used for acquiring a JSON mode rule of a device model to which the access device belongs when receiving data to be verified, and the access device is a device corresponding to the data to be verified;
the cutting module is used for cutting out a corresponding JSON mode rule segment from the JSON mode rule according to the data to be verified, wherein the JSON mode rule segment is a JSON mode rule for describing the data to be verified;
and the verification module is used for verifying the data to be verified by utilizing the JSON mode rule segment.
Optionally, the apparatus further comprises:
the input module is used for inputting the JSON mode rule segment and the data to be verified into a verification function, and the verification function is a function stored in an open source class library meeting the JSON mode standard;
and the verification module is used for verifying the data to be verified by utilizing the JSON mode rule segment according to the verification function.
Optionally, the JSON mode rule of the device model to which the access device belongs is used to describe a data specification of an access parameter of each device characteristic of the access device;
wherein the device characteristics include at least one of attributes, stations, services, and events;
the data specification includes at least one of a data type, a value range, whether padding is necessary, and a data mode.
Optionally, the data to be verified is measurement point data reported by the access device; the device further comprises:
and the sending module is used for sending the data to be checked to a downstream message queue when the data to be checked passes the check.
Optionally, the data to be verified is a call parameter included in a service call request to the access device; the device further comprises:
and the calling module is used for calling the service of the access equipment when the calling parameter is verified to be passed.
Optionally, the cutting module includes:
the first obtaining submodule is used for obtaining the equipment characteristics corresponding to the data to be verified, and the equipment characteristics comprise at least one of attributes, measuring points, services and events;
the matching submodule is used for matching the equipment characteristics with the equipment characteristics of the access equipment described in the JSON mode rule;
and the second obtaining submodule is used for obtaining the part successfully matched with the equipment characteristics in the JSON mode rule as the JSON mode rule segment of the data to be verified.
In one aspect, a computer device is provided, which includes a processor and a memory, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the data verification method in the internet of things.
In one aspect, a computer-readable storage medium is provided, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the storage medium, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the data verification method in the internet of things.
The technical scheme provided by the application can comprise the following beneficial effects:
when data to be verified is received, a JSON mode rule of an equipment model to which access equipment corresponding to the data to be verified belongs is obtained, a JSON mode rule segment describing the data to be verified is cut out from the JSON mode rule according to the data to be verified, and the data to be verified is verified by utilizing the JSON mode rule segment, so that in the data verification process of the Internet of things, the waste of verification resources is reduced and the verification efficiency is improved according to the characteristic of fragment periodic transmission of scene data of the Internet of things.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flowchart illustrating a data verification method in the internet of things according to an exemplary embodiment of the present application;
fig. 2 is a schematic diagram illustrating a device having a function of data interaction with a data verification server in a data verification method in the internet of things according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a data verification method in the internet of things according to an exemplary embodiment of the present application;
fig. 4 is a flowchart illustrating a data verification method in the internet of things according to an exemplary embodiment of the present application;
fig. 5 is a flowchart illustrating a data verification method in the internet of things according to an exemplary embodiment of the present application;
fig. 6 shows a block diagram of a data verification device in the internet of things according to an exemplary embodiment of the present application;
FIG. 7 is a block diagram illustrating the structure of a computer device according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
It is to be understood that reference herein to "a number" means one or more and "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
With the large-scale popularization of the technology of the internet of things, higher requirements are provided for data accuracy in the information interaction process, the application provides a data verification method in the internet of things, waste of verification resources in the verification process can be reduced, and verification efficiency is improved. For ease of understanding, several terms referred to in this application are explained below.
1) Internet of Things (Internet of Things, ioT)
The internet of things is a network which is based on information carriers such as the internet, a traditional telecommunication network and the like and enables all common objects capable of performing independent functions to realize interconnection. The application fields of the method mainly comprise transportation, logistics, industrial manufacturing, health care, intelligent environments (families, offices and factories) and the like, and the method has very wide market prospect.
2)JSON
JSON is a light-weight, open and standard data exchange format, is also the most common exchange format for data exchange among the current Internet services, and has the characteristics of simplicity, good readability and the like.
3) JSON mode (JSONSchema)
JSON schema is a standard used to define JSON data constraints. According to the convention Schema, two parties exchanging data can understand the requirements and constraints of JSON data, and can verify the data accordingly to ensure the correctness of data exchange.
The JSONSchema has the advantages of describing a known data format, providing documents which can be clearly read by both human beings and machines, providing help for automatic testing and data verification of scenes such as ensuring the quality of data submitted by users and the like, and the like.
Please refer to fig. 1, which shows a flowchart of a data verification method in the internet of things according to an exemplary embodiment of the present application. The data verification method in the internet of things is executed by a data verification server, and as shown in fig. 1, the data verification method in the internet of things may include the following steps:
step 110, when receiving the data to be verified, obtaining a JSON mode (JSON schema) rule of a device model to which an access device belongs, where the access device is a device corresponding to the data to be verified.
The access device may be a device having a function of data interaction with the data verification server, and the access device may have one or more of the following features: 1) Have a static attribute; 2) The method comprises the steps of dynamically reporting the data of the measuring points; 3) The service for cloud calling can be provided; 4) For example, please refer to fig. 2, which shows a schematic diagram of a device having a function of data interaction with a data verification server in a data verification method in the internet of things according to an embodiment of the present application, and as shown in fig. 2, the device has a static attribute, and can dynamically report point data, and can realize, through interaction of an input parameter and an output parameter, invocation of a service corresponding to the device by the data verification server with the data verification server, and automatic reporting of an event by uploading the output parameter to the data verification server.
Optionally, the device model described in the access device refers to a conceptual model for describing the attributes and functions of the device in the real world.
And step 120, cutting out a corresponding JSON mode rule segment from the JSON mode rule according to the data to be verified, wherein the JSON mode rule segment is the JSON mode rule describing the data to be verified.
Each device corresponds to one device model, each device model can correspond to a plurality of devices, each device model has a complete JSON mode rule corresponding to the device model, the device model can comprise a plurality of elements for describing the device model, data to be verified can correspond to a certain element of the device model, and JSON mode rule segments corresponding to the device elements are cut out from the complete JSON mode rule according to the elements of the device model corresponding to the data to be verified.
And step 130, checking the data to be checked by utilizing the JSON mode rule segment.
The data verification server can verify the rationality of the data to be verified by utilizing the JSON mode rule segment so as to ensure the accuracy of data exchange.
To sum up, the data verification method in the internet of things provided in the embodiment of the present application is executed by the data verification server, and when receiving data to be verified, the JSON mode rule of the device model to which the access device corresponding to the data to be verified belongs is acquired, and the corresponding JSON mode rule segment is cut out from the JSON mode rule according to the data to be verified, where the JSON mode rule segment is a JSON mode rule describing the data to be verified, and the data to be verified is verified by using the JSON mode rule segment, so that in the data verification process in the internet of things, the waste of verification resources is reduced and the verification efficiency is improved for the characteristic of fragment periodic transmission of scene data in the internet of things.
Referring to fig. 3, a flowchart of a data verification method in the internet of things according to an exemplary embodiment of the present application is shown. The data verification method in the internet of things is executed by a data verification server, and as shown in fig. 3, the data verification method in the internet of things may include the following steps:
step 310, when the data to be verified is received, acquiring the JSON mode rule of the device model to which the access device belongs, where the access device is a device corresponding to the data to be verified.
Optionally, the format of the data to be verified is JSON, and the JSON mode rule is a tool used for describing and verifying JSON, where JSON is a lightweight, open, and standard data exchange format.
Optionally, the JSON mode rule of the device model to which the access device belongs is used to describe a data specification of an access parameter of each device characteristic of the access device;
wherein the device characteristics include at least one of attributes, stations, services, and events;
the data specification includes at least one of a data type, a value range, whether padding is necessary, and a data pattern.
Optionally, the data verification server uses the not/any Of/all Of capabilities Of the JSON mode to respectively express the logical no or and, thereby avoiding redefinition Of the logical relationship between data for different devices and various data specifications in the open ecology Of the internet Of things.
In a possible case, the JSON schema rule of a certain device model is organized according to attributes, measurement points, services, and events, and each part constituting the model also exists in the form of the JSON schema rule, for example, the following JSON schema rule of a device model of a data verification method in the internet of things:
Figure BDA0002320324750000071
the JSON mode rule of the device model is a JSON mode rule of a planetary sensor model, and it can be seen from the JSON mode rule that the planetary sensor model is structurally organized according to attributes (attributes), measurement points (measurepoints), services (services), and events (events), each part constituting the model also exists in the form of the JSON mode rule, and a set defined for each part of the model also exists in the form of the JSON mode rule, for example, a measurement point (measurepoints) of the planetary sensor model is defined as:
Figure BDA0002320324750000081
the definition of the measurement point temperature of the planetary sensor model can be expanded as follows:
Figure BDA0002320324750000082
the measuring point temperature of the planetary sensor model is defined by a JSON mode rule, the JSON mode rule of the measuring point defines that the data type of the point is a number type, the minimum value of a legal value is-271, the maximum value is 30000, namely the data value range of the point is as follows: (-271, 30000).
And step 320, cutting out a corresponding JSON mode rule segment from the JSON mode rule according to the data to be verified, wherein the JSON mode rule segment is the JSON mode rule describing the data to be verified.
Optionally, the steps may include:
1) Acquiring equipment characteristics corresponding to data to be verified, wherein the equipment characteristics comprise at least one of attributes, measuring points, services and events;
2) Matching the device characteristics with the device characteristics of the access device described in the JSON mode rule;
3) And acquiring a part successfully matched with the device characteristics in the JSON mode rule as a JSON mode rule segment of the data to be verified.
When the access device of the planetary sensor model inputs data to be verified, and the device characteristic corresponding to the data to be verified is a measuring point, acquiring a JSON mode rule segment describing the measuring point of the access device in the JSON mode rule of the planetary sensor model as the JSON mode rule segment of the data to be verified.
And 330, inputting the JSON mode rule segment and the data to be verified into a verification function, wherein the verification function is a function stored in an open source class library according with the JSON mode standard.
The open source class library conforming to the JSON schema standard may be org.
The check function stored in the open source class library conforming to the JSON mode standard performs validity check on the data to be checked by using the JSON mode rule segment cut out from the JSON mode rule and the data to be checked as input parameters, for example, the check function is as follows:
z=f(x,y)
wherein x is a JSON mode rule segment, y is data to be verified, and z is a verification result indicating whether the data to be verified passes verification or fails verification.
And 340, verifying the data to be verified by utilizing the JSON mode rule segment according to the verification function.
And 350, the data to be checked is the measuring point data reported by the access equipment, and when the data to be checked passes the check, the data to be checked is sent to a downstream message queue.
Optionally, when the data to be tested is not verified, a verification failure log is printed.
Step 360, the data to be tested is a calling parameter contained in the service calling request to the access device, and when the data to be verified passes the verification, the service of the access device is called.
Optionally, when the data to be checked is not checked, the check result of the data to be checked is returned to the sending device of the data to be checked.
To sum up, the data verification method in the internet of things provided in the embodiment of the present application is executed by the data verification server, and when receiving data to be verified, the JSON mode rule of the device model to which the access device corresponding to the data to be verified belongs is acquired, and the corresponding JSON mode rule segment is cut out from the JSON mode rule according to the data to be verified, where the JSON mode rule segment is a JSON mode rule describing the data to be verified, and the data to be verified is verified by using the JSON mode rule segment, so that in the data verification process in the internet of things, the waste of verification resources is reduced and the verification efficiency is improved for the characteristic of fragment periodic transmission of scene data in the internet of things.
The following describes the present application by taking an example of sending measurement point data by a device, and please refer to fig. 4, which shows a flowchart of a data verification method in the internet of things provided by an exemplary embodiment of the present application. The data verification method in the internet of things is executed by a data verification server, and as shown in fig. 4, the data verification method in the internet of things may include the following steps:
step 410, the access device sends the station data, and correspondingly, the data verification server receives the station data.
Step 420, the data verification server obtains the JSON mode rule file of the device model to which the access device belongs from the JSON mode rule description file of the access device model.
Step 430, the data verification server extracts the JSON mode rule segment corresponding to the measurement point data from the JSON mode rule of the device model to which the access device belongs.
Step 440, the data verification server verifies whether the measuring point data conforms to the measuring point JSON mode rule by using the JSON mode rule segment; if so, go to step 450, otherwise go to step 460.
Step 450, the data verification server sends the measurement point data to a downstream message queue.
In step 460, the data verification server prints a verification failure log.
Taking the temperature measurement point in the embodiment shown in fig. 3 as an example, the measurement point JSON mode rule is a measurement point JSON mode rule segment cut from the JSON mode rule of the planetary sensor model in the embodiment shown in fig. 3 according to the temperature measurement point sent by the access device, where the measurement point JSON mode rule segment defines the data type of this point as number type, and the legal value range is: (-271, 30000);
if the measuring point data sent by the equipment is 300, the data type of the measuring point is met, and the legal value range of the measuring point is met, so that the measuring point data is sent to a downstream queue message by the data verification server through verification;
if the measuring point data sent by the equipment is-300, although the data type of the measuring point is met, the data is not in the legal value range of the measuring point, so that the data does not pass the verification, and a verification failure log is printed by the data verification server;
if the measuring point data sent by the equipment is 'abc', the data type of the measuring point is not met, so that the data do not pass verification, and a verification failure log is printed by the data verification server.
To sum up, the data verification method in the internet of things provided in the embodiment of the present application is executed by the data verification server, and when receiving data to be verified, the JSON mode rule of the device model to which the access device corresponding to the data to be verified belongs is acquired, and the corresponding JSON mode rule segment is cut out from the JSON mode rule according to the data to be verified, where the JSON mode rule segment is a JSON mode rule describing the data to be verified, and the data to be verified is verified by using the JSON mode rule segment, so that in the data verification process in the internet of things, the waste of verification resources is reduced and the verification efficiency is improved for the characteristic of fragment periodic transmission of scene data in the internet of things.
Reference is made to fig. 5, which shows a flowchart of a data verification method in the internet of things according to an exemplary embodiment of the present application. The data verification method in the internet of things is executed by a data verification server, and as shown in fig. 5, the data verification method in the internet of things may include the following steps:
step 510, the application program sends a service call request to the access device, and correspondingly, the data verification server receives the service call request, where the service call request includes a call parameter.
In step 520, the data verification server obtains the JSON mode rule file of the device model to which the access device belongs from the JSON mode rule description file of the access device model.
Step 530, the data verification server extracts the JSON schema rule segment corresponding to the input parameter of the service from the JSON schema rule of the device model to which the access device belongs.
Step 540, the data verification server verifies whether the calling parameter in the service calling request conforms to the JSON mode rule of the service input parameter by using the JSON mode rule segment; if so, go to step 550, otherwise go to step 560.
At step 540, the data verification server initiates a service call to the access device.
In step 550, the data verification server returns the verification result of the call parameter in the service call request to the application program.
To sum up, the data verification method in the internet of things provided in the embodiment of the present application is executed by the data verification server, and when receiving data to be verified, the JSON mode rule of the device model to which the access device corresponding to the data to be verified belongs is acquired, and the corresponding JSON mode rule segment is cut out from the JSON mode rule according to the data to be verified, where the JSON mode rule segment is a JSON mode rule describing the data to be verified, and the data to be verified is verified by using the JSON mode rule segment, so that in the data verification process in the internet of things, the waste of verification resources is reduced and the verification efficiency is improved for the characteristic of fragment periodic transmission of scene data in the internet of things.
Referring to fig. 6, a block diagram of a data verification apparatus in the internet of things according to an exemplary embodiment of the present application is shown. The apparatus may be implemented in the form of software as all or part of a data verification server to perform all or part of the steps of the method shown in fig. 1, fig. 3, fig. 4, or fig. 5, corresponding to the embodiment. As shown in fig. 6, the data verification apparatus in the internet of things may include:
an obtaining module 610, configured to obtain, when data to be verified is received, a JSON mode rule of a device model to which an access device belongs, where the access device is a device corresponding to the data to be verified;
the cutting module 620 is configured to cut out a corresponding JSON mode rule segment from the JSON mode rule according to the data to be verified, where the JSON mode rule segment is a JSON mode rule describing the data to be verified;
and the verifying module 630 is configured to verify the data to be verified by using the JSON mode rule segment.
Optionally, the apparatus further comprises:
the input module is used for inputting the JSON mode rule segment and the data to be verified into a verification function, and the verification function is a function stored in an open source class library conforming to the JSON mode standard;
the verifying module 630 is configured to verify the data to be verified by using the JSON mode rule segment according to the verifying function.
Optionally, the JSON mode rule of the device model to which the access device belongs is used to describe the data specification of the access parameter of each device characteristic of the access device;
wherein the device characteristics include at least one of attributes, stations, services, and events;
the data specification includes at least one of a data type, a value range, whether padding is necessary, and a data pattern.
Optionally, the data to be verified is the measurement point data reported by the access device; the device also includes:
and the sending module is used for sending the data to be checked to the downstream message queue when the data to be checked passes the check.
Optionally, the data to be verified is a call parameter included in a service call request to the access device; the device also includes:
and the calling module is used for calling the service of the access equipment when the calling parameter is verified to be passed.
Optionally, the clipping module 620 includes:
the first obtaining submodule is used for obtaining the equipment characteristics corresponding to the data to be verified, and the equipment characteristics comprise at least one of attributes, measuring points, services and events;
the matching submodule is used for matching the device characteristics with the device characteristics of the access device described in the JSON mode rule;
and the second obtaining submodule is used for obtaining the part successfully matched with the equipment characteristics in the JSON mode rule as the JSON mode rule segment of the data to be verified.
To sum up, the data verification apparatus in the internet of things provided in the embodiment of the present application is implemented as all or part of the data verification server in a software manner, and when receiving data to be verified, obtains a JSON mode rule of a device model to which an access device corresponding to the data to be verified belongs, cuts out a corresponding JSON mode rule segment from the JSON mode rule according to the data to be verified, where the JSON mode rule segment is a JSON mode rule describing the data to be verified, and verifies the data to be verified by using the JSON mode rule segment, so that in a data verification process in the internet of things, waste of verification resources is reduced and verification efficiency is improved for characteristics of segmental periodic transmission of scene data of the internet of things.
FIG. 7 is a block diagram illustrating the structure of a computer device 700 according to an example embodiment. The computer device may be implemented as the data verification server in the above-mentioned scheme of the present application. The computer device 700 includes a Central Processing Unit (CPU) 701, a system Memory 704 including a Random Access Memory (RAM) 702 and a Read-Only Memory (ROM) 703, and a system bus 705 connecting the system Memory 704 and the CPU 701. The computer device 700 also includes a basic Input/Output system (I/O system) 706, which facilitates transfer of information between devices within the computer, and a mass storage device 707 for storing an operating system 713, application programs 714, and other program modules 715.
The basic input/output system 706 comprises a display 708 for displaying information and an input device 709, such as a mouse, keyboard, etc., for a user to input information. Wherein the display 708 and input device 709 are connected to the central processing unit 701 through an input output controller 710 coupled to the system bus 705. The basic input/output system 706 may also include an input/output controller 710 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input-output controller 710 may also provide output to a display screen, a printer, or other type of output device.
The mass storage device 707 is connected to the central processing unit 701 through a mass storage controller (not shown) connected to the system bus 705. The mass storage device 707 and its associated computer-readable media provide non-volatile storage for the computer device 700. That is, the mass storage device 707 may include a computer-readable medium (not shown) such as a hard disk or Compact Disc-Only Memory (CD-ROM) drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, erasable Programmable Read-Only Memory (EPROM), electrically Erasable Programmable Read-Only Memory (EEPROM), flash Memory or other solid state Memory technology, CD-ROM, digital Versatile Disks (DVD), or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 704 and mass storage device 707 described above may be collectively referred to as memory.
According to various embodiments of the present application, the computer device 700 may also operate as a remote computer connected to a network via a network, such as the Internet. That is, the computer device 700 may connect to the network 712 through a network interface unit 711 coupled to the system bus 705, or may connect to other types of networks or remote computer systems (not shown) using the network interface unit 711.
The memory further includes one or more programs, the one or more programs are stored in the memory, and the central processing unit 701 implements all or part of the steps of the method shown in fig. 1, 3, 6 or 7 by executing the one or more programs.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer
The embodiment of the present application further provides a computer-readable storage medium, configured to store at least one instruction, at least one program, a code set, or a set of instructions, where the at least one instruction, the at least one program, the code set, or the set of instructions are loaded and executed by the processor to implement the data verification method in the internet of things. For example, the computer readable storage medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (7)

1. The data verification method in the Internet of things is characterized in that the data in the Internet of things has the characteristic of periodic fragment transmission; the method is executed by a data checking server, and the data checking server respectively expresses logical No or AND by utilizing not/any, of/all and Of JSON mode; the method comprises the following steps:
when data to be verified is received, acquiring a JSON mode rule of a device model to which access equipment belongs, wherein the access equipment is equipment corresponding to the data to be verified; the device model is structurally organized according to attributes, measuring points, services and events, all parts forming the device model exist in a JSON mode rule form, and a set defined by each part in the device model is in the JSON mode rule form; the JSON mode rule of the device model to which the access device belongs is used for describing the data specification of the access parameters of the device characteristics of the access device; the data specification comprises at least one of a data type, a value range, whether the data needs to be filled and a data mode;
acquiring equipment characteristics corresponding to the data to be checked, wherein the equipment characteristics comprise at least one of attributes, measuring points, services and events;
matching the device characteristics corresponding to the data to be verified with the device characteristics of the access device described in the JSON mode rule;
acquiring a part of the JSON mode rule successfully matched with the device characteristics corresponding to the data to be verified as a JSON mode rule segment of the data to be verified, wherein the JSON mode rule segment is used for describing the JSON mode rule of the data to be verified;
inputting the JSON mode rule segment and the data to be verified into a verification function, wherein the verification function is a function stored in an open source class library conforming to JSON mode standards, and the verification function is used for carrying out validity verification on the data to be verified by taking the JSON mode rule segment and the data to be verified as input parameters;
and verifying the data to be verified by utilizing the JSON mode rule segment according to the verification function.
2. The method according to claim 1, wherein the data to be verified is station data reported by the access device; the method further comprises the following steps:
and when the data to be checked passes the check, sending the data to be checked to a downstream message queue.
3. The method according to claim 1, wherein the data to be verified is a call parameter included in a service call request to the access device; the method further comprises the following steps:
and when the call parameter is verified, calling the service of the access equipment.
4. The method of any of claims 1 to 3, further comprising:
and returning the verification result of the data to be verified to the sending equipment of the data to be verified.
5. The data verification device in the Internet of things is characterized in that data in the Internet of things has the characteristic of periodic fragment transmission; the device is applied to a data checking server which respectively expresses the logical negation, or, and by utilizing the not/any, of/all and Of JSON mode; the device comprises:
the access device comprises an acquisition module, a verification module and a verification module, wherein the acquisition module is used for acquiring a JSON mode rule of a device model to which the access device belongs when receiving data to be verified, and the access device is a device corresponding to the data to be verified; the device model is structurally organized according to attributes, measuring points, services and events, all parts forming the device model exist in a JSON mode rule form, and a set defined by each part in the device model is in the JSON mode rule form; the JSON mode rule of the device model to which the access device belongs is used for describing the data specification of the access parameters of the device characteristics of the access device; the data specification comprises at least one of a data type, a value range, whether the data needs to be filled and a data mode;
the cutting module is used for acquiring the equipment characteristics corresponding to the data to be verified, wherein the equipment characteristics comprise at least one of attributes, measuring points, services and events; matching the device characteristics corresponding to the data to be verified with the device characteristics of the access device described in the JSON mode rule; acquiring a part of the JSON mode rule successfully matched with the device characteristics corresponding to the data to be verified as a JSON mode rule segment of the data to be verified, wherein the JSON mode rule segment is used for describing the JSON mode rule of the data to be verified;
the verification module is used for inputting the JSON mode rule segment and the data to be verified into a verification function, the verification function is a function stored in an open source class library conforming to the JSON mode standard, and the verification function is used for carrying out validity verification on the data to be verified by taking the JSON mode rule segment and the data to be verified as input parameters; and verifying the data to be verified by utilizing the JSON mode rule segment according to the verification function.
6. A computer device, characterized in that the computer device comprises a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to realize the data verification method in the Internet of things according to any one of claims 1 to 4.
7. A computer-readable storage medium, wherein at least one program is stored in the storage medium, and the at least one program is loaded and executed by a processor to implement the method for verifying data in the internet of things according to any one of claims 1 to 4.
CN201911295202.2A 2019-12-16 2019-12-16 Data verification method and device in Internet of things, computer equipment and storage medium Active CN111106899B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911295202.2A CN111106899B (en) 2019-12-16 2019-12-16 Data verification method and device in Internet of things, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911295202.2A CN111106899B (en) 2019-12-16 2019-12-16 Data verification method and device in Internet of things, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111106899A CN111106899A (en) 2020-05-05
CN111106899B true CN111106899B (en) 2023-03-24

Family

ID=70423391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911295202.2A Active CN111106899B (en) 2019-12-16 2019-12-16 Data verification method and device in Internet of things, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111106899B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111835710B (en) * 2020-05-29 2023-08-15 中国平安财产保险股份有限公司 Method, device, computer equipment and storage medium for verifying request body
CN111898035B (en) * 2020-06-19 2023-10-31 深圳奇迹智慧网络有限公司 Data processing strategy configuration method and device based on Internet of things and computer equipment
CN113965399B (en) * 2021-10-29 2023-01-24 重庆忽米网络科技有限公司 Internet of things equipment data transmission method based on MQTT protocol
CN116501727B (en) * 2023-06-29 2023-09-19 深圳市华磊迅拓科技有限公司 Equipment data verification method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483467A (en) * 2017-08-31 2017-12-15 四川长虹电器股份有限公司 The JSON message checking methods of Internet interface service
CN110390069A (en) * 2019-07-31 2019-10-29 中国工商银行股份有限公司 The method, apparatus of data check calculates equipment and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483467A (en) * 2017-08-31 2017-12-15 四川长虹电器股份有限公司 The JSON message checking methods of Internet interface service
CN110390069A (en) * 2019-07-31 2019-10-29 中国工商银行股份有限公司 The method, apparatus of data check calculates equipment and medium

Also Published As

Publication number Publication date
CN111106899A (en) 2020-05-05

Similar Documents

Publication Publication Date Title
CN111106899B (en) Data verification method and device in Internet of things, computer equipment and storage medium
US9449329B2 (en) Enterprise architecture system and method
CN111080270A (en) Collaborative system application design method, system, device, server and storage medium
CN108875757B (en) Information auditing method, server and system
CN110599354B (en) Online checking method, online checking system, computer device and computer readable storage medium
CN109726108B (en) Front-end code testing method, device, system and medium based on analog data
CN111290742A (en) Parameter verification method and device, electronic equipment and readable storage medium
CN111124917B (en) Method, device, equipment and storage medium for managing and controlling public test cases
WO2022095357A1 (en) Artificial intelligence-based intelligent associated reply method and apparatus, and computer device
CN112328619A (en) Data quality monitoring method, device, system, electronic device and storage medium
CN107133233B (en) Processing method and device for configuration data query
CN110716743B (en) Aggregation API development method and system suitable for multiparty collaborative development
CN110222323A (en) A kind of voucher generation method, device, readable storage medium storing program for executing and terminal device
CN114025027B (en) Method and device for running data transmission script, storage medium and electronic device
CN112395339B (en) Intersystem data admission verification method, device, computer equipment and storage medium
CN113868498A (en) Data storage method, electronic device, device and readable storage medium
CN116719817B (en) Digital object relationship tracing method and system for technological resources
CN113360353A (en) Test server and cloud platform
CN110516258B (en) Data verification method and device, storage medium and electronic device
EP3867833A1 (en) Real-time workflow tracking
CN113467782B (en) Method, device and equipment for determining business process
CN114968822A (en) Interface testing method and device, computer equipment and storage medium
CN110888811B (en) Code coverage rate information processing method and device, electronic equipment and medium
CN113791766A (en) Method for combining data interfaces, electronic device and readable storage medium
CN115017185A (en) Data processing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Shan Hongjie

Inventor after: Ming Lang

Inventor after: Yu Haifeng

Inventor before: Shan Hongjie

Inventor before: Ming Lang

GR01 Patent grant
GR01 Patent grant