Method and device for configuring gateway, gateway and system
By optimizing the data storage structure and access equipment configuration of the gateway, the problems of equipment access requirements and data transmission delay in the building automatic control system are solved, and more efficient equipment configuration and intelligent management are achieved.
Patent Information
- Application Number
- CN202411474977.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-10-22
AI Technical Summary
Due to hardware resource limitations in existing building automatic control systems, the gateway cannot meet the needs of large-scale equipment access, and too many or too few equipment will lead to data transmission delays and communication failures.
By obtaining the configuration information of the gateway access device, optimizing the basic data storage structure, adaptively compressing the data storage space, calculating the remaining access capability characterization indicators, and outputting configuration prompt information to properly configure the device.
The maximum number of devices that the gateway can access is improved, the problem of too many or too few devices is alleviated, and the level of intelligent configuration processes and data transmission efficiency are improved.
Smart Images

Figure CN119316283A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of building automation technology, and in particular to a method, device, gateway and system for configuring a gateway. Background Art
[0002] In the related art, the access device information of the gateway is often configured based on manual experience. This is likely to result in too few or too many devices connected to the gateway (such as expansion modules, or terminal devices connected to the gateway through expansion modules, or terminal devices directly connected to the gateway, etc.), which in turn causes a series of problems. For example, when the gateway has fewer expansion modules connected, it cannot meet the large-scale device access needs. When the gateway has too many expansion modules connected, the huge amount of data will cause the communication bus to be busy, which will cause the data of some expansion modules to be unable to be sent in time, affecting the real-time nature of the data and generating communication failure information.
[0003] In addition, in building automation systems, lightweight gateways are limited by hardware resources and have a small running memory space, which leads to the inability to support the access of expansion modules, or the number of accessible expansion modules and devices accessed through expansion modules is small. Summary of the invention
[0004] The present disclosure provides a method, an apparatus, a gateway and a system for configuring a gateway.
[0005] According to a first aspect of the present disclosure, a method for configuring a gateway is provided, comprising: obtaining configuration information of an access device of the gateway; optimizing a basic data storage structure in the gateway according to the configuration information of the access device to obtain an optimized data storage structure, wherein the storage space occupied by the optimized data storage structure is smaller than the storage space occupied by the basic data storage structure; determining the storage space occupied by the access device in the gateway according to the storage space occupied by the optimized data storage structure; determining a remaining access capability characterization indicator of the gateway according to the running memory space of the gateway and the storage space occupied by the access device in the gateway.
[0006] In some embodiments, the configuration information of the access device includes the type of the access device and data attribute configuration information of the access device.
[0007] In some embodiments, the gateway has multiple basic data storage structures, and optimizing the basic data storage structure in the gateway according to the configuration information of the access device to obtain the optimized data storage structure includes: selecting a basic data storage structure corresponding to the type of the access device from the multiple basic data storage structures, and using it as the target storage structure; optimizing the target storage structure according to the data attribute configuration information of the access device to obtain the optimized data storage structure.
[0008] In some embodiments, optimizing the target storage structure according to the data attribute configuration information of the access device to obtain an optimized data storage structure includes: determining the optimization level of each attribute in the target storage structure according to the data attribute configuration information of the access device; determining the optimized storage space of each attribute according to the optimization level of each attribute and the correspondence between the optimization level and the storage space of the attribute; determining the optimized data storage structure according to the optimized storage space of each attribute.
[0009] In some embodiments, the data attribute configuration information includes a value of a first attribute, and determining the optimization level of each attribute in the target storage structure based on the data attribute configuration information of the access device includes: when the first attribute is all attributes in the target storage structure, determining the optimization level of each attribute in the target storage structure based on the value of the first attribute.
[0010] In some embodiments, the data attribute configuration information includes a value of a first attribute, and determining the optimization level of each attribute in the target storage structure based on the data attribute configuration information of the access device includes: when the first attribute is a part of the attributes in the target storage structure, determining the optimization level of the first attribute based on the value of the first attribute; when the target storage structure also includes a second attribute associated with the first attribute, determining the value of the second attribute based on the value of the first attribute and the logical relationship between the attributes; and determining the optimization level of the second attribute based on the value of the second attribute.
[0011] In some embodiments, determining the optimization level of each attribute in the target storage structure based on the data attribute configuration information of the access device also includes: when the target storage structure also includes a third attribute in addition to the first attribute and the second attribute, setting the optimization level of the third attribute to a set value, and the optimized storage space corresponding to the set value is the same as the storage space of the third attribute in the target storage structure.
[0012] In some embodiments, determining the optimized data storage structure based on the optimized storage space of each attribute includes: deleting attributes with zero optimized storage space from the attributes to obtain remaining attributes; and obtaining the optimized data storage structure based on the remaining attributes.
[0013] In some embodiments, the remaining access capability characterization indicator includes the remaining storage space of the running memory, and determining the remaining access capability characterization indicator of the gateway based on the running memory space of the gateway and the storage space occupied by the access device in the gateway includes: calculating the difference between the running memory space and the storage space occupied by the access device in the gateway; and determining the remaining storage space of the running memory based on the difference.
[0014] In some embodiments, the remaining access capability characterization indicator also includes the amount of configurable data of at least one remaining accessible device, and determining the remaining access capability characterization indicator of the gateway based on the running memory space of the gateway and the storage space occupied by the access devices in the gateway also includes: determining the amount of configurable data of each remaining accessible device based on the remaining storage space of the running memory and the storage space occupied by the basic data storage structure corresponding to each remaining accessible device.
[0015] In some embodiments, the access device includes at least one of an expansion module and a device accessing the gateway through the expansion module.
[0016] In some embodiments, the method for configuring a gateway further includes: outputting configuration prompt information, wherein the configuration prompt information carries an indicator representing the remaining access capability of the gateway.
[0017] According to a second aspect of the present disclosure, a device for configuring a gateway is provided, comprising: a program module for executing the method for configuring a gateway as described above.
[0018] According to a third aspect of the present disclosure, there is provided an apparatus for configuring a gateway, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the aforementioned method for configuring a gateway based on instructions stored in the memory.
[0019] According to a fourth aspect of the present disclosure, a gateway is provided, comprising: the device for configuring a gateway as described above.
[0020] According to a fifth aspect of the present disclosure, a system for configuring a gateway is provided, comprising: the gateway as described above; and a configuration management device, configured to receive the configuration prompt information from the gateway and display the configuration prompt information.
[0021] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the method for configuring a gateway as described above is implemented.
[0022] According to a seventh aspect of the present disclosure, a computer program product is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the method for configuring a gateway as described above is implemented.
[0023] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0025] Figure 1 is a flowchart of a method for configuring a gateway according to some embodiments of the present disclosure;
[0026] Figure 2 is a flowchart of a storage structure optimization step in a method for configuring a gateway according to some embodiments of the present disclosure;
[0027] Figure 3 yes Figure 2 An exemplary flow chart of step S22 is shown;
[0028] Figure 4 is a flowchart of a method for configuring a gateway according to other embodiments of the present disclosure;
[0029] Figure 5 is a structural diagram of an apparatus for configuring a gateway according to some embodiments of the present disclosure;
[0030] Figure 6 is a structural diagram of an optimization module in an apparatus for configuring a gateway according to some embodiments of the present disclosure;
[0031] Figure 7 is a schematic diagram of a structure of an apparatus for configuring a gateway according to other embodiments of the present disclosure;
[0032] Figure 8 is a schematic diagram of the structure of a gateway according to some embodiments of the present disclosure;
[0033] Fig. 9 is a structural diagram of a system for configuring a gateway according to some embodiments of the present disclosure;
[0034] Fig.10The diagram is a schematic diagram of a network topology to which the method for configuring a gateway according to some embodiments of the present disclosure is applicable.
[0035] The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings. DETAILED DESCRIPTION
[0036] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0037] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0038] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0039] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.
[0040] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0041] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0042] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0043] In the related art, due to the inadequacy of the gateway access device configuration process, the number of devices accessing the gateway is too small or too large, which in turn causes a series of problems. In addition, since the gateway itself is limited by hardware resources, the number of devices that can access the gateway is limited, which cannot meet the large-scale device access needs.
[0044] In view of this, the present disclosure proposes a method, apparatus, gateway and system for configuring a gateway, which can increase the maximum number of devices that can be connected to the gateway, while effectively alleviating the problem of too many connected devices and improving the intelligence level of the gateway configuration process.
[0045] Figure 1FIG. 1 is a flow chart of a method for configuring a gateway according to some embodiments of the present disclosure. Figure 1 As shown, in some embodiments of the present disclosure, the method for configuring a gateway includes steps S1 to S5.
[0046] Step S1: Obtain configuration information of the access device of the gateway.
[0047] The access device of the gateway may refer to at least one of an extension module that accesses the gateway, a device that accesses the gateway through the extension module, and a device that directly accesses the gateway. Among them, the device that accesses the gateway through the extension module or directly accesses the gateway may be a terminal device, such as an indoor unit of an air conditioner, an outdoor unit of an air conditioner, etc.
[0048] The configuration information of the access device may include at least one of the following information: the type of the access device, the data attribute configuration information of the access device, and the like.
[0049] For example, the configuration information of the access device includes the type of the access device and the configuration information of the data attribute. By including these two aspects in the configuration information of the access device, it is convenient to perform fine optimization on the basic storage structure of the gateway later.
[0050] In some examples, the access device of the gateway refers to an extension module that is accessed to the gateway. In these examples, the following configuration information may be obtained: data attribute configuration information of the extension module.
[0051] In other examples, the access device of the gateway refers to the device that is connected to the gateway through the extension module. In these examples, the following configuration information can be obtained: the type of the device that is connected to the gateway through the extension module, and the data attribute configuration information of the device that is connected to the gateway through the extension module. By obtaining the configuration information of the device that is connected through the extension module, it is helpful to improve the refinement level of the gateway configuration process.
[0052] In some other examples, the access device of the gateway refers to the extension module and the device accessing the gateway through the extension module. In these examples, the following configuration information can be obtained: the type of the extension module, the data attribute configuration information of the extension module, the type of the device accessing the gateway through the extension module, and the data attribute configuration information of the device accessing the gateway through the extension module. By obtaining the configuration information of the extension module and the device accessed through the extension module, the two configuration granularities of the extension module and the device accessed through the extension module are taken into account, which helps to further improve the refinement level of the gateway configuration process.
[0053] In step S1, there are multiple ways to obtain the configuration information. In one exemplary acquisition method, the configuration information of the access device of the gateway is received from the configuration management device. In another exemplary acquisition method, the configuration information of the access device of the gateway is obtained from a local storage module.
[0054] Step S2: Optimizing the basic data storage structure in the gateway according to the configuration information of the access device to obtain an optimized data storage structure.
[0055] There may be one or more basic data storage structures in the gateway. The basic data storage structure defines multiple attributes and the storage space occupied by each attribute. For example, the basic data storage structure is shown in Table 1.
[0056] Table 1
[0057]
[0058] As shown in Table 1, the basic data storage structure includes the following attributes of data: name, address, data type, value, value range, calculation formula, extension flag, unit, and priority. For each attribute in the basic data storage structure, storage space is pre-allocated. For example, the storage space of the attribute "name" is N4 bytes, and the storage space of the attribute "data type" is N1 bytes.
[0059] It should be noted that Table 1 is only an example of a basic data storage structure. In specific implementation, the attributes included in the basic data storage structure and the storage space of each attribute can be flexibly set according to requirements.
[0060] In step S2, by optimizing the basic data storage structure, the storage space occupied by the optimized data storage structure is smaller than the storage space occupied by the basic data storage structure. In this way, the data storage space occupied by each access device in the gateway can be adaptively compressed, which helps the gateway to access more access devices.
[0061] In specific implementation, in step S2, multiple implementations can be adopted to optimize the storage structure. Two exemplary methods are described below.
[0062] In a first exemplary manner, the configuration information of the access device includes configuration information of data attributes of the access device. In this manner, the basic data storage structure is optimized according to the configuration information of the data attributes of the access device to obtain an optimized data storage structure.
[0063] For example, the gateway has a basic data storage structure. Assuming that the data attribute configuration information of the terminal device a connected to the gateway is obtained, the basic data storage structure is optimized according to the data attribute configuration information of the terminal device a to obtain an optimized data storage structure.
[0064] For example, the gateway has a basic data storage structure. Assuming that the configuration information of the data attributes of the terminal device a connected to the gateway and the configuration information of the data attributes of the terminal device b connected to the gateway are obtained, the basic data storage structure can be optimized according to the configuration information of the data attributes of the terminal device a to obtain the optimized data storage structure p1; the basic data storage structure can be optimized according to the configuration information of the data attributes of the terminal device b to obtain the optimized data storage structure p2.
[0065] In a second exemplary embodiment, the configuration information of the access device includes the type of the access device and the configuration information of the data attribute of the access device. In this exemplary embodiment, the storage structure optimization step (ie, step S2) specifically includes: Figure 2 Steps S21 to S22 are shown.
[0066] Step S21: Select a basic data storage structure corresponding to the type of the access device and use it as the target storage structure.
[0067] In the second exemplary embodiment, the gateway has multiple basic data storage structures, and there is a corresponding relationship between the basic data storage structures and the device types. For example, device type 1 corresponds to basic data storage structure p1, and device type 2 corresponds to basic data storage structure p2. After determining the type of the access device, the target storage structure is selected from the multiple basic data storage structures according to the type of the access device.
[0068] For example, when the access devices are terminal device a and terminal device b accessed through expansion module A, and the device type of terminal device a is type 1 and the device type of terminal device b is type 2, the basic data storage structure corresponding to type 1 can be used as the target storage structure (of terminal device a), and the basic data storage structure corresponding to type 2 can be used as the target storage structure (of terminal device b).
[0069] For example, when the access device is terminal device a accessed through expansion module A, and the device type of terminal device a is type 1, the basic data storage structure corresponding to type 1 can be used as the target storage structure.
[0070] In the disclosed embodiment, by setting corresponding basic data storage structures for different types of devices, it is helpful to improve the flexibility of subsequent data storage structure optimization. Moreover, compared with setting only one basic data storage structure for the gateway, since the basic storage structure designed for a specified type of device does not need to take into account the data attributes of various types of devices, the storage space occupied by the basic data storage structure is reduced, which helps the gateway to access more devices.
[0071] Step S22: Optimize the target storage structure according to the data attribute configuration information of the access device.
[0072] In some examples, when data attribute configuration information of an access device is obtained, a target storage structure of the access device is optimized to obtain an optimized data storage structure of the access device.
[0073] For example, assuming that the basic data storage structure shown in Table 1 is optimized, the optimized data storage structure obtained is shown in Table 2.
[0074] Table 2
[0075]
[0076] As shown in Table 2, the optimized data storage structure includes five attributes: name, address, data type, value, and priority, and the storage space occupied by each attribute is N2 bytes, N1 bytes, N1 bytes, N1 bytes, and N1 bytes, respectively. Among them, N4>N2>N1. In this example, the number of attributes of the optimized data storage structure is less than that of the basic data storage structure, and the storage space occupied by the attribute is also less than the storage space occupied by the attribute in the basic data storage structure. Therefore, the storage space occupied by the optimized data storage structure is less than the storage space occupied by the basic data storage structure.
[0077] In other examples, when data attribute configuration information of multiple access devices is obtained, the respective target storage structures are optimized according to the data attribute configuration information of each access device to obtain an optimized data storage structure for each access device.
[0078] In the embodiment of the present disclosure, by Figure 2 The process shown can improve the flexibility and accuracy of storage structure optimization, and further optimize the process of access device configuration for the gateway.
[0079] Back to Figure 1 Step S3: Determine the storage space occupied by the access device in the gateway according to the storage space occupied by the optimized data storage structure.
[0080] In some examples, when there are multiple access devices, the storage space occupied by the optimized data storage structure corresponding to each access device is summed; based on the summation result, the storage space occupied by these access devices is determined.
[0081] Furthermore, in some of the above examples, the storage space can be summed according to the following formula: . Among them, F1 is the sum of the storage space, m1 is the storage space occupied by the optimized data storage structure corresponding to access device 1, n1 is the amount of data using the optimized data storage structure in access device 1, m2 is the storage space occupied by the optimized data storage structure corresponding to access device 2, n2 is the amount of data using the optimized data storage structure in access device 2, mx is the storage space occupied by the optimized data storage structure corresponding to access device x, and nx is the amount of data using the optimized data storage structure in access device x.
[0082] In addition, in some of the above examples, the storage space can also be summed according to the following formula: . Among them, F1 is the sum of the storage space, c1 is the storage space occupied by the optimized data storage structure corresponding to type 1, d1 is the amount of data using the optimized data storage structure in all access devices, c2 is the storage space occupied by the optimized data storage structure corresponding to type 2, c2 is the amount of data using the optimized data storage structure in all access devices, cx is the storage space occupied by the optimized data storage structure corresponding to type x, and dx is the amount of data using the optimized data storage structure in all access devices.
[0083] After obtaining the above summation result, the above summation result can be used as the storage space occupied by these access devices. In addition, the above summation result can also be further calculated to obtain the storage space occupied by these access devices.
[0084] In other examples, when there is only one access device, the storage space occupied by the optimized data storage structure corresponding to the access device is used as the storage space occupied by the access device. In addition, the storage space occupied by the optimized data storage structure corresponding to the access device can also be further calculated to obtain the storage space occupied by the access device.
[0085] Step S4: determining a remaining access capability characterization index of the gateway according to the running memory space of the gateway and the storage space occupied by the access devices in the gateway.
[0086] The remaining access capacity characterization indicator of the gateway is used to characterize the remaining device access capacity of the gateway.
[0087] In some examples, the remaining access capacity characterization index of the gateway includes the remaining storage space of the gateway's running memory. In these examples, step S4 specifically includes: calculating the difference between the running memory space of the gateway and the storage space occupied by the access device in the gateway; and determining the remaining storage space of the running memory of the gateway based on the above difference. For example, the above difference is used as the remaining storage space of the running memory. By calculating the remaining storage space of the running memory of the gateway, it is convenient for the user to understand the remaining access capacity of the current gateway, and configure a reasonable number of access devices for the gateway accordingly, thereby improving the controllability and intelligence level of the gateway configuration process.
[0088] In other examples, the remaining access capability characterization index of the gateway includes the remaining storage space in the gateway's running memory and the amount of configurable data of at least one remaining accessible device. In these examples, step S4 specifically includes: calculating the difference between the running memory space of the gateway and the storage space occupied by the access devices in the gateway; determining the remaining storage space in the running memory of the gateway based on the difference; determining the amount of configurable data of each remaining accessible device based on the remaining storage space in the running memory of the gateway and the storage space occupied by the basic data storage structure corresponding to each remaining accessible device.
[0089] Among them, the remaining accessible devices refer to the devices that the gateway can still access. For example, the remaining accessible devices include devices of type "type 1" and devices of type "type 2". In this example, after obtaining the remaining storage space of the gateway running memory, the quotient of the remaining storage space of the gateway running memory and the storage space occupied by the basic data storage structure corresponding to the "type 1" device can be calculated, and the configurable data volume of the "type 1" device can be obtained according to the quotient; the quotient of the remaining storage space of the gateway running memory and the storage space occupied by the basic data storage structure corresponding to the "type 2" device is calculated, and the configurable data volume of the "type 2" device can be obtained according to the quotient.
[0090] In the above example, by calculating the remaining storage space of the running memory and the amount of configurable data of the remaining accessible devices, the remaining access capacity of the gateway can be better characterized, and the intelligence level of the gateway configuration process can be further improved.
[0091] Furthermore, in addition to steps S1 to S4, the method for configuring a gateway may further include: outputting configuration prompt information, the configuration prompt information carrying a characterization index of the remaining access capacity of the gateway. By outputting the configuration prompt information, it is convenient for the user to reasonably configure the number of access devices accordingly, thereby improving the user's configuration experience.
[0092] In the embodiments of the present disclosure, on the one hand, by optimizing the basic data storage structure in the gateway according to the configuration information of the gateway access device, it is helpful to achieve adaptive compression of the storage space occupied by the data of the access device in the gateway, thereby increasing the maximum number of devices that the gateway can access; on the other hand, by calculating the remaining access capacity characterization index of the gateway, it is convenient for users to configure a reasonable number of access devices for the gateway based on this, effectively alleviating the problems caused by too few or too many access devices, and improving the intelligence level of gateway configuration.
[0093] In order to better explain the optimization process of storage structure, the following Figure 3 right Figure 2 Step S22 is shown for exemplary purposes. Figure 3 As shown, step S22 specifically includes steps S221 to S223.
[0094] Step S221: Determine the optimization level of each attribute in the target storage structure according to the data attribute configuration information.
[0095] The data attribute configuration information includes the value of the first attribute. The first attribute may be one or more attributes in the target storage structure.
[0096] In some examples, the first attribute is all attributes in the target storage structure. In these examples, step S221 includes: determining the optimization level of each attribute in the target storage structure according to the value of the first attribute.
[0097] Furthermore, in the above example, the storage space actually occupied by the first attribute may be estimated according to the value of the first attribute, and then the optimization level of the first attribute may be determined according to the actually occupied storage space.
[0098] For example, assuming that the value of the first attribute "name" is configured as "temperature", it can be estimated that the storage space actually occupied by the attribute is greater than N1 bytes and less than N2 bytes, and then based on the actual occupied storage space, the optimization level of the attribute is determined to be M2.
[0099] In the above example, the above process can meet the user's application scenario requirements for full configuration of data attributes, and can accurately determine the optimization level of each attribute in the target storage structure, thereby facilitating the subsequent accurate compression of the storage space occupied by each attribute.
[0100] In other examples, the first attribute is a part of the attributes in the target storage structure. In these examples, step S221 includes: determining the optimization level of the first attribute according to the value of the first attribute; if the target storage structure also includes a second attribute associated with the first attribute, determining the value of the second attribute according to the value of the first attribute and the logical relationship between the attributes; and determining the optimization level of the second attribute according to the value of the second attribute.
[0101] Furthermore, in some other examples mentioned above, step S221 may also include: when the target storage structure also includes a third attribute in addition to the first attribute and the second attribute, setting the optimization level of the third attribute to a set value, and the optimized storage space corresponding to the set value is the same as the storage space of the third attribute in the target storage structure.
[0102] For example, assume that the target storage structure is as shown in Table 1, and the first attributes involved in the configuration information of the access device are the five attributes of "name", "address", "data range", "extension flag", and "priority", and the target storage structure also includes the four attributes of "data type", "value", "calculation formula", and "unit". Among them, "unit" is an associated attribute of "extension flag", so it belongs to the second attribute, and "data type", "value" and "calculation formula" belong to the third attribute. Further, assume that the value of "extension flag" is 0, and by querying the logical relationship between the attributes, it can be known that when the value of "extension flag" is 0, the value of the attribute "unit" associated with it is also 0, so the optimization level of the second attribute "unit" is determined to be M0. The three third attributes of "data type", "value" and "calculation formula" can set their optimization levels to set values, and the optimized storage space corresponding to the set value is the same as its storage space in the target storage structure.
[0103] In the above example, the above process can meet the user's application scenario requirements for partial configuration of data attributes, and can accurately determine the optimization level of each attribute for the first attribute, the second attribute, and the third attribute, thereby facilitating the subsequent accurate compression of the storage space occupied by each attribute.
[0104] Step S222: Determine the optimized storage space of each attribute according to the optimization level of each attribute and the corresponding relationship between the optimization level and the storage space of the attribute.
[0105] The correspondence between the optimization level and the storage space of the attribute defines the optimized storage space of the attribute corresponding to each optimization level. Table 3 gives an example of the correspondence.
[0106] Table 3
[0107]
[0108] As shown in Table 3, the storage space of the attribute corresponding to the optimization level M0 is 0 bytes, the storage space of the attribute corresponding to the optimization level M1 is N1 bytes, the storage space of the attribute corresponding to the optimization level M2 is N2 bytes, the storage space of the attribute corresponding to the optimization level M3 is N3 bytes, and the storage space of the attribute corresponding to the optimization level M4 is N4 bytes. N1 to N4 are all integers greater than 0.
[0109] Step S223: Determine an optimized data storage structure according to the optimized storage space of each attribute.
[0110] In some examples, step S223 includes: deleting the attributes whose storage space is zero after optimization from various attributes to obtain remaining attributes; and obtaining the optimized data storage structure according to the remaining attributes.
[0111] For example, assuming that the target data storage structure includes 9 attributes, and it is determined through calculation that the optimized storage space of two of the 9 attributes is zero, the two attributes are deleted, and the optimized data storage structure is constructed based on the remaining 7 attributes.
[0112] exist Figure 3 In the process shown, by using the attributes of the data as the optimization granularity of the storage structure, the refinement level of the storage structure optimization is improved, and the gateway configuration process is further optimized. In addition, by presetting the correspondence between the optimization level and the storage space of the attribute, and determining the optimized storage space of each attribute according to the correspondence in the storage structure optimization process, the processing efficiency of the storage structure optimization can be improved.
[0113] Figure 4 FIG. 1 is a flow chart of a method for configuring a gateway according to other embodiments of the present disclosure. Figure 4 As shown, in some other embodiments of the present disclosure, the method for configuring a gateway includes steps 41 to 47.
[0114] Step 41: The user configures the access device information of the gateway.
[0115] The user can configure the access device information of the gateway through the interactive interface of the configuration management device, for example, configuring the extension module accessed by the gateway and the information of the terminal device accessed through the extension module.
[0116] Step 42: The configuration management device sends the configuration information of the access device of the gateway to the gateway.
[0117] The configuration management device may be a host computer with configuration software installed. After receiving the configuration information input by the user, the configuration information is sent to the gateway.
[0118] Step 43: The gateway optimizes the basic data storage structure.
[0119] In this step, the gateway optimizes the basic data storage structure in the gateway according to the configuration information of the access device to obtain an optimized data storage structure, wherein the storage space occupied by the optimized data storage structure is smaller than the storage space occupied by the basic data storage structure.
[0120] Regarding how to implement step 43 specifically, reference may be made to the relevant description of the aforementioned embodiment.
[0121] Step 44: The gateway determines an indicator representing the remaining access capability of the gateway.
[0122] Regarding how to implement step 44 specifically, reference may be made to the relevant description of the aforementioned embodiment.
[0123] Step 45: The gateway sends configuration prompt information to the configuration management device.
[0124] The configuration prompt information carries a remaining access capability characterization indicator of the gateway. For example, the remaining access capability characterization indicator includes the remaining storage space of the gateway running memory.
[0125] Step 46: The configuration management device displays configuration prompt information.
[0126] Step 47: The user configures the access device information of the gateway again.
[0127] For example, the user can configure more expansion modules and terminal devices according to the remaining storage space of the gateway running memory. After the configuration is completed, the gateway can store the data of the corresponding access device through the optimized storage structure.
[0128] In the disclosed embodiment, the above process can increase the maximum number of devices that can be connected to the gateway, while effectively alleviating the problem of too many connected devices and improving the intelligence level of the gateway configuration process.
[0129] Figure 5 is a schematic diagram of a structure of an apparatus for configuring a gateway according to some embodiments of the present disclosure. Figure 5 As shown, in some embodiments of the present disclosure, the device 50 for configuring a gateway can be used to execute the method for configuring a gateway described in any of the aforementioned embodiments, including an acquisition module 51, an optimization module 52, a first determination module 53, and a second determination module 54.
[0130] The acquisition module 51 is configured to acquire configuration information of the access device of the gateway.
[0131] The optimization module 52 is configured to optimize the basic data storage structure in the gateway according to the configuration information of the access device to obtain an optimized data storage structure, wherein the storage space occupied by the optimized data storage structure is smaller than the storage space occupied by the basic data storage structure.
[0132] The first determining module 53 is configured to determine the storage space occupied by the access device in the gateway according to the storage space occupied by the optimized data storage structure.
[0133] The second determination module 54 is configured to determine the remaining access capability characterization indicator of the gateway according to the running memory space of the gateway and the storage space occupied by the access devices in the gateway.
[0134] In the embodiments of the present disclosure, the above device can increase the maximum number of devices that can be connected to the gateway, while effectively alleviating the problem of too many connected devices and improving the intelligence level of the gateway configuration process.
[0135] Figure 6 FIG. 1 is a schematic diagram of the structure of an optimization module in an apparatus for configuring a gateway according to some embodiments of the present disclosure. Figure 6 As shown, in some embodiments, the optimization module 52 includes an optimization level determination unit 521 , a storage space determination unit 522 , and a storage structure determination unit 523 .
[0136] The optimization level determination unit 521 is configured to determine the optimization level of each attribute in the target storage structure according to the data attribute configuration information of the access device.
[0137] For example, assuming that the connected terminal device a belongs to device type 1, the basic data storage structure of device type 1 is used as the target storage structure, and the optimization level of each attribute in the structure is determined. If the connected terminal device b belongs to device type 2, the basic data storage structure of device type 2 is used as the target storage structure, and the optimization level of each attribute in the structure is determined.
[0138] The storage space determining unit 522 is configured to determine the optimized storage space of each attribute according to the optimization level of each attribute and the corresponding relationship between the optimization level and the storage space of the attribute.
[0139] The storage structure determining unit 523 is configured to determine the optimized data storage structure according to the optimized storage space of the attribute.
[0140] For example, assuming that the connected terminal device a belongs to device type 1, the basic data storage structure of device type 1 is optimized to obtain an optimized data storage structure. assuming that the connected terminal device b belongs to device type 2, the basic data storage structure of device type 2 is optimized to obtain an optimized data storage structure.
[0141] In the disclosed embodiment, the refinement level of storage structure optimization is improved through the above optimization module, and the gateway configuration process is further optimized. Moreover, by presetting the correspondence between the optimization level and the storage space of the attribute, and determining the optimized storage space of each attribute according to the correspondence during the storage structure optimization process, the processing efficiency of the storage structure optimization can be improved.
[0142] Figure 7 FIG. 1 is a schematic diagram of a device for configuring a gateway according to other embodiments of the present disclosure. Figure 7 As shown, the device 70 for configuring a gateway includes a memory 71 and a processor 72 coupled to the memory 71. The memory 71 is used to store instructions for executing the corresponding embodiment of the method for configuring a gateway. The processor 72 is configured to execute the method for configuring a gateway in any of some embodiments of the present disclosure based on the instructions stored in the memory 71.
[0143] Figure 8 is a schematic diagram of the structure of a gateway according to some embodiments of the present disclosure. Figure 8 As shown, the gateway 80 comprises means 81 for configuring the gateway.
[0144] The device 81 for configuring a gateway is used to execute the method for configuring a gateway described in any of the aforementioned embodiments.
[0145] In the disclosed embodiment, through the above gateway, the maximum number of devices that can be connected to the gateway can be increased, while the problem of too many connected devices can be effectively alleviated, and the intelligence level of the gateway configuration process can be improved.
[0146] Fig. 9 is a schematic diagram of the structure of a system for configuring a gateway according to some embodiments of the present disclosure. Fig. 9 As shown, a system 90 for configuring a gateway includes a gateway 80 and a configuration management device 91 .
[0147] The gateway 80 is configured to execute the method for configuring a gateway described in any of the foregoing embodiments.
[0148] The configuration management device 91 is configured to receive configuration prompt information from the gateway 80 and display the configuration prompt information. In addition, the configuration management device 91 can also interact with the user so that the user can configure the information of the gateway access device.
[0149] In the disclosed embodiment, through the above system, the maximum number of devices that can be connected to the gateway can be increased, while the problem of too many connected devices can be effectively alleviated, and the intelligence level of the gateway configuration process can be improved.
[0150] Fig.10 FIG. 1 is a schematic diagram of a network topology to which the method for configuring a gateway according to some embodiments of the present disclosure may be applied. Fig.10 As shown, the network topology includes a management layer, a network control layer, and a device layer.
[0151] The management layer includes configuration management facilities.
[0152] The network control layer includes a gateway (such as a lightweight gateway) and a plurality of expansion modules, wherein the gateway is used to execute the method for configuring the gateway described in any of the above embodiments.
[0153] The device layer includes multiple terminal devices connected to the gateway through expansion modules.
[0154] In the embodiments of the present disclosure, by enhancing the gateway function, the maximum number of devices that can be connected to the gateway can be increased, while the problem of too many connected devices can be effectively alleviated, and the intelligence level of the gateway configuration process can be improved.
[0155] Here, various aspects of the present disclosure are described with reference to flowcharts and / or block diagrams of methods, devices, and computer program products according to embodiments of the present disclosure. It should be understood that each frame of the flowchart and / or block diagram and the combination of frames can be implemented by computer-readable program instructions.
[0156] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable device to produce a machine, so that the processor executes the instructions to produce means for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.
[0157] These computer-readable program instructions may also be stored in a computer-readable memory, which cause the computer to work in a specific manner to produce an article of manufacture, including instructions for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.
[0158] The present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.
[0159] So far, the method, device, gateway and system for configuring a gateway according to the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed herein.
Claims
1. A method for configuring a gateway, comprising: Obtain the configuration information of the gateway's access device; According to the configuration information of the access device, the basic data storage structure in the gateway is optimized to obtain an optimized data storage structure, wherein the storage space occupied by the optimized data storage structure is smaller than the storage space occupied by the basic data storage structure; Determining the storage space occupied by the access device in the gateway according to the storage space occupied by the optimized data storage structure; A remaining access capability characterization indicator of the gateway is determined according to the running memory space of the gateway and the storage space occupied by the access device in the gateway.
2. The method for configuring a gateway according to claim 1, wherein: The configuration information of the access device includes the type of the access device and data attribute configuration information of the access device.
3. The method for configuring a gateway according to claim 2, wherein: There are multiple basic data storage structures of the gateway, and optimizing the basic data storage structure in the gateway according to the configuration information of the access device to obtain an optimized data storage structure includes: Selecting a basic data storage structure corresponding to the type of the access device from a plurality of basic data storage structures, and using it as a target storage structure; The target storage structure is optimized according to the data attribute configuration information of the access device to obtain an optimized data storage structure.
4. The method for configuring a gateway according to claim 3, wherein: The optimizing the target storage structure according to the data attribute configuration information of the access device to obtain an optimized data storage structure includes: Determining the optimization level of each attribute in the target storage structure according to the data attribute configuration information of the access device; Determining the optimized storage space of each attribute according to the optimization level of each attribute and the corresponding relationship between the optimization level and the storage space of the attribute; The optimized data storage structure is determined according to the optimized storage space of each attribute.
5. The method for configuring a gateway according to claim 4, wherein: The data attribute configuration information includes a value of a first attribute, and determining the optimization level of each attribute in the target storage structure according to the data attribute configuration information of the access device includes: In the case that the first attribute is all the attributes in the target storage structure, the optimization level of each attribute in the target storage structure is determined according to the value of the first attribute.
6. The method for configuring a gateway according to claim 4, wherein: The data attribute configuration information includes a value of a first attribute, and determining the optimization level of each attribute in the target storage structure according to the data attribute configuration information of the access device includes: In the case where the first attribute is a part of the attributes in the target storage structure, determining an optimization level of the first attribute according to a value of the first attribute; In a case where the target storage structure further includes a second attribute associated with the first attribute, determining a value of the second attribute according to a value of the first attribute and a logical relationship between attributes; An optimization level of the second attribute is determined according to the value of the second attribute.
7. The method for configuring a gateway according to claim 6, wherein: Determining the optimization level of each attribute in the target storage structure according to the data attribute configuration information of the access device further includes: When the target storage structure further includes a third attribute in addition to the first attribute and the second attribute, the optimization level of the third attribute is set to a set value, and the optimized storage space corresponding to the set value is the same as the storage space of the third attribute in the target storage structure.
8. The method for configuring a gateway according to claim 4, wherein: Determining the optimized data storage structure according to the optimized storage space of each attribute includes: Deleting the attributes whose storage space is zero after optimization from the attributes to obtain the remaining attributes; The optimized data storage structure is obtained according to the remaining attributes.
9. The method for configuring a gateway according to claim 1, wherein: The remaining access capability characterization indicator includes the remaining storage space of the running memory, and determining the remaining access capability characterization indicator of the gateway according to the running memory space of the gateway and the storage space occupied by the access device in the gateway includes: Calculating a difference between the running memory space and the storage space occupied by the access device in the gateway; The remaining storage space of the running memory is determined according to the difference.
10. The method for configuring a gateway according to claim 9, wherein: The remaining access capability characterization indicator further includes at least one amount of configurable data of remaining accessible devices, and the determining of the remaining access capability characterization indicator of the gateway according to the running memory space of the gateway and the storage space occupied by the access devices in the gateway further includes: The configurable data volume of each remaining accessible device is determined according to the remaining storage space of the running memory and the storage space occupied by the basic data storage structure corresponding to each remaining accessible device.
11. The method for configuring a gateway according to any one of claims 1 to 10, wherein: The access device includes at least one of an expansion module and a device accessing the gateway through the expansion module.
12. The method for configuring a gateway according to any one of claims 1 to 10, further comprising: Output configuration prompt information, where the configuration prompt information carries a characterization indicator of the remaining access capability of the gateway.
13. An apparatus for configuring a gateway, comprising: A program module for executing the method for configuring a gateway as claimed in any one of claims 1 to 12.
14. An apparatus for configuring a gateway, comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the method for configuring a gateway according to any one of claims 1 to 12 based on instructions stored in the memory.
15. A gateway, comprising: An apparatus for configuring a gateway as claimed in claim 13 or 14.
16. A system for configuring a gateway, comprising: The gateway as claimed in claim 15; The configuration management device is used to receive the configuration prompt information from the gateway and display the configuration prompt information.
17. A computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method for configuring a gateway as described in any one of claims 1 to 12.
18. A computer program product having computer program instructions stored thereon, wherein the instructions are executed by a processor to implement the method for configuring a gateway according to any one of claims 1 to 12.
Citation Information
Patent Citations
Method and device for configuring user access network data
CN101087208A
Internet of things data acquisition and optimization method and system, gateway and storage medium
CN110650085A
Computing resource allocation method and device, equipment and storage medium
CN118093178A
Automated wireless access point resource allocation and optimization
US20120020307A1
System and method for data and message optimization in wireless communications
WO2006111011A1