CN108762824A - A kind of apparatus logic processing method and processing device based on configuration file - Google Patents

A kind of apparatus logic processing method and processing device based on configuration file Download PDF

Info

Publication number
CN108762824A
CN108762824A CN201810348997.8A CN201810348997A CN108762824A CN 108762824 A CN108762824 A CN 108762824A CN 201810348997 A CN201810348997 A CN 201810348997A CN 108762824 A CN108762824 A CN 108762824A
Authority
CN
China
Prior art keywords
internet
information
configuration
equipment
configuration file
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.)
Pending
Application number
CN201810348997.8A
Other languages
Chinese (zh)
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.)
Qingdao Haier Technology Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN201810348997.8A priority Critical patent/CN108762824A/en
Publication of CN108762824A publication Critical patent/CN108762824A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Abstract

The apparatus logic processing method and processing device based on configuration file that the invention discloses a kind of, by loading the corresponding configuration file of Internet of Things equipment and obtaining the configuration content of the configuration file;The apparatus logic that the Internet of Things equipment is determined according to the configuration content, to provide a user the corresponding functional information of Internet of Things equipment.Scheme of the present invention, the apparatus logic information of equipment is described by the configuration file convenient for computer analyzing, configuration file is taken into account can readability and enforceability, understand equipment functionally and logically convenient for developer, the configuration file of each Internet of Things equipment need not be encoded before access Internet of Things equipment, terminal only needs the resolver for providing parsing configuration file that can run property connection equipment, so that Internet of Things equipment shows consistent result on different terminal platforms, reduce the workload of exploitation, improves working efficiency.

Description

A kind of apparatus logic processing method and processing device based on configuration file
Technical field
The present invention relates to internet of things field more particularly to a kind of apparatus logic processing method based on configuration file and Device.
Background technology
Internet of Things (Internet of Things) is one of current most popular technology.Each manufacturer is all actively promoting The intelligence of traditional equipment, these equipment that can access internet are referred to as Internet of Things equipment.Realize terminal and Internet of Things equipment Communication, it is desirable to a set of agreement connects them.Understand the function of equipment and various places in order to facilitate developer Manage logic, at present more widespread practice be first take one be easy to read illustrate document to describe the relevant information of equipment, Such as:Device attribute, control instruction and constraints etc..It then will be described in this document by the developer of different terminals platform The form of content code writes out so that terminal can be run.For example, in order to make people whenever and wherever possible can be with Internet of Things Equipment interacts, and the APP on mobile phone comes into being.At present when developing a cell phone application, if it is desired to access one Internet of Things equipment, it will usually that first takes equipment illustrates document, this illustrates to describe equipment in document for which attribute, alarm, Dependence mutex relation between control instruction and these contents etc..Then different platform is (such as:Android, iOS, Web etc.) Developer can realize the apparatus logic described in document using different programming languages, this has resulted in overlapping development, And it may be because and inconsistent operation result is caused to the difference that document understands.
Although what current this natural language was write illustrates that document can help developer to understand the function of equipment and patrol Volume, but its shortcoming is that cannot easily be identified by computer, it is therefore desirable to being translated into computer by developer can The code of operation.And the terminal platform for being currently available for control Internet of Things equipment has the programming language much used also different, institute To need to carry out primary translation coding work for each platform, this can consume a large amount of manpower and materials.If there is multiple exploitations Personnel access same model device for different platforms simultaneously, as the personal deviation understood document, causes equipment to exist Performance on each platform is inconsistent.
Invention content
The present invention provides a kind of apparatus logic processing method and processing device based on configuration file, to solve in the prior art Description apparatus logic illustrates that document cannot be identified by computer, needs to use different programming languages in different terminal platforms To realize the problem of illustrating the apparatus logic described in document.
One side according to the present invention provides a kind of write method of configuration file, including:
Obtain facility information;
The characteristic information of Internet of Things equipment is determined according to the facility information;
The configuration content of configuration file is built by the characteristic information, and the format of the configuration content is arranged to count The data structure that calculation machine can directly be understood;
The configuration content includes one or more in following content:Device attribute information, equipment alarm information, equipment Group command operation information and apparatus logic corrector array.
Optionally,
The device attribute information, the status information for describing the Internet of Things equipment;
The equipment alarm information, for describing the Internet of Things equipment alarm information;
The equipment group command operation information, for determining the instruction code for being handed down to the Internet of Things equipment;
The apparatus logic corrector array, for describing the restriction relation between the device attribute information.
Optionally, after the configuration content that configuration file is built by the characteristic information, including:
It is used as the file of the configuration file by the summary info that preset algorithm model determines to the configuration content Signature, the file signature are used to verify the integrality of the configuration file.
Optionally, the format of the configuration content includes Object Markup Language JSON data interchange formats.
The second aspect according to the present invention provides a kind of apparatus logic processing method based on configuration file, including:
The corresponding configuration file of load Internet of Things equipment and the configuration content for obtaining the configuration file, the configuration content packet It includes one or more in following content:Device attribute information, equipment alarm information, equipment group command operation information and equipment are patrolled Collect corrector array;
The apparatus logic that the Internet of Things equipment is determined according to the configuration content, to provide a user the Internet of Things equipment phase The functional information answered.
Optionally, before the apparatus logic that the Internet of Things equipment is determined according to the configuration content, including:
The configuration content is written in the data information that the Internet of Things equipment is reported, to update the configuration content, and will The data information that the Internet of Things equipment reports feeds back to user.
Optionally, when the configuration content includes the device attribute information and the apparatus logic corrector array, After updating the configuration content, further include:
The logic corrector array is traversed according to the device attribute information in the updated configuration content, if The updated device attribute information meets the trigger condition of any corrector in the logic corrector array, then holds successively The specified amendment operation of the row corrector;And the data information that reports the Internet of Things equipment and pass through the corrector amendment The data information crossed feeds back to user.
Optionally, when the configuration content includes the equipment group command operation information, further include:
According to the equipment group command operation information in the configuration content, it converts the operational order of user to Internet of Things The acceptable instruction code of equipment.
In terms of third according to the present invention, a kind of device of writing of configuration file is provided, including:
Acquisition module, for obtaining facility information;
Determining module, the characteristic information for determining Internet of Things equipment according to the facility information;
Module is built, for the configuration content by characteristic information structure configuration file, and by the configuration content Format be arranged to the data structure that computer can directly be understood;The configuration content includes one kind or more in following content Kind:Device attribute information, equipment alarm information, equipment group command operation information and apparatus logic corrector array.
Optionally, further include:
Signature blocks, for the configuration content by the summary info that preset algorithm model determines be used as described in match The file signature of file is set, the file signature is used to verify the integrality of the configuration file.
The 4th aspect according to the present invention, provides a kind of apparatus logic processing unit based on configuration file, including:
Load-on module, for loading the corresponding configuration file of Internet of Things equipment and obtaining the configuration content of the configuration file, The configuration content includes one or more in following content:Device attribute information, equipment alarm information, equipment group command behaviour Make information and apparatus logic corrector array;
Data interaction module determines the apparatus logic of the Internet of Things equipment according to the configuration content, to provide a user The corresponding functional information of Internet of Things equipment.
Optionally, further include:
Update module, the configuration content is written in the data information for reporting the Internet of Things equipment, described in update Content is configured, and the data information that the Internet of Things equipment reports is fed back into user.
Optionally, further include:
Correcting module, for traversing the logic according to the device attribute information in the updated configuration content Corrector array, if the updated device attribute information meets the triggering of any corrector in the logic corrector array Condition then executes the specified amendment operation of the corrector successively;And the data information and process for reporting the Internet of Things equipment The corrected data information of corrector feeds back to user.
Optionally, the data interaction module is additionally operable to according to the equipment group command operation letter in the configuration content Breath, converts the operational order of user to the acceptable instruction code of Internet of Things equipment.
The 5th aspect according to the present invention, provides a kind of computer readable storage medium, is stored on the storage medium The step of having computer program, following method is realized when described program is executed by processor:
Obtain facility information;
The characteristic information of Internet of Things equipment is determined according to the facility information;
The configuration content of configuration file is built by the characteristic information, and the format of the configuration content is arranged to count The data structure that calculation machine can directly be understood.
According to the present invention the 6th aspect, provides a kind of computer equipment, including memory, processor and is stored in institute The computer program that can be run on memory and on the processor is stated, the processor is realized as follows when executing described program The step of method:
Obtain facility information;
The characteristic information of Internet of Things equipment is determined according to the facility information;
The configuration content of configuration file is built by the characteristic information, and the format of the configuration content is arranged to count The data structure that calculation machine can directly be understood.
The 7th aspect according to the present invention, provides a kind of computer readable storage medium, is stored on the storage medium The step of having computer program, following method is realized when described program is executed by processor:
The corresponding configuration file of load Internet of Things equipment and the configuration content for obtaining the configuration file, the configuration content packet It includes one or more in following content:Device attribute information, equipment alarm information, equipment group command operation information and equipment are patrolled Collect corrector array;
The apparatus logic that the Internet of Things equipment is determined according to the configuration content, to provide a user the Internet of Things equipment phase The functional information answered.
According to the present invention the 8th aspect, provides a kind of computer equipment, including memory, processor and is stored in institute The computer program that can be run on memory and on the processor is stated, the processor is realized as follows when executing described program The step of method:
The corresponding configuration file of load Internet of Things equipment and the configuration content for obtaining the configuration file, the configuration content packet It includes one or more in following content:Device attribute information, equipment alarm information, equipment group command operation information and equipment are patrolled Collect corrector array;
The apparatus logic that the Internet of Things equipment is determined according to the configuration content, to provide a user the Internet of Things equipment phase The functional information answered.
Beneficial effects of the present invention are:
Scheme of the present invention describes the apparatus logic information of equipment by the configuration file convenient for computer analyzing, Configuration file take into account can readability and enforceability, understand equipment functionally and logically convenient for developer, access Internet of Things equipment Preceding to be encoded to the configuration file of each Internet of Things equipment, terminal only needs to provide to parse to match for property connection equipment Setting the resolver of file can run so that Internet of Things equipment shows consistent as a result, reducing on different terminal platforms The workload of exploitation improves working efficiency.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technical means of the present invention, And can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, below the special specific implementation mode for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is that configuration file writes flow chart in one embodiment of the invention;
Fig. 2 is the apparatus logic process chart based on configuration file in one embodiment of the invention;
Fig. 3 is the apparatus logic processing system frame diagram based on configuration file in one embodiment of the invention;
Fig. 4 is the structure diagram for writing device of configuration file in one embodiment of the invention;
Fig. 5 is the structure diagram of the apparatus logic processing unit based on configuration file in one embodiment of the invention.
In figure:11- acquisition modules, 12- determining modules, 13- build module, 14- signature blocks, 21- load-on modules, 22- Data interaction module, 23- update modules, 24- correcting modules.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
Fig. 1 is referred to, in the first embodiment of the present invention, provides a kind of write method of configuration file, including as follows Step:
Step S101:Obtain facility information;
Step S102:The characteristic information of Internet of Things equipment is determined according to facility information;
Step S103:The configuration content of configuration file is built by characteristic information, and the format for configuring content is arranged to The data structure that computer can directly be understood.
Optionally, the format for configuring content includes Object Markup Language JSON data interchange formats.
It includes one or more in following content to configure content:Device attribute information, equipment alarm information, equipment group life Enable operation information and apparatus logic corrector array.
Optionally, device attribute information, the status information for describing Internet of Things equipment;Equipment alarm information, for describing Internet of Things equipment alarm information;Equipment group command operation information, for determining the instruction code for being handed down to Internet of Things equipment;The equipment Logic corrector array, for describing the restriction relation between device attribute information.In a preferred embodiment, it configures in content Each information can be adjusted according to the actual conditions of Internet of Things equipment, without being determined if Internet of Things equipment does not have relevant information The process of these information, if any Internet of Things equipment do not receive the function of instruction, at this time, it is not necessary to create and set in configuration file This configuration content of standby group command operation information.
Optionally, after the configuration content of configuration file being built by characteristic information, including:
It is used as the file signature of configuration file, file by the summary info that preset algorithm model determines to configuration content The integrality signed for verifying configuration file.
Through the embodiment of the present invention, when realizing the communication of terminal and Internet of Things equipment, the terminal platform is to all Internet of Things Equipment need to only provide the resolver of terminal platform itself to be parsed to corresponding configuration file, not need developer The work of translation coding is carried out to the corresponding configuration file of Internet of Things equipment, it can be ensured that same Internet of Things equipment is in different terminals platform On performance it is consistent, avoid overlapping development, improve work efficiency.
Fig. 1 is referred to, in the second embodiment of the present invention, provides a kind of write method of configuration file, including as follows Step:
Step S101:Obtain facility information;
Step S102:The characteristic information of Internet of Things equipment is determined according to facility information;
Step S103:The configuration content of configuration file is built by characteristic information, and the format for configuring content is arranged to The data structure that computer can directly be understood.In this way, when realizing the communication of terminal and Internet of Things equipment, the terminal platform is to all Internet of Things equipment only need to run corresponding configuration file by the resolver of terminal platform itself, do not need developer into The work of row translation coding, it can be ensured that performance of the same Internet of Things equipment on different terminals platform is consistent, improves work Efficiency.
All information, including attribute, alarm, restriction relation etc. that facility information can be used when being included in exploitation.
It includes one or more in following content to configure content:Device attribute information, equipment alarm information, equipment group life Enable operation information and apparatus logic corrector array.Configure each information in content can according to the actual conditions of Internet of Things equipment into Row adjustment, if Internet of Things equipment does not have relevant information can not have to determine the relevant information, if any Internet of Things equipment do not connect The function of instruction is received, at this time, it is not necessary to this configuration content of establishment equipment group command operation information in configuration file.
For the characteristic information determined in step S102, the configuration content such as device attribute information of configuration file is built, With regard to needing to determine whether default value, the attribute value of attribute are writeable, whether attribute value is readable, attribute according to the attribute of facility information Can value range, property operations the characteristic informations such as command type, it should be understood by those skilled in the art that can be according to Internet of Things equipment Practical situation determines relevant characteristic information, does not just enumerate herein.
Preferably, when writing configuration file, the format of configuration file is also predefined, including file is carried out to configuration file Signature and the format for determining configuration content.Preferably, to verify the integrality of configuration file, configuration text is built by characteristic information After the configuration content of part, file signature is carried out to configuration file, including:
It is used as the file signature of configuration file, file by the summary info that preset algorithm model determines to configuration content The integrality signed for verifying configuration file.
In a preferred embodiment, the signature rule for file signature being carried out to configuration file is to use SHA- to configuration content 256 algorithm models calculate the summary info in configuration content, then by calculated summary info switch to the 16 of small letter into Text processed, the summary info of hexadecimal text occupy the length of 64 byte of configuration file.If having modification in configuration, again Calculate the signature, to ensure the integrality of configuration file.
In the preferred embodiment of the present invention, the format for configuring content includes Object Markup Language JSON data interchange formats.With The data interchange format of Object Markup Language JSON is basic structure, integrally regard configuration content as a JS object, JS objects Including at least device attribute information, equipment alarm information, equipment group command operation information and apparatus logic corrector array, also wrap Include metadata, equipment essential information, wherein metadata includes some description informations to the configuration file, as configuration file is worked as The preceding imprint for including resolver such as illustrates the resolver minimal version that the configuration file uses.Equipment essential information includes The characteristic informations such as model, type, manufacturer, the connection type (WiFi, bluetooth, cellular network, ZigBee) of equipment.Then basis Object Markup Language JSON data interchange formats configure the format of content to be arranged, such as by device attribute information according to the key of JSON Value indicates each characteristic information of device attribute information with corresponding key name, and determine the value of each characteristic information to structure Type, such as the default value of attribute is indicated with key name defaultvalue, whether attribute value is writeable is indicated with key name writable, The key name is explained with natural language simultaneously, in order to which developer reads, specific format description refers to table 1, Those skilled in the art are it should be understood that the format of other configurations contents is also arranged in this way, and details are not described herein.
The format description of 1 device attribute information of table
Preferably, configuration content includes metadata, equipment essential information, device attribute information, equipment alarm information, equipment When group command operation information and apparatus logic corrector array, the format of each configuration content is arranged in the way of table 1, This is repeated no more, at this point, the content of file signature includes:
MetaData- metadata informations;
BaseInfo- equipment essential informations;
Attributes- device attribute informations:
ValueRange- attributes can value range;
DataList- list types;
DataStep- stepper types;
DataTime- time types;
Alarms- equipment alarm information;
GroupCommand- equipment group command operation information;
Modifiers- apparatus logic corrector arrays:
Modifier- correctors;
Trigger- triggers;
Action- corrects operation.
As it can be seen that the embodiment of the present invention passes through determining configuration file so that the description standard of apparatus logic need not be opened Hair personnel carry out the work of translation coding, reduce workload, moreover it is possible to ensure what Internet of Things equipment showed on different terminals platform Function is consistent, reduces development cost and maintenance difficulties.
Fig. 2 is referred to, in the third embodiment of the present invention, provides a kind of apparatus logic processing side based on configuration file Method includes the following steps:
Step S201:The corresponding configuration file of load Internet of Things equipment and the configuration content for obtaining configuration file, configure content Including one or more in following content:Device attribute information, equipment alarm information, equipment group command operation information and equipment Logic corrector array;
Step S202:The apparatus logic of Internet of Things equipment is determined according to configuration content, it is corresponding to provide a user Internet of Things equipment Functional information.
Since the corresponding configuration file of Internet of Things equipment describes the armamentarium logical message of Internet of Things equipment, so terminal is flat Platform uses the apparatus logic processing method in the embodiment of the present invention that can be provided a user according to the configuration content in configuration file The corresponding function of Internet of Things equipment, avoid translation cataloged procedure causes Internet of Things to set the understanding deviation of document due to personal The standby function on each platform shows inconsistent problem, improves work efficiency.
Optionally, before the apparatus logic that Internet of Things equipment is determined according to configuration content, including:
The data information write-in configuration content that Internet of Things equipment is reported, to update configuration content, and Internet of Things equipment is reported Data information feed back to user.
The actual equipment of Internet of Things equipment will be obtained after configuring content update according to the data information of Internet of Things equipment real-time report Logical message greatly reduces developer in this way, determining the apparatus logic of Internet of Things equipment according to updated configuration content Workload, and after the data information that Internet of Things equipment reports is fed back to user, user knows that configuration content is changed, User in this way can timely update interface in the terminal that it is held, and then establish effective prison in user and Internet of Things equipment room Listen mechanism.
Preferably, if can also obtain the correlation function of Internet of Things equipment according to the initial data in configuration file, the step It can be without.
Optionally, when configuration content includes device attribute information and apparatus logic corrector array, content is configured in update Afterwards, further include:
Logic corrector array is traversed according to the device attribute information in updated configuration content, if updated equipment Attribute information meets the trigger condition of any corrector in logic corrector array, then executes the specified amendment behaviour of corrector successively Make;And the data information and the process corrected data information of corrector that Internet of Things equipment reports are fed back into user.
That is, when the data in updated device attribute information meet the trigger condition of corresponding corrector, just The specified amendment operation of the corrector is executed successively, is such as changed the value range of some attribute, is changed whether attribute is writeable, is arranged The default value etc. of attribute goes manual correction related data without developer.And it by data information that Internet of Things equipment reports and repaiies The data information just crossed feeds back to user, to establish effective monitoring mechanism in user and Internet of Things equipment room.
Optionally, when configuration content includes equipment group command operation information, further include:
According to the equipment group command operation information in configuration content, converting the operational order of user to Internet of Things equipment can connect The instruction code received.
It is real according to Internet of Things equipment to convert the operational order of user to this process of the acceptable instruction code of Internet of Things equipment Border situation carries out, and the initial data in equipment group command operation information can be used carrying out conversion process, also can be according to Internet of Things The data information that equipment newly reports carries out the data after equipment group command operation information update, it should be noted that the conversion The premise that process can be performed, which is Internet of Things equipment, to be had the function of receiving instruction, to realize user between Internet of Things equipment Interactive process.
Preferably, Fig. 3 is referred to, the processing system of apparatus logic includes mainly:Internet of Things equipment, configuration file and terminal solution Parser, terminal resolver such as iOS resolvers, Android resolvers, Web resolvers etc., the equipment of Internet of Things equipment is patrolled in this system It collects and is all described in configuration file, each resolver is according to the configuration content in configuration file, so that it may be carried to user It converts the operational order of user to equipment receivable instruction generation for the corresponding function of Internet of Things equipment, while according to configuration file Code so that the function that an Internet of Things equipment shows on different terminals can be consistent.
As it can be seen that the embodiment of the present invention is convenient for the configuration file of computer analyzing by processing, simplifies terminal and Internet of Things are set Communication process between standby so that, need not be to the configuration of each Internet of Things equipment when terminal obtains the apparatus logic of Internet of Things equipment File exclusively carries out coding, reduces the workload of exploitation, improves working efficiency.
Fig. 2 is referred to, in the fourth embodiment of the present invention, provides a kind of apparatus logic processing side based on configuration file Method includes the following steps:
Step S201:The corresponding configuration file of load Internet of Things equipment and the configuration content for obtaining configuration file, configure content Including one or more in following content:Device attribute information, equipment alarm information, equipment group command operation information and equipment Logic corrector array;
Step S202:The apparatus logic of Internet of Things equipment is determined according to configuration content, it is corresponding to provide a user Internet of Things equipment Functional information.
Above-mentioned steps of embodiment of the present invention S201 and step S202 are completed by preset logic engine, to make the present embodiment Processing procedure it is clearer, it is preferred that for configuring content and include device attribute information and apparatus logic corrector array To be described further to the apparatus logic processing procedure based on configuration file, it should be noted that in order to ensure load It is the configuration file of specified Internet of Things equipment, general configure in content further includes describing the characteristic informations such as unit type, type Equipment essential information, therefore, apparatus logic process flow of the embodiment of the present invention is as follows:
Step 1:Loading configuration file, logic engine load the configuration text of corresponding Internet of Things equipment according to equipment essential information Part, and be created that device attribute information, apparatus logic corrector array etc.;
Step 2:Device attribute information is updated, obtains the data information that Internet of Things equipment reports, logic engine is according to configuration text The device attribute information determined in part, will be in newest data information write device attribute information;
Step 3:Logic corrector array is traversed according to updated attribute value in device attribute information, when updated category When property value meets the trigger condition of some corrector, 4 are thened follow the steps, it is no to then follow the steps 5;
Step 4:Logic engine executes each amendment operation for the corrector being triggered successively, such as changes taking for some attribute It is worth range, whether modification attribute is writeable, the default value to set a property;
Step 5:Data information and the process corrected data information of corrector that Internet of Things equipment reports are returned into user.
The embodiment of the present invention handles configuration file by logic engine, and different platform need to only realize the parsing of configuration file The configuration file of device, an Internet of Things equipment can show consistent as a result, realizing terminal and object on different platforms Join the communication between equipment so that, need not be to the configuration of each Internet of Things equipment when terminal obtains the apparatus logic of Internet of Things equipment File is encoded, moreover it is possible to which it is for reference to provide the real-time data information of Internet of Things equipment to the user, in user and Internet of Things equipment Between establish effective monitoring mechanism, preferably to control the device-dependent function of Internet of Things, reduce the workload of exploitation, Improve working efficiency.
Fig. 4 is referred to, in the fifth embodiment of the present invention, provides a kind of device of writing of configuration file, including:
Acquisition module 11, for obtaining facility information;
Determining module 12, the characteristic information for determining Internet of Things equipment according to facility information;
Module 13 is built, the configuration content for building configuration file by characteristic information, and the format that content will be configured It is arranged to the data structure that computer can directly be understood;It includes one or more in following content to configure content:Device attribute Information, equipment alarm information, equipment group command operation information and apparatus logic corrector array.
Optionally, further include:
Signature blocks 14, for being used as configuration file by the summary info that preset algorithm model determines to configuration content File signature, file signature is used to verify the integrality of the configuration file.
Fig. 5 is referred to, in the sixth embodiment of the present invention, provides a kind of apparatus logic processing based on configuration file Device, including:
Load-on module 21 is matched for loading the corresponding configuration file of Internet of Things equipment and obtaining the configuration content of configuration file It includes one or more in following content to set content:Device attribute information, equipment alarm information, equipment group command operation information And apparatus logic corrector array;
Data interaction module 22 determines the apparatus logic of Internet of Things equipment according to configuration content, is set with providing a user Internet of Things Standby corresponding functional information.
Optionally, further include:
Update module 23, the data information write-in configuration content for reporting Internet of Things equipment, to update configuration content, and The data information that Internet of Things equipment reports is fed back into user.
Optionally, device further includes:
Correcting module 24, for traversing logic corrector number according to the device attribute information in updated configuration content Group executes successively if updated device attribute information meets the trigger condition of any corrector in logic corrector array The specified amendment operation of corrector;And the data information and the process corrected data information of corrector for reporting Internet of Things equipment are anti- Feed user.
Optionally, if Internet of Things equipment has the function of receiving instruction, data interaction module 22 is additionally operable to according in configuration Equipment group command operation information in appearance converts the operational order of user to the acceptable instruction code of Internet of Things equipment.
Fig. 1 is referred to, in the seventh embodiment of the present invention, provides a kind of computer readable storage medium, storage medium On the step of being stored with computer program, following method is realized when program is executed by processor:
Step S101:Obtain facility information;
Step S102:The characteristic information of Internet of Things equipment is determined according to facility information;
Step S103:The configuration content of configuration file is built by characteristic information, and the format for configuring content is arranged to The data structure that computer can directly be understood.
It includes one or more in following content to configure content:Device attribute information, equipment alarm information, equipment group life Enable operation information and apparatus logic corrector array.
Optionally, after the configuration content of configuration file being built by characteristic information, which realizes when being executed by processor The step of following method:
It is used as the file signature of configuration file, file by the summary info that preset algorithm model determines to configuration content The integrality signed for verifying configuration file.
Fig. 1 is referred to, in the eighth embodiment of the present invention, provides a kind of computer equipment, including memory, processor And the computer program that can be run on a memory and on a processor is stored, processor realizes following method when executing program Step:
Step S101:Obtain facility information;
Step S102:The characteristic information of Internet of Things equipment is determined according to facility information;
Step S103:The configuration content of configuration file is built by characteristic information, and the format for configuring content is arranged to The data structure that computer can directly be understood.
It includes one or more in following content to configure content:Device attribute information, equipment alarm information, equipment group life Enable operation information and apparatus logic corrector array.
Optionally, after the configuration content of configuration file being built by characteristic information, processor is realized as follows when executing program The step of method:
It is used as the file signature of configuration file, file by the summary info that preset algorithm model determines to configuration content The integrality signed for verifying configuration file.
Fig. 2 is referred to, in the ninth embodiment of the present invention, provides a kind of computer readable storage medium, storage medium On the step of being stored with computer program, following method is realized when program is executed by processor:
Step S201:The corresponding configuration file of load Internet of Things equipment and the configuration content for obtaining configuration file, configure content Including one or more in following content:Device attribute information, equipment alarm information, equipment group command operation information and equipment Logic corrector array;
Step S202:The apparatus logic of Internet of Things equipment is determined according to configuration content, it is corresponding to provide a user Internet of Things equipment Functional information.
Optionally, it before the apparatus logic that Internet of Things equipment is determined according to configuration content, is realized such as when program is executed by processor The step of lower method:
The data information write-in configuration content that Internet of Things equipment is reported, to update configuration content, and Internet of Things equipment is reported Data information feed back to user.
Optionally, when configuration content includes device attribute information and apparatus logic corrector array, content is configured in update Afterwards, the step of following method is also realized when program is executed by processor:
Logic corrector array is traversed according to the device attribute information in updated configuration content, if updated equipment Attribute information meets the trigger condition of any corrector in logic corrector array, then executes the specified amendment behaviour of corrector successively Make;And the data information and the process corrected data information of corrector that Internet of Things equipment reports are fed back into user.
Optionally, it is also realized when configuration content includes equipment group command operation information, when program is executed by processor as follows The step of method:
According to the equipment group command operation information in configuration content, converting the operational order of user to Internet of Things equipment can connect The instruction code received.
Refer to Fig. 2, in the tenth embodiment of the present invention, provide a kind of computer equipment, including memory, processor and The computer program that can be run on a memory and on a processor is stored, processor realizes the step of following method when executing program Suddenly:
Step S201:The corresponding configuration file of load Internet of Things equipment and the configuration content for obtaining configuration file, configure content Including one or more in following content:Device attribute information, equipment alarm information, equipment group command operation information and equipment Logic corrector array;
Step S202:The apparatus logic of Internet of Things equipment is determined according to configuration content, it is corresponding to provide a user Internet of Things equipment Functional information.
Optionally, before the apparatus logic that Internet of Things equipment is determined according to configuration content, processor is realized as follows when executing program The step of method:
The data information write-in configuration content that Internet of Things equipment is reported, to update configuration content, and Internet of Things equipment is reported Data information feed back to user.
Optionally, when configuration content includes device attribute information and apparatus logic corrector array, content is configured in update Afterwards, the step of realizing following method when processor executes program:
Logic corrector array is traversed according to the device attribute information in updated configuration content, if updated equipment Attribute information meets the trigger condition of any corrector in logic corrector array, then executes the specified amendment behaviour of corrector successively Make;And the data information and the process corrected data information of corrector that Internet of Things equipment reports are fed back into user.
Optionally, when configuration content includes equipment group command operation information, processor realizes following method when executing program The step of:
According to the equipment group command operation information in configuration content, converting the operational order of user to Internet of Things equipment can connect The instruction code received.
Obviously, scheme of the present invention describes the apparatus logic of equipment by the configuration file convenient for computer analyzing Information, configuration file take into account can readability and enforceability, equipment is understood functionally and logically convenient for developer, different Terminal platform need not realize the apparatus logic illustrated described in document using different programming languages, and terminal is for property Connection equipment only needs the resolver for providing parsing configuration file that can run so that Internet of Things equipment is opened up on different terminal platforms Reveal consistent as a result, reducing the workload of exploitation, improves working efficiency.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage Medium may include:ROM, RAM, disk or CD etc..
In short, the foregoing is merely illustrative of the preferred embodiments of the present invention, it is not intended to limit the scope of the present invention. All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should be included in the present invention's Within protection domain.

