EP4293442A1 - Data acquisition method and apparatus, calculation device, and storage medium - Google Patents

Data acquisition method and apparatus, calculation device, and storage medium Download PDF

Info

Publication number
EP4293442A1
EP4293442A1 EP21929581.3A EP21929581A EP4293442A1 EP 4293442 A1 EP4293442 A1 EP 4293442A1 EP 21929581 A EP21929581 A EP 21929581A EP 4293442 A1 EP4293442 A1 EP 4293442A1
Authority
EP
European Patent Office
Prior art keywords
data
offset
byte
data point
data points
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
EP21929581.3A
Other languages
German (de)
French (fr)
Inventor
Tengfei WU
Daniel BOVENSIEPEN
Jiaxing ZHU
Peipei WANG
Shanshan GAN
Yi Liu
Yan Lin
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.)
Siemens AG
Original Assignee
Siemens AG
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 Siemens AG filed Critical Siemens AG
Publication of EP4293442A1 publication Critical patent/EP4293442A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/06Arrangements for sorting, selecting, merging, or comparing data on individual record carriers
    • G06F7/08Sorting, i.e. grouping record carriers in numerical or other ordered sequence according to the classification of at least some of the information they carry
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts

Definitions

  • the present disclosure relates generally to the technical field of digital factories, in particular to a data acquisition method and apparatus, a calculation device and a storage medium.
  • the present invention proposes a data acquisition method which acquires data points from a field device more efficiently.
  • a data acquisition method comprising: generating a list of data points to be acquired from a field device; performing the following operations for each data point in the list separately: parsing an address of the data point, and determining values of a region type, a DB offset, a byte offset and a bit offset in the address; using a first predetermined rule to calculate a sorting indicator of the data point according to the values of the region type, the DB offset, the byte offset and the bit offset; using a second predetermined rule to calculate a grouping indicator of the data point according to the values of the region type, the DB offset and the byte offset; sorting all of the data points according to the calculated sorting indicator of each data point; dividing all of the sorted data points into multiple groups on the basis of the grouping indicator and a byte length of each data point and the length of a protocol data unit of the field device; and sending a data request for each group of data points.
  • the step of dividing all of the sorted data points into multiple groups comprises: traversing all data points starting from a first data point, separately calculating the sum of byte lengths of all groups for different grouping methods while ensuring that the byte length of each group into which the data points are divided is less than or equal to the length of the protocol data unit and the number of groups into which the data points are divided is minimal, and grouping the data points using the grouping method for which the sum of the byte lengths is minimal.
  • a data acquisition apparatus comprising: a data point list generating unit, configured to generate a list of data points to be acquired from a field device; a data point information processing unit, configured to perform the following operations for each data point in the list: parsing an address of the data point, and determining values of a region type, a DB offset, a byte offset and a bit offset in the address; using a first predetermined rule to calculate a sorting indicator of the data point according to the values of the region type, the DB offset, the byte offset and the bit offset; using a second predetermined rule to calculate a grouping indicator of the data point according to the values of the region type, the DB offset and the byte offset; a data point sorting unit, configured to sort all of the data points according to the calculated sorting indicator of each data point; a data point grouping unit, configured to divide all of the sorted data points into multiple groups on the basis of the grouping indicator and a byte length of each data point and
  • the data point grouping unit is further configured to: traverse all data points starting from a first data point, calculate the sum of byte lengths of all groups for different grouping methods while ensuring that the byte length of each group into which the data points are divided is less than or equal to the length of the protocol data unit and the number of groups into which the data points are divided is minimal, and group the data points using the grouping method for which the sum of the byte lengths is minimal.
  • a computing device comprising: at least one processor; and a memory coupled to the at least one processor, the memory being used to store an instruction, wherein, when the instruction is executed by the at least one processor, the processor is caused to execute the method described above.
  • a non-transitory machine-readable storage medium storing an executable instruction which, when executed, causes the machine to execute the method described above.
  • a computer program comprising a computer-executable instruction which, when executed, causes at least one processor to execute the method described above.
  • a computer program product tangibly stored on a computer-readable medium and comprising a computer-executable instruction which, when executed, causes at least one processor to execute the method described above.
  • the data acquisition method and apparatus define a data general-purpose model capable of describing data points of different field devices; based on information extracted from data points, multiple data points are divided into groups, and a group of data points is merged in one data request, so the number of data requests can be reduced, thereby improving the communication efficiency. Furthermore, the method that minimizes the sum of the byte lengths of all of the groups into which the data points are divided is chosen for grouping the data points, making it possible to reduce the number of invalid bytes included in the data request, thereby further improving the communication efficiency.
  • the method and apparatus according to the present invention take full account of the similarities and differences between data points of different devices, so have very good compatibility.
  • the reference labels are as follows: 100: data acquisition method S101, S104, S106, S108 and S110: steps 200: data acquisition apparatus 202: data point list generating unit 204: data point information processing unit 206: data point sorting unit 208: data point grouping unit 210: data request unit 300: computing device 302: processor 304: memory
  • the term “comprising” and variants thereof represent open terms, meaning “including but not limited to”.
  • the term “based on” means “at least partly based on”.
  • the terms “one embodiment” and “an embodiment” mean “at least one embodiment”.
  • the term “another embodiment” means “at least one other embodiment”.
  • the terms “first”, “second”, etc. may denote different or identical objects. Other definitions may be included below, either explicitly or implicitly. Unless clearly stated in the context, the definition of a term is consistent throughout the Description.
  • the present invention proposes a data acquisition method which acquires data points from a field device more efficiently.
  • Acquisition of data from a field device is generally based on socket communication, comprising two steps: 1) sending a data request to the field device; 2) reading a data response from the field device.
  • a user can obtain data of various data points of the field device by these two steps.
  • Data points are variables stored in the field device which have a physical meaning, e.g. temperature, humidity, etc.
  • the data acquisition method according to the present disclosure can merge multiple data points in a single data request, and can thus reduce the number of data requests sent to the field device, thereby improving the communication efficiency.
  • improving the communication efficiency comprises two aspects: firstly, reducing the number of data requests as much as possible; and having achieved this, further reducing the overall payload byte length.
  • data points having similar addresses in the device internal memory can be merged into a single data request.
  • a data point model is proposed that is capable of describing data points of different devices, the data point model comprising information capable of describing the similarity of data point addresses.
  • the data point model defined in the present disclosure may for example comprise information such as data point names, data point addresses, source data types, destination data types and data transformations. The specific meanings of each of these items of information are explained below.
  • the storage position of a data point can be determined.
  • the data point model at least comprises two items of information: data point address, and source data type.
  • the data point model may also comprise information such as data point name, destination data type and data transformation.
  • the method according to embodiments of the present disclosure can group these multiple data points, and include a request for a group of multiple data points in a single data request, and can thus reduce the number of data requests and improve the communication efficiency.
  • Fig. 1 is a flow chart of an exemplary process of a data acquisition method 100 according to embodiments of the present invention.
  • step S102 a list of data points to be acquired from a field device is generated.
  • the list comprises information of multiple data points which a user wishes to acquire from the field device.
  • an edge device may have an engineering tool to configure a list of data points to be acquired from the field device.
  • the engineering tool may for example be a Web user interface or a PC client, etc.
  • Each data point in the generated data point list conforms to the data point model defined above.
  • step S104 the following operations are performed for each data point in the list separately.
  • an address of the data point is parsed, to determine values of region type, DB offset, byte offset and bit offset in the address.
  • the address of the data point in the data point list is a string indicating address information; by parsing this string, values of the attributes mentioned above can be obtained.
  • a data point in the Modbus device has the address 1.40001.1, and by parsing this address, attribute values of the data point address can be obtained as follows:
  • a sorting indicator may be calculated according to the values of region type, DB offset, byte offset and bit offset.
  • the sorting indicator is defined as a 64-bit number, and the following formula is used to calculate the sorting indicator of the data point.
  • Sorting indicator region type ⁇ 48 + DB offset ⁇ 32 + byte offset * 8 * data unit + bit offset
  • the symbol “ ⁇ ” means that a value is moved n bits to the left for storage
  • “data unit” means the byte size actually changed when the byte offset of the address of the field device changes by 1.
  • the data units of different field devices might be different; for example, in some devices, when the byte offset of the address changes by 1, it actually changes by 1 byte, while in other devices, when the byte offset of the address changes by 1, it actually changes by 2 bytes, so the byte offset if multiplied by one data unit when calculating the sorting indicator.
  • the sorting indicator is calculated on the basis of the values of region type, DB offset, byte offset and bit offset, so may be used to assess the similarity between different data point addresses.
  • a grouping indicator may be calculated according to the values of region type, DB offset and byte offset.
  • the grouping indicator is also defined as a 64-bit number, and the following formula is used to calculate the grouping indicator of the data point.
  • Grouping indicator region type ⁇ 48 + DB offset ⁇ 32 + byte offset * data unit
  • the grouping indicator is information that can be used when grouping data points, and does not include bit information in the address, because bit information is not taken into account when grouping is performed; as before, the byte offset in this case is also multiplied by the data unit.
  • step S106 all data points are sorted according to the calculated sorting indicator of each data point.
  • all data points are sorted in ascending order of data point address.
  • the data points are arranged sequentially in order of address from small to big.
  • step S108 all of the sorted data points are divided into multiple groups on the basis of the grouping indicator and byte length of each data point and the length of a protocol data unit of the field device.
  • all of the sorted data points may be grouped in the following way.
  • each field device has its standard PDU (protocol data unit) length.
  • PDU protocol data unit
  • Addresses between the addresses of two adjacent data points store invalid data unrelated to the data to be requested; such addresses are invalid, and if a large number of such invalid addresses are included in the data request sent to the field device, the data obtained will include a large amount of invalid data, so the communication efficiency is reduced. Thus, it is hoped that the data request, as far as possible, includes no invalid addresses or only a small number of invalid addresses.
  • N data points 1 - N are included in the data point list, and the data points are divided into M groups.
  • the mth group (m being one of 1 - M) starts at data point S and ends at data point E; then the byte length of group m is: grouping indicator of data point E + byte length of data point E - grouping indicator of data point S.
  • the byte length of each group can be calculated, and the sum of the byte lengths of all groups can then be calculated.
  • All of the data points are traversed, starting from the first data point, and the sum of the byte lengths of all groups is separately calculated for different grouping methods while ensuring that the byte length of each group into which the data points are divided is less than or equal to the PDU length and the number of groups into which the data points are divided is minimal, and finally, the grouping method for which the sum of the byte lengths is minimal is used to group the data points.
  • step S110 a data request for each group of data points is sent to the field device.
  • each group it is possible to know the address of a starting data point and the total byte length from the starting data point to an end data point; based on these two parameters, the data points of one group may be merged in a read request to send a data request to the field device.
  • Fig. 2 is a block diagram of an exemplary configuration of a data acquisition apparatus 200 according to embodiments of the present invention.
  • the data acquisition apparatus 200 comprises: a data point list generating unit 202, a data point information processing unit 204, a data point sorting unit 206, a data point grouping unit 208 and a data request unit 210.
  • the data point list generating unit 202 is configured to generate a list of data points to be acquired from a field device.
  • the data point information processing unit 204 is configured to perform the following operations for each data point in the list:
  • the data point sorting unit 206 is configured to sort all data points according to the calculated sorting indicator of each data point.
  • the data point grouping unit 208 is configured to divide all of the sorted data points into multiple groups on the basis of the grouping indicator and byte length of each data point and the length of a protocol data unit of the field device.
  • the data request unit 210 is configured to send a data acquisition request for each group of data points.
  • the data point grouping unit 208 is further configured to: traverse all data points starting from a first data point, calculate the sum of the byte lengths of all of the groups for different grouping methods while ensuring that the byte length of each group into which the data points are divided is less than or equal to the length of the protocol data unit and the number of groups into which the data points are divided is minimal, and group the data points using the grouping method for which the sum of the byte lengths is minimal.
  • the "data unit” means the byte size actually changed when the byte offset of the address of the field device changes by 1.
  • the details of the operations and functions of the various parts of the data acquisition apparatus 200 may for example be the same as or similar to the relevant parts of the embodiment of the data acquisition method 100 of the present disclosure described with reference to Fig. 1 , so a detailed description is not repeated here.
  • the data acquisition method and apparatus define a data general-purpose model capable of describing data points of different field devices; based on information extracted from data points, multiple data points are divided into groups, and a group of data points is merged in one data request, so the number of data requests can be reduced, thereby improving the communication efficiency. Furthermore, the method that minimizes the sum of the byte lengths of all of the groups into which the data points are divided is chosen for grouping the data points, making it possible to reduce the number of invalid bytes included in the data request, thereby further improving the communication efficiency.
  • the method and apparatus according to the present invention take full account of the similarities and differences between data points of different devices, so have very good compatibility.
  • the data acquisition method and apparatus according to embodiments of the present disclosure have been described above with reference to Figs. 1 and 2 .
  • the various units of the data acquisition apparatus described above may be realized using hardware, software, or a combination of hardware and software.
  • Fig. 3 shows a block diagram of a calculation device 300 for realizing data acquisition according to embodiments of the present disclosure.
  • the calculation device 300 may comprise at least one processor 302, which processor 302 executes at least one computer-readable instruction (i.e. the abovementioned element realized in the form of software) encoded or stored in a computer-readable storage medium (i.e. a memory 304).
  • a computer-readable storage medium i.e. a memory 304
  • a computer-executable instruction stored in the memory 304 when executed, causes the at least one processor 302 to perform the various operations and functions described above with reference to Figs. 1 - 2 in various embodiments of the present disclosure.
  • a non-transitory machine-readable medium may have a machine-executable instruction (i.e. the abovementioned element realized in the form of software) which, when executed by a machine, causes the machine to perform the various operations and functions described above with reference to Figs. 1 - 2 in various embodiments of the present disclosure.
  • a machine-executable instruction i.e. the abovementioned element realized in the form of software
  • a computer program comprising a computer-executable instruction which, when executed, causes at least one processor to perform the various operations and functions described above with reference to Figs. 1 - 2 in various embodiments of the present disclosure.
  • a computer program product comprising a computer-executable instruction which, when executed, causes at least one processor to perform the various operations and functions described above with reference to Figs. 1 - 2 in various embodiments of the present disclosure.
  • the apparatus structures described in the embodiments above may be physical structures or logic structures, i.e. some units might be realized by the same physical entity, or some units might be realized by multiple physical entities separately, or may be realized jointly by certain components in multiple independent devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Automation & Control Theory (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure relates to a data acquisition method and apparatus, a calculation device, and a storage medium. The data acquisition method comprises: generating a list of data points to be acquired from a field device; separately performing the following operations for each data point in the list: parsing the address of the data point and determining values of a region type, a DP offset, a byte offset, and a bit offset in the address; calculating a sorting indicator of the data point according to the values of the region type, the DB offset, the byte offset, and the bit offset by using a first predetermined rule; calculating a grouping indicator of the data point according to the values of the region type, the DB offset, and the byte offset by using a second predetermined rule; sorting all the data points according to the calculated sorting indicator of each data point; dividing all the sorted data points into a plurality of groups on the basis of the grouping indicator and a byte length of each data point and the length of a protocol data unit of the filed device; and sending to the field device a data request for each group of data points.

Description

    Technical field
  • The present disclosure relates generally to the technical field of digital factories, in particular to a data acquisition method and apparatus, a calculation device and a storage medium.
  • Background art
  • In order to realize Industry 4.0, the transmission of field device data to IT systems and/or industrial clouds to achieve data transparency is very important. There are different types of field devices, including sensors, PLCs (programmable logic controllers), CNC (numerically controlled lathes) and other devices, with different types of field devices having their own communication protocols. When it is necessary to acquire large numbers of data points from field devices, the question of how to improve communication efficiency for different devices is important. In the prior art, many industrial gateways support data acquisition from field devices, but at the present time there is no universal data acquisition method capable of acquiring data in an optimal way.
  • Summary of the invention
  • A brief summary of the present invention is given below, in order to provide a basic understanding of certain aspects of the present invention. It should be understood that this summary is not an exhaustive summary of the present invention. It is not intended to determine key or important parts of the present invention, nor is it intended to define the scope of the present invention. Its aim is merely to set out some concepts in simplified form, and thus serve as a preamble to the more detailed description discussed later. In view of the above, the present invention proposes a data acquisition method which acquires data points from a field device more efficiently.
  • According to one aspect of the present disclosure, a data acquisition method is provided, comprising: generating a list of data points to be acquired from a field device; performing the following operations for each data point in the list separately: parsing an address of the data point, and determining values of a region type, a DB offset, a byte offset and a bit offset in the address; using a first predetermined rule to calculate a sorting indicator of the data point according to the values of the region type, the DB offset, the byte offset and the bit offset; using a second predetermined rule to calculate a grouping indicator of the data point according to the values of the region type, the DB offset and the byte offset; sorting all of the data points according to the calculated sorting indicator of each data point; dividing all of the sorted data points into multiple groups on the basis of the grouping indicator and a byte length of each data point and the length of a protocol data unit of the field device; and sending a data request for each group of data points.
  • In this way, the number of data requests can be reduced, improving the communication efficiency.
  • Optionally, in one example of the above aspect, the step of dividing all of the sorted data points into multiple groups comprises: traversing all data points starting from a first data point, separately calculating the sum of byte lengths of all groups for different grouping methods while ensuring that the byte length of each group into which the data points are divided is less than or equal to the length of the protocol data unit and the number of groups into which the data points are divided is minimal, and grouping the data points using the grouping method for which the sum of the byte lengths is minimal.
  • In this way, the overall payload byte length can be reduced, further improving the communication efficiency.
  • Optionally, in one example of the above aspect, the first predetermined rule is: sorting indicator = region type << 48 + DB offset << 32 + byte offset * 8 * data unit + bit offset, wherein the data unit means the byte actually changed when the byte offset of the address of the field device changes by 1.
  • Optionally, in one example of the above aspect, the second predetermined rule is: grouping indicator = region type << 48 + DB offset << 32 + byte offset * data unit, wherein the data unit means the byte size actually changed when the byte offset of the address of the field device changes by 1.
  • According to another aspect of the present disclosure, a data acquisition apparatus is provided, comprising: a data point list generating unit, configured to generate a list of data points to be acquired from a field device; a data point information processing unit, configured to perform the following operations for each data point in the list: parsing an address of the data point, and determining values of a region type, a DB offset, a byte offset and a bit offset in the address; using a first predetermined rule to calculate a sorting indicator of the data point according to the values of the region type, the DB offset, the byte offset and the bit offset; using a second predetermined rule to calculate a grouping indicator of the data point according to the values of the region type, the DB offset and the byte offset; a data point sorting unit, configured to sort all of the data points according to the calculated sorting indicator of each data point; a data point grouping unit, configured to divide all of the sorted data points into multiple groups on the basis of the grouping indicator and a byte length of each data point and the length of a protocol data unit of the field device; and a data request unit, configured to send a data acquisition request for each group of data points.
  • Optionally, in one example of the above aspect, the data point grouping unit is further configured to: traverse all data points starting from a first data point, calculate the sum of byte lengths of all groups for different grouping methods while ensuring that the byte length of each group into which the data points are divided is less than or equal to the length of the protocol data unit and the number of groups into which the data points are divided is minimal, and group the data points using the grouping method for which the sum of the byte lengths is minimal.
  • According to another aspect of the present disclosure, a computing device is provided, comprising: at least one processor; and a memory coupled to the at least one processor, the memory being used to store an instruction, wherein, when the instruction is executed by the at least one processor, the processor is caused to execute the method described above.
  • According to another aspect of the present disclosure, a non-transitory machine-readable storage medium is provided, storing an executable instruction which, when executed, causes the machine to execute the method described above.
  • According to another aspect of the present disclosure, a computer program is provided, comprising a computer-executable instruction which, when executed, causes at least one processor to execute the method described above.
  • According to another aspect of the present disclosure, a computer program product is provided, tangibly stored on a computer-readable medium and comprising a computer-executable instruction which, when executed, causes at least one processor to execute the method described above.
  • The data acquisition method and apparatus according to the present invention define a data general-purpose model capable of describing data points of different field devices; based on information extracted from data points, multiple data points are divided into groups, and a group of data points is merged in one data request, so the number of data requests can be reduced, thereby improving the communication efficiency. Furthermore, the method that minimizes the sum of the byte lengths of all of the groups into which the data points are divided is chosen for grouping the data points, making it possible to reduce the number of invalid bytes included in the data request, thereby further improving the communication efficiency. The method and apparatus according to the present invention take full account of the similarities and differences between data points of different devices, so have very good compatibility.
  • Brief description of the drawings
  • By referring to the description of embodiments of the present invention in conjunction with the drawings, it will be easier to understand the above and other objectives, characteristics and advantages of the present invention. The components in the drawings are merely intended to show the principles of the present invention. In the drawings, identical or similar technical features or components will be indicated using identical or similar reference labels. In the drawings:
    • Fig. 1 is a flow chart of an exemplary process of a data acquisition method 100 according to embodiments of the present invention.
    • Fig. 2 is a block diagram of an exemplary configuration of a data acquisition apparatus 200 according to embodiments of the present invention.
    • Fig. 3 shows a block diagram of a calculation device 300 for realizing data acquisition according to embodiments of the present disclosure.
  • The reference labels are as follows:
    100: data acquisition method S101, S104, S106, S108 and S110: steps
    200: data acquisition apparatus 202: data point list generating unit
    204: data point information processing unit 206: data point sorting unit
    208: data point grouping unit 210: data request unit
    300: computing device 302: processor
    304: memory
  • Detailed description of the invention
  • The subject matter described herein is now discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed merely in order to enable those skilled in the art to better understand and thereby implement the subject matter described herein, without limiting the protection scope, applicability or examples expounded in the claims. The functions and arrangement of the discussed elements may be changed without departing from the scope of protection of the content of the present disclosure. In all of the examples, various processes or components may be omitted, substituted or added as required. For example, the described methods may be executed in a different order from that described, and various steps may be added, omitted or combined. Furthermore, features described in relation to some examples may also be combined in other examples.
  • As used herein, the term "comprising" and variants thereof represent open terms, meaning "including but not limited to". The term "based on" means "at least partly based on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc. may denote different or identical objects. Other definitions may be included below, either explicitly or implicitly. Unless clearly stated in the context, the definition of a term is consistent throughout the Description.
  • To solve the abovementioned problem, the present invention proposes a data acquisition method which acquires data points from a field device more efficiently.
  • Acquisition of data from a field device is generally based on socket communication, comprising two steps: 1) sending a data request to the field device; 2) reading a data response from the field device. A user can obtain data of various data points of the field device by these two steps. Data points are variables stored in the field device which have a physical meaning, e.g. temperature, humidity, etc. The data acquisition method according to the present disclosure can merge multiple data points in a single data request, and can thus reduce the number of data requests sent to the field device, thereby improving the communication efficiency.
  • According to the present disclosure, improving the communication efficiency comprises two aspects: firstly, reducing the number of data requests as much as possible; and having achieved this, further reducing the overall payload byte length. To reduce the number of data requests, data points having similar addresses in the device internal memory can be merged into a single data request. In the present disclosure, a data point model is proposed that is capable of describing data points of different devices, the data point model comprising information capable of describing the similarity of data point addresses.
  • The data point model defined in the present disclosure may for example comprise information such as data point names, data point addresses, source data types, destination data types and data transformations. The specific meanings of each of these items of information are explained below.
    • Data point names:
      Used to identify data points, with different data points having different data point names.
    • Data point addresses:
      Used to address data points in field devices. Different devices might have different data point address definitions. In the present disclosure, the following method is used to describe data point addresses, with a single data point address comprising the attributes: region type, DB offset, byte offset and bit offset.
      • > Region type:
        Different devices might have different region type definitions. For example, in the case of a Modbus device, region type indicates a workstation ID of the device; in the case of a PLC device, region type indicates different data regions, e.g. M, I, Q and DB regions in some PLCs.
      • > DB offset:
        DB offset may also have different meanings for different devices. For example, in a Modbus device, DB offset represents object type, e.g. coil, discrete input, holding register and input register, etc.; in the some PLCs, DB offset indicates DB offset number, e.g. DB1, DB2; and in other PLCs, the DB offset may be set to 0.
      • > Byte offset:
        Byte offset represents byte offset in a DB, or byte offset in a data region when the DB offset is 0.
      • > Bit offset:
        Bit offset indicates bit offset in a byte.
    • Source data types:
      Source data types indicate data types defined in a single field device, wherein the data types defined in the same field device are generally the same, e.g. bool, char, byte, short, int, word, dword, long, string, etc. The byte length of a single data point may be determined according to source data type.
    • Destination data types:
      Data types defined in an IT system or cloud platform, wherein data types are generally the same in the same IT system or cloud platform, e.g. bool, int, double, long, string, etc.
    • Data transformations:
      Data read from a field device is generally in the form of a byte array, and meaningful data needs to be extracted from the byte array by linear transformation or square transformation.
  • Based on a start address of a stored data point determined from a data point address and a byte length of a data point determined from a source data type, the storage position of a data point can be determined. Thus, the data point model at least comprises two items of information: data point address, and source data type. Optionally, the data point model may also comprise information such as data point name, destination data type and data transformation.
  • As stated above, data of a large number of data points might need to be acquired from a field device; the method according to embodiments of the present disclosure can group these multiple data points, and include a request for a group of multiple data points in a single data request, and can thus reduce the number of data requests and improve the communication efficiency.
  • The data acquisition method and apparatus according to embodiments of the present disclosure are described below with reference to the drawings.
  • Fig. 1 is a flow chart of an exemplary process of a data acquisition method 100 according to embodiments of the present invention.
  • Firstly, in step S102, a list of data points to be acquired from a field device is generated.
  • The list comprises information of multiple data points which a user wishes to acquire from the field device.
  • In one specific example, an edge device may have an engineering tool to configure a list of data points to be acquired from the field device. The engineering tool may for example be a Web user interface or a PC client, etc. Each data point in the generated data point list conforms to the data point model defined above.
  • Next, in step S104, the following operations are performed for each data point in the list separately.
  • Firstly, an address of the data point is parsed, to determine values of region type, DB offset, byte offset and bit offset in the address.
  • The address of the data point in the data point list is a string indicating address information; by parsing this string, values of the attributes mentioned above can be obtained.
  • For example, taking a Modbus device as a specific example, a data point in the Modbus device has the address 1.40001.1, and by parsing this address, attribute values of the data point address can be obtained as follows:
    • Region type = 1 (workstation ID)
    • DB offset = 4 (holding register)
    • Byte offset = 1
    • Bit offset = 1
  • Next, a sorting indicator may be calculated according to the values of region type, DB offset, byte offset and bit offset.
  • In a specific example, the sorting indicator is defined as a 64-bit number, and the following formula is used to calculate the sorting indicator of the data point. Sorting indicator = region type << 48 + DB offset << 32 + byte offset * 8 * data unit + bit offset
    Figure imgb0001
  • Here, the symbol "<<" means that a value is moved n bits to the left for storage, and "data unit" means the byte size actually changed when the byte offset of the address of the field device changes by 1. The data units of different field devices might be different; for example, in some devices, when the byte offset of the address changes by 1, it actually changes by 1 byte, while in other devices, when the byte offset of the address changes by 1, it actually changes by 2 bytes, so the byte offset if multiplied by one data unit when calculating the sorting indicator.
  • In this way, a 64-bit number indicating the sorting indicator of the address can be obtained.
  • Those skilled in the art will understand that another formula could also be used to calculate the sorting indicator; there is no restriction to the formula shown in the specific example above. The sorting indicator is calculated on the basis of the values of region type, DB offset, byte offset and bit offset, so may be used to assess the similarity between different data point addresses.
  • Next, a grouping indicator may be calculated according to the values of region type, DB offset and byte offset.
  • In a specific example, the grouping indicator is also defined as a 64-bit number, and the following formula is used to calculate the grouping indicator of the data point. Grouping indicator = region type << 48 + DB offset << 32 + byte offset * data unit
    Figure imgb0002
  • The grouping indicator is information that can be used when grouping data points, and does not include bit information in the address, because bit information is not taken into account when grouping is performed; as before, the byte offset in this case is also multiplied by the data unit. Next, in step S106, all data points are sorted according to the calculated sorting indicator of each data point.
  • Preferably, all data points are sorted in ascending order of data point address. Thus, after being sorted, the data points are arranged sequentially in order of address from small to big.
  • Then in step S108, all of the sorted data points are divided into multiple groups on the basis of the grouping indicator and byte length of each data point and the length of a protocol data unit of the field device.
  • Specifically, all of the sorted data points may be grouped in the following way.
  • It will be understood that field devices using different communication protocols might have different PDU lengths, and each field device has its standard PDU (protocol data unit) length. Firstly, the PDU length of the field device that is to receive a data request is determined; when the data points are grouped, the byte length of each group cannot be greater than the PDU length.
  • Secondly, in order to minimize the number of times that data requests are sent, the number of groups into which all of the data points are divided must be minimized.
  • Finally, the sum of the byte lengths of all groups is minimized, while satisfying the two points above.
  • Addresses between the addresses of two adjacent data points store invalid data unrelated to the data to be requested; such addresses are invalid, and if a large number of such invalid addresses are included in the data request sent to the field device, the data obtained will include a large amount of invalid data, so the communication efficiency is reduced. Thus, it is hoped that the data request, as far as possible, includes no invalid addresses or only a small number of invalid addresses. By minimizing the sum of the byte lengths of all of the groups into which the data points are divided, a situation can be achieved in which as few invalid addresses as possible are included in all of the data point groups, and in this way the communication efficiency can be further improved.
  • Suppose that N data points 1 - N are included in the data point list, and the data points are divided into M groups.
  • Suppose that the mth group (m being one of 1 - M) starts at data point S and ends at data point E; then the byte length of group m is: grouping indicator of data point E + byte length of data point E - grouping indicator of data point S.
  • By means of the above formula, the byte length of each group can be calculated, and the sum of the byte lengths of all groups can then be calculated.
  • All of the data points are traversed, starting from the first data point, and the sum of the byte lengths of all groups is separately calculated for different grouping methods while ensuring that the byte length of each group into which the data points are divided is less than or equal to the PDU length and the number of groups into which the data points are divided is minimal, and finally, the grouping method for which the sum of the byte lengths is minimal is used to group the data points.
  • Those skilled in the art can realize the abovementioned optimal grouping method by using a mathematical method such as an optimization algorithm; no further details are given here.
  • Finally, in step S110, a data request for each group of data points is sent to the field device.
  • For each group, it is possible to know the address of a starting data point and the total byte length from the starting data point to an end data point; based on these two parameters, the data points of one group may be merged in a read request to send a data request to the field device.
  • Fig. 2 is a block diagram of an exemplary configuration of a data acquisition apparatus 200 according to embodiments of the present invention.
  • As shown in Fig. 2, the data acquisition apparatus 200 comprises: a data point list generating unit 202, a data point information processing unit 204, a data point sorting unit 206, a data point grouping unit 208 and a data request unit 210.
  • The data point list generating unit 202 is configured to generate a list of data points to be acquired from a field device.
  • The data point information processing unit 204 is configured to perform the following operations for each data point in the list:
    • parsing an address of the data point, and determining values of a region type, a DB offset, a byte offset and a bit offset in the address;
    • using a first predetermined rule to calculate a sorting indicator of the data point according to the values of the region type, the DB offset, the byte offset and the bit offset;
    • using a second predetermined rule to calculate a grouping indicator of the data point according to the values of the region type, the DB offset and the byte offset.
  • The data point sorting unit 206 is configured to sort all data points according to the calculated sorting indicator of each data point.
  • The data point grouping unit 208 is configured to divide all of the sorted data points into multiple groups on the basis of the grouping indicator and byte length of each data point and the length of a protocol data unit of the field device.
  • The data request unit 210 is configured to send a data acquisition request for each group of data points.
  • Preferably, the data point grouping unit 208 is further configured to: traverse all data points starting from a first data point, calculate the sum of the byte lengths of all of the groups for different grouping methods while ensuring that the byte length of each group into which the data points are divided is less than or equal to the length of the protocol data unit and the number of groups into which the data points are divided is minimal, and group the data points using the grouping method for which the sum of the byte lengths is minimal. The first predetermined rule is: sorting indicator = region type << 48 + DB offset << 32 + byte offset * 8 * data unit + bit offset .
    Figure imgb0003
    The second predetermined rule is: grouping indicator = region type << 48 + DB offset << 32 + byte offset * data unit .
    Figure imgb0004
  • The "data unit" means the byte size actually changed when the byte offset of the address of the field device changes by 1.
  • It must be explained that the structure of the data acquisition apparatus 200 and the component units thereof shown in Fig. 2 are merely exemplary, and those skilled in the art could amend the structural block diagram shown in Fig. 2 as needed.
  • The details of the operations and functions of the various parts of the data acquisition apparatus 200 may for example be the same as or similar to the relevant parts of the embodiment of the data acquisition method 100 of the present disclosure described with reference to Fig. 1, so a detailed description is not repeated here.
  • The data acquisition method and apparatus according to the present invention define a data general-purpose model capable of describing data points of different field devices; based on information extracted from data points, multiple data points are divided into groups, and a group of data points is merged in one data request, so the number of data requests can be reduced, thereby improving the communication efficiency. Furthermore, the method that minimizes the sum of the byte lengths of all of the groups into which the data points are divided is chosen for grouping the data points, making it possible to reduce the number of invalid bytes included in the data request, thereby further improving the communication efficiency.
  • The method and apparatus according to the present invention take full account of the similarities and differences between data points of different devices, so have very good compatibility.
  • The data acquisition method and apparatus according to embodiments of the present disclosure have been described above with reference to Figs. 1 and 2. The various units of the data acquisition apparatus described above may be realized using hardware, software, or a combination of hardware and software.
  • Fig. 3 shows a block diagram of a calculation device 300 for realizing data acquisition according to embodiments of the present disclosure. According to an embodiment, the calculation device 300 may comprise at least one processor 302, which processor 302 executes at least one computer-readable instruction (i.e. the abovementioned element realized in the form of software) encoded or stored in a computer-readable storage medium (i.e. a memory 304).
  • It should be understood that a computer-executable instruction stored in the memory 304, when executed, causes the at least one processor 302 to perform the various operations and functions described above with reference to Figs. 1 - 2 in various embodiments of the present disclosure.
  • According to an embodiment, a non-transitory machine-readable medium is provided. The non-transitory machine-readable medium may have a machine-executable instruction (i.e. the abovementioned element realized in the form of software) which, when executed by a machine, causes the machine to perform the various operations and functions described above with reference to Figs. 1 - 2 in various embodiments of the present disclosure.
  • According to an embodiment, a computer program is provided, comprising a computer-executable instruction which, when executed, causes at least one processor to perform the various operations and functions described above with reference to Figs. 1 - 2 in various embodiments of the present disclosure.
  • According to an embodiment, a computer program product is provided, comprising a computer-executable instruction which, when executed, causes at least one processor to perform the various operations and functions described above with reference to Figs. 1 - 2 in various embodiments of the present disclosure.
  • It should be understood that the various embodiments herein are all described progressively; for parts that are the same or similar in different embodiments, one embodiment may serve as a reference for another embodiment and vice versa, and each embodiment primarily describes features that differ from other embodiments. For example, the embodiment relating to the apparatus, the embodiment relating to the calculation device and the embodiment relating to the machine-readable storage medium above are described in relatively simple terms because they are essentially similar to the method embodiment; for related parts, it is sufficient to refer to part of the description of the method embodiment.
  • Specific embodiments of this Description have been described above. Other embodiments are within the scope of the attached claims. In some cases, actions or steps recorded in the claims may be performed in a different order from that in the embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific order or consecutive order shown to achieve the desired result. In some embodiments, multi-task processing and parallel processing are also possible or possibly advantageous.
  • In each of the processes and each of the system structural diagrams above, not all of the steps and units are necessary; some steps or units may be omitted according to actual needs. The apparatus structures described in the embodiments above may be physical structures or logic structures, i.e. some units might be realized by the same physical entity, or some units might be realized by multiple physical entities separately, or may be realized jointly by certain components in multiple independent devices.
  • The particular implementations expounded above with reference to the drawings describe exemplary embodiments, but do not represent all embodiments that can be realized or that fall within the scope of protection of the claims. The term "exemplary" used throughout this Description means "used as an example, instance or illustration", but does not mean "preferred" or "advantageous" over other embodiments. In order to provide an understanding of the described technology, particular implementations include specific details. However, these technologies can be implemented without these specific details. In some instances, to avoid making the concept of the described embodiments difficult to understand, commonly known structures and apparatuses are shown in the form of block diagrams.
  • The above description of the content of the present disclosure is provided to enable any person skilled in the art to realize or use the content of the present disclosure. To a person skilled in the art, various amendments to the content of the present disclosure will be obvious, and the general principles defined herein may be applied to other variants without departing from the scope of protection of the content of the present disclosure. Thus, the content of the present disclosure is not limited to the examples and designs described herein, but rather is consistent with the broadest scope corresponding to the principles and novel features disclosed herein.
  • The above are merely preferred embodiments of the present invention, which are not used to limit the present invention. Any amendments, equivalent substitutions or improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims (12)

  1. A data acquisition method, comprising:
    generating a list of data points to be acquired from a field device;
    performing the following operations for each data point in the list separately:
    parsing an address of the data point, and determining values of a region type, a DB offset, a byte offset and a bit offset in the address;
    using a first predetermined rule to calculate a sorting indicator of the data point according to the values of the region type, the DB offset, the byte offset and the bit offset;
    using a second predetermined rule to calculate a grouping indicator of the data point according to the values of the region type, the DB offset and the byte offset;
    sorting all of the data points according to the calculated sorting indicator of each data point;
    dividing all of the sorted data points into multiple groups on the basis of the grouping indicator and a byte length of each data point and the length of a protocol data unit of the field device; and
    sending a data request for each group of data points to the field device.
  2. The method as claimed in claim 1, wherein the step of dividing all of the sorted data points into multiple groups comprises:
    traversing all data points starting from a first data point, separately calculating the sum of byte lengths of all groups for different grouping methods while ensuring that the byte length of each group into which the data points are divided is less than or equal to the length of the protocol data unit and the number of groups into which the data points are divided is minimal, and grouping the data points using the grouping method for which the sum of the byte lengths is minimal.
  3. The method as claimed in claim 1 or 2, wherein the first predetermined rule is:
    sorting indicator = region type << 48 + DB offset << 32 + byte offset * 8 * data unit + bit offset, wherein the data unit means the byte size actually changed when the byte offset of the address of the field device changes by 1.
  4. The method as claimed in claim 1 or 2, wherein the second predetermined rule is: grouping indicator = region type << 48 + DB offset << 32 + byte offset * data unit ,
    Figure imgb0005
    wherein the data unit means the byte size actually changed when the byte offset of the address of the field device changes by 1.
  5. A data acquisition apparatus, comprising:
    a data point list generating unit, configured to generate a list of data points to be acquired from a field device;
    a data point information processing unit, configured to perform the following operations for each data point in the list:
    parsing an address of the data point, and determining values of a region type, a DB offset, a byte offset and a bit offset in the address;
    using a first predetermined rule to calculate a sorting indicator of the data point according to the values of the region type, the DB offset, the byte offset and the bit offset;
    using a second predetermined rule to calculate a grouping indicator of the data point according to the values of the region type, the DB offset and the byte offset;
    a data point sorting unit, configured to sort all of the data points according to the calculated sorting indicator of each data point;
    a data point grouping unit, configured to divide all of the sorted data points into multiple groups on the basis of the grouping indicator and a byte length of each data point and the length of a protocol data unit of the field device; and
    a data request unit, configured to send a data acquisition request for each group of data points.
  6. The apparatus as claimed in claim 5, wherein the data point grouping unit is further configured to:
    traverse all data points starting from a first data point, calculate the sum of byte lengths of all groups for different grouping methods while ensuring that the byte length of each group into which the data points are divided is less than or equal to the length of the protocol data unit and the number of groups into which the data points are divided is minimal, and group the data points using the grouping method for which the sum of the byte lengths is minimal.
  7. The apparatus as claimed in claim 5 or 6, wherein the first predetermined rule is: sorting indicator = region type << 48 + DB offset << 32 + byte offset * 8 * data unit + bit offset ,
    Figure imgb0006
    wherein the data unit means the byte size actually changed when the byte offset of the address of the field device changes by 1.
  8. The apparatus as claimed in claim 5 or 6, wherein the second predetermined rule is: grouping indicator = region type << 48 + DB offset << 32 + byte offset * data unit ,
    Figure imgb0007
    wherein the data unit means the byte size actually changed when the byte offset of the address of the field device changes by 1.
  9. A computing device (700), comprising:
    at least one processor (702); and
    a memory (704) coupled to the at least one processor (702), the memory being used to store an instruction, wherein, when the instruction is executed by the at least one processor (702), the processor (702) is caused to execute the method as claimed in any one of claims 1 - 4.
  10. A non-transitory machine-readable storage medium, storing an executable instruction which, when executed, causes the machine to execute the method as claimed in any one of claims 1 - 4.
  11. A computer program, comprising a computer-executable instruction which, when executed, causes at least one processor to execute the method as claimed in any one of claims 1 - 4.
  12. A computer program product, tangibly stored on a computer-readable medium and comprising a computer-executable instruction which, when executed, causes at least one processor to execute the method as claimed in any one of claims 1 - 4.
