CN112256774B - Power data processing method, device, computer equipment and storage medium - Google Patents
Power data processing method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN112256774B CN112256774B CN202011032276.XA CN202011032276A CN112256774B CN 112256774 B CN112256774 B CN 112256774B CN 202011032276 A CN202011032276 A CN 202011032276A CN 112256774 B CN112256774 B CN 112256774B
- Authority
- CN
- China
- Prior art keywords
- data
- power
- power data
- target
- communication
- 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
Links
- 238000003672 processing method Methods 0.000 title abstract description 22
- 238000004891 communication Methods 0.000 claims abstract description 180
- 238000000034 method Methods 0.000 claims abstract description 31
- 230000006870 function Effects 0.000 claims description 129
- 238000006243 chemical reaction Methods 0.000 claims description 67
- 238000012545 processing Methods 0.000 claims description 43
- 238000004590 computer program Methods 0.000 claims description 17
- 238000010276 construction Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005538 encapsulation Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000013480 data collection Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
- G06F16/285—Clustering or classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- Public Health (AREA)
- Water Supply & Treatment (AREA)
- General Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Telephonic Communication Services (AREA)
Abstract
The application relates to a power data processing method, a device, a computer device and a storage medium. The method comprises the following steps: and collecting power data. The target data object model is selected from more than one preset data object model according to the data type of the power data. An object function corresponding to the power data is determined. The power data and the object function are constructed as communication objects according to the target data object model. And converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model. And sending the communication object frame data to the electric power internet of things platform. By adopting the method, the electric power data acquisition efficiency can be improved.
Description
Technical Field
The present application relates to the field of internet of things, and in particular, to a method and apparatus for processing electric power data, a computer device, and a storage medium.
Background
With the development of computer technology, the technology of the internet of things appears. The internet of things refers to connecting any object with a network through information sensing equipment according to a stipulated protocol, and carrying out information exchange and communication on the object through an information transmission medium so as to realize the functions of intelligent identification, positioning, tracking, supervision and the like. In the power industry, the diversity of power business leads to a variety of data types of power data required to be collected by the power internet of things platform. The data type of the power data and the corresponding operation method are changed frequently along with the application scene, and each acquisition device cannot transmit the acquired power data to the power internet of things platform. Data communication between the electric power internet of things platform and each acquisition device is difficult, so that electric power data acquisition efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a power data processing method, apparatus, computer device, and storage medium capable of improving power data collection efficiency.
A method of power data processing, the method comprising:
Collecting power data;
selecting a target data object model from more than one preset data object models according to the data type of the power data;
Determining an object function corresponding to the power data;
constructing the power data and the object function as communication objects according to the target data object model;
Converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model;
and sending the communication object frame data to an electric power internet of things platform.
In one embodiment, the preset data object model is obtained through a preset data object model generating step, and the preset data object model generating step includes:
Acquiring sample power data from the power internet of things platform;
performing basic service abstraction processing on the sample power data to obtain a basic service class;
Based on the basic service class, carrying out service characteristic classification processing on the sample power data according to the data type of the sample power data to obtain sub-service classes with more than one type;
And combining the sub-service classes with the basic service class respectively to obtain more than one preset data object model corresponding to the data type of the sample electric power data.
In one embodiment, the method further comprises:
Determining data attributes of at least one of sub-service classes for each type of sub-service class;
determining attribute length and attribute characteristics of each data attribute of the sub-service class;
and determining the corresponding coding mode of each data attribute according to the attribute length and attribute characteristics of each data attribute of the sub-service class.
In one embodiment, the constructing the power data and the object function as communication objects according to the target data object model includes:
Determining a first parameter and a second parameter from the power data according to the target data object model;
Determining a first conversion result according to the first parameter and a basic class function corresponding to the basic service class, and determining a second conversion result according to the second parameter and a byte conversion function corresponding to the sub-service class;
And constructing the power data and the object function as communication objects according to the first conversion result and the second conversion result.
A method of power data processing, the method comprising:
receiving communication object frame data sent by acquisition equipment;
Selecting a target data object model from more than one preset data object models according to the object type determined by the communication object frame data;
converting the communication object frame data into a communication object according to a target frame format corresponding to the target data object model;
Determining power data and an object function corresponding to the power data according to the communication object; and the electric power data and the object function are used for indicating the electric power internet of things platform to perform corresponding electric power business processing based on the electric power data and the object function.
In one embodiment, the converting the communication object frame data into the communication object according to the target frame format corresponding to the target data object model includes:
Determining an object type according to a type field in a target frame format corresponding to the target data object model; determining the object length according to a first length field in a target frame format corresponding to the target data object model; determining object attributes according to attribute fields in a target frame format corresponding to the target data object model; determining attribute length according to a second length field in a target frame format corresponding to the target data object model; determining attribute content according to the content field in the target frame format corresponding to the target data object model; determining an object function according to a function field in a target frame format corresponding to the target data object model;
and converting the communication object frame data into a communication object according to the object type, the object length, the object attribute, the attribute length, the attribute content and the object function.
In one embodiment, the determining, according to the communication object, power data and an object function corresponding to the power data includes:
determining a first conversion result and a second conversion result according to the communication object;
Determining a first parameter according to the first conversion result and a basic class function corresponding to a basic service class of the target data object model;
determining a second parameter according to the second parameter and a byte conversion function corresponding to a sub-service class of the target data object model;
And determining power data and an object function corresponding to the power data according to the first parameter and the second parameter.
A power data processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring power data;
the selection module is used for selecting a target data object model from more than one preset data object models according to the data type of the power data;
a determining module for determining an object function corresponding to the power data;
the construction module is used for constructing the power data and the object function into communication objects according to the target data object model;
the conversion module is used for converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model;
and the sending module is used for sending the communication object frame data to the electric power internet of things platform.
A power data processing apparatus, the apparatus comprising:
the receiving module is used for receiving the communication object frame data sent by the acquisition equipment;
a first selection module, configured to select a target data object model from more than one preset data object models according to the object type determined by the communication object frame data;
The first conversion module is used for converting the communication object frame data into a communication object according to a target frame format corresponding to the target data object model;
A first determining module, configured to determine, according to the communication object, power data and an object function corresponding to the power data; and the electric power data and the object function are used for indicating the electric power internet of things platform to perform corresponding electric power business processing based on the electric power data and the object function.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of:
Collecting power data;
selecting a target data object model from more than one preset data object models according to the data type of the power data;
Determining an object function corresponding to the power data;
constructing the power data and the object function as communication objects according to the target data object model;
Converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model;
and sending the communication object frame data to an electric power internet of things platform.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of:
receiving communication object frame data sent by acquisition equipment;
Selecting a target data object model from more than one preset data object models according to the object type determined by the communication object frame data;
converting the communication object frame data into a communication object according to a target frame format corresponding to the target data object model;
Determining power data and an object function corresponding to the power data according to the communication object; and the electric power data and the object function are used for indicating the electric power internet of things platform to perform corresponding electric power business processing based on the electric power data and the object function.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Collecting power data;
selecting a target data object model from more than one preset data object models according to the data type of the power data;
Determining an object function corresponding to the power data;
constructing the power data and the object function as communication objects according to the target data object model;
Converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model;
and sending the communication object frame data to an electric power internet of things platform.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
receiving communication object frame data sent by acquisition equipment;
Selecting a target data object model from more than one preset data object models according to the object type determined by the communication object frame data;
converting the communication object frame data into a communication object according to a target frame format corresponding to the target data object model;
Determining power data and an object function corresponding to the power data according to the communication object; and the electric power data and the object function are used for indicating the electric power internet of things platform to perform corresponding electric power business processing based on the electric power data and the object function.
The power data processing method, the power data processing device, the computer equipment and the storage medium collect power data. The target data object model is selected from more than one preset data object model according to the data type of the power data. An object function corresponding to the power data is determined. The power data and the object function are constructed as communication objects according to the target data object model. And converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model. And sending the communication object frame data to the electric power internet of things platform. In this way, through presetting preset data object models respectively corresponding to the electric power data of various data types, when the data types of the electric power data and the corresponding operation methods are changed frequently along with application scenes, the corresponding data object models are selected from a plurality of preset data object models according to the data types of the electric power data to encapsulate the electric power data, so that normal data communication between the electric power internet of things platform and each acquisition device is ensured, and the electric power data acquisition efficiency is improved.
Drawings
FIG. 1 is an application scenario diagram of a power data processing method in one embodiment;
FIG. 2 is a flow chart of a power data processing method according to an embodiment;
FIG. 3 is a schematic diagram of basic traffic classes in one embodiment;
FIG. 4 is a schematic diagram of sub-service classes in one embodiment;
FIG. 5 is a flow chart of a power data processing method according to another embodiment;
FIG. 6 is a diagram of a target frame format in one embodiment;
FIG. 7 is a schematic diagram of byte conversion of a communication object in one embodiment;
FIG. 8 is a communication flow of an acquisition device and an electric power Internet of things platform in one embodiment;
FIG. 9 is a block diagram of a power data processing device in one embodiment;
FIG. 10 is a block diagram of a power data processing device in one embodiment;
FIG. 11 is an internal block diagram of a computer device in one embodiment;
fig. 12 is an internal structural view of a computer device in another embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The power data processing method provided by the application can be applied to an application environment shown in figure 1. The application environment includes an acquisition device 102 and a server running a power internet of things platform 104. The acquisition device 102 and the power internet of things platform 104 communicate over a network. The acquisition device 102 may include a desktop device or a mobile device, among other things. The mobile device may specifically include at least one of a smart meter, a mobile phone, a tablet computer, a notebook computer, and the like. Those skilled in the art will appreciate that the application environment shown in fig. 1 is only a partial scenario related to the present application, and does not constitute a limitation on the application environment of the present application.
The acquisition device 102 acquires power data. The acquisition device 102 selects a target data object model from more than one preset data object model according to the data type of the power data. The acquisition device 102 determines an object function corresponding to the power data. The acquisition device 102 constructs the power data and the object function as a communication object according to the target data object model. The acquisition device 102 converts the communication object into communication object frame data conforming to a target frame format corresponding to the target data object model. The acquisition device 102 sends communication object frame data to the power internet of things platform 104.
In one embodiment, as shown in fig. 2, a power data processing method is provided, and the method is applied to the acquisition device 102 in fig. 1 for illustration, and includes the following steps:
S202, collecting power data.
The power data is data generated in the power business processing process in the power industry.
Specifically, the electric power internet of things platform is in communication connection with at least one acquisition device, and the electric power internet of things platform and the acquisition device are both provided with the same set of electric power data acquisition communication protocol. The acquisition devices can be deployed at corresponding power sites and acquire power data corresponding to the power sites.
S204, selecting a target data object model from more than one preset data object models according to the data type of the power data.
The data object model is a model conforming to an object-oriented structure and is used for packaging power data.
Specifically, a preset data object model for each data type is provided in the acquisition device. The collection device may determine a data type corresponding to the power data after collecting the power data. Furthermore, the collecting device may select the target data object model from more than one preset data object model according to the data type of the power data.
S206, determining an object function corresponding to the power data.
Wherein the object function is a function for processing power data.
In one embodiment, the object functions may specifically include at least one of a write function, a delete function, an update function, a call function, a sync function, and the like.
S208, constructing the power data and the object function as communication objects according to the target data object model.
Wherein the communication object is an object obtained by encapsulating the power data and the object function.
Specifically, the collection device may determine a base service class and a sub-service class corresponding to the power data according to the target data object model. Wherein the sub-service class may inherit the base service class. The acquisition device may construct the power data and the object function as communication objects according to the basic service class and the sub-service class corresponding to the power data.
S210, converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model.
The target frame format is a frame format in which fields carrying data features are ordered according to a preset rule. The communication target frame data is frame data of a communication target conforming to the target frame format.
In particular, the target data object model may correspond to a target frame format. The acquisition device may determine a corresponding target frame format based on the target data object model. Furthermore, the acquisition device may convert the communication object into communication object frame data conforming to a target frame format corresponding to the target data object model.
S212, the communication object frame data is sent to the electric power internet of things platform.
Specifically, the collection device may send the communication object frame data to the electric power internet of things platform, and the electric power internet of things platform may receive the communication object frame data, convert the communication object frame data into a communication object, and determine the electric power data and the corresponding object function according to the communication object. Furthermore, the electric power internet of things platform can perform corresponding electric power business processing based on the electric power data and the object function.
In the above power data processing method, power data is collected. The target data object model is selected from more than one preset data object model according to the data type of the power data. An object function corresponding to the power data is determined. The power data and the object function are constructed as communication objects according to the target data object model. And converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model. And sending the communication object frame data to the electric power internet of things platform. In this way, through presetting preset data object models respectively corresponding to the electric power data of various data types, when the data types of the electric power data and the corresponding operation methods are changed frequently along with application scenes, the corresponding data object models are selected from a plurality of preset data object models according to the data types of the electric power data to encapsulate the electric power data, so that normal data communication between the electric power internet of things platform and each acquisition device is ensured, and the electric power data acquisition efficiency is improved.
In one embodiment, the preset data object model is obtained through a preset data object model generating step, and the preset data object model generating step includes: acquiring sample power data from a power internet of things platform; carrying out basic service abstraction processing on the sample power data to obtain a basic service class; based on the basic service class, carrying out service characteristic classification processing on the sample power data according to the data type of the sample power data to obtain more than one type of sub-service class; and combining the sub-service classes with the basic service class respectively to obtain more than one preset data object model corresponding to the data type of the sample electric power data.
The sample power data are power data obtained by selecting historical power data of the power internet of things platform. The basic service class is a service class that includes common information items for all data types. A sub-service class is a service class that includes information items of a particular data type.
Specifically, the power internet of things platform stores historically collected power data. The collection device may obtain sample power data from historical power data of the power internet of things platform. The acquisition equipment can carry out basic service abstraction processing on the sample power data to obtain basic service classes. The acquisition equipment can perform service characteristic classification processing on the sample power data according to the data type of the sample power data based on the obtained basic service class, so as to obtain more than one type of sub-service class. It is understood that one data type corresponds to one type of sub-service class. The collection device may combine the sub-service classes of more than one type with the base service class, respectively, to obtain more than one preset data object model corresponding to the data type of the sample power data. It will be appreciated that each sub-service class in the preset data object model may inherit an information item of the underlying service class.
In one embodiment, as shown in FIG. 3, the basic service class specifies the message type, message ID, reply message ID, and total byte length of the type. All operations used in the power industry are classified as message types by the same power equipment. The message types are divided into five types, and the number is set: the number 0 represents an active reporting type, the number 1 represents a calling reporting type, the number 2 represents a calling type, the number 3 represents a remote control type, and the number 4 represents a remote synchronization type.
In one embodiment, as shown in fig. 4, the collection device classifies the power traffic into five major types based on sample power data. Namely, a power information type, a power event information type, a geographical location information type, an administrative location information type, and a system status information type. The five types of electric power business can inherit information items of the basic business class, and when the electric power business type is newly added, the electric power business type is newly added with related attributes only, and the electric power business type can automatically inherit the related attributes of the basic class without more modification.
In one embodiment, the preset data object model may also be built by a third party computer device. The third party computer equipment deploys the built preset data object model on the acquisition equipment and the electric power internet of things platform, so that the acquisition equipment can package the acquired electric power data into a communication object data frame through the preset data object model, and the packaged communication object data frame is sent to the electric power internet of things platform. The electric power internet of things platform can also acquire electric power data from the communication object data frame through a preset data object model.
In the above embodiment, the basic service class is obtained by performing basic service abstraction processing on the sample power data, and the service feature classification processing is performed on the sample power data, so as to obtain more than one sub-service class. Thus, by taking the base service class as the parent class of each child service class, each child service class can inherit the information items of the base service class. When the sub service class is added, the new information item is not needed, and the basic service class is directly inherited, so that the expandability of the power service is improved.
In one embodiment, the power data processing method further includes: determining data attributes of at least one of the sub-service classes for each type of sub-service class; determining the attribute length and attribute characteristics of each data attribute of the sub-service class; and determining the corresponding coding mode of each data attribute according to the attribute length and attribute characteristics of each data attribute of the sub-service class.
For example, as shown in table 1 below, the data attributes of the geographic location information type are longitude, latitude, and altitude, and the attribute lengths are two bytes each. The attribute length of the power information type is a dynamic length. Geographical location information type the manner of encoding the power information type is shown in table 2 below.
TABLE 1
TABLE 2
In the above embodiment, the coding mode corresponding to each data attribute is determined according to the attribute length and attribute characteristics of each data attribute of the sub-service class, so that the power data of the sub-service class can be uniformly coded according to the set coding mode, the consistency of the data coding modes is ensured, uniform packaging of the power data is realized, and the power data acquisition efficiency is further improved.
In one embodiment, step S208, that is, the step of constructing the power data and the object function as the communication object according to the target data object model, specifically includes: determining a first parameter and a second parameter from the power data according to the target data object model; determining a first conversion result according to the first parameter and a basic class function corresponding to the basic service class, and determining a second conversion result according to the second parameter and a byte conversion function corresponding to the sub-service class; and constructing the power data and the object function as communication objects according to the first conversion result and the second conversion result.
In one embodiment, the first parameter may specifically include at least one of a collection time of the power data and an ID of a last message. The second parameter may specifically include at least one of longitude, latitude, altitude, and the like. The basic class function may specifically include at least one of a message ID acquisition function, a reply message ID acquisition function, a type ID acquisition function, and the like. The byte conversion function may specifically include at least one of an administrative number acquisition function, a single byte positive number conversion function, and the like. The first conversion result may specifically include at least one of a message ID, a reply message ID, and a type ID. The first conversion result may include at least one of a single byte, two bytes, and an administrative number byte, or the like.
In the above embodiment, the first parameter and the second parameter determined from the power data are converted into the first conversion result and the second conversion result by the base class function and the byte conversion function, and are constructed as the communication object according to the first conversion result and the second conversion result. Therefore, the data communication among the electric power internet of things platforms can be performed in a communication object mode, so that the consistency of the encapsulation of the electric power data is kept, and the collection efficiency of the electric power data is further improved.
In one embodiment, as shown in fig. 5, a power data processing method is provided, and the method is applied to the power internet of things platform 104 in fig. 1 for illustration, and includes the following steps:
s502, receiving communication object frame data sent by the acquisition equipment.
Specifically, the collection device may send the communication object frame data to the electric power internet of things platform, and the electric power internet of things platform may receive the communication object frame data sent by the collection device.
S504, selecting a target data object model from more than one preset data object models according to the object type determined by the communication object frame data.
Specifically, a preset data object model for each object type is arranged in the electric power internet of things platform. The power internet of things platform may select the target data object model from more than one preset data object model according to the object type determined by the communication object frame data after receiving the communication object frame data.
S506, converting the frame data of the communication object into the communication object according to the target frame format corresponding to the target data object model.
Specifically, the electric power internet of things platform can determine a basic service class and a sub-service class corresponding to electric power data according to the target data object model. Wherein the sub-service class may inherit the base service class. The electric power internet of things platform can convert communication object frame data into communication objects according to the basic service class and the sub-service class corresponding to the object type.
S508, determining power data and an object function corresponding to the power data according to the communication object; and the power data and the object function are used for indicating the power internet of things platform to perform corresponding power business processing based on the power data and the object function.
In the above embodiment, the target data object model is selected from more than one preset data object model by receiving the communication object frame data transmitted by the acquisition device and according to the object type determined by the communication object frame data. And converting the frame data of the communication object into the communication object according to the target frame format corresponding to the target data object model. According to the communication object, power data and an object function corresponding to the power data are determined. And the electric power internet of things platform performs corresponding electric power business processing based on the electric power data and the object function. In this way, through presetting preset data object models corresponding to the power data of various data types, when the data types of the power data and the corresponding operation methods are changed frequently along with the application scene, the corresponding data object models are selected from the plurality of preset data object models according to the data types of the power data, and the power data and the corresponding object functions are extracted from the received communication object frame data, so that the normal data communication between the power internet of things platform and each acquisition device is ensured, and the power data acquisition efficiency is improved.
In one embodiment, step S506, that is, the step of converting the communication object frame data into the communication object according to the target frame format corresponding to the target data object model, specifically includes: determining the object type according to the type field in the target frame format corresponding to the target data object model; determining the object length according to a first length field in a target frame format corresponding to the target data object model; determining object attributes according to attribute fields in a target frame format corresponding to the target data object model; determining attribute length according to a second length field in a target frame format corresponding to the target data object model; determining attribute content according to the content field in the target frame format corresponding to the target data object model; determining an object function according to a function field in a target frame format corresponding to the target data object model; the communication object frame data is converted into a communication object according to the object type, the object length, the object attribute, the attribute length, the attribute content and the object function.
In one embodiment, as shown in fig. 6, the type field in the target frame format is represented by the first byte. The first length field is represented by the second and third bytes. The attribute field is represented by the fourth byte. If the attribute length is fixed, the second length field is not set, and if the attribute length is not fixed, the second length field is set. The content field is set according to whether the length is fixed, and the function field is represented by the last two bytes.
In the above embodiment, the communication object frame data is converted into the communication object by extracting the object type, the object length, the object attribute, the attribute length, the attribute content, and the object function from the communication object frame data according to each field in the target frame format corresponding to the target data object model. Thus, the conversion efficiency of the communication target frame data is improved.
In one embodiment, step S508, that is, a step of determining power data and an object function corresponding to the power data according to a communication object, specifically includes: determining a first conversion result and a second conversion result according to the communication object; determining a first parameter according to a first conversion result and a basic class function corresponding to a basic service class of the target data object model; determining a second parameter according to the second parameter and a byte conversion function corresponding to the sub-service class of the target data object model; and determining the power data and an object function corresponding to the power data according to the first parameter and the second parameter.
In the above-described embodiment, the first conversion result and the second conversion result determined from the communication object are converted into the first parameter and the second parameter by the base class function and the byte conversion function, and the power data and the object function are determined according to the first parameter and the second parameter. Therefore, the data communication among the electric power internet of things platforms can be performed in a communication object mode, so that the consistency of the encapsulation of the electric power data is kept, and the collection efficiency of the electric power data is further improved.
In one embodiment, as shown in fig. 7, the collection device may construct the power data and the corresponding object function as a communication object, send the communication byte stream after byte conversion of the communication object to the power internet of things platform, and after receiving the communication byte stream, the power internet of things platform performs byte conversion on the communication byte stream to obtain the communication object, and obtain the power data and the corresponding object function from the communication object.
In one embodiment, as shown in fig. 8, the collection device may package the power data for each data type into a communication object group. The collection equipment can encapsulate the communication object group into a protocol message through the basic class function and the byte conversion function, and send the protocol message to the electric power Internet of things platform through a protocol utilization pipeline. After receiving the protocol message, the electric power internet of things platform converts the protocol message into a communication object group through a basic class function and a byte conversion function. Furthermore, the electric power internet of things platform can acquire electric power data from the communication object group and store the electric power data into the database. The electric power internet of things platform can acquire electric power data from the database to perform corresponding electric power business processing.
It should be understood that, although the steps of fig. 2 and 5 are shown sequentially in order, the steps are not necessarily performed sequentially in order. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps of fig. 2 and 5 described above may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, or the order in which the sub-steps or stages are performed is not necessarily sequential, but may be performed in turn or alternately with at least some of the other steps or other steps.
In one embodiment, as shown in fig. 9, there is provided a power data processing apparatus 900 comprising: an acquisition module 901, a selection module 902, a determination module 903, a construction module 904, a conversion module 905, and a transmission module 906, wherein:
The acquisition module 901 is used for acquiring power data.
A selection module 902, configured to select a target data object model from more than one preset data object models according to a data type of the power data.
A determining module 903, configured to determine an object function corresponding to the power data.
A construction module 904 for constructing the power data and the object function as communication objects according to the target data object model.
The conversion module 905 is configured to convert the communication object into communication object frame data that conforms to a target frame format corresponding to the target data object model.
And the sending module 906 is configured to send the communication object frame data to the electric power internet of things platform.
In one embodiment, the collection module 901 is further configured to obtain sample power data from a power internet of things platform; carrying out basic service abstraction processing on the sample power data to obtain a basic service class; based on the basic service class, carrying out service characteristic classification processing on the sample power data according to the data type of the sample power data to obtain more than one type of sub-service class; and combining the sub-service classes with the basic service class respectively to obtain more than one preset data object model corresponding to the data type of the sample electric power data.
In one embodiment, the acquisition module 901 is further configured to determine, for each type of sub-service class, a data attribute of at least one of the sub-service classes; determining the attribute length and attribute characteristics of each data attribute of the sub-service class; and determining the corresponding coding mode of each data attribute according to the attribute length and attribute characteristics of each data attribute of the sub-service class.
In one embodiment, the constructing module 904 is further configured to determine the first parameter and the second parameter from the power data according to the target data object model; determining a first conversion result according to the first parameter and a basic class function corresponding to the basic service class, and determining a second conversion result according to the second parameter and a byte conversion function corresponding to the sub-service class; and constructing the power data and the object function as communication objects according to the first conversion result and the second conversion result.
The power data processing device is used for acquiring power data. The target data object model is selected from more than one preset data object model according to the data type of the power data. An object function corresponding to the power data is determined. The power data and the object function are constructed as communication objects according to the target data object model. And converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model. And sending the communication object frame data to the electric power internet of things platform. In this way, through presetting preset data object models respectively corresponding to the electric power data of various data types, when the data types of the electric power data and the corresponding operation methods are changed frequently along with application scenes, the corresponding data object models are selected from a plurality of preset data object models according to the data types of the electric power data to encapsulate the electric power data, so that normal data communication between the electric power internet of things platform and each acquisition device is ensured, and the electric power data acquisition efficiency is improved.
In one embodiment, as shown in fig. 10, there is provided a power data processing apparatus 1000 including: a receiving module 1001, a first selecting module 1002, a first converting module 1003, and a first determining module 1004, wherein:
the receiving module 1001 is configured to receive communication object frame data sent by the acquisition device.
The first selection module 1002 is configured to select a target data object model from more than one preset data object models according to an object type determined by the communication object frame data.
The first conversion module 1003 is configured to convert the communication object frame data into a communication object according to a target frame format corresponding to the target data object model.
A first determining module 1004, configured to determine, according to a communication object, power data and an object function corresponding to the power data; and the power data and the object function are used for indicating the power internet of things platform to perform corresponding power business processing based on the power data and the object function.
In one embodiment, the first conversion module 1003 is further configured to determine an object type according to a type field in a target frame format corresponding to the target data object model; determining the object length according to a first length field in a target frame format corresponding to the target data object model; determining object attributes according to attribute fields in a target frame format corresponding to the target data object model; determining attribute length according to a second length field in a target frame format corresponding to the target data object model; determining attribute content according to the content field in the target frame format corresponding to the target data object model; determining an object function according to a function field in a target frame format corresponding to the target data object model; the communication object frame data is converted into a communication object according to the object type, the object length, the object attribute, the attribute length, the attribute content and the object function.
In one embodiment, the first determining module 1004 is further configured to determine a first conversion result and a second conversion result according to the communication object; determining a first parameter according to a first conversion result and a basic class function corresponding to a basic service class of the target data object model; determining a second parameter according to the second parameter and a byte conversion function corresponding to the sub-service class of the target data object model; and determining the power data and an object function corresponding to the power data according to the first parameter and the second parameter.
The power data processing apparatus selects the target data object model from among more than one preset data object models by receiving the communication object frame data transmitted by the acquisition device and according to the object type determined by the communication object frame data. And converting the frame data of the communication object into the communication object according to the target frame format corresponding to the target data object model. According to the communication object, power data and an object function corresponding to the power data are determined. And the electric power internet of things platform performs corresponding electric power business processing based on the electric power data and the object function. In this way, through presetting preset data object models corresponding to the power data of various data types, when the data types of the power data and the corresponding operation methods are changed frequently along with the application scene, the corresponding data object models are selected from the plurality of preset data object models according to the data types of the power data, and the power data and the corresponding object functions are extracted from the received communication object frame data, so that the normal data communication between the power internet of things platform and each acquisition device is ensured, and the power data acquisition efficiency is improved.
For specific limitations of the power data processing apparatus, reference may be made to the above limitation of the power data processing method, and no further description is given here. The respective modules in the above-described power data processing apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be the acquisition device 102 of fig. 1 described above, and the internal structure of which may be as shown in fig. 11. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a power data processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
In one embodiment, a computer device is provided, and the computer device may be a server running the electric power internet of things platform 104 in fig. 1, and an internal structure diagram thereof may be shown in fig. 12. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing power data processing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a power data processing method.
It will be appreciated by those skilled in the art that the structures shown in fig. 11 and 12 are merely block diagrams of portions of structures associated with the inventive arrangements and are not limiting of the computer device to which the inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the above-described power data processing method. The steps of the power data processing method here may be the steps in the power data processing method of each of the above embodiments.
In one embodiment, a computer readable storage medium is provided, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the above-described power data processing method. The steps of the power data processing method here may be the steps in the power data processing method of each of the above embodiments.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
Claims (10)
1. A method of power data processing, the method comprising:
Collecting power data;
Selecting a target data object model from more than one preset data object models according to the data type of the power data; the data type comprises a basic service class and a sub-service class to which the electric power data belong, and the preset data object model is generated by sample electric power data of an electric power internet of things platform;
Determining an object function corresponding to the power data;
constructing the power data and the object function as communication objects according to the target data object model;
Converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model;
The communication object frame data is sent to an electric power internet of things platform;
Wherein said constructing said power data and said object function as communication objects according to said target data object model comprises:
Determining a first parameter and a second parameter from the power data according to the target data object model;
Determining a first conversion result according to the first parameter and a basic class function corresponding to the basic service class, and determining a second conversion result according to the second parameter and a byte conversion function corresponding to the sub-service class;
And constructing the power data and the object function as communication objects according to the first conversion result and the second conversion result.
2. The method according to claim 1, wherein the preset data object model is obtained by a preset data object model generating step, the preset data object model generating step comprising:
Acquiring sample power data from the power internet of things platform;
performing basic service abstraction processing on the sample power data to obtain a basic service class;
Based on the basic service class, carrying out service characteristic classification processing on the sample power data according to the data type of the sample power data to obtain sub-service classes with more than one type;
And combining the sub-service classes with the basic service class respectively to obtain more than one preset data object model corresponding to the data type of the sample electric power data.
3. The method according to claim 2, wherein the method further comprises:
Determining data attributes of at least one of sub-service classes for each type of sub-service class;
determining attribute length and attribute characteristics of each data attribute of the sub-service class;
and determining the corresponding coding mode of each data attribute according to the attribute length and attribute characteristics of each data attribute of the sub-service class.
4. The method of claim 2, wherein the sample power data is selected from historical power data of the power internet of things platform.
5. A method of power data processing, the method comprising:
receiving communication object frame data sent by acquisition equipment;
selecting a target data object model from more than one preset data object models according to the object type determined by the communication object frame data; the preset data object model is generated by sample electric power data of an electric power internet of things platform;
converting the communication object frame data into a communication object according to a target frame format corresponding to the target data object model;
Determining power data and an object function corresponding to the power data according to the communication object; the power data and the object function are used for indicating the power internet of things platform to perform corresponding power business processing based on the power data and the object function;
Wherein the determining, according to the communication object, the power data and the object function corresponding to the power data includes:
determining a first conversion result and a second conversion result according to the communication object;
Determining a first parameter according to the first conversion result and a basic class function corresponding to a basic service class of the target data object model;
determining a second parameter according to the second conversion result and a byte conversion function corresponding to the sub-service class of the target data object model;
And determining power data and an object function corresponding to the power data according to the first parameter and the second parameter.
6. The method according to claim 5, wherein converting the communication object frame data into a communication object according to the target frame format corresponding to the target data object model, comprises:
Determining an object type according to a type field in a target frame format corresponding to the target data object model; determining the object length according to a first length field in a target frame format corresponding to the target data object model; determining object attributes according to attribute fields in a target frame format corresponding to the target data object model; determining attribute length according to a second length field in a target frame format corresponding to the target data object model; determining attribute content according to the content field in the target frame format corresponding to the target data object model; determining an object function according to a function field in a target frame format corresponding to the target data object model;
and converting the communication object frame data into a communication object according to the object type, the object length, the object attribute, the attribute length, the attribute content and the object function.
7. The method of claim 6, wherein the type field in the target frame format is represented by a first byte, the first length field is represented by second and third bytes, and the attribute field is represented by a fourth byte.
8. A power data processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring power data;
The selection module is used for selecting a target data object model from more than one preset data object models according to the data type of the power data; the data type comprises a basic service class and a sub-service class to which the electric power data belong, and the preset data object model is generated by sample electric power data of an electric power internet of things platform; a determining module for determining an object function corresponding to the power data;
the construction module is used for constructing the power data and the object function into communication objects according to the target data object model;
the conversion module is used for converting the communication object into communication object frame data which accords with a target frame format corresponding to the target data object model;
the sending module is used for sending the communication object frame data to an electric power internet of things platform;
The construction module is specifically configured to determine a first parameter and a second parameter from the power data according to the target data object model; determining a first conversion result according to the first parameter and a basic class function corresponding to the basic service class, and determining a second conversion result according to the second parameter and a byte conversion function corresponding to the sub-service class; and constructing the power data and the object function as communication objects according to the first conversion result and the second conversion result.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011032276.XA CN112256774B (en) | 2020-09-27 | 2020-09-27 | Power data processing method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011032276.XA CN112256774B (en) | 2020-09-27 | 2020-09-27 | Power data processing method, device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112256774A CN112256774A (en) | 2021-01-22 |
CN112256774B true CN112256774B (en) | 2024-04-26 |
Family
ID=74233165
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011032276.XA Active CN112256774B (en) | 2020-09-27 | 2020-09-27 | Power data processing method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112256774B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113111854A (en) * | 2021-04-30 | 2021-07-13 | 平安国际融资租赁有限公司 | Current signal extraction method, current signal extraction device, computer equipment and storage medium |
CN114385287B (en) * | 2021-12-13 | 2024-01-05 | 武汉慧联无限科技有限公司 | Presentation content determining method, apparatus, electronic device and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20040046259A (en) * | 2002-11-26 | 2004-06-05 | 한국전자통신연구원 | The method for generating memory resident object-relational schema/query by using UML |
WO2009055961A1 (en) * | 2007-10-30 | 2009-05-07 | Mingzhong Li | Object indexing data, object storage warehouse, object access method and object access system in multidimensional framework |
CN103329479A (en) * | 2011-01-28 | 2013-09-25 | 索尼公司 | Information processing apparatus, information processing method, and program |
JP2017037459A (en) * | 2015-08-10 | 2017-02-16 | 住友電気工業株式会社 | Power information management device, power information management method and power information management program |
CN110826896A (en) * | 2019-10-31 | 2020-02-21 | 北京东软望海科技有限公司 | Data processing control method and device, computer equipment and storage medium |
CN110933146A (en) * | 2019-11-14 | 2020-03-27 | 厦门网宿有限公司 | Data conversion method and device and server |
CN111416866A (en) * | 2020-03-25 | 2020-07-14 | 上海电力大学 | Data communication method for power internet of things |
-
2020
- 2020-09-27 CN CN202011032276.XA patent/CN112256774B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20040046259A (en) * | 2002-11-26 | 2004-06-05 | 한국전자통신연구원 | The method for generating memory resident object-relational schema/query by using UML |
WO2009055961A1 (en) * | 2007-10-30 | 2009-05-07 | Mingzhong Li | Object indexing data, object storage warehouse, object access method and object access system in multidimensional framework |
CN103329479A (en) * | 2011-01-28 | 2013-09-25 | 索尼公司 | Information processing apparatus, information processing method, and program |
JP2017037459A (en) * | 2015-08-10 | 2017-02-16 | 住友電気工業株式会社 | Power information management device, power information management method and power information management program |
CN110826896A (en) * | 2019-10-31 | 2020-02-21 | 北京东软望海科技有限公司 | Data processing control method and device, computer equipment and storage medium |
CN110933146A (en) * | 2019-11-14 | 2020-03-27 | 厦门网宿有限公司 | Data conversion method and device and server |
CN111416866A (en) * | 2020-03-25 | 2020-07-14 | 上海电力大学 | Data communication method for power internet of things |
Non-Patent Citations (1)
Title |
---|
数据标准化在电力物联网综合业务平台的应用;白丽锐;杨友朋;王春新;;物联网技术(08);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112256774A (en) | 2021-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113434910B (en) | Service data uplink method and device | |
CN112256774B (en) | Power data processing method, device, computer equipment and storage medium | |
CN108491367B (en) | Report document generation method and device, computer equipment and storage medium | |
CN111722947A (en) | Service calling method and system | |
CN112055078B (en) | Data transmission method, device, computer equipment and storage medium | |
CN111158779B (en) | Data processing method and related equipment | |
CN111552696A (en) | Data processing method and device based on big data, computer equipment and medium | |
CN114363055B (en) | Data transmission method and device, computer equipment and storage medium | |
CN108833500B (en) | Service calling method, service providing method, data transmission method and server | |
CN110808950A (en) | Message processing method and device, computer equipment and storage medium | |
CN105991683A (en) | Data transmission method and device | |
CN111953662A (en) | Data processing method, device and system and storage medium | |
CN116594834A (en) | Operation and maintenance data processing method and device for multi-protocol server | |
CN113742101B (en) | Data intercommunication method, device, equipment and readable storage medium | |
CN114900796A (en) | Longitude and latitude coordinate compression method based on Beidou short message transmission | |
KR20210128096A (en) | Apparatus and method for interworking among internet of things platforms | |
CN114268675B (en) | Communication method and system based on IEC61850 model and electronic equipment | |
CN115994203B (en) | AI-based data annotation processing method, system and AI center | |
CN117041245A (en) | Data exchange method, device, computer equipment and storage medium | |
CN112633908B (en) | Advertisement test object generation method and device and computer equipment | |
CN114697121A (en) | Data processing method and device of power monitoring system and computer equipment | |
CN117376300A (en) | Message all-channel sending method and device, electronic equipment and storage medium | |
CN116962319A (en) | Calling method, calling device, network equipment and readable storage medium | |
CN118245462A (en) | Data integration method, apparatus, device, medium and program product for information system | |
JPWO2006040991A1 (en) | Terminal device, server device, and Web service providing system |
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 |