CN115374109B - Data access method, device, computing equipment and system - Google Patents

Data access method, device, computing equipment and system Download PDF

Info

Publication number
CN115374109B
CN115374109B CN202210908140.3A CN202210908140A CN115374109B CN 115374109 B CN115374109 B CN 115374109B CN 202210908140 A CN202210908140 A CN 202210908140A CN 115374109 B CN115374109 B CN 115374109B
Authority
CN
China
Prior art keywords
attribute
combined
data
data table
target
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.)
Active
Application number
CN202210908140.3A
Other languages
Chinese (zh)
Other versions
CN115374109A (en
Inventor
贺承汉
黄凯耀
胡正策
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210908140.3A priority Critical patent/CN115374109B/en
Publication of CN115374109A publication Critical patent/CN115374109A/en
Application granted granted Critical
Publication of CN115374109B publication Critical patent/CN115374109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • 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/24Querying
    • G06F16/248Presentation of query results
    • 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/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

Landscapes

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

Abstract

The application relates to the technical field of computers, and discloses a data access method, a device, a computing device and a system, wherein the method comprises the following steps: if an object access request is received, acquiring an object data table corresponding to the object according to a target object identifier of a target object indicated by the object access request, wherein the object data table comprises attribute values of the target object under a plurality of attributes, and the attribute values of the target object under the plurality of attributes are obtained by processing reporting information corresponding to the attributes according to a data processing mode corresponding to each attribute indicated by an object model corresponding to the target object; and sending the object data table of the target object to the client. According to the scheme provided by the application, the attribute values of the object under a plurality of attributes can be acquired through one request, so that the data acquisition efficiency is improved.

Description

Data access method, device, computing equipment and system
Technical Field
The present application relates to the field of computers, and in particular, to a data access method, apparatus, computing device, and system.
Background
In the industrial internet of things scenario, a large-scale device may need multiple sensors to detect parameters of multiple aspects of the device, for example, for a numerical control machine tool, a temperature sensor needs to detect a temperature, a rotation speed sensor needs to detect a rotation speed, and so on. In the related art, the report information detected by each sensor is generally stored in a database. On the basis, if the temperature and the rotating speed of the data machine tool are required to be obtained, the temperature and the rotating speed are firstly obtained from a database according to the equipment identification of the sensor from which the temperature and the rotating speed of the numerical control machine tool are derived, then the temperature and the rotating speed are integrated, and finally the integrated data are sent to an access party. The data storage mode has the problem of low data acquisition efficiency.
Disclosure of Invention
The application provides a data access method, a data access device, a data access computing device and a data access system, which are used for solving the problem of low data acquisition efficiency in the related art.
In a first aspect, a data access method is provided, including: if an object access request is received, acquiring an object data table corresponding to the object according to a target object identifier of a target object indicated by the object access request, wherein the object data table comprises attribute values of the target object under a plurality of attributes, and the attribute values of the target object under the plurality of attributes are obtained by processing reporting information corresponding to the attributes according to a data processing mode corresponding to each attribute indicated by an object model corresponding to the target object; and sending the object data table of the target object to the client.
In the scheme of the application, the data processing modes corresponding to the attributes of the object are indicated through the object model of the object, the reported information corresponding to the attribute is processed according to the data processing mode corresponding to each attribute, the attribute value of each attribute is correspondingly obtained, and then the attribute values of the object under the attributes are associated and stored in the object data table. On the basis, after receiving an object access request initiated by a client, correspondingly acquiring an object data table of a target object requested to be accessed, and sending the object data table to the client, wherein the object data table comprises attribute values of the object under a plurality of attributes, so that the client can acquire the attribute values of the object under the plurality of attributes by initiating a request once, and the acquisition efficiency of the attribute values of the object under the plurality of attributes is effectively improved.
In one possible implementation manner, before the object data table corresponding to the target object is acquired, the method further includes: obtaining an object model configured for an object, wherein the object model indicates a plurality of attributes defined for the object and a data processing mode corresponding to each attribute; processing the reported information corresponding to each attribute of the object according to the data processing mode corresponding to each attribute to obtain an attribute value of the object under each attribute; and integrating the attribute values of the object under the plurality of attributes into an object data table corresponding to the object.
Based on the possible implementation manner, after the reported information is processed, the attribute values of the object under a plurality of attributes are stored in the object data table, so that after the data related to the object is required to be accessed, the reported information is not required to be processed and data integration is performed after a request is received, the response time to the object access request is greatly shortened, the data acquisition efficiency is further ensured, and the user experience is improved.
In one possible implementation, the object model further indicates a source device identifier corresponding to each attribute of the object; processing the reported information corresponding to each attribute of the object according to the data processing mode corresponding to each attribute, and before obtaining the attribute value of the object under each attribute, the method further comprises: and acquiring reporting information corresponding to each attribute of the object in the reporting data set according to the source equipment identifier corresponding to each attribute.
In one possible implementation, the data processing means indicates a conversion means between the original data format and the target data format; processing the reported information corresponding to each attribute of the object according to the data processing mode corresponding to each attribute to obtain an attribute value of the object under each attribute, wherein the processing comprises the following steps: determining the original data format of the reported information corresponding to an attribute; and converting the format of the reported information corresponding to the attribute according to the conversion mode between the original data format and the target data format to obtain an attribute value of the attribute corresponding to the target data format.
In one possible implementation, the data processing means indicates the way in which the attribute values are extracted; processing the reported information corresponding to each attribute of the object according to the data processing mode corresponding to each attribute to obtain an attribute value of the object under each attribute, wherein the processing comprises the following steps: and extracting the attribute value corresponding to the attribute from the reporting information corresponding to the attribute according to the extraction mode of the attribute value indicated by the data processing mode.
In one possible implementation manner, the reported information in the reported data set is stored in a partition according to the source equipment; in this case, the report information corresponding to each attribute may be acquired according to the following procedure: according to the corresponding relation between the equipment identifier and the storage position and the source equipment identifier corresponding to each attribute, performing equipment identifier matching to determine the storage position of the reported information corresponding to each attribute; and acquiring the reporting information corresponding to each attribute from the storage position where the reporting information corresponding to each attribute is located.
Based on the possible implementation manner, since the reported information is stored in a partition mode according to the source equipment, the reported information is convenient to orderly store, and the reported information corresponding to each attribute is convenient to quickly acquire based on the source equipment identifier corresponding to each attribute.
In a second aspect, a data access method is provided, including: receiving a combined object access request, wherein the combined object access request comprises a target combined identifier of a target combined object; acquiring a combined object view of the target combined object according to the target combined identifier; sending a combined object view of the target combined object to the client; the combined object view of the target combined object is generated according to an object data table of a plurality of objects included in the target combined object and an association relationship between the plurality of objects included in the target combined object; the object data table of the object comprises attribute values of the object under a plurality of attributes, and the attribute values of the object under the plurality of attributes are obtained by processing the reporting information corresponding to each attribute according to the data processing mode corresponding to each attribute indicated by the object model corresponding to the object.
In the possible implementation manner, on the basis of generating the combined object view for the combined object, the combined object view of the target combined object can be returned to the client in response to the combined object access request initiated by the client, so that the data of a plurality of objects associated with the combined object can be obtained by initiating a request once, and the data acquisition efficiency is improved.
In one possible implementation, the method further includes: acquiring a combined object model configured for the combined object, wherein the combined object model indicates a plurality of objects included in the combined object and association relations among the plurality of objects; obtaining an object data table corresponding to each object included in the combined object; and generating a combined object view corresponding to the combined object according to the association relation among the plurality of objects and the object data table respectively corresponding to the plurality of objects included in the combined object.
Based on the possible implementation manner, on the basis of taking the object as a unit of data storage, the object data tables of the plurality of objects are further integrated through the configured combined object model to obtain a combined object view of the combined object, so that an access service of the combined object view can be provided for the client based on the generated combined object view.
In one possible implementation, the method further includes: generating an access interface, wherein the access interface comprises at least one of a first access interface of an object data table corresponding to an object and a second access interface of a combined object view corresponding to a combined object; the generated access interface is published. Based on the published access interfaces, when the data related to the object is required to be accessed, an object data table of the object can be obtained through the first access interface, and when the data related to the combined object is required to be accessed, a combined object view of the combined object can be obtained through the second access interface.
In one possible implementation, the method further includes: and synchronizing the object data table corresponding to the object and the combined object view corresponding to the combined object to a database of the cloud. Based on the above possible implementation manner, the client may also access the database in the cloud to obtain the object data table of the object and the combined object view of the combined object.
In a third aspect, there is provided a data access apparatus comprising means for performing the data access method of the first aspect or any of the possible designs of the first aspect; or the data access apparatus comprises means for performing the second aspect or each of the data access methods in any of the possible designs of the second aspect.
In a fourth aspect, there is provided a processor for performing the operational steps of the data access method of the first aspect or any of the possible designs of the first aspect; or for performing the operational steps of the data access method in any of the possible designs of the second aspect or the first aspect.
In a fifth aspect, a computing device is provided, the computing device comprising at least one processor and memory for storing a set of computer instructions; when the processor executes a set of computer instructions as an executing device in the first aspect or any of the possible implementations of the first aspect, the operational steps of the data access method in the first aspect or any of the possible implementations of the first aspect are executed; alternatively, the operational steps of the data access method in the second aspect or any one of the possible implementations of the second aspect are performed when the processor executes a set of computer instructions as an executing device in the second aspect or any one of the possible implementations of the second aspect
In a sixth aspect, there is provided a computer readable storage medium comprising: comprising a memory for storing a set of computer instructions and a processor; when the processor executes a set of computer instructions, the operational steps of the data access method as in the first aspect or any one of the possible implementations of the first aspect are implemented; alternatively, the steps of the data access method as in the second aspect or any one of the possible implementations of the second aspect are implemented.
In a seventh aspect, there is provided a data access system comprising: the data acquisition equipment is used for acquiring the report information of the object under a plurality of attributes and sending the report information to the computing equipment; the computing device is configured to implement the data access method according to the first aspect or any one of the possible implementation manners of the first aspect according to the reported information of the object under the plurality of attributes; or implementing a data access method as in the second aspect or any one of the possible implementations of the second aspect.
In an eighth aspect, a computer program product is provided which, when run on a computing device, causes the computing device to perform the operational steps of the data access method as in the first aspect or any one of the possible implementations of the first aspect; alternatively, the method of data access according to the second aspect or any one of the possible implementation manners of the second aspect is performed.
Further combinations of the present application may be made to provide further implementations based on the implementations provided in the above aspects.
Drawings
FIG. 1 is a schematic diagram of a data access system according to the present application;
FIG. 2 is a flow chart of a method for accessing data according to the present application;
FIG. 3 is a schematic diagram of creating an object data table and generating an access interface according to an object model according to the present application;
FIG. 4 is a flow chart of generating a combined object view in accordance with the present application;
FIG. 5 is a schematic diagram of generating a combined object view and generating an access interface according to a combined object model according to the present application;
FIG. 6 is a schematic diagram of a data access system according to the present application;
FIG. 7 is a flow chart of a data process provided by the present application;
FIG. 8 is a block diagram of a data access device according to the present application;
fig. 9 is a schematic structural diagram of a computing device according to the present application.
Detailed Description
For ease of understanding, the terms involved in the present application will be specifically explained first:
the object is: it may be a physical thing or a logical concept, and for example, the object may be an industrial device, a base station, a server cluster, an intelligent home system, an on-vehicle system, or the like.
The combined object is as follows: the present application relates to an aggregate formed by combining a plurality of objects, for example, if a smart television, a smart speaker, and a smart bulb are used as one object, a smart home system including the smart television, the smart speaker, and the smart bulb may be regarded as one combined object.
View: is a virtual table in the database whose contents are defined by queries, and it is also understood that a view is a structured query language (Structured Query Language, SQL) statement of a query stored in the database. As with the real data table, the view includes a series of named row and column data, but the view does not exist in the database in the form of stored data values, the row and column data in the view is from the data table to which the query defining the view applies, and is dynamically generated as the view is applied. The real data table only uses physical storage space, the view does not occupy the physical storage space, the view is only the existence of logical concepts, the data table can be modified immediately, but the view can only be modified by modifying created sentences.
In the scene of industrial internet of things, if attribute values detected by each sensor for equipment are respectively stored in a database, the database needs to be accessed for multiple times under the condition that the attribute values of multiple attributes of the equipment are required to be acquired, and even further, the attribute values of the multiple attributes of the equipment acquired by the database are integrated, so that the problem of low data acquisition efficiency exists. To solve this problem, the present application has been proposed.
In the scheme of the application, the data processing modes corresponding to the attributes of the object are indicated through the object model of the object, the reported information corresponding to the attribute is processed according to the data processing mode corresponding to each attribute, the attribute value of each attribute is correspondingly obtained, and then the attribute values of the object under the attributes are associated and stored in the object data table. On the basis, after receiving an object access request initiated by a client, correspondingly acquiring an object data table of a target object requested to be accessed, and sending the object data table to the client, wherein the object data table comprises attribute values of the object under a plurality of attributes, so that the client can acquire the attribute values of the object under the plurality of attributes by initiating a request once, and the acquisition efficiency of the attribute values of the object under the plurality of attributes is effectively improved.
The technical scheme to be protected of the application is described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a data access system according to an embodiment of the present application, and as shown in fig. 1, the data access system includes a terminal 110 and a server 120 communicatively connected to the terminal 110. The terminal 110 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a vehicle-mounted device, a service terminal, etc., and is not particularly limited herein. The server 120 may be a physical server or a cloud server.
The server 120 deploys a database, where data such as an object data table of an object is stored, based on which the server 120 can provide a data access service related to the object for the terminal, that is, after receiving an object access request initiated by the terminal 110, the server 120 obtains, according to a target object identifier indicated by the object access request, an object data table corresponding to the target object from the database, and returns the object data table of the target object to the terminal 110.
In the present application, the data table of the object stored in the database includes attribute values of the object under a plurality of attributes. The attribute values of the object under the plurality of attributes are obtained by processing the reported information corresponding to the attributes according to the data processing mode configured for each attribute in the object model corresponding to the object.
The attribute of the object refers to a parameter for describing the object, and for example, the attribute may be temperature, humidity, operation duration, rotation speed, and the like. An object may be described under a plurality of attributes. For example, if the object is a numerically controlled machine tool, the properties of the object may be temperature, humidity, rotation speed, operating voltage, operating current, continuous operating time, etc.
The object model of the object may be obtained by performing model configuration on the administrator client, that is, the user may define, on the administrator client, an attribute for describing the object and a data processing manner corresponding to each attribute, and then the administrator client correspondingly uploads the object model obtained by configuration to the server 120.
The data access system further comprises a data acquisition device 130, wherein the reported information corresponding to each attribute of the object can be obtained by data acquisition of the data acquisition device, and the data acquisition device 130 comprises various sensors (a temperature sensor, a humidity sensor, a rotating speed sensor), an image acquisition device, an ammeter, a voltmeter, a flowmeter and the like. After the data acquisition device 130 reports the report information to the server, the server 120 may process the report information corresponding to each attribute according to the object model configured for the object and the data processing mode corresponding to each attribute, to obtain an attribute value corresponding to the object under each attribute; and integrating attribute values of the object under a plurality of attributes into an object data table of the object correspondingly.
Based on this, the server 120 may provide a data access service for the terminal based on the object data table of the stored object, and if the server 120 receives the object access request sent by the terminal 110, the server correspondingly obtains the object data table of the requested access object from the database, and since the object data table includes the attribute values of the object under a plurality of attributes, the terminal 110 may obtain the attribute values of the object under a plurality of attributes by initiating an access request, thereby improving the data obtaining efficiency.
Further, the user may configure a combined object model of the combined object at the administrator client, where the combined object model is used to indicate a plurality of objects included in the combined object and an association relationship between the plurality of objects. After the administrator client transmits the combined object model of the combined object to the server 120, the server 120 may correspondingly acquire an object data table of each object included in the combined object according to a plurality of objects included in the combined object indicated by the combined object model, and generate a combined object view of the combined object according to an association relationship between the plurality of objects indicated by the combined object model and the object data table of each object included in the combined object. Thus, if the terminal 110 initiates a combined object access request to the server 120, the server 120 may obtain a combined object view of the combined object and send the combined object view to the terminal 110. In this way, the terminal 110 can acquire the data of a plurality of objects associated with the combined object by initiating an access request once, thereby improving the data acquisition efficiency.
Fig. 2 is a flowchart of a data access method provided by the present application, which may be performed by the server in fig. 1, but may also be performed by other computing devices having processing capabilities. As shown in fig. 2, the method at least includes steps 210-230, which are described in detail below:
At step 210, an initiated object access request is received, the object access request including a target object identification of a target object.
The object access request refers to a request for accessing data related to an object, and in the present application, an object corresponding to the data requested to be accessed by the object access request is referred to as a target object, and the target object identifier refers to a request for uniquely identifying the target object.
Step 220, according to the target object identifier, obtaining an object data table corresponding to the target object, where the object data table includes attribute values of the target object under a plurality of attributes, where the attribute values of the target object under the plurality of attributes are obtained by processing the report information corresponding to each attribute according to a data processing manner corresponding to each attribute indicated by the object model corresponding to the target object.
The attribute of the object refers to a parameter for describing the object, and the corresponding attribute value of the object under the attribute can be understood as the parameter value of the corresponding parameter; attributes such as temperature, humidity, rotational speed, etc. Different objects, as well as different attributes used to describe the objects.
Information acquisition is generally carried out on an object through data acquisition equipment such as a sensor and the like, so that reporting information corresponding to the object under each attribute is obtained; reporting information corresponding to the attribute may also be understood as acquisition information acquired in the data acquisition device for indicating the corresponding attribute value. The data acquisition equipment can send the acquired report information to a server for temporary storage so as to facilitate the subsequent further processing of the report information based on the data processing mode corresponding to each attribute in the object model.
Because the data format of the data acquisition device is different from the data storage format required in the database, or the unit of the data acquired by the data acquisition device is different from the unit required for the attribute in the database, or the attribute value under an attribute is further calculated by the information acquired by a plurality of data acquisition devices, in this case, the reported information corresponding to the attribute may need to be further processed, and the processing result obtained by the further processing is taken as the attribute value corresponding to the attribute. The processing mode from the reported information corresponding to the attribute value is called as a data processing mode corresponding to the attribute. The data processing mode is, for example, a conversion mode that converts degrees celsius to degrees fahrenheit, and also, for example, a conversion mode that converts floating point type data to integer type data.
In the present application, a plurality of attributes of an object and a corresponding data processing method can be defined in advance according to actual needs, for example, attributes to be focused on for each object, a data storage format required by a database, a format and a unit of data acquired by a data acquisition device, and the like. The process of defining a plurality of attributes of the object and configuring a corresponding data processing mode for each attribute by a user according to the needs is a process of configuring an object model of the object. In a specific embodiment, the carrier of the object model may be a JSON-format configuration file, after which the configured object model is sent to the server.
In some embodiments, the attribute values of the object under the attribute may be determined according to the report information corresponding to the attribute through the following procedure of steps 201-203, and the attribute values under the plurality of attributes are updated into the data table corresponding to the object. Specific:
step 201, obtaining an object model of an object; the object model indicates a plurality of attributes defined for the object and a data processing mode corresponding to each attribute.
The object model of the object may be configured at the administrator client, and then the object model of the object and the object identifier of the object are associated and stored in the server, and then the object model of the object may be obtained from the server according to the object identifier of the object.
Fig. 2 illustrates a plurality of attributes defined for an object in an object model (i.e., attributes 1 to m, m being integers greater than 1) and data processing manners configured for each attribute (i.e., data processing manners B1 to Bm). In a specific embodiment, the attribute configured for the object in the object model and the data processing manner of the object may be configured according to actual needs. Further, the object model shown in fig. 2 further defines a type corresponding to each attribute, where the type is used to indicate a data type of an attribute value corresponding to an attribute in the object data table, and the data type includes an integer type and a floating point type, so that after determining the attribute value corresponding to each attribute, the attribute value can be stored in the object data table of the object according to the type corresponding to each attribute indicated by the object model.
Step 202, according to the data processing mode corresponding to each attribute, processing the report information corresponding to each attribute of the object to obtain the attribute value of the object under each attribute.
As described above, the reporting information corresponding to the attribute may be collected by the data collecting device and reported to the server by the collecting device. Therefore, the server can correspondingly acquire the reporting information corresponding to each attribute.
In some embodiments of the present application, the object model also indicates a source device identity corresponding to each attribute of the object; prior to step 202, the method further comprises: and acquiring reporting information corresponding to each attribute of the object in the reporting data set according to the source equipment identifier corresponding to each attribute.
The source equipment identifier corresponding to the attribute refers to the equipment identifier of the equipment from which the reporting information corresponding to the attribute is sent. And each piece of reporting information in the reporting data set is associated with the equipment identifier of the source equipment, so that the equipment identifier is matched based on the source equipment identifier corresponding to each attribute in the object model and the equipment identifier of the equipment from which each piece of reporting information in the reporting data set is derived, and the reporting information corresponding to each attribute is determined.
In some embodiments of the present application, reporting information in the reporting dataset is stored in a partitioned manner according to the source device; in this embodiment, the report information corresponding to each attribute may be obtained according to the following procedure: determining a storage position of the reported information corresponding to each attribute based on the corresponding relation between the equipment identifier and the storage position and the source equipment identifier corresponding to each attribute; and acquiring the reporting information corresponding to each attribute from the storage position where the reporting information corresponding to each attribute is located.
That is, the storage position of the report information of each device in the server is preset, and the storage position set for the device and the device identifier corresponding to the device are associated and stored. And after receiving the report information sent by the equipment, the server correspondingly stores the report information in a corresponding storage position. Based on the source equipment identification corresponding to each attribute in the object model, reporting information corresponding to the attribute is obtained from a storage position associated with the source equipment identification.
In some embodiments, the data processing manner corresponding to the attribute may be a conversion manner between data formats, that is, the data processing manner indicates a conversion manner between the original data format and the target data format; in this embodiment, step 202 includes: determining the original data format of the reported information corresponding to an attribute; and converting the format of the reported information corresponding to the attribute according to the conversion mode between the original data format and the target data format to obtain an attribute value of the attribute corresponding to the target data format.
In some embodiments, the data processing manner may indicate a conversion manner between multiple original data formats and a target data format, in which case, an original data format to which the reported information corresponding to an attribute belongs may be first identified, and then format conversion is performed on the reported information corresponding to the attribute according to the conversion manner between the original data format to which the reported information corresponding to the attribute belongs and the target format, so as to obtain an attribute value corresponding to the attribute.
In other embodiments, the data processing manner may indicate a conversion manner between an original data format and a target data format, in which case, the server determines that the data format to which the reported information corresponding to the attribute belongs is the original data format indicated by the data processing manner corresponding to the attribute, and performs format conversion according to the conversion manner indicated by the data processing manner, so as to obtain the attribute value corresponding to the attribute. Otherwise, if the server determines that the data format to which the reported information corresponding to the attribute belongs is not the original data format indicated by the data processing mode corresponding to the attribute, the server can send prompt information to the manager client. It can be understood that if the data format to which the reported information corresponding to the attribute belongs is not the original data format indicated by the data processing manner corresponding to the attribute, format conversion is still performed according to the conversion manner indicated by the data processing manner, which may result in inaccuracy of the obtained attribute value.
In other embodiments, the data processing manner corresponding to the attribute may be an extraction manner of extracting the attribute value from the corresponding report information. In this case, step 202 includes: and extracting the attribute value corresponding to the attribute from the reporting information corresponding to the attribute according to the extraction mode corresponding to the attribute.
For example, in some indoor environments, such as a laboratory, the working states of a plurality of test devices (corresponding to the test devices are objects, the working states are attributes) or the states of a certain component in the test devices may need to be concerned, an image acquisition device for performing image acquisition is deployed in the laboratory, and the report information corresponding to the working states is the images acquired by the image acquisition device and including the test devices; in this case, the data processing method corresponding to the attribute may be a recognition method for recognizing the operation state of the test equipment from the image including the test equipment. In a specific embodiment, the report information corresponding to different attributes may be the same, that is, it is equivalent to extracting the attribute values of at least two attributes from the same report information.
For another example, based on an image containing the test equipment, in addition to identifying the operating state of the test equipment, the degree of corrosion of the test equipment (which is positively correlated with the size of the area of the corroded region in the test equipment), and the state of the lubricating oil of the test equipment may be identified; in this case, from the reported information including the image of the test equipment, attribute values of three attributes, which are the operating state of the test equipment, the corrosion degree of the test equipment, and the state of the lubricating oil in the test equipment, are extracted, respectively. In other embodiments, the reporting information corresponding to the different attributes may also be different.
In a specific embodiment, the report information corresponding to an attribute may originate from one data acquisition device or may originate from a plurality of data acquisition devices. Under the condition that the reported information corresponding to the attribute is sourced from a plurality of data acquisition devices, the data processing mode corresponding to the attribute is used for further processing and calculating the reported information corresponding to the attribute to obtain the attribute value corresponding to the attribute.
And 203, integrating attribute values of the object under a plurality of attributes into an object data table corresponding to the object.
The object data table corresponding to the object is constructed according to the object model of the object. Specifically, according to a plurality of attributes of an object set in an object model, an attribute field for representing each attribute of the object and a field for representing an attribute value may be set in an object data table, so that after obtaining attribute values of the object under the plurality of attributes, the attribute values may be stored under the field representing the attribute value correspondingly. Further, if the object model further indicates a source device identifier corresponding to the attribute, the device identifier from which the attribute value is stored may also be correspondingly stored in the object data table.
In a specific embodiment, the data acquisition device may perform information acquisition at intervals and continuously send report information to the server, where the report information carries a timestamp, and the timestamp is used to indicate a time when the report information is acquired by the data acquisition device. In this case, the time stamp and the attribute value associations of the plurality of attributes under the time stamp may also be integrated into the object data table.
In some embodiments of the present application, after an object data table of an object is created according to an object model corresponding to the object, an access interface of the object data table may be generated, where the access interface of the object data table may also be understood as a uniform resource locator (Uniform Resource Locator, URL) of the object data table. And then, externally publishing the access interface of the object data table corresponding to the object, and storing the access interface in association with the object identification of the object. Based on this, in step 220, an access interface associated with the target object identifier may be obtained according to the target object identifier of the target object, and an object data table of the target object may be obtained correspondingly according to the access interface associated with the target object identifier. Therefore, the access address of the object data table corresponding to the object is provided directly, and the access address of the object data table can be obtained according to the target object identification in the object access request without searching the data table identification (such as the data table name) of the object data table and then searching the access address of the data table according to the data table identification, so that the efficiency of accessing the object data table can be further improved.
FIG. 3 is a schematic diagram of creating an object data table and generating an access interface according to an object model according to the present application. As shown in fig. 3, an attribute of each object and a data type corresponding to each attribute are defined in an object model 310, for example, for an attribute of "temperature", the set data type corresponding to the attribute is "int", the object model further defines a data processing manner corresponding to each attribute, then, based on the object model, a first SQL statement 320 for creating an object data table is generated, and then, the first SQL statement 320 is executed to create an object data table 330 of the object; thus, in step 203 of the corresponding embodiment of fig. 2, the attribute values of the obtained object under a plurality of attributes may be integrated into the object data table established for the object. Thereafter, an access interface of the object data table 330 is generated; thus, in step 220 of the corresponding embodiment of fig. 2, an access interface associated with the target object identifier may be determined based on the target object identifier, and the object data table of the target object may be correspondingly obtained according to the access interface.
After receiving the new report information flow 340, processing each report information in the report information flow 340 according to the data processing mode corresponding to each attribute indicated by the object model of the object, so as to obtain the attribute value of the object under each attribute. Thereafter, the attribute values of the plurality of attributes of the object under the same time stamp are integrated into the object data table 330 to update the data in the object data table.
Step 230, send the object data table of the target object to the client.
Because the object data table comprises attribute values of the object under a plurality of attributes, a user can know information of multiple aspects of the target object according to the object data table received by the client.
In the scheme of the application, the data processing modes corresponding to the attributes of the object are indicated through the object model of the object, the reported information corresponding to the attribute is processed according to the data processing mode corresponding to each attribute, the attribute value of each attribute is correspondingly obtained, and then the attribute values of the object under the attributes are associated and stored in the object data table. On the basis, after receiving an object access request initiated by a client, correspondingly acquiring an object data table of a target object requested to be accessed, and sending the object data table to the client, wherein the object data table comprises attribute values of the object under a plurality of attributes, so that the client can acquire the attribute values of the object under the plurality of attributes by initiating a request once, and the acquisition efficiency of the attribute values of the object under the plurality of attributes is effectively improved. In addition, as the plurality of attribute values are stored in the object data table after the reported information is processed, after the information related to the object is required to be accessed, the reported information is not required to be processed and data integration is performed after the request is received, so that the response time to the object access request is greatly shortened, the data acquisition efficiency is further ensured, and the user experience is improved.
In some application scenarios, a data processing device for collecting the report information may be newly added according to actual needs, in this case, if according to a data storage manner in the prior art, a program in a server is required to be updated, so as to ensure that the program in the server is adapted to the newly added data collecting device, for example, ensure that the server can accurately analyze the report information reported by the new data collecting device. In other words, according to the existing data storage mode, the server may need to be subjected to end-to-end adaptation and software upgrading to support access to the report information acquired by the newly added data acquisition device, which has the problems of large online difficulty and long online period of the new data acquisition device.
By adopting the scheme of the application, the problem can be effectively solved, and the object model of the object is correspondingly updated under the condition that the data acquisition equipment needs to be newly added, so that the reporting information corresponding to the new data acquisition equipment, the attribute corresponding to the reporting information of the newly added data acquisition equipment and the corresponding data processing mode are updated, and the data format of the reporting information acquired by the newly added data acquisition equipment and the format of the attribute value of the attribute corresponding to the reporting information in the object data table can be defined in advance through the object model, thereby, after the reporting information acquired by the newly added data acquisition equipment is received, the server can correspondingly analyze and further process the reporting information. It can be seen that by adopting the scheme of the application, the server is not required to be updated on a large scale, and the object model of the object is updated according to the requirement, so that the problems of high online difficulty and long online period of the novel data acquisition equipment in the prior art can be effectively solved.
In the scheme of the application, a plurality of attributes defined in an object model and data processing modes corresponding to the attributes can be configured according to actual needs, so that the scheme of the application can be suitable for different application scenes and has wide application range.
Based on the object data table of each object generated in the corresponding embodiment of fig. 2, a combined object view of the combined object may be generated according to the association relationship between the plurality of objects included in the combined object indicated by the combined object model of the combined object and the object data table of the plurality of objects included in the combined object, and the combined object view of the combined object may be stored in association with the combined object identifier, so that a data access service related to the combined object may be provided to the terminal. Fig. 4 is a flowchart of a combined object view for generating a combined object according to the present application, and in fig. 4, each object data table in the database may be generated according to steps 201-203 of the corresponding embodiment of fig. 2 or steps 310-330 of the corresponding embodiment of fig. 3. As shown in fig. 4, the method further includes:
In step 410, a combined object model configured for the combined object is obtained, the combined object model indicating an association relationship between a plurality of objects included in the combined object and the plurality of objects.
The association relationship between the plurality of objects may be a parent-child relationship, a parallel relationship, or the like, and is not particularly limited herein, and of course, the hierarchical relationship between each object and the combined object may be further determined by the association relationship between the plurality of objects. The association relationship may be a relationship between objects established based on a certain attribute of the objects, or may be an association relationship between different objects defined in advance according to needs, for example, for a power grid system of a city a, where the city a includes an A1 region and an A2 region, and when the power grid system of the city a is taken as a combined object, the power grid system of the A1 region and the power grid system of the A1 region may be regarded as two objects included in the combined object, where the association relationship between the power grid system of the A1 region and the power grid system of the A2 region is a parallel relationship, and the parallel relationship is determined according to an administrative division of the A1 region and the A1 region.
A schematic diagram of a combined object model is shown in fig. 4, and as shown in fig. 4, the combined object model indicates that the combined object includes an object C1, an object C2, …, an object Cp (where p is a positive integer), and an object C2-1, an object C2-2, and an object C2-3, where the object C1, the object C2, …, and the object Cp are in a side-by-side relationship, and the object C2 is in a parent-child relationship with the object C2-1, the object C2-2, and the object C2-3. Further, object C1, object C2, …, and object Cp may also be understood as primary sub-objects of the combined object, and object C2-1, object C2-2, and object C2-3 may also be understood as secondary sub-objects of the combined object.
Step 420, obtain the object data table corresponding to each object included in the combined object.
Since the combined object model indicates a plurality of objects included in the combined object, an object data table of each object included in the combined object can be acquired from the database correspondingly according to the object identifications of the plurality of objects. The establishing of the object data table and the obtaining of the attribute values of the objects in the object data table under each attribute are described with reference to the corresponding embodiment of fig. 2, and are not repeated herein.
And 430, generating a combined object view corresponding to the combined object according to the association relation among the plurality of objects and the object data tables respectively corresponding to the plurality of objects included in the combined object.
In some embodiments, an SQL statement for generating a combined object view may be generated in advance according to a plurality of objects included in the combined object and association relationships between the plurality of objects indicated by the combined object model, and then in step 430, the SQL statement for generating the combined object view may be called to generate a combined object view corresponding to the combined object by using the association relationships between the plurality of objects and the object data tables respectively corresponding to the plurality of objects.
If the association relationship among the objects is established based on one or more attributes, the attribute on which the association relationship depends is called as the attribute corresponding to the association relationship. In this way, the association relationship actually indicates the attribute to be presented in the combined object view, that is, the attribute to be presented is the attribute to which the association relationship corresponds. Based on the attribute corresponding to the association relation, the data of the row or the column for indicating the attribute value under the attribute is acquired from the object data table of each object, and then the combined object view of the combined object is generated according to the data of the row or the column for indicating the attribute value under the attribute acquired from the object data tables of the plurality of objects.
In some embodiments of the present application, after generating a combined object view corresponding to a combined object, an access interface corresponding to the combined object view is generated and published, and correspondingly, in a case that a client needs to access the combined object, the combined object view of the combined object may be acquired based on the access interface corresponding to the combined object.
The object data tables of a plurality of objects are further integrated through the configured combined object model on the basis of taking the objects as units of data storage to obtain a combined object view of the combined objects, so that access service of the combined object view can be provided for the client based on the generated combined object view.
Specifically, the data access service for combining the object views of the objects can be provided for the client through the following processes, specifically including: receiving a combined object access request; the combined object access request includes a target combined identifier of the target combined object; acquiring a combined object view of the target combined object according to the target combined identifier; and sending the combined object view of the target combined object to the client. The combined object view may be generated according to steps 410-430 of the corresponding embodiment of fig. 4 based on the object data table stored in the database, and the object data table of the plurality of objects included in the combined object may be generated according to steps 201-203 of fig. 2, which are specifically referred to above and will not be described herein.
A combined object access request refers to a request for accessing data related to a combined object. In the present application, a composite object corresponding to data requested to be accessed by a composite object access request is referred to as a target composite object.
In some embodiments, if an access interface corresponding to a combined object view is published, an access interface corresponding to a target combined object may be determined according to a target combined identifier, and then, the combined object view of the target combined object is acquired correspondingly according to the access interface corresponding to the target combined object.
In some embodiments, on the basis of configuring an object model for an object and configuring a combined object model for a combined object, an access interface may be generated only for the object data table, or may be generated only for the combined object view, or may be generated for both the object data table and the combined object view, and may be specifically set according to actual needs.
FIG. 5 is a schematic diagram illustrating generating a combined object view and generating an access interface from a combined object model, according to an embodiment of the present application. In step 430 of the corresponding embodiment of fig. 4, a combined object view may be generated in accordance with the process shown in fig. 5. As shown in fig. 5, based on a combined object model 510 configured for the combined object, a second SQL statement 520 for creating a combined object view corresponding to the combination is then generated according to the association relationship between the plurality of objects indicated by the combined object model, so as to correspondingly generate the combined object view of the combined object based on the second SQL statement 520. Then, a second access interface 530 corresponding to the combined object view is generated, and the second access interface 530 is issued. Therefore, in the case that the client needs to access the data related to the combined object, the second access interface associated with the combined object identifier may be determined according to the combined object identifier of the target combined object requested to be accessed, and then the combined object view of the target combined object requested to be accessed is correspondingly acquired through the second access interface 530.
In some embodiments of the application, the method further comprises: and synchronizing the object data table corresponding to the object and the combined object view corresponding to the combined object to a database of the cloud.
The data access method provided by the application can be executed by edge computing equipment positioned at the side, and the corresponding database is also deployed on the edge computing equipment. In this case, the edge computing device may synchronize the object data table and the combined object view of each combined object into the cloud database, such that the client may obtain the object data table of the object and/or the combined object view of the combined object by accessing the database in the edge computing device or the cloud database.
Fig. 6 is a schematic diagram of a data access system according to the present application, where, based on an object data table for providing objects according to the corresponding embodiments of fig. 2 and 3 and a combined object view for combining objects according to the corresponding embodiments of fig. 4 and 5, a data access service for providing object related data and a data access service for combining object related data may be provided for a client according to the embodiment shown in fig. 6.
As shown in fig. 6, the data access system includes a first access subsystem 610 and a second access subsystem 620. The first access subsystem 610 is deployed on the side and the second access subsystem 620 is deployed on the cloud side. The first access subsystem 610 includes a plurality of data acquisition devices (data acquisition devices K1, K2, … … Kn are shown in fig. 6 by way of example) and an edge computing device 611, each data acquisition device being communicatively coupled to the edge computing device 611. The plurality of data collection devices are used for data collection and send the collected report information to the edge computing device 611.
The edge computing device 611 is provided with a data buffer, and the data buffer is used for storing reporting information reported by the data acquisition device. Specifically, in the data buffer area, partition storage can be performed according to the data acquisition device from which each reported information is derived. The edge computing device 611 may periodically obtain the report information corresponding to each attribute from the data buffer.
Also deployed in the edge computing device 611 is a first model library for storing object models configured for objects and combined object models configured for combined objects, and a first database. The first database is used for storing an object data table of objects and a combined object view of combined objects.
The edge computing device 611 may perform basic object processing steps based on the object model of the object. In the basic object processing step, the edge computing device 611 generates an object data table of the object according to the object model of the object, stores the object data table in the first database, and generates a first access interface of the object data table according to the storage position of the object data table in the first database. Further, in the basic object processing step, the edge computing device 611 further obtains the report information corresponding to each attribute from the data buffer according to the source device identifier corresponding to each attribute indicated by the object model, and performs steps 202-203, and implementation details of the specific steps 202-203 are described above.
Further, the edge computing device 611 may further filter the report information and perform data backfilling in the basic object processing step, so as to process the report information that is not reported in the historical time period, obtain the corresponding attribute value in the historical time period, and update the attribute value to the object data table of the object according to the timestamp corresponding to the attribute value, so as to ensure the integrity of the data in the object data table.
The edge computing device 611 may perform a combined object processing step based on a combined object model of the combined object. The combined object processing step includes steps 410-430 as above, resulting in a combined object view of the combined object; thereafter, the combined object view is stored in a first database and a second access interface for the combined object view is generated and published. In a particular embodiment, the second access interface and the first access interface may be REST (Representational State Transfer ) interfaces.
Further, the edge computing device 611 may also synchronize the object data table in the first database and the combined object view to a second database in the second access subsystem 620. Further, a second model library may also be deployed in the second access subsystem 620, where the second model library is configured to store a second combined object model of a second combined object, where the second combined object may be obtained by further combining the objects and/or the combined objects in the first model library. On this basis, the cloud server may perform the steps of combining object processing, namely: generating a second combined object view of the second combined object according to each second combined object model in the second model library and the object data table and the combined object view in the second database is similar to steps 410-430, and the process of generating the second combined object view is not repeated here.
After data synchronization, the client may obtain an object data table of the object and a combined object view of the combined object by accessing the first database or the second database.
Fig. 7 is a flowchart of a data access method provided by the present application. As shown in fig. 7, the flow of data processing includes a configuration process 710, a caching process 720, a data integration process 730, and a data access process 740, wherein the four processes may be performed by the server 120 shown in fig. 1 or the edge computing device 611 shown in fig. 6. The object models of the objects in the embodiments corresponding to fig. 2, 3 and 6, and the combined object model of the combined object in the embodiments corresponding to fig. 4, 5 and 6, may be configured according to the configuration process 710 shown in fig. 7.
As shown in fig. 7, in the configuration process 710, after obtaining the object model and the object combination object model configured by the administrator user or developer at the administrator client, the edge computing device stores the object model and the combination object model in the object model configuration file. Thereafter, a basic object processing step and a combined object processing step are performed. In the basic object processing step, an object model is read from an object model configuration file, an object data table of an object is created in a first database according to the object model, and a first access interface corresponding to the object data table is issued to a data access interface. In the combined object processing step, a combined object model is obtained from an object model configuration file, a combined object view corresponding to the combined object is created in a first database, and a second azimuth interface corresponding to the combined object view is issued to a data access interface.
In the caching process 720, after the edge computing device receives the data stream from the data acquisition device, the edge computing device caches the data stream according to the data source partition, that is, according to the source device identifier corresponding to each piece of reporting information in the data stream, and stores the corresponding piece of reporting information in the storage partition corresponding to the source device identifier.
In the data integration process 730, a base object processing step is performed. Specifically, in the basic object processing step, the information reported in the access cache is periodically reported, and the following steps are sequentially executed: acquiring reporting information corresponding to each attribute according to the source equipment identifier corresponding to each attribute; and performs steps 201-203 above. Further, after completing the data integration process of one period, the edge computing device may synchronize the object data table and the combined object view in the first database to the second database in the cloud, so that the cloud server may further combine the object data table or the combined object view.
In the data access process 740, if an object access request is received, determining a first access interface corresponding to a target object identifier according to the target object identifier carried by the object access request; then, converting the object access request into a data table access request according to the determined first access interface; sending a data table access request to a first database; thereafter, the first database returns the object data table of the target object to the client.
In the data access process 740, if a combined object access request is received, determining a second access interface corresponding to the target combined identifier according to the target combined identifier carried by the combined object access request; then, according to the determined second access interface, converting the combined object access request into a combined object view access request, and sending the combined object view access request to a first database; thereafter, the first database returns the combined object view of the target combined object to the client.
In the embodiment of the application, an object is established as a basic processing unit, specifically, according to the data processing mode corresponding to each attribute indicated in the configured object model, the reported information of the object under a plurality of attributes is processed to obtain the attribute value of the object under each attribute, and the attribute values of the object under the plurality of attributes are correspondingly integrated into the object data table of the object, so that the instantiation of the object model is realized. In addition, an access interface of the object data table is also provided, so that the object data table of the object can be accessed according to the access interface in the data access process. In the application, because the reported information is not required to be processed in the data access process, and then the integration of a plurality of attribute values is carried out, the reported information is processed and integrated before being stored, which is equivalent to the process logic of integrating the data processing and the attribute values carried out in the application layer in the prior art to be moved down to the data layer, thereby, the client can access the attribute values of the object under a plurality of attributes based on one request without carrying out additional processing, realizing the separation of the application and the data and improving the efficiency of data access.
The method to be protected by the present application is described in detail above with reference to the accompanying drawings, and the apparatus and computing device to be protected by the present application, which may be used to perform the method in the above-described embodiments of the present application, are further described below with reference to fig. 8 and 9. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the above-described method embodiments of the present application.
Fig. 8 is a block diagram of a data access apparatus provided in the present application, where the data access apparatus may be disposed in the server 120 shown in fig. 1 or the edge computing device 611 shown in fig. 6, and as shown in fig. 8, the data access apparatus 800 includes: an object access request receiving module 810, configured to receive an object access request, where the object access request includes a target object identifier of a target object; the object data table obtaining module 820 is configured to obtain an object data table corresponding to the target object according to the target object identifier, where the object data table includes attribute values of the target object under a plurality of attributes, and the attribute values of the target object under the plurality of attributes are obtained by processing the report information corresponding to each attribute according to a data processing manner corresponding to each attribute indicated by the object model corresponding to the target object; the object data table sending module 830 is configured to send an object data table of the target object to the client.
In some embodiments of the present application, the data access apparatus 800 further comprises: the object model acquisition module is used for acquiring an object model configured for an object, wherein the object model indicates a plurality of attributes defined for the object and data processing modes corresponding to the attributes; the processing module is used for processing the reported information corresponding to each attribute of the object according to the data processing mode corresponding to each attribute to obtain the attribute value of the object under each attribute; and the integrating module is used for integrating the attribute values of the object under a plurality of attributes into an object data table corresponding to the object.
In some embodiments of the present application, the data access apparatus 800 further comprises: the access interface generation module is used for generating an access interface, and the access interface comprises at least one of a first access interface for combining the object view corresponding to the object and a second access interface for combining the object data table corresponding to the object; and the access interface issuing module is used for issuing the generated access interface.
In some embodiments of the present application, the object model also indicates a source device identity corresponding to each attribute of the object; the data access device 800 further includes: and the report information acquisition module is used for acquiring report information corresponding to each attribute of the object in the report data set according to the source equipment identifier corresponding to each attribute.
In some embodiments of the present application, the data processing means indicates a conversion means between the original data format and the target data format; the processing module is further to: determining the original data format of the reported information corresponding to an attribute; and converting the format of the reported information corresponding to the attribute according to the conversion mode between the original data format and the target data format to obtain an attribute value of the attribute corresponding to the target data format.
In some embodiments of the present application, reporting information in the reporting dataset is stored in a partitioned manner according to the source device; the report information acquisition module is further used for: determining a storage position of the reported information corresponding to each attribute based on the corresponding relation between the equipment identifier and the storage position and the source equipment identifier corresponding to each attribute; and acquiring the reporting information corresponding to each attribute from the storage position where the reporting information corresponding to each attribute is located.
In some embodiments of the present application, the data access apparatus 800 further comprises: and the synchronization module is used for synchronizing the object data table corresponding to the object and the combined object view corresponding to the combined object to the database of the cloud.
In another aspect of the present application, there is provided a data access apparatus including: the combined object access request receiving module is used for receiving a combined object access request, wherein the combined object access request comprises a target combined identifier of a target combined object; the combined object view acquisition module is used for acquiring a combined object view of the target combined object according to the target combined identifier; the combined object view of the target combined object is generated according to an object data table of a plurality of objects included in the target combined object and an association relationship between the plurality of objects included in the target combined object; the object data table of the object comprises attribute values of the object under a plurality of attributes, wherein the attribute values of the object under the plurality of attributes are obtained by processing the reporting information corresponding to each attribute according to the data processing mode corresponding to each attribute indicated by the object model corresponding to the object; and the combined object view sending module is used for sending the combined object view of the target combined object to the client.
In some embodiments of the application, the data access device further comprises: a combined object model acquisition module configured to acquire a combined object model configured for a combined object, the combined object model indicating a plurality of objects included in the combined object and an association relationship between the plurality of objects; the object data table acquisition module is used for acquiring an object data table corresponding to each object included in the combined object; and the combined object view generation module is used for generating a combined object view corresponding to the combined object according to the association relation among the plurality of objects and the object data tables respectively corresponding to the plurality of objects included in the combined object.
In some embodiments of the application, the data access device further comprises: the access interface generation module is used for generating an access interface, and the access interface comprises at least one of a first access interface for combining the object view corresponding to the object and a second access interface for combining the object data table corresponding to the object; and the access interface issuing module is used for issuing the generated access interface.
It should be understood that the data access device according to the embodiments of the present application may correspond to executing the data access method described in the embodiments of the present application, and operations and/or functions of each module in the data access device are respectively for implementing corresponding flows of each method in the embodiments of the method, which are not described herein for brevity.
Fig. 9 is a schematic structural diagram of a computing device 900 provided in this embodiment, where the computing device may be a server in fig. 1, such as an edge computing device, or a cloud server in the cloud, and the computing device may be used to perform the data access method provided in the present application. As shown in fig. 9, computing device 900 includes a processor 910, a bus 920, a memory 930, a memory unit 950 (also referred to as a main memory unit), and a communication interface 940. Processor 910, memory 930, memory unit 950, and communication interface 940 are coupled by bus 920.
It is to be appreciated that in this embodiment, the processor 910 may be a CPU, and the processor 910 may also be other general purpose processors, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like. Communication interface 940 is used to enable communication of computing device 900 with external devices or appliances.
Bus 920 may include a path to transfer information between components such as processor 910, memory unit 950, and storage 930. The bus 920 may include a power bus, a control bus, a status signal bus, and the like in addition to a data bus. But for clarity of illustration, the various buses are labeled as bus 920 in the drawing. Bus 920 may be a peripheral component interconnect express (Peripheral Component Interconnect Express, PCIE) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, a unified bus (Ubus or UB), a computer quick link (compute express link, CXL), a cache coherent interconnect protocol (cache coherent interconnect for accelerators, CCIX), or the like.
As one example, computing device 900 may include multiple processors. The processor may be a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or computing units for processing data (e.g., computer program instructions).
It should be noted that, in fig. 9, only the computing device 900 includes 1 processor 910 and 1 memory 930 as an example, where the processor 910 and the memory 930 are respectively used to indicate a type of device or apparatus, and in a specific embodiment, the number of each type of device or apparatus may be determined according to service requirements.
The memory unit 950 may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
Specifically, in the solution of the present application, the memory unit 950 may store an object model of an object, and a combined object model of a combined object; further, it may also be used to store object data tables created based on the object model, and combined object views created based on the combined object model.
Memory 930 may be used for computer readable instructions which, when executed by processor 910, implement the data access method provided by the present application. The memory 930 may be a solid state disk or a mechanical hard disk.
It should be appreciated that the computing device 900 described above may be a DPU. The data access apparatus 800 above may be configured in a computing device 900 for implementing the data access method provided by the present application.
As a possible implementation manner, the present application further protects a computer device cluster, where the computer device cluster includes two or more computer devices, and each computer device may refer to a computer device 900 shown in fig. 9, where the computer devices in the computer device cluster are used to implement the operation steps of the methods shown in fig. 2 to fig. 7, which are not described herein for brevity.
The method steps in this embodiment may be implemented by hardware, or may be implemented by executing software instructions by a processor. The software instructions may be comprised of corresponding software modules that may be stored in random access memory (random access memory, RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. In addition, the ASIC may reside in a computing device. The processor and the storage medium may reside as discrete components in a network device or terminal device.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. The processes or functions of embodiments of the present application are performed in whole or in part by a computing device when the computer program or instructions are loaded and executed on a processor in the computing device. The computing device may be a general purpose computer, a special purpose computer, a computer network, a network device, a user device, or other programmable apparatus.
The computer program or instructions may be stored in or transmitted from one computer readable storage medium to another, for example, by wired or wireless means from one website site, computer, server, or data center. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices such as servers, data centers, etc. that integrate one or more available media. Usable media may be magnetic media such as floppy disks, hard disks, magnetic tape; optical media, such as digital video discs (digital video disc, DVD); but also semiconductor media such as solid state disks (solid state drive, SSD).
It will be appreciated that, in order to implement the functions of the method embodiments described above, the computing device includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application scenario and design constraints imposed on the solution.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more. For example, the plurality of processing units refers to two or more processing units; the plurality of systems means two or more systems. In the embodiment of the present application, the term "and/or" is merely an association relationship describing the association object, which indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone.
The terms first and second and the like in the description and in the claims of embodiments of the application, are used for distinguishing between different objects and not necessarily for describing a particular sequential order of objects. For example, the first reference resistor and the second reference resistor, etc., are used to distinguish between different reference resistors, and are not used to describe a particular order of reference resistors.
The present application is not limited to the above embodiments, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the present application, and these modifications and substitutions are intended to be included in the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (13)

1. A method of data access, comprising:
receiving an object access request, wherein the object access request comprises a target object identification of a target object;
according to the target object identification, an object data table corresponding to the target object is obtained, the object data table comprises attribute values of the target object under a plurality of attributes, and the attribute values of the target object under the plurality of attributes are obtained by processing reporting information corresponding to the attributes according to a data processing mode corresponding to each attribute indicated by an object model corresponding to the target object;
Sending an object data table of the target object to a client;
before the object data table corresponding to the target object is obtained according to the target object identifier, the method further includes:
obtaining an object model configured for an object, wherein the object model indicates a plurality of attributes defined for the object and data processing modes corresponding to the attributes;
processing the reported information corresponding to each attribute of the object according to the data processing mode corresponding to each attribute to obtain an attribute value of the object under each attribute;
and integrating attribute values of the object under a plurality of attributes into an object data table corresponding to the object.
2. The method of claim 1, wherein the data processing means indicates a conversion means between an original data format and a target data format;
processing the report information corresponding to each attribute of the object according to the data processing mode corresponding to each attribute to obtain an attribute value of the object under each attribute, including:
determining the original data format of the reported information corresponding to an attribute;
and carrying out format conversion on the report information corresponding to the attribute according to the conversion mode between the original data format and the target data format to obtain an attribute value of the attribute corresponding to the target data format.
3. The method according to claim 1, wherein the method further comprises:
acquiring a combined object model configured for a combined object, wherein the combined object model indicates a plurality of objects included in the combined object and association relations among the plurality of objects;
obtaining an object data table corresponding to each object included in the combined object;
and generating a combined object view corresponding to the combined object according to the association relation among the plurality of objects and the object data table respectively corresponding to the plurality of objects included in the combined object.
4. A method according to claim 3, characterized in that the method further comprises:
generating an access interface, wherein the access interface comprises at least one of a first access interface of an object data table corresponding to an object and a second access interface of a combined object view corresponding to the combined object;
the generated access interfaces are published to obtain an object data table of the object based on the first access interface or a combined object view of the combined object based on the second access interface.
5. A method according to claim 3, characterized in that the method further comprises:
And synchronizing the object data table corresponding to the object and the combined object view corresponding to the combined object to a database of the cloud.
6. A data access device, comprising:
the object access request receiving module is used for receiving an object access request, wherein the object access request comprises a target object identifier of a target object;
the object data table acquisition module is used for acquiring an object data table corresponding to the target object according to the target object identifier, wherein the object data table comprises attribute values of the target object under a plurality of attributes, and the attribute values of the target object under the plurality of attributes are obtained by processing reporting information corresponding to the attributes according to a data processing mode corresponding to each attribute indicated by an object model corresponding to the target object;
the object data table sending module is used for sending the object data table of the target object to the client;
the apparatus further comprises:
the object model obtaining module is used for obtaining an object model configured for an object before the object data table obtaining module obtains an object data table corresponding to the target object according to the target object identifier, wherein the object model indicates a plurality of attributes defined for the object and data processing modes corresponding to the attributes;
The processing module is used for processing the reported information corresponding to each attribute of the object according to the data processing mode corresponding to each attribute to obtain the attribute value of the object under each attribute;
and the integrating module is used for integrating the attribute values of the object under a plurality of attributes into an object data table corresponding to the object.
7. The apparatus of claim 6, wherein the data processing means indicates a conversion means between an original data format and a target data format; the processing module is used for:
determining the original data format of the reported information corresponding to an attribute;
and carrying out format conversion on the report information corresponding to the attribute according to the conversion mode between the original data format and the target data format to obtain an attribute value of the attribute corresponding to the target data format.
8. The apparatus of claim 6, wherein the apparatus further comprises:
a combined object model obtaining module, configured to obtain a combined object model configured for a combined object, where the combined object model indicates a plurality of objects included in the combined object and association relationships between the plurality of objects;
The object data table acquisition module is used for acquiring an object data table corresponding to each object included in the combined object;
and the combined object view generation module is used for generating a combined object view corresponding to the combined object according to the association relation among the plurality of objects and the object data tables respectively corresponding to the plurality of objects included in the combined object.
9. The apparatus of claim 8, wherein the apparatus further comprises:
the access interface generation module is used for generating an access interface, and the access interface comprises at least one of a first access interface of an object data table corresponding to an object and a second access interface of a combined object view corresponding to the combined object;
and the access interface issuing module is used for issuing the generated access interface to acquire an object data table of the object based on the first access interface or acquire a combined object view of the combined object based on the second access interface.
10. The apparatus of claim 8, wherein the apparatus further comprises:
and the synchronization module is used for synchronizing the object data table corresponding to the object and the combined object view corresponding to the combined object to a database of the cloud.
11. A computing device comprising a memory and a processor, the memory for storing a set of computer instructions; the method of any one of claims 1 to 5 is implemented when the processor executes the set of computer instructions.
12. A data access system, comprising:
the data acquisition equipment is used for acquiring the report information of the object under a plurality of attributes and sending the report information to the computing equipment;
a computing device for implementing the data access method according to any one of claims 1 to 5 based on reported information of an object under a plurality of attributes.
13. A computer readable storage medium comprising a memory and a processor, the memory for storing instructions that when executed on the processor cause the processor to perform the method of any of claims 1-5.
CN202210908140.3A 2022-07-29 2022-07-29 Data access method, device, computing equipment and system Active CN115374109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210908140.3A CN115374109B (en) 2022-07-29 2022-07-29 Data access method, device, computing equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210908140.3A CN115374109B (en) 2022-07-29 2022-07-29 Data access method, device, computing equipment and system

Publications (2)

Publication Number Publication Date
CN115374109A CN115374109A (en) 2022-11-22
CN115374109B true CN115374109B (en) 2023-09-01

Family

ID=84063045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210908140.3A Active CN115374109B (en) 2022-07-29 2022-07-29 Data access method, device, computing equipment and system

Country Status (1)

Country Link
CN (1) CN115374109B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117708218B (en) * 2024-02-05 2024-05-03 成都秦川物联网科技股份有限公司 Industrial Internet of things data access method and database system based on service sub-platform

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003123082A (en) * 2001-10-12 2003-04-25 Sony Corp Device and method for image processing and computer program
CN1794238A (en) * 2004-12-20 2006-06-28 达索系统公司 Process and system for rendering an object in a view using a product lifecycle management database
CN101872305A (en) * 2010-06-08 2010-10-27 用友软件股份有限公司 UI (User Interface) performance and service logic separation method and system
JP2015018326A (en) * 2013-07-09 2015-01-29 日本電信電話株式会社 Three-dimensional object identification space, three-dimensional object generation device, method and program
CN108123842A (en) * 2017-12-22 2018-06-05 武汉虹信技术服务有限责任公司 A kind of adaption system and method that can access more plant equipments based on KNX agreements
CN110874534A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Data processing method and data processing device
CN114490651A (en) * 2022-01-19 2022-05-13 阿里云计算有限公司 Data storage method and device
CN114661830A (en) * 2022-03-09 2022-06-24 苏州工业大数据创新中心有限公司 Data processing method, device, terminal and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003123082A (en) * 2001-10-12 2003-04-25 Sony Corp Device and method for image processing and computer program
CN1794238A (en) * 2004-12-20 2006-06-28 达索系统公司 Process and system for rendering an object in a view using a product lifecycle management database
CN101872305A (en) * 2010-06-08 2010-10-27 用友软件股份有限公司 UI (User Interface) performance and service logic separation method and system
JP2015018326A (en) * 2013-07-09 2015-01-29 日本電信電話株式会社 Three-dimensional object identification space, three-dimensional object generation device, method and program
CN108123842A (en) * 2017-12-22 2018-06-05 武汉虹信技术服务有限责任公司 A kind of adaption system and method that can access more plant equipments based on KNX agreements
CN110874534A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Data processing method and data processing device
CN114490651A (en) * 2022-01-19 2022-05-13 阿里云计算有限公司 Data storage method and device
CN114661830A (en) * 2022-03-09 2022-06-24 苏州工业大数据创新中心有限公司 Data processing method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN115374109A (en) 2022-11-22

Similar Documents

Publication Publication Date Title
CN111258978B (en) Data storage method
CN111339171B (en) Data query method, device and equipment
TW201800967A (en) Method and device for processing distributed streaming data
CN110134738B (en) Distributed storage system resource estimation method and device
WO2023005771A1 (en) Track querying method and device, storage medium, and computer program product
CN107528904B (en) Method and apparatus for data distributed anomaly detection
CN115374109B (en) Data access method, device, computing equipment and system
CN111723161A (en) Data processing method, device and equipment
CN110784377A (en) Method for uniformly managing cloud monitoring data in multi-cloud environment
CN111414410A (en) Data processing method, device, equipment and storage medium
CN112506969A (en) BMC address query method, system, equipment and readable storage medium
CN109145225B (en) Data processing method and device
CN115883407A (en) Data acquisition method, system, equipment and storage medium
CN111723245B (en) Method for establishing association relation of different types of storage objects in data storage system
CN105930354B (en) Storage model conversion method and device
CN109560940B (en) Charging method and device for content delivery network CDN service
CN106570029B (en) Data processing method and system for distributed relational database
CN113672692A (en) Data processing method, data processing device, computer equipment and storage medium
CN109284833B (en) Method, apparatus and storage medium for obtaining feature data for machine learning model
CN107894942B (en) Method and device for monitoring data table access amount
CN108023920B (en) Data packet transmission method, equipment and application interface
CN115269519A (en) Log detection method and device and electronic equipment
CN111756869B (en) DNS resolution server address collection method and system
CN110955709B (en) Data processing method and device and electronic equipment
CN107679093B (en) Data query method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant