Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of the present application.
Fig. 1 is a diagram of an application environment of an object-oriented protocol data paraphrasing module according to an embodiment of the present invention, as shown in fig. 1, in the application environment, anapparatus terminal 110 and an object-oriented protocoldata paraphrasing module 120 are included, which are described in detail below.
In the embodiment of the present invention, thedevice terminal 110 is required to be a terminal device that needs to support an object-oriented protocol, for example, a concentrator in the field of power communication, but in the technical solution disclosed in the present invention, thedevice terminal 110 may not support the object-oriented protocol itself, but support the object-oriented protocol by the object-oriented protocoldata paraphrasing module 120, specifically, thedevice terminal 110 acquires the object-oriented protocol data through other communication methods, sends the object-oriented protocol data to the object-oriented protocoldata paraphrasing module 120 through an application interface layer protocol, the object-oriented protocoldata paraphrasing module 120 paraphrases the object-oriented protocol data according to a data mapping relationship related to the object-oriented protocol stored in advance in thedevice terminal 120, generates object-oriented protocol paraphrasing data and returns the object-oriented protocol paraphrasing data to thedevice terminal 110 through the application interface layer protocol, in this way, thedevice terminal 110 has a function of supporting an object-oriented protocol.
As a preferred embodiment of the present invention, thedevice terminal 110 may further implement sending of the object-oriented protocol data through the object-oriented protocol data paraphrasing module, specifically, thedevice terminal 110 sends request data related to the object-oriented protocoldata paraphrasing module 120 through an application interface layer protocol, and after the object-oriented protocoldata paraphrasing module 120 processes the request data by using the data mapping relationship, the data conforming to the object-oriented protocol is generated and returned to thedevice terminal 110, so that thedevice terminal 110 may send the data conforming to the object-oriented protocol.
As another preferred embodiment of the present invention, the interface parameters and the data are transmitted in a standard interactive interface format, specifically, the interface parameters and the data are transmitted in a json format. That is, the json format is used for transmission between thedevice terminal 110 and the object-oriented protocoldata paraphrasing module 120. The json format is considered to be a lightweight data exchange format, namely, the json format is easy to read and write by people and is also easy to analyze and generate by machines, and the json format is an ideal data exchange language.
As another preferred embodiment of the present invention, considering that the object-oriented protocol data paraphrasing module is an independent functional module, and therefore needs to have certain data transmission, data storage and data processing functions, specifically, the object-oriented protocol data paraphrasing module can be subdivided into a data mapping relationship initialization sub-module, an object-oriented protocol data receiving sub-module, an object-oriented protocol data pre-checking sub-module, an object-oriented protocol data unpacking sub-module, an object-oriented protocol data framing sub-module, an object-oriented protocol paraphrasing data packing sub-module and an object-oriented protocol paraphrasing data sending sub-module, each sub-module is respectively responsible for data transmission, data storage and data processing functions, for example, the object-oriented protocol data receiving sub-module and the object-oriented protocol paraphrasing data sending sub-module are mainly responsible for data transmission functions, the object-oriented protocol data pre-checking sub-module, the object-oriented protocol data unpacking sub-module, the object-oriented protocol data framing sub-module and the object-oriented protocol paraphrasing data packing sub-module are mainly responsible for data processing functions, specific implementation functions are related to names of the functions, when a person skilled in the art sees the function sub-modules, the functions performed by the sub-modules can be clear, meanwhile, the function sub-modules are determined by the form functions, and the specific structure also belongs to the common knowledge of the person skilled in the art.
It should be noted that the object-oriented protocol data paraphrasing module provided by the present invention may exist independently, that is, when a product related to the object-oriented protocol is developed subsequently, a conventional product may be developed directly without paying attention to the object-oriented protocol, and then data interaction is performed with the object-oriented protocol data paraphrasing module disclosed by the present invention to realize support for the object-oriented protocol. The object-oriented protocol data paraphrasing module provided by the invention can be generated in batch in advance, and then in the actual development process, the limitation on developers is less, so that the development of the object-oriented protocol related products can be realized on the premise of unskilled mastering the object-oriented protocol, and the development efficiency of the products is effectively improved.
The object-oriented protocol data paraphrasing module provided by the embodiment of the invention does not need to pay attention to the object-oriented protocol when a user develops a product related to the object-oriented protocol by pre-storing a data mapping relation related to the object-oriented protocol, but can transmit the object-oriented protocol data paraphrasing module provided by the application through a preset application interface layer protocol by adopting a standard interactive interface format, after the object-oriented protocol data is obtained, the object-oriented protocol data is sent to the object-oriented protocol data paraphrasing module through the application interface layer protocol, the object-oriented protocol data is processed by utilizing the data mapping relation related to the object-oriented protocol in the object-oriented protocol data paraphrasing module, and a paraphrasing result is obtained, namely, the user does not need to pay attention to the object-oriented protocol, the object-oriented protocol data paraphrasing module provided by the invention can be directly utilized to realize the function of supporting the object-oriented protocol, so that a developer can put more energy on service development and the development efficiency of products is improved.
As shown in fig. 2, a flowchart of steps of an object-oriented protocol data paraphrasing method provided in an embodiment of the present invention is mainly applied to the terminal device shown in fig. 1, and specifically includes the following steps:
step S202, the acquired object-oriented protocol data is sent to an object-oriented protocol data paraphrasing module through an application interface layer protocol.
In the embodiment of the invention, the data mapping relation related to the object-oriented protocol is stored in the object-oriented protocol data definition module in advance.
In the embodiment of the invention, the application interface layer protocol refers to that interface parameters and data are transmitted by adopting a standard interactive interface format.
Step S202, receiving the object oriented protocol paraphrase data returned by the object oriented protocol data paraphrase module.
In the embodiment of the invention, the object-oriented protocol paraphrasing data is generated by paraphrasing the object-oriented protocol data by an object-oriented protocol data paraphrasing module according to the data mapping relation.
In the embodiment of the present invention, since the object-oriented protocol data interpretation method provided by the present invention is mainly applied to the terminal device shown in fig. 1, the object-oriented protocol data interpretation method provided by the embodiment of the present invention can be understood by referring to the explanation of fig. 1 in detail, and the present invention is not described again.
In the object-oriented protocol data paraphrasing method provided by the embodiment of the invention, after the object-oriented protocol data is obtained, the object-oriented protocol data is sent to the object-oriented protocol data paraphrasing module through an application interface layer protocol, the object-oriented protocol data is processed by utilizing a pre-stored data mapping relation related to the object-oriented protocol in the object-oriented protocol data paraphrasing module, and a paraphrasing result is obtained, namely, a user does not need to pay attention to the object-oriented protocol and does not need to develop a product related to the object-oriented protocol to directly support the object-oriented protocol, so that more energy of a developer is put into service development, and the development efficiency of the product is improved.
As shown in fig. 3, a flowchart of steps of another method for paraphrasing object-oriented protocol data according to an embodiment of the present invention is mainly applied to the terminal device shown in fig. 1, and compared with the flowchart of steps of the method for paraphrasing object-oriented protocol data shown in fig. 2, the method further includes:
step S302, sending request data related to the object-oriented protocol data paraphrasing module through the application interface layer protocol.
Step S304, receiving the data which is returned by the object-oriented protocol data paraphrasing module and conforms to the object-oriented protocol.
In the embodiment of the invention, the data conforming to the object-oriented protocol is generated by processing the request data according to the data mapping relation by an object-oriented protocol data paraphrasing module.
The step flow chart of the object-oriented protocol data paraphrasing method provided by the embodiment of the invention realizes that the terminal equipment which does not support the object-oriented protocol sends the data which accords with the object-oriented protocol.
As shown in fig. 4, a schematic structural diagram of an object-oriented protocol data paraphrasing apparatus provided in an embodiment of the present invention is mainly configured on a terminal device shown in fig. 1, and specifically includes:
an object-oriented protocoldata sending unit 410, configured to send the obtained object-oriented protocol data to the object-oriented protocol data paraphrasing module through an application interface layer protocol.
In the embodiment of the invention, the data mapping relation related to the object-oriented protocol is stored in the object-oriented protocol data definition module in advance.
In the embodiment of the invention, the application interface layer protocol refers to that interface parameters and data are transmitted by adopting a standard interactive interface format.
An object-oriented protocol paraphrasedata receiving unit 420 for receiving the object-oriented protocol paraphrase data returned by the object-oriented protocol data paraphrase module
In the embodiment of the invention, the object-oriented protocol paraphrasing data is generated by paraphrasing the object-oriented protocol data by an object-oriented protocol data paraphrasing module according to the data mapping relation.
In the embodiment of the present invention, it should be noted that the object-oriented protocol data paraphrasing apparatus is disposed on theterminal device 110 as shown in fig. 1, and is related to theterminal device 110, and is different from the object-oriented protocol data paraphrasing module.
In the embodiment of the present invention, since the object-oriented protocol data interpretation method provided by the present invention is mainly applied to the terminal device shown in fig. 1, the object-oriented protocol data interpretation method provided by the embodiment of the present invention can be understood by referring to the explanation of fig. 1 in detail, and the present invention is not described again.
In the object-oriented protocol data paraphrasing device provided by the embodiment of the invention, after the object-oriented protocol data is acquired, the object-oriented protocol data is sent to the object-oriented protocol data paraphrasing module through an application interface layer protocol, the object-oriented protocol data is processed by utilizing a pre-stored data mapping relation related to the object-oriented protocol in the object-oriented protocol data paraphrasing module, and a paraphrasing result is acquired, that is, a user does not need to pay attention to the object-oriented protocol itself and does not need to develop a product related to the object-oriented protocol to directly support the object-oriented protocol itself, so that a developer can put more energy into service development and the development efficiency of the product is improved.
As shown in fig. 5, compared with the schematic structural diagram of the apparatus for paraphrasing object-oriented protocol data shown in fig. 4, the schematic structural diagram of the apparatus for paraphrasing object-oriented protocol data provided in the embodiment of the present invention further includes:
a requestdata sending unit 510, configured to send request data related to the object-oriented protocol data paraphrasing module through the application interface layer protocol.
An object-oriented protocoldata receiving unit 520, configured to receive data conforming to the object-oriented protocol returned by the object-oriented protocol data paraphrasing module.
In the embodiment of the invention, the data conforming to the object-oriented protocol is generated by processing the request data according to the data mapping relation by an object-oriented protocol data paraphrasing module.
The structure schematic diagram of the object-oriented protocol data paraphrasing device provided by the embodiment of the invention realizes that the terminal equipment which does not support the object-oriented protocol sends the data which conforms to the object-oriented protocol.
The embodiment of the invention also provides a concentrator, wherein the concentrator does not support an object-oriented protocol; the concentrator is provided with an object protocol data paraphrasing module; the object-oriented protocol data is paraphrased between the concentrator and the object-oriented protocol data paraphrasing module by an object-oriented protocol data paraphrasing method as shown in fig. 2 or fig. 3.
To facilitate understanding of the object-oriented protocol data paraphrasing module provided by the present invention, as shown in fig. 6, a specific structure diagram of the object-oriented protocol data paraphrasing module is provided for the embodiment of the present invention, which is described in detail below.
In the embodiment of the invention, the object-oriented protocol data paraphrasing module comprises a physical layer, a link layer, an application layer, a data exchange layer and an object layer, wherein the object layer stores data attributes and format conversion functions.
In the embodiment of the present invention, the object-oriented protocol data paraphrasing module mainly relates to the downlink and uplink processes of data, and specifically, in the downlink process of one data, data interaction between layers is as follows: physical layer: and the system is responsible for acquiring downlink communication data and sending the downlink communication data to a link layer.
And a link layer: the method is responsible for checking the communication address of downlink communication data, then framing the link layer to obtain a legal application protocol data unit, and then forwarding the legal application protocol data unit to the application layer.
An application layer: the method is mainly used for realizing the processing of pre-connection, application connection, safe transmission, reporting, reading, setting, operation and proxy service. Wherein, each processing function is as follows:
pre-connection: the method is mainly used for establishing the link connection and maintaining the link connection.
Connecting applications; the method is mainly used for realizing default application connection information, performing application connection negotiation and security authentication with a main station, generating negotiated application connection information and maintaining application connection.
And (4) safe transmission: the method is mainly used for realizing the safety check of the application protocol data unit and transferring the application protocol data unit to other processing modules for processing.
Reading: the method is mainly used for realizing reading service processing and forwarding the object information to a data exchange layer.
Setting: the method is mainly used for realizing the setting service processing and forwarding the object information to the data exchange layer.
The operation is as follows: the method is mainly used for realizing operation service processing and forwarding the object information to the data exchange layer.
Reporting: the method is mainly used for the report confirmation of the main station and informing the report task of the confirmation information. The reporting task mainly comprises the scheduling of the reporting task and the generation of reporting data.
The agent: the method is mainly used for generating the proxy task. The agent task mainly refers to generating a meter reading relay task and acquiring meter reading data.
A data exchange layer: the method is mainly used for calling the corresponding access interface.
Object layer: the data attribute and the format conversion function are mainly stored, and the object information is processed through the data attribute and the format conversion function.
After data is downloaded to an object layer and object information is processed to obtain a processing result, the data needs to be sequentially uplink returned to a physical layer and sent through the physical layer, specifically, in the uplink process, data interaction among the layers is as follows:
object layer: after the processing of the object information is realized, the processing result is handed over to the data exchange layer.
A data exchange layer: the method is mainly used for generating the protocol data unit from the processing result and handing over the protocol data unit to an application layer.
An application layer: the method is mainly used for generating application protocol data units of various services and handing over to a link layer. The method specifically includes reporting, reading, setting, operating, acting and the like.
And a link layer: it is mainly responsible for generating link layer data frames according to the application protocol data units of various services and forwarding to the physical layer.
Physical layer: is mainly responsible for the transmission of link layer data frames.
In the embodiments of the present invention, it should be noted that some technical terms related to the embodiments belong to the common general knowledge well known to those skilled in the art, and the technical solutions of the present invention will be clearly known to those skilled in the art when reading the above solutions without specific description.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in various embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile 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 DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.