CN115314329A - Attribute value conversion method and device, storage medium and electronic device - Google Patents

Attribute value conversion method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115314329A
CN115314329A CN202210764138.3A CN202210764138A CN115314329A CN 115314329 A CN115314329 A CN 115314329A CN 202210764138 A CN202210764138 A CN 202210764138A CN 115314329 A CN115314329 A CN 115314329A
Authority
CN
China
Prior art keywords
attribute values
attribute
target
execute
target operation
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
CN202210764138.3A
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
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210764138.3A priority Critical patent/CN115314329A/en
Publication of CN115314329A publication Critical patent/CN115314329A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network
    • H04L12/281Exchanging configuration information on appliance services in a home automation network indicating a format for calling an appliance service function in a home automation network

Abstract

The application discloses a method and a device for converting attribute values, a storage medium and an electronic device, which relate to the technical field of smart home/smart home, and the method for converting the attribute values comprises the following steps: acquiring N first attribute values for indicating a first device to execute a target operation, wherein N is greater than or equal to 1; determining M second attribute values according to the N first attribute values, wherein M is greater than or equal to 1,M second attribute values for indicating a second device to execute the target operation; and controlling the second equipment to execute the target operation through the M second attribute values. The problem of among the prior art efficiency when equipment interconnection is not high is solved.

Description