EP21929581.3A 2021-03-11 2021-03-11 Data acquisition method and apparatus, calculation device, and storage medium Pending EP4293442A1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/080259 WO2022188103A1 (en) 2021-03-11 2021-03-11 Data acquisition method and apparatus, calculation device, and storage medium

Publications (1)

Publication Number Publication Date
EP4293442A1 true EP4293442A1 (en) 2023-12-20

Family

ID=83226185

Family Applications (1)

Application Number Title Priority Date Filing Date
EP21929581.3A Pending EP4293442A1 (en) 2021-03-11 2021-03-11 Data acquisition method and apparatus, calculation device, and storage medium

Country Status (4)

Country Link
US (1) US20240273119A1 (en)
EP (1) EP4293442A1 (en)
CN (1) CN116868136A (en)
WO (1) WO2022188103A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117955773B (en) * 2023-10-24 2024-10-29 北京伟联科技有限公司 Data transmission method, ammeter data transmission device and air compressor data transmission device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11163747B2 (en) * 2017-05-05 2021-11-02 Servicenow, Inc. Time series data forecasting
CN108037725B (en) * 2017-12-08 2019-09-03 中冶南方工程技术有限公司 A kind of method and apparatus for reading and writing plc data
CN112286706B (en) * 2020-12-25 2021-05-18 北京邮电大学 Remote and rapid acquisition method for application information of android application and related equipment