Claims (18)

1. a kind of write method of configuration file, which is characterized in that including:
Obtain facility information;
The characteristic information of Internet of Things equipment is determined according to the facility information;
The configuration content of configuration file is built by the characteristic information, and the format of the configuration content is arranged to computer The data structure that can directly understand;
The configuration content includes one or more in following content:Device attribute information, equipment alarm information, equipment group life Enable operation information and apparatus logic corrector array.
2. the write method of configuration file as described in claim 1, which is characterized in that
The device attribute information, the status information for describing the Internet of Things equipment;
The equipment alarm information, for describing the Internet of Things equipment alarm information;
The equipment group command operation information, for determining the instruction code for being handed down to the Internet of Things equipment;
The apparatus logic corrector array, for describing the restriction relation between the device attribute information.
3. the write method of configuration file as described in claim 1, which is characterized in that described to be built by the characteristic information After the configuration content of configuration file, including:
It is used as the file signature of the configuration file by the summary info that preset algorithm model determines to the configuration content, The file signature is used to verify the integrality of the configuration file.
4. the write method of configuration file as described in claim 1, which is characterized in that the format of the configuration content includes pair As markup language JSON data interchange formats.
5. a kind of apparatus logic processing method based on configuration file, which is characterized in that including:
The corresponding configuration file of load Internet of Things equipment and the configuration content for obtaining the configuration file, the configuration content include such as It is one or more in lower content:Device attribute information, equipment alarm information, equipment group command operation information and apparatus logic are repaiied Positive device array;
The apparatus logic of the Internet of Things equipment is determined according to the configuration content, it is corresponding to provide a user the Internet of Things equipment Functional information.
6. the apparatus logic processing method based on configuration file as claimed in claim 5, which is characterized in that described in the basis Before configuration content determines the apparatus logic of the Internet of Things equipment, including:
The configuration content is written in the data information that the Internet of Things equipment is reported, to update the configuration content, and will be described The data information that Internet of Things equipment reports feeds back to user.
7. the apparatus logic processing method of Internet of Things equipment as claimed in claim 6, which is characterized in that the configuration content includes When the device attribute information and the apparatus logic corrector array, after updating the configuration content, further include:
The logic corrector array is traversed according to the device attribute information in the updated configuration content, if update The device attribute information afterwards meets the trigger condition of any corrector in the logic corrector array, then executes institute successively State the specified amendment operation of corrector;And the data information and the process corrector for reporting the Internet of Things equipment are corrected Data information feeds back to user.
8. such as the apparatus logic processing method described in claim 5 or 6 based on configuration file, which is characterized in that the configuration When content includes the equipment group command operation information, further include:
According to the equipment group command operation information in the configuration content, it converts the operational order of user to Internet of Things equipment Acceptable instruction code.
9. a kind of configuration file writes device, which is characterized in that including:
Acquisition module, for obtaining facility information;
Determining module, the characteristic information for determining Internet of Things equipment according to the facility information;
Build module, for by the characteristic information build configuration file configuration content, and by it is described configure content lattice Formula is arranged to the data structure that computer can directly be understood;The configuration content includes one or more in following content:If Standby attribute information, equipment alarm information, equipment group command operation information and apparatus logic corrector array.
10. configuration file as claimed in claim 9 writes device, which is characterized in that further include:
Signature blocks, for being used as the configuration text by the summary info that preset algorithm model determines to the configuration content The file signature of part, the file signature are used to verify the integrality of the configuration file.
11. a kind of apparatus logic processing unit based on configuration file, which is characterized in that including:
Load-on module, it is described for loading the corresponding configuration file of Internet of Things equipment and obtaining the configuration content of the configuration file It includes one or more in following content to configure content:Device attribute information, equipment alarm information, equipment group command operation letter Breath and apparatus logic corrector array;
Data interaction module determines the apparatus logic of the Internet of Things equipment according to the configuration content, described to provide a user The corresponding functional information of Internet of Things equipment.
12. the apparatus logic processing unit based on configuration file as claimed in claim 11, which is characterized in that further include:
Update module, the configuration content is written in the data information for reporting the Internet of Things equipment, to update the configuration Content, and the data information that the Internet of Things equipment reports is fed back into user.
13. the apparatus logic processing unit of Internet of Things equipment as claimed in claim 12, which is characterized in that further include:
Correcting module, for traversing the logic amendment according to the device attribute information in the updated configuration content Device array, if the updated device attribute information meets the triggering item of any corrector in the logic corrector array Part then executes the specified amendment operation of the corrector successively;And the data information that reports the Internet of Things equipment and pass through institute It states the corrected data information of corrector and feeds back to user.
14. the apparatus logic processing unit based on configuration file as claimed in claim 11, which is characterized in that the data are handed over Mutual module is additionally operable to, according to the equipment group command operation information in the configuration content, convert the operational order of user to The acceptable instruction code of Internet of Things equipment.
15. computer readable storage medium, which is characterized in that be stored with computer program, described program on the storage medium The step of any one of Claims 1-4 the method is realized when being executed by processor.
16. a kind of computer equipment, which is characterized in that including memory, processor and be stored on the memory and can be The computer program run on the processor, the processor are realized any one in Claims 1-4 when executing described program The step of item the method.
17. computer readable storage medium, which is characterized in that be stored with computer program, described program on the storage medium The step of any one of claim 5 to 8 the method is realized when being executed by processor.
18. a kind of computer equipment, which is characterized in that including memory, processor and be stored on the memory and can be The computer program run on the processor, the processor are realized any one in claim 5 to 8 when executing described program The step of item the method.
CN201810348997.8A 2018-04-18 2018-04-18 A kind of apparatus logic processing method and processing device based on configuration file Pending CN108762824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810348997.8A CN108762824A (en) 2018-04-18 2018-04-18 A kind of apparatus logic processing method and processing device based on configuration file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810348997.8A CN108762824A (en) 2018-04-18 2018-04-18 A kind of apparatus logic processing method and processing device based on configuration file