Attribute value conversion method and device, storage medium and electronic device
Technical Field
The application relates to the technical field of smart home/smart home, in particular to a method and a device for converting attribute values, a storage medium and an electronic device.
Background
The object model mainly describes an interaction model of how to communicate with the device, namely: how to read and write the state of the device, how to issue commands to the device, and how to report an event, such as a generated device alarm, to the device. At present, the definition of object models of the same type of equipment does not form an industry uniform definition standard, each department has a unique definition mode, so that various non-standard object models are defined for the equipment of the same type, and when the difference of the equipment object models of the departments causes different companies to realize equipment interconnection and intercommunication, the control instruction generated according to the attribute definition in the equipment object model A cannot control equipment corresponding to another equipment object model B, so that the efficiency of the equipment interconnection and intercommunication is not high.
Aiming at the problem of low efficiency in the process of interconnection and intercommunication of equipment in the prior art, no effective solution exists at present
Disclosure of Invention
The embodiment of the invention provides a method and a device for converting attribute values, a storage medium and an electronic device, which at least solve the problem of low efficiency in interconnection and intercommunication of equipment in the prior art.
According to an embodiment of the present invention, there is provided a method of converting attribute values, including: acquiring N first attribute values for indicating a first device to execute a target operation, wherein N is greater than or equal to 1; determining M second attribute values according to the N first attribute values, wherein M is larger than or equal to 1,M and is used for indicating a second device to execute the target operation; and controlling the second equipment to execute the target operation through the M second attribute values.
In one exemplary embodiment, determining M of the second attribute values from N first attribute values comprises: acquiring target attribute names corresponding to the N first attribute values; and searching the M second attribute values corresponding to the N first attribute values in a target mapping table according to the target attribute name, wherein the target mapping table records the mapping relationship among the target attribute name, the N first attribute values and the M second attribute values.
In an exemplary embodiment, before said looking up said M second attribute values corresponding to said N first attribute values in a target mapping table according to said target attribute name, said method further comprises: obtaining the N first attribute values for instructing the first device to execute the target operation and the M second attribute values for instructing the second device to execute the target operation; acquiring a target attribute name corresponding to the target operation; and establishing mapping relations among the N first attribute values, the M second attribute values and the target attribute name, and recording the mapping relations in the target mapping table.
In one exemplary embodiment, determining M second attribute values according to N first attribute values further comprises: acquiring target attribute names corresponding to the N first attribute values; searching a first conversion relation in a target mapping table according to the target attribute name, wherein the target mapping table records the mapping relation between the target attribute name and the first conversion relation, and the first conversion relation is the conversion relation between the first attribute value and the second attribute value; and converting the N first attribute values according to the first conversion relation to obtain the M second attribute values.
In an exemplary embodiment, converting the N first attribute values according to the first conversion relationship to obtain the M second attribute values includes: calling a first execution file corresponding to the first conversion relation, wherein the first execution file is used for converting the first attribute value into the second attribute value according to the first conversion relation; converting the N first attribute values into the M second attribute values through the first execution file.
In an exemplary embodiment, before said looking up the first translation relationship in the target mapping table according to the target attribute name, the method further comprises: obtaining the N first attribute values for instructing the first device to execute the target operation and the M second attribute values for instructing the second device to execute the target operation; acquiring a target attribute name corresponding to the target operation; determining the first transformation relationship between the N first attribute values and the M second attribute values; and establishing a mapping relation among the target attribute name, the N first attribute values and the first conversion relation, and recording the mapping relation in the target mapping table.
In an exemplary embodiment, said controlling, by said M second attribute values, said second device to perform said target operation further comprises: controlling the second device to execute the target operation according to the M second attribute values; or sending the M second attribute values to the second device to instruct the second device to execute the target operation according to the M second attribute values.
According to another embodiment of the present invention, there is provided an attribute value conversion apparatus including: the device comprises an acquisition module, a processing module and a control module, wherein the acquisition module is used for acquiring N first attribute values used for indicating first equipment to execute target operation, and N is greater than or equal to 1; a determining module, configured to determine M second attribute values according to the N first attribute values, where M is greater than or equal to 1,M, where M is used to instruct a second device to perform the target operation; and the control module is used for controlling the second equipment to execute the target operation through the M second attribute values.
According to a further embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, N first attribute values used for indicating the first equipment to execute the target operation are obtained, wherein N is greater than or equal to 1; determining M second attribute values according to the N first attribute values, wherein M is greater than or equal to 1,M for indicating a second device to execute the target operation; and controlling the second equipment to execute the target operation through the M second attribute values, and converting the first attribute value for controlling the first equipment to execute the operation into a second attribute value capable of controlling the second equipment to execute the target operation, so that the second equipment can execute the target operation according to the first attribute value, the problem of low efficiency in equipment interconnection and intercommunication in the prior art is solved, and the efficiency of equipment interconnection and intercommunication is improved.
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.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
FIG. 1 is a diagram illustrating a hardware environment of a method for converting attribute values according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of converting attribute values according to an embodiment of the application;
FIG. 3 is a diagram of a target mapping table according to an embodiment of the present application;
FIG. 4 is a diagram of another target mapping table according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an alternative plant model transformation according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an alternative standard profile in accordance with an embodiment of the present application;
FIG. 7 is a diagram of a standard serialized data structure according to an embodiment of the present application;
fig. 8 is a block diagram of a structure of an attribute value conversion apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present application, a method for converting an attribute value is provided. The attribute value conversion method is widely applied to full-House intelligent digital control application scenes such as Smart homes (Smart Home), intelligent homes, intelligent Home equipment ecology, intelligent residence (Intelligent House) ecology and the like. Optionally, in this embodiment, fig. 1 is a schematic diagram of a hardware environment of a method for converting attribute values according to an embodiment of the present application, and the method for converting attribute values may be applied to the hardware environment formed by the terminal device 102 and the server 104 shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, set a database on the server or independent of the server, and provide a data storage service for the server 104, and configure a cloud computing and/or edge computing service on the server or independent of the server, and provide a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be and not be limited to PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, the intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding's equipment, intelligent bathroom equipment, the intelligence robot of sweeping the floor, the intelligence robot of wiping the window, intelligence robot of mopping the floor, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen guarding, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In this embodiment, a method for converting attribute values is provided, and fig. 2 is a flowchart of a method for converting attribute values according to an embodiment of the present application, where as shown in fig. 2, the flowchart includes the following steps:
step S202, N first attribute values used for indicating the first equipment to execute target operation are obtained, wherein N is larger than or equal to 1;
step S204, determining M second attribute values according to the N first attribute values, wherein M is greater than or equal to 1,M second attribute values used for indicating a second device to execute the target operation;
step S206, controlling the second device to execute the target operation through the M second attribute values.
In this embodiment, the first device and the second device correspond to different device models, a device attribute of the first device is represented by a first attribute value, a device attribute of the second device is represented by a second attribute value, the first device executes a target operation according to the first attribute value in the control instruction issued by the first APP, the second device executes the target operation according to the second attribute value in the control instruction issued by the second APP, the first APP issues the control instruction according to the first device model, and the second APP issues the control instruction according to the second device model.
When the first device and the second device are interconnected, the device attribute of the first device is required to be uploaded to the first APP and the second APP, and the second device is controlled to execute the target operation through a control instruction issued by the first APP. The attribute value of the function attribute in the control instruction for executing the target operation in the first device is a first attribute value, and the attribute value of the function attribute in the control instruction for executing the target operation in the second device is a second attribute value.
When the first APP issues the control instruction to the second device, the first attribute value in the control instruction needs to be converted into a second attribute value that can be read by the second device, and the second device executes the target operation according to the converted second attribute value.
For example, when the switch function is executed, the switch function corresponds to an attribute, the attribute value corresponds to on and off, when the device a executes a power-on operation, the attribute value in the control instruction is 0 (a first attribute value), when the device B executes the power-on operation, the attribute value in the control instruction is 1 (a second attribute value), and when the APP corresponding to the device a issues an execution control instruction to the device B, the control device a executing the power-on operation attribute value 0 in the control instruction is to be converted into the attribute value 1 of the control device B executing the power-on operation.
It should be noted that, if one function of the device corresponds to one or more attributes, for example, the wind direction of the air conditioner a corresponds to two attributes of up-down wind and left-right wind, when describing the wind direction of the air conditioner or issuing a control command to adjust the wind direction, two attribute values are required to represent that corresponding operations are to be performed (corresponding to N attribute values), and the wind direction of the air conditioner B corresponds to one attribute of up-down wind, when describing the wind direction of the air conditioner or issuing a control command to adjust the wind direction, one attribute value is required to represent that corresponding operations are to be performed (corresponding to M attribute values).
By the embodiment, the first attribute value for controlling the first device to execute the target operation is converted into the second attribute value for controlling the second device to execute the target operation, so that the APP issuing the first attribute value cannot control the second device to execute the target operation.
In one exemplary embodiment, determining M of the second attribute values from N first attribute values includes: acquiring target attribute names corresponding to the N first attribute values; and searching the M second attribute values corresponding to the N first attribute values in a target mapping table according to the target attribute name, wherein the target mapping table records the mapping relationship among the target attribute name, the N first attribute values and the M second attribute values.
In this embodiment, when an attribute value corresponding to one function of a device may be enumerated, a mapping relationship between a target attribute name and a value of a corresponding attribute value is recorded in a target mapping table, for example, a power on/off function of the device is used, fig. 3 is a schematic diagram of the target mapping table according to an embodiment of the present application, as shown in fig. 3, an attribute value 0 of a device a and an attribute value 1 of a device B both correspond to power on of the device, and an attribute value 1 of a device B and an attribute value of a device a both correspond to power off of the device. When the first attribute value is 0, determining that the corresponding target attribute name is started, and finding a second attribute value corresponding to the starting: 1.
in an exemplary embodiment, before said looking up said M said second attribute values corresponding to said N first attribute values in a target mapping table according to said target attribute name, said method further comprises: obtaining the N first attribute values for instructing the first device to execute the target operation and the M second attribute values for instructing the second device to execute the target operation; acquiring a target attribute name corresponding to the target operation; and establishing mapping relations among the N first attribute values, the M second attribute values and the target attribute name, and recording the mapping relations in the target mapping table.
In this embodiment, before converting the first attribute value into the second attribute value, a mapping relationship needs to be established between attribute values corresponding to all attributes in the first device and the second device, and a mapping relationship is established between the first attribute value and the second attribute value used for instructing the devices to execute the same target operation through corresponding target attribute names.
In an exemplary embodiment, determining M second attribute values according to N first attribute values further includes: acquiring target attribute names corresponding to the N first attribute values; searching a first conversion relation in a target mapping table according to the target attribute name, wherein the target mapping table records the mapping relation between the target attribute name and the first conversion relation, and the first conversion relation is the conversion relation between the first attribute value and the second attribute value; and converting the N first attribute values according to the first conversion relation to obtain the M second attribute values.
In this embodiment, when an attribute value corresponding to one function of a device cannot be enumerated, the attribute value may be represented by a mathematical expression, for example, a wind direction adjustment of the device is performed, fig. 4 is a schematic diagram of another target mapping table according to an embodiment of the present application, as shown in fig. 4, a wind direction of an air conditioner a corresponds to two attributes of up-wind and down-wind, an attribute value of up-wind and down-wind is represented by x, an attribute value of left-wind and right-wind is represented by y, a wind direction of an air conditioner B corresponds to one attribute of up-wind and down-wind, an attribute value of up-wind and down-wind of an air conditioner B is z, where z may be represented by a related mathematical expression of x and y, that is, z = f (x, y), that is, a conversion relationship between a first attribute value and a second attribute value in the above embodiment is corresponded to, and a name of a target attribute may be a wind direction adjustment.
When the same target operation is instructed to be performed, for example, the first attribute value is (0,1), i.e. x =0, y =1, the target attribute name corresponding to the first attribute value is acquired: adjusting the direction, finding the conversion relation between the first attribute value and the second attribute value according to the target attribute name: z = f (x, y), the second attribute value can be determined.
In an exemplary embodiment, converting the N first attribute values according to the first conversion relationship to obtain the M second attribute values includes: calling a first execution file corresponding to the first conversion relation, wherein the first execution file is used for converting the first attribute value into the second attribute value according to the first conversion relation; converting the N first attribute values into the M second attribute values through the first execution file.
In this embodiment, after the conversion relationship between the first attribute value and the second attribute value is determined, an operation of converting the first attribute value into the second attribute value needs to be performed by calling an execution file corresponding to the conversion relationship.
In an exemplary embodiment, before said looking up the first translation relationship in the target mapping table according to the target attribute name, the method further comprises:
obtaining the N first attribute values for instructing the first device to execute the target operation and the M second attribute values for instructing the second device to execute the target operation; acquiring a target attribute name corresponding to the target operation; determining the first transformation relationship between the N first attribute values and the M second attribute values; and establishing a mapping relation among the target attribute name, the N first attribute values and the first conversion relation, and recording the mapping relation in the target mapping table.
In this embodiment, before converting the first attribute value into the second attribute value, a conversion relationship needs to be established between the attribute values that are not enumeratable or inconvenient to enumerate and correspond to the attributes in the first device and the second device, and a mapping relationship is established between the first attribute value and the second attribute value that are used for instructing the devices to execute the same target operation and the corresponding conversion relationship.
In an exemplary embodiment, said controlling, by said M second attribute values, said second device to perform said target operation further comprises: controlling the second device to execute the target operation according to the M second attribute values; or sending the M second attribute values to the second device to instruct the second device to execute the target operation according to the M second attribute values.
In this embodiment, after the first APP issues the control instruction, the control instruction may be sent to the second device, and the conversion device in the second device converts the first attribute value into the second attribute value, so as to control the second device to execute the target operation according to the M second attribute values, or the conversion device in the first APP converts the first attribute value into the second attribute value, and sends the second attribute value to the second device, so as to instruct the second device to execute the target operation according to the M second attribute values.
It is to be understood that the above-described embodiments are only a few, but not all, embodiments of the present invention.
The present invention will be described in detail with reference to the following examples:
fig. 5 is a schematic diagram illustrating an optional equipment model conversion according to an embodiment of the present application, and as shown in fig. 5, an equipment model of a partner 1 and an equipment model of a partner 2 are defined differently, and although the equipment models are defined differently, different object models may be converted by using a corresponding relationship between a functional attribute and an attribute value defined in the equipment models.
The functional attributes and the corresponding relationship between attribute values defined in the device object model are embodied by a standard configuration file (corresponding to the target mapping table), fig. 6 is a schematic diagram of an optional standard configuration file according to an embodiment of the present application, and as shown in fig. 6, the attribute information of the partner 1 and the partner 2, which execute the same operation, is obtained and automatically filled in the same line in the standard configuration file, and the filling of the attribute information includes: the target attribute name, the data type, and the attribute value may include, in addition to the attribute information shown in fig. 6: the function name, the enumeration dereferencing, the dereferencing mathematical expression, the dereferencing description, the reading permission, the writing permission, the expansion fixed parameter, the expansion parameter expression indication, the minimum dereferencing, the maximum dereferencing, the step length, the unit and the like can be artificially set to the attribute information needing to be filled.
The standard configuration file is in an Excel format, and is divided into two parts from the middle of a table according to columns, the left part and the right part have the same structure, the left part is used for filling in the definition of the function attributes of the equipment of the partner 1, and the right part is used for filling in the definition of the function attributes of the equipment of the partner 2.
The standard configuration file is filled in units of lines, each line representing a certain value option or value-taking expression of a function or attribute. If one attribute has a plurality of enumeration values, a plurality of lines are filled, the value is filled in an enumeration value-taking blank space, and the names of the attributes are the same. If an attribute cannot enumerate the attribute value, or the attribute value can be represented by a mathematical expression by using the attribute value corresponding to the partner 2, the attribute is only filled in one line, and the mathematical expression is filled in a numeric value mathematical expression space. The attribute value filling method of the partner 2 is the same as above, and when the value of an attribute cannot be expressed or is inconvenient to express through an enumeration method, but the attribute value of the partner 1 can be expressed through a mathematical expression, the mathematical expression can be filled in a space of the corresponding numeric mathematical expression.
The standard configuration file fills all the blank spaces according to the requirements of column sequence and strict non-sequence according to rows. Filling in a function name column to obtain a function attribute name Chinese description; the name column fills the definite field names during conversion, the names must have uniqueness, and if one name is a hierarchical structure, the name is suggested to form a unique definite name through a splicing form; the data type can be any basic type of packaging type, or String and JSON; enumerating the confirmed values corresponding to the data types capable of being filled with values, and filling the data types in the extended parameters in a JSON form if the values correspond to a plurality of values of a plurality of fields; filling a value description into a certain state description corresponding to a certain function, such as the opening state of a switch; the read permission and write permission columns express whether the attribute can be read or modified and express the attribute in a Boolean type value; the use scene of the extended fixed parameter column is that when a certain state of a function needs to be converted, transmitted or reported to determine a plurality of fields and values, the attached fields and values are placed in the extended fixed parameters; the application scenario of the extended parameter expression column is that when an extended parameter is an expression similar to a main value, a certain field of a partner can be used for expressing the extended parameter through a mathematical expression, and the expression is put in the extended parameter expression; filling the minimum maximum value of the attribute values in the minimum value and the maximum value column; the step length is the fixed size of the attribute value change; the Unit column fills in the Unit definition for the attribute.
The enumeration value, the value expression, the expansion fixed parameter and the expansion parameter expression must have at least one value, otherwise, the row is ignored. Each row cannot be blanked, and the spaces determined not to be filled are replaced with (/), ensuring that no space is left.
Fig. 7 is a diagram of a standard serialized data structure according to an embodiment of the present application, as shown in fig. 7, the standard configuration file is parsed to obtain a serialized and persistent data structure, and device data (corresponding to the first attribute value) delivered by a service is translated into required device model data (corresponding to the second attribute value) according to the translation direction.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, there is further provided an attribute value conversion apparatus, and fig. 8 is a block diagram of a structure of an attribute value conversion apparatus according to an embodiment of the present application, and as shown in fig. 8, the apparatus includes:
an obtaining module 802, configured to obtain N first attribute values used for instructing a first device to execute a target operation, where N is greater than or equal to 1;
a determining module 804, configured to determine M second attribute values according to the N first attribute values, where M is greater than or equal to 1,M second attribute values used to instruct a second device to perform the target operation;
a control module 806, configured to control the second device to perform the target operation according to the M second attribute values.
In an exemplary embodiment, the determining module further includes: a first obtaining unit, configured to obtain target attribute names corresponding to the N first attribute values; a first searching unit, configured to search, according to the target attribute name, the M second attribute values corresponding to the N first attribute values in a target mapping table, where a mapping relationship among the target attribute name, the N first attribute values, and the M second attribute values is recorded in the target mapping table.
In an exemplary embodiment, the apparatus is further configured to obtain the N first attribute values for instructing the first device to execute the target operation, and the M second attribute values for instructing the second device to execute the target operation; acquiring a target attribute name corresponding to the target operation; and establishing mapping relations among the N first attribute values, the M second attribute values and the target attribute name, and recording the mapping relations in the target mapping table.
In an exemplary embodiment, the determining module further includes: a second obtaining unit, configured to obtain target attribute names corresponding to the N first attribute values; a second searching unit, configured to search a first conversion relationship in a target mapping table according to the target attribute name, where a mapping relationship between the target attribute name and the first conversion relationship is recorded in the target mapping table, and the first conversion relationship is a conversion relationship between the first attribute value and the second attribute value; and the conversion unit is used for converting the N first attribute values according to the first conversion relation to obtain the M second attribute values.
In an exemplary embodiment, the conversion unit further includes: a calling subunit, configured to call a first execution file corresponding to the first conversion relationship, where the first execution file is an execution file used to convert the first attribute value into the second attribute value according to the first conversion relationship; a converting subunit, configured to convert, by the first execution file, the N first attribute values into the M second attribute values.
In an exemplary embodiment, the apparatus is further configured to obtain the N first attribute values for instructing the first device to execute the target operation, and the M second attribute values for instructing the second device to execute the target operation; acquiring a target attribute name corresponding to the target operation; determining the first transformation relationship between the N first attribute values and the M second attribute values; and establishing a mapping relation among the target attribute name, the N first attribute values and the first conversion relation, and recording the mapping relation in the target mapping table.
In an exemplary embodiment, the control module is further configured to control the second device to execute the target operation according to the M second attribute values; or sending the M second attribute values to the second device to instruct the second device to execute the target operation according to the M second attribute values.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
In the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring N first attribute values for indicating first equipment to execute target operation, wherein N is greater than or equal to 1;
s2, determining M second attribute values according to the N first attribute values, wherein M is greater than or equal to 1,M second attribute values used for indicating second equipment to execute the target operation;
and S3, controlling the second equipment to execute the target operation through the M second attribute values.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
In an exemplary embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring N first attribute values for indicating first equipment to execute target operation, wherein N is greater than or equal to 1;
s2, determining M second attribute values according to the N first attribute values, wherein M is greater than or equal to 1,M second attribute values used for indicating second equipment to execute the target operation;
and S3, controlling the second equipment to execute the target operation through the M second attribute values.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that, as will be apparent to those skilled in the art, numerous modifications and adaptations can be made without departing from the principles of the present application and such modifications and adaptations are intended to be considered within the scope of the present application.

