Data request optimization method and device and response mode communication system

文档序号:1831074 发布日期:2021-11-12 浏览:26次 中文

阅读说明:本技术 数据请求优化方法、装置及应答模式通信系统 (Data request optimization method and device and response mode communication system ) 是由 魏赫轩 申伟刚 陈楚洪 裘文波 黄淼成 于 2021-07-26 设计创作,主要内容包括:本申请涉及一种数据请求优化方法、装置及应答模式通信系统,数据请求优化方法包括获取请求设备的所有数据请求,为每个数据请求配置权重,根据每个数据请求配置的权重对相应数据请求进行扩增,对扩增后所有数据请求进行排序,依照排序结果发送请求数据,提高重要数据获取的实时性,有助于发现数据的周期性特征。(The data request optimization method comprises the steps of obtaining all data requests of request equipment, configuring weight for each data request, amplifying corresponding data requests according to the weight configured by each data request, sequencing all the amplified data requests, sending request data according to sequencing results, improving the instantaneity of important data acquisition and being beneficial to discovering the periodic characteristics of the data.)

1. A method for optimizing data requests, comprising:

acquiring all data requests of a requesting device;

configuring a weight for each data request;

amplifying the corresponding data requests according to the weight configured by each data request;

and sequencing all the data requests after amplification, and sending request data according to a sequencing result.

2. The data request optimization method of claim 1, wherein the configuring the weight for each data request comprises:

weights are configured for each data request according to the real-time requirements of the data request,

and/or the presence of a gas in the gas,

a weight is configured for each data request based on the data change characteristics of the data request.

3. The data request optimization method of claim 2, further comprising:

recording the response time corresponding to each data request;

and acquiring the data change characteristics corresponding to each data request according to the response time corresponding to each data request.

4. The method according to claim 1, wherein the augmenting the corresponding data request according to the configured weight of each data request comprises:

and amplifying according to the weight value corresponding to each data request.

5. The method according to claim 1, wherein the augmenting the corresponding data request according to the configured weight of each data request comprises:

and amplifying according to the multiple of the weight value corresponding to each data request.

6. The data request optimization method of claim 1, wherein the sorting all the data requests after the amplification and sending the request data according to the sorting result comprises:

and randomly sequencing all the data requests after amplification, and sending request data according to a random sequencing result.

7. The data request optimization method according to any one of claims 1 to 6, further comprising:

acquiring a data request sending period;

and re-randomly sequencing all the data requests in each data request sending period, and sending request data according to the data request sending period according to a random sequencing result.

8. The data request optimization method of claim 1, wherein obtaining all data requests of the requesting device comprises:

and receiving a plurality of data requests sent by the request equipment in a unified way.

9. A data request optimization apparatus, comprising:

the acquisition module is used for acquiring all data requests of the request equipment;

a configuration module for configuring a weight for each data request;

the amplification module is used for amplifying the corresponding data requests according to the weight configured by each data request;

and the sending module is used for sequencing all the data requests after amplification and sending the request data according to the sequencing result.

10. An acknowledged mode communication system, comprising: the data request optimization apparatus, the requesting device, and the plurality of answering devices of claim 9;

the data request optimization device is respectively connected with the request equipment and the plurality of response equipment.

11. The answer mode communication system according to any one of claims 10, further comprising:

and the display equipment is used for displaying the configuration module in the data request optimization device.

Technical Field

The application belongs to the technical field of data request optimization, and particularly relates to a data request optimization method, a data request optimization device and a response mode communication system.

Background

The serial bus data communication mode is mostly a request and response mode, that is, when one device needs to acquire data from other devices, the request is initiated first, and then the other device responds to the request, so that one data transmission is completed. Taking the Modbus protocol as an example, a master device and N slave devices exist in a bus, and only the master device is allowed to send a data acquisition request, and the slave devices report data when responding to the request. When a plurality of data need to be acquired, a plurality of requests need to be initiated, and data are periodically and circularly acquired by generally adopting a sequential request mode. When the number of the initiated requests is too large, some data which are requested less times but have higher real-time performance are easy to ignore; and when the response device generates periodic short-time mutation, if the periodicity of the mutation time is similar to the request period, the periodic mutation characteristic of the data is not easy to be found.

Disclosure of Invention

In order to overcome the problems that when the traditional serial bus data transmission is carried out and the number of requests is too large, some data with low request times and high real-time performance are easy to ignore and the periodic abrupt change characteristics of the data of a response device are not easy to be found, the data request optimization method, the device and the response mode communication system are provided.

In a first aspect, the present application provides a data request optimization method, including:

acquiring all data requests of a requesting device;

configuring a weight for each data request;

amplifying the corresponding data requests according to the weight configured by each data request;

and sequencing all the data requests after amplification, and sending request data according to a sequencing result.

Further, the configuring the weight for each data request includes:

weights are configured for each data request according to the real-time requirements of the data request,

and/or the presence of a gas in the gas,

a weight is configured for each data request based on the data change characteristics of the data request.

Further, the method also comprises the following steps:

recording the response time corresponding to each data request;

and acquiring the data change characteristics corresponding to each data request according to the response time corresponding to each data request.

Further, the amplifying the corresponding data request according to the configured weight of each data request includes:

and amplifying according to the weight value corresponding to each data request.

Further, the amplifying the corresponding data request according to the configured weight of each data request includes:

and amplifying according to the multiple of the weight value corresponding to each data request.

Further, the sorting all the data requests after amplification and sending request data according to the sorting result includes:

and randomly sequencing all the data requests after amplification, and sending request data according to a random sequencing result.

Further, the method also comprises the following steps:

acquiring a data request sending period;

and re-randomly sequencing all the data requests in each data request sending period, and sending request data according to the data request sending period according to a random sequencing result.

Further, the acquiring all data requests of the requesting device includes:

and receiving a plurality of data requests sent by the request equipment in a unified way.

In a second aspect, the present application provides a data request optimization apparatus, including:

the acquisition module is used for acquiring all data requests of the request equipment;

a configuration module for configuring a weight for each data request;

the amplification module is used for amplifying the corresponding data requests according to the weight configured by each data request;

and the sending module is used for sequencing all the data requests after amplification and sending the request data according to the sequencing result.

In a third aspect, the present application provides an acknowledged mode communication system, comprising:

a data request optimisation means, a requesting device and a plurality of answering devices as described in the second aspect;

the data request optimization device is respectively connected with the request equipment and the plurality of response equipment.

Further, the method also comprises the following steps:

and the display equipment is used for displaying the configuration module in the data request optimization device.

The technical scheme provided by the embodiment of the application can have the following beneficial effects:

according to the data request optimization method, the data request optimization device and the response mode communication system, the data request optimization method comprises the steps of obtaining all data requests of a request device, configuring the weight for each data request, amplifying the corresponding data requests according to the weight configured for each data request, sequencing all the data requests after amplification, sending request data according to the sequencing result, improving the instantaneity of obtaining important data and being beneficial to finding out the periodic characteristics of the data.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.

Fig. 1 is a flowchart of a data request optimization method according to an embodiment of the present application.

Fig. 2 is a flowchart of a data request optimization method according to another embodiment of the present application.

Fig. 3 is a functional block diagram of a data request optimization apparatus according to an embodiment of the present application.

Fig. 4 is a functional block diagram of an answer mode communication system according to an embodiment of the present application.

Fig. 5 is a functional block diagram of a conventional request-response model according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without making any creative effort, shall fall within the protection scope of the present application.

Fig. 1 is a flowchart of a data request optimization method according to an embodiment of the present application, and as shown in fig. 1, the data request optimization method includes:

s11: acquiring all data requests of a requesting device;

s12: configuring a weight for each data request;

s13: amplifying the corresponding data requests according to the weight configured by each data request;

s14: and sequencing all the data requests after amplification, and sending request data according to a sequencing result.

The serial bus data communication mode is mostly a request and response mode, that is, when one device needs to acquire data from other devices, the request is initiated first, and then the other device responds to the request, so that one data transmission is completed. In a conventional data request method, when a plurality of data needs to be acquired, a plurality of requests need to be initiated, and data is periodically and circularly acquired by generally adopting a sequential request mode. When the number of the initiated requests is too large, some data which are requested less times but have higher real-time performance are easy to ignore; and when the response device generates periodic short-time mutation, if the periodicity of the mutation time is similar to the request period, the periodic mutation characteristic of the data is not easy to be found.

In this embodiment, the data request optimization method includes acquiring all data requests of a requesting device, configuring a weight for each data request, amplifying corresponding data requests according to the weight configured for each data request, sorting all the amplified data requests, and sending request data according to a sorting result, so that the real-time performance of acquiring important data is improved, and discovery of periodic characteristics of the data is facilitated.

An embodiment of the present invention provides another data request optimization method, as shown in a flowchart illustrated in fig. 2, where the data request optimization method includes:

s21: receiving a plurality of data requests sent by request equipment in a unified manner;

in the conventional data request method, the request device needs to send data requests to multiple response devices one by one, and the request time is long.

It should be noted that the source and classification of the data request are determined by an actual system, for example, in an air conditioning system, the requesting device needs to obtain the operation parameters of each air conditioner extension, and each operation parameter is a data request.

S22: configuring a weight for each data request according to the real-time requirement and/or the data change characteristic of the data request;

for example, the real-time requirement of the data for requesting and responding is low, or the weight of the request data which is unchanged for a long time is configured to be 1; the data change for the request response is fast, or the weight of the request data with high real-time property is required to be configured to be 5.

In some embodiments, further comprising:

recording the response time corresponding to each data request;

and acquiring the data change characteristics corresponding to each data request according to the response time corresponding to each data request.

S23: amplifying the corresponding data requests according to the weight configured by each data request;

for example, a data request with a request weight of 1 is amplified according to 1 request, a request with a request weight of 5 is amplified according to 5 requests, and the more the data request amplification quantity is, the more the number of data acquisition times is, so that the real-time performance of important data is increased.

In some embodiments, further comprising:

the data requests are amplified according to the multiple of the weight value corresponding to each data request, for example, a data request with a request weight of 1 is amplified according to 1 × 2-2 requests, and a request with a request weight of 5 is amplified according to 5 × 2-10 requests.

The data request amplification method is not limited in the present application, and can be set by those skilled in the art according to actual needs.

S24: and randomly sequencing all the data requests after amplification, and sending request data according to a random sequencing result.

For example, in the conventional data request method, the response device has a short fault at every 1S, the fault maintenance time is short, and if the request period is 1S, abrupt change or abnormality of the periodically changed data is not easy to find.

In this embodiment, all the summarized data requests are randomly arranged, and the arrangement is not regular. The possibility of acquiring periodically varying data can be increased when the data that needs to be acquired varies periodically and at the same period as the data request round because the data request has no regularity.

S25: acquiring a data request sending period;

s26: and re-randomly sequencing all the data requests in each data request sending period, and sending request data according to the data request sending period according to a random sequencing result.

The original data request sending data is disturbed again in each data request sending period, the data requests are randomly arranged again, and the requests are initiated again, so that the periodic characteristics or the abnormity of the data can be further discovered.

In the embodiment, the real-time performance of data acquisition can be improved by classifying the request data and configuring the weight; by optimizing the roll call sequence, i.e., randomly arranging the amplified data requests, the ability to discover periodic features can be improved.

An embodiment of the present invention provides a data request optimization apparatus, and as shown in a functional structure diagram of fig. 3, the data request optimization apparatus includes:

an obtaining module 31, configured to obtain all data requests of a requesting device;

a configuration module 32 for configuring a weight for each data request;

an amplification module 33, configured to amplify the corresponding data request according to the configured weight of each data request;

and the sending module 34 is configured to sort all the data requests after amplification, and send request data according to a sorting result.

In some embodiments, the obtaining module 31 is configured to: the receiving request device uniformly sends a plurality of data requests.

In some embodiments, configuration module 32 is configured to:

weights are configured for each data request according to the real-time requirements of the data request,

and/or the presence of a gas in the gas,

a weight is configured for each data request based on the data change characteristics of the data request.

Further, the recording module is configured to record a response time corresponding to each data request, and obtain a data change characteristic corresponding to each data request according to the response time corresponding to each data request.

In some embodiments, the configuration module 33 is configured to:

and amplifying according to the weight value corresponding to each data request.

Or, amplifying according to the multiple of the weight value corresponding to each data request.

In some embodiments, further comprising:

and the random ordering module is used for randomly ordering all the data requests after amplification and sending request data according to a random ordering result.

Or acquiring a data request sending period, re-randomly sequencing all data requests in each data request sending period, and sending request data according to the data request sending period according to a random sequencing result.

In this embodiment, all data requests of the requesting device are acquired by the acquiring module, the configuring module configures a weight for each data request, the amplifying module amplifies the corresponding data request according to the weight configured for each data request, the transmitting module sequences all the amplified data requests, and transmits the requested data according to the sequencing result, so that the real-time performance of acquiring important data can be improved, and the discovery of the periodic characteristics of the data is facilitated.

An embodiment of the present invention provides a response mode communication system, as shown in a functional structure diagram of fig. 4, where the response mode communication system includes:

the data request optimization apparatus 41, the requesting device 42, and the plurality of responding devices 43 as described in the above embodiments;

the data request optimization device 41 is connected to a requesting device 42 and a plurality of responding devices 43, respectively.

In some embodiments, further comprising:

and the display device is used for displaying the configuration modules in the data request optimization device 41.

In the embodiment, a data request optimization device is added to uniformly receive a plurality of data requests sent by the request device, so as to reduce the request time, configure weights and amplify the data requests according to the weights after receiving all the data requests, and then send the data requests randomly, so that the real-time performance of important data acquisition can be improved, and the periodic characteristics of data can be found. .

It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.

It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.

Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.

It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.

It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.

In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.

The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.

In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

It should be noted that the present invention is not limited to the above-mentioned preferred embodiments, and those skilled in the art can obtain other products in various forms without departing from the spirit of the present invention, but any changes in shape or structure can be made within the scope of the present invention with the same or similar technical solutions as those of the present invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:存储设备的链路启动方法、存储设备、主机及其实现系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!