Publications (1)

Publication Number Publication Date
CN108762824A true CN108762824A (en) 2018-11-06

Family

ID=64011375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810348997.8A Pending CN108762824A (en) 2018-04-18 2018-04-18 A kind of apparatus logic processing method and processing device based on configuration file

Country Status (1)

Country Link
CN (1) CN108762824A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825453A (en) * 2019-10-25 2020-02-21 中盈优创资讯科技有限公司 Data processing method and device based on big data platform
CN112422380A (en) * 2020-11-18 2021-02-26 青岛海尔科技有限公司 Target device control method and device, storage medium and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035016A (en) * 2007-02-08 2007-09-12 中兴通讯股份有限公司 Terminal equipment configuration system and method
CN102693235A (en) * 2011-03-23 2012-09-26 鸿富锦精密工业(深圳)有限公司 Information notification device and method of altered equipment configuration file
US9122302B2 (en) * 2012-12-18 2015-09-01 Yue Huang Automatic garage door automatic monitoring and controlling system based on the internet of things concept and near field communication (NFC) technology
US20160065653A1 (en) * 2014-08-26 2016-03-03 Fujitsu Limited Internet of things (iot) device configuration construction
CN105630581A (en) * 2014-11-07 2016-06-01 南京南瑞继保电气有限公司 Task processing method and device, and computer storage medium
CN107239416A (en) * 2016-06-27 2017-10-10 陈淼波 The computer system and implementation method of unified abstract representation are provided for smart machine

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035016A (en) * 2007-02-08 2007-09-12 中兴通讯股份有限公司 Terminal equipment configuration system and method
CN102693235A (en) * 2011-03-23 2012-09-26 鸿富锦精密工业(深圳)有限公司 Information notification device and method of altered equipment configuration file
US9122302B2 (en) * 2012-12-18 2015-09-01 Yue Huang Automatic garage door automatic monitoring and controlling system based on the internet of things concept and near field communication (NFC) technology
US20160065653A1 (en) * 2014-08-26 2016-03-03 Fujitsu Limited Internet of things (iot) device configuration construction
CN105630581A (en) * 2014-11-07 2016-06-01 南京南瑞继保电气有限公司 Task processing method and device, and computer storage medium
CN107239416A (en) * 2016-06-27 2017-10-10 陈淼波 The computer system and implementation method of unified abstract representation are provided for smart machine
CN107247597A (en) * 2016-06-27 2017-10-13 陈淼波 A kind of device object that unified abstract representation is provided for smart machine

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825453A (en) * 2019-10-25 2020-02-21 中盈优创资讯科技有限公司 Data processing method and device based on big data platform
CN110825453B (en) * 2019-10-25 2023-12-05 中盈优创资讯科技有限公司 Data processing method and device based on big data platform
CN112422380A (en) * 2020-11-18 2021-02-26 青岛海尔科技有限公司 Target device control method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN102938800B (en) A kind of radio communication quality Auto-Test System and method
WO2020181599A1 (en) Model application method and system, and model management method and server
CN108683636B (en) Charging pile communication method and system
CN110012002A (en) Message parsing method, device and server, computer readable storage medium
CN110113220A (en) A kind of method of electric power Internet of Things end equipment plug and play
CN103176789A (en) Method and system used for realizing function extension of open platform
CN106707848A (en) Control program organization structure of control system and download method
CN112612535A (en) XML and JSON based satellite receiving system network communication coding and decoding engine method
CN108762824A (en) A kind of apparatus logic processing method and processing device based on configuration file
CN110995859A (en) Intelligent transformer substation supporting platform system based on ubiquitous Internet of things
CN109240732A (en) A kind of process method of combination based on elastic regulation
CN111585344A (en) Substation intelligent checking method and device based on total station IED simulation
CN107819611B (en) Client test method based on IEC61850 multi-server simulation
CN109117127A (en) Program code generation method, device and computer readable storage medium
CN103905233B (en) Realize method, system and the access network device of analog sensor plug and play
CN104090768A (en) Automatic intelligent smart phone form generating system and method
CN110286883B (en) Intelligent database coding monitoring method and device and electronic equipment
CN104507100B (en) A method of Zigbee network is managed using wireless terminal
CN105224420B (en) A kind of analysis method and system of automatic parsing terminal abnormal
CN107749814A (en) Running state data update method, device and the terminal of equipment
CN107168748A (en) A kind of method that multinomial upgrading task is realized by a upgrade file bag
CN110020432A (en) A kind of information processing method and information processing equipment
CN112333193B (en) Automatic protocol updating method and system
CN113220701A (en) Block chain-based data structure adaptive change upgrading method, device, equipment and product
CN107580070B (en) A kind of method, system and the relevant apparatus of the transmission of computer remote file

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181106

RJ01 Rejection of invention patent application after publication