Claims (10)

1. A method for converting attribute values, comprising:
acquiring N first attribute values for indicating a first device to execute a target operation, wherein N is greater than or equal to 1;
determining M second attribute values according to the N first attribute values, wherein M is larger than or equal to 1,M and is used for indicating a second device to execute the target operation;
and controlling the second equipment to execute the target operation through the M second attribute values.
2. The method of claim 1, wherein determining M second attribute values from N first attribute values comprises:
acquiring target attribute names corresponding to the N first attribute values;
and searching the M second attribute values corresponding to the N first attribute values in a target mapping table according to the target attribute name, wherein the target mapping table records the mapping relationship among the target attribute name, the N first attribute values and the M second attribute values.
3. The method of claim 2, wherein prior to said looking up said M second attribute values corresponding to said N first attribute values in a target mapping table by said target attribute name, said method further comprises:
obtaining the N first attribute values for instructing the first device to execute the target operation and the M second attribute values for instructing the second device to execute the target operation;
acquiring a target attribute name corresponding to the target operation;
and establishing mapping relations among the N first attribute values, the M second attribute values and the target attribute name, and recording the mapping relations in the target mapping table.
4. The method of claim 1, wherein determining M of the second attribute values based on N first attribute values further comprises:
acquiring target attribute names corresponding to the N first attribute values;
searching a first conversion relation in a target mapping table according to the target attribute name, wherein the target mapping table records the mapping relation between the target attribute name and the first conversion relation, and the first conversion relation is the conversion relation between the first attribute value and the second attribute value;
and converting the N first attribute values according to the first conversion relation to obtain the M second attribute values.
5. The method of claim 4, wherein transforming the N first attribute values according to the first transformation relationship to obtain the M second attribute values comprises:
calling a first execution file corresponding to the first conversion relation, wherein the first execution file is used for converting the first attribute value into the second attribute value according to the first conversion relation;
converting the N first attribute values into the M second attribute values through the first execution file.
6. The method of claim 4, wherein prior to said looking up a first translation relationship in said target mapping table by said target attribute name, said method further comprises:
obtaining the N first attribute values for instructing the first device to execute the target operation and the M second attribute values for instructing the second device to execute the target operation;
acquiring a target attribute name corresponding to the target operation;
determining the first transformation relationship between the N first attribute values and the M second attribute values;
and establishing a mapping relation among the target attribute name, the N first attribute values and the first conversion relation, and recording the mapping relation in the target mapping table.
7. The method of claim 1, wherein said controlling said second device to perform said target operation by said M of said second attribute values further comprises:
controlling the second device to execute the target operation according to the M second attribute values; alternatively, the first and second electrodes may be,
and sending the M second attribute values to the second device to instruct the second device to execute the target operation according to the M second attribute values.
8. An apparatus for converting attribute values, comprising:
the device comprises an acquisition module, a processing module and a control module, wherein the acquisition module is used for acquiring N first attribute values used for indicating first equipment to execute target operation, and N is greater than or equal to 1;
a determining module, configured to determine M second attribute values according to the N first attribute values, where M is greater than or equal to 1,M, where M is used to instruct a second device to perform the target operation;
and the control module is used for controlling the second equipment to execute the target operation through the M second attribute values.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202210764138.3A 2022-06-30 2022-06-30 Attribute value conversion method and device, storage medium and electronic device Pending CN115314329A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210764138.3A CN115314329A (en) 2022-06-30 2022-06-30 Attribute value conversion method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210764138.3A CN115314329A (en) 2022-06-30 2022-06-30 Attribute value conversion method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115314329A true CN115314329A (en) 2022-11-08

Family

ID=83854787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210764138.3A Pending CN115314329A (en) 2022-06-30 2022-06-30 Attribute value conversion method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115314329A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1481115A (en) * 2002-09-18 2004-03-10 联想(北京)有限公司 Method for converting descriptors between devices on different sub network of household network
US20090129250A1 (en) * 2005-10-27 2009-05-21 Pioneer Corporation Information recording apparatus and method and computer program
CN106292302A (en) * 2015-05-22 2017-01-04 阿里巴巴集团控股有限公司 The control method of intelligent domestic system and device
CN106559503A (en) * 2015-09-25 2017-04-05 华为技术有限公司 A kind of communication means and device based on Internet of Things
KR20170071021A (en) * 2015-12-15 2017-06-23 엘지전자 주식회사 Device for converting a protocol between different networks
CN108292467A (en) * 2015-12-02 2018-07-17 皇家飞利浦有限公司 Control device for home appliance system
CN110049014A (en) * 2019-03-18 2019-07-23 武汉虹信技术服务有限责任公司 A kind of OpenAPI converting system and method based on more Modbus bus protocols
CN110912813A (en) * 2019-12-26 2020-03-24 杭州行至云起科技有限公司 Gateway supporting multiple protocols, control method and event reporting method
CN110932952A (en) * 2019-12-17 2020-03-27 杭州行至云起科技有限公司 Control system, control method and upgrading method of intelligent household product
CN111880446A (en) * 2020-07-20 2020-11-03 海尔优家智能科技(北京)有限公司 Control instruction sending method and control instruction receiving method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1481115A (en) * 2002-09-18 2004-03-10 联想(北京)有限公司 Method for converting descriptors between devices on different sub network of household network
US20090129250A1 (en) * 2005-10-27 2009-05-21 Pioneer Corporation Information recording apparatus and method and computer program
CN106292302A (en) * 2015-05-22 2017-01-04 阿里巴巴集团控股有限公司 The control method of intelligent domestic system and device
CN106559503A (en) * 2015-09-25 2017-04-05 华为技术有限公司 A kind of communication means and device based on Internet of Things
CN108292467A (en) * 2015-12-02 2018-07-17 皇家飞利浦有限公司 Control device for home appliance system
KR20170071021A (en) * 2015-12-15 2017-06-23 엘지전자 주식회사 Device for converting a protocol between different networks
CN110049014A (en) * 2019-03-18 2019-07-23 武汉虹信技术服务有限责任公司 A kind of OpenAPI converting system and method based on more Modbus bus protocols
CN110932952A (en) * 2019-12-17 2020-03-27 杭州行至云起科技有限公司 Control system, control method and upgrading method of intelligent household product
CN110912813A (en) * 2019-12-26 2020-03-24 杭州行至云起科技有限公司 Gateway supporting multiple protocols, control method and event reporting method
CN111880446A (en) * 2020-07-20 2020-11-03 海尔优家智能科技(北京)有限公司 Control instruction sending method and control instruction receiving method

Similar Documents

Publication Publication Date Title
CN112448989A (en) Internet of things equipment control method and system, configuration terminal, equipment and storage medium
CN110867956A (en) Topology automatic identification system and method based on intelligent platform area
CN114374602A (en) Master control equipment configuration method and device, cloud server and storage medium
CN114697150B (en) Command issuing method and device, storage medium and electronic device
CN110233874B (en) Information transmission method and device for Internet of things equipment
CN105868170A (en) Method for generating industrial data report in server
CN112764874B (en) Virtual machine server information acquisition method based on CMDB configuration management system
WO2018113184A1 (en) Intelligent device control and management method based on forces protocol
CN116107975A (en) Control method and device of equipment, storage medium and electronic device
CN115314329A (en) Attribute value conversion method and device, storage medium and electronic device
CN116027937A (en) Rendering method and device of component to be edited, storage medium and electronic device
CN115408826A (en) Modeling method and device of power internet of things, electronic equipment and storage medium
CN114915514A (en) Intention processing method and device, storage medium and electronic device
CN114675928A (en) Container mirror image construction method and device, storage medium and electronic device
CN115168605A (en) Map determination method and apparatus, storage medium, and electronic apparatus
CN110990016B (en) Command acquisition method, device, equipment and page of Linux operating system
CN109861893B (en) Communication method, device and system based on system bus
CN107273328B (en) Interface management method and system
CN113824710B (en) Communication protocol conversion method and device and computer readable storage medium
CN103560910A (en) Communication resource management system accuracy detection system dynamic configuration method and device
CN115495423A (en) Model file conversion method and device, storage medium and electronic device
CN115686604A (en) Product function data processing method, system, storage medium and electronic device
CN112578679B (en) Control system and method, storage medium and electronic device
CN110888391B (en) Method and device for carrying out intelligent logic analysis control on cold station machine room
KR100653084B1 (en) Method of automatically setting database and pages of home portal server and home network system using the same

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