Also Published As

Publication number Publication date
CN116868136A (en) 2023-10-10
WO2022188103A1 (en) 2022-09-15
US20240273119A1 (en) 2024-08-15

Similar Documents

Publication Publication Date Title
CN101158954B (en) Method for recognizing repeat data in computer storage
US20130191597A1 (en) Cache device, communication apparatus, and computer program product
WO1995034155A2 (en) A method for storing and retrieving data and a memory arrangement
KR102376114B1 (en) Encoding method, decoding method, and device
EP4293442A1 (en) Data acquisition method and apparatus, calculation device, and storage medium
WO2005088473A1 (en) Apparatus and method for data consistency validation
JP4478731B2 (en) Communication device and gateway device
CN111767314A (en) Data caching and querying method and device, lazy caching system and storage medium
US20230237099A1 (en) Bitmap filter, a method of generating the same, and a method of using a bitmap filter to perform a join
CN104956340A (en) Scalable data deduplication
CN107368563A (en) The delet method and device of database data, electronic equipment, storage medium
CN116800549B (en) Data processing method and system based on computer software development
CN110658795A (en) Accurate fusion method and system for digital twin data
KR102416580B1 (en) Data management apparatus and method using hash table
CN105389394A (en) Data request processing method and device based on a plurality of database clusters
CN105511814A (en) Storage method of static data file
CN107562762A (en) Data directory construction method and device
US8312052B2 (en) Process for transforming and consulting directed and attributed multigraphs based on the use of maps and bitmaps
CN116186045A (en) Sparse matrix adjustment method and device, electronic equipment and storage medium
US20060101045A1 (en) Methods and apparatus for interval query indexing
EP1417800A1 (en) Method and system for storing large data files
Salgado-García et al. Exact scaling in the expansion-modification system
CN107688567B (en) Index storage method and related device
CN111697973B (en) Compression method and compression system
US20150169248A1 (en) System and method for array-based data storage and search

Legal Events

Date Code Title Description
STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE

PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE

17P Request for examination filed

Effective date: 20230911

AK Designated contracting states

Kind code of ref document: A1

Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

DAV Request for validation of the european patent (deleted)
DAX Request for extension of the european patent (deleted)