An operation instruction generation method and device, computer equipment and a storage medium

By introducing a data item conversion unit into the energy consumption information collection system, and using the mapping relationship to convert base server operation instructions, the problem of incompatibility between the base server and field terminal equipment communication protocols is solved, achieving protocol compatibility and cost reduction, and supporting the expansion of new services.

CN116233270BActive Publication Date: 2026-04-21CHINA GRIDCOM +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA GRIDCOM
Filing Date
2023-02-28
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, the communication protocols between the base server and the field terminal equipment are incompatible, which requires the redevelopment of the energy consumption information collection system, incurring significant manpower and financial costs, and also poses risks of project delays and personnel training.

Method used

By introducing a data item conversion unit into the energy consumption information acquisition system, the operation instructions issued by the base server are converted into a format that can be recognized by the acquisition front-end unit using the mapping relationship data, and operation instructions that can be executed by the field communication terminal are generated, thus avoiding the need to redevelop the entire system.

Benefits of technology

It achieves protocol compatibility between the base server and field terminal equipment, reduces development workload, lowers costs, supports new business expansion, does not affect the original system business, and simplifies hardware interaction and message encoding development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233270B_ABST
    Figure CN116233270B_ABST
Patent Text Reader

Abstract

This invention discloses an operation instruction generation method, apparatus, computer device, and storage medium. The method includes: acquiring a first operation instruction issued by a base server for a target communication terminal; determining a set of data items corresponding to a target service type from mapping data between a first protocol and a second protocol; determining a second data item corresponding to the first data item from the data item set; determining a second operation type corresponding to the first operation type based on the mapping data; and generating a second operation instruction for the target communication terminal according to the type of the first protocol, the target service type, the second operation type, and the second data item. This enables the base server to be compatible with various data collection services of existing energy consumption information collection systems through data item conversion based on communication protocols.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an operation instruction generation method, apparatus, computer device, and storage medium. Background Technology

[0002] With the continuous development of customer-side energy internet construction, the types of field terminal equipment such as concentrators, electricity meters, and water meters are increasing, as are the communication protocol types of these field terminal equipment. As a crucial component in the communication between the base server and field terminal equipment, the energy consumption information collection system faces the need to support multiple protocols.

[0003] In related technologies, a complete energy consumption information collection system is usually redeveloped based on the protocol used by the base server so that the base server can be compatible with various data collection services, which requires a lot of development costs. Summary of the Invention

[0004] This invention aims to at least partially solve one of the technical problems in related technologies. Therefore, the first objective of this invention is to propose an operation instruction generation method that enables the data item format defined by the protocol used by the base server to be compatible with various data collection services of existing energy consumption information collection systems, without causing any other impact on the existing energy consumption information collection systems.

[0005] The second objective of this invention is to provide an operation instruction generation device.

[0006] The third objective of this invention is to provide a computer device.

[0007] The fourth objective of this invention is to provide a computer-readable storage medium.

[0008] To achieve the above objectives, a first aspect of the present invention provides an operation instruction generation method applied to a data item conversion unit of an energy consumption information collection system, wherein the data item conversion unit is connected to a base server; the energy consumption information collection system further includes a collection front-end unit connected to a communication terminal; the method includes: acquiring a first operation instruction issued by the base server for a target communication terminal; wherein the first operation instruction includes a first data item, a target service type, a first protocol type of the target communication terminal, and a first operation type of the target communication terminal; wherein the first data item satisfies the data format requirements of a second protocol, and the first data item is used to indicate the target communication terminal's operation type. The target communication terminal performs a service interaction operation; the first operation type is used to declare the operation type when the target communication terminal performs the service interaction operation; a set of data items corresponding to the target service type is determined in the mapping relationship data between the first protocol and the second protocol; a second data item corresponding to the first data item is determined in the set of data items corresponding to the target service type; wherein the second data item meets the data format required by the first protocol; a second operation type corresponding to the first operation type is determined based on the mapping relationship data; and a second operation instruction for the target communication terminal is generated according to the type of the first protocol, the target service type, the second operation type, and the second data item.

[0009] According to one embodiment of the present invention, the operation instruction generation method further includes: sending the second operation instruction to the acquisition front-end unit to instruct the acquisition front-end unit to send the second operation instruction to the target communication terminal; wherein, the second operation instruction is used to instruct the target communication terminal to send service data corresponding to the target service type to the acquisition front-end unit.

[0010] According to one embodiment of the present invention, the base server sends the first operation instruction to the message queue corresponding to the target service topic; wherein, the first operation instruction corresponds to a request data type; the target service topic is the service topic corresponding to the request data type; the step of obtaining the first operation instruction issued by the base server for the target communication terminal includes: obtaining the first operation instruction from the message queue corresponding to the target service topic.

[0011] According to one embodiment of the present invention, the operation instruction generation method includes: acquiring first service data; wherein the first service data includes a third data item, and the first service data is service data corresponding to the target service type obtained by the target communication terminal executing the second operation instruction; determining a fourth data item corresponding to the third data item in the mapping relationship data; wherein the fourth data item satisfies the data format required by the second protocol; generating second service data according to the type of the second protocol and the fourth data item; wherein the second service data satisfies the data format pre-agreed between the base server and the data item conversion unit.

[0012] According to one embodiment of the present invention, the first service data includes a plurality of data strings; before acquiring the first service data, the operation instruction generation method further includes: determining a target return method for returning the second service data to the base server according to the return method parameter of the service data attached to the first operation instruction; acquiring the first service data includes: if the target return method is a complete data return method, acquiring each of the data strings sequentially until the complete first service data is received.

[0013] According to one embodiment of the present invention, the step of obtaining the first service data includes: receiving the first service data by sequentially obtaining each of the data strings; the step of determining the fourth data item corresponding to the third data item in the mapping relationship data includes: if the target return method is a single-string data return method, when obtaining each of the data strings, determining the fourth data item corresponding to the third data item in each of the obtained data strings in the mapping relationship data.

[0014] According to one embodiment of the present invention, the base server sends the first operation instruction to the message queue corresponding to the target service topic; wherein, the first operation instruction corresponds to a request data type; the target service topic is the service topic corresponding to the request data type; the method further includes: sending the second service data to the message queue corresponding to the target service topic so that it can be obtained by the base server.

[0015] According to one embodiment of the present invention, the target service type includes at least one of the following: electrical energy type, maximum demand type, variable type, event type, load record type, parameter type, data acquisition and monitoring type, control type, input / output device interface type, transparent transmission type, upgrade type, statistical type, and load identification type.

[0016] According to one embodiment of the present invention, the first operation instruction defines a communication object layer, a service object layer, and a service interaction item layer; the parameters on the service object layer include the operation type; the parameters on the service interaction item layer include the first data item; the first operation instruction also includes parameters required for the base server on the communication object layer to establish a communication connection with the target communication terminal, and attribute parameters of the target communication terminal on the service object layer.

[0017] To achieve the above objectives, a second aspect of the present invention provides an operation instruction generation device applied to a data item conversion unit of an energy consumption information collection system, wherein the data item conversion unit is connected to a base server; the energy consumption information collection system further includes a collection front-end unit connected to a communication terminal; the device includes: an instruction acquisition module, used to acquire a first operation instruction issued by the base server for a target communication terminal; wherein the first operation instruction includes a first data item, a target service type, a first protocol type of the target communication terminal, and a first operation type of the target communication terminal; wherein the first data item satisfies the data format required by a second protocol, and the first data item is used to instruct the target communication terminal to perform a service interaction operation; the first... The operation type is used to declare the operation type when the target communication terminal performs a service interaction operation; the data item set determination module is used to determine the data item set corresponding to the target service type in the mapping relationship data between the first protocol and the second protocol; the data item determination module is used to determine the second data item corresponding to the first data item in the data item set corresponding to the target service type; wherein, the second data item meets the data format required by the first protocol; the operation type determination module is used to determine the second operation type corresponding to the first operation type based on the mapping relationship data; the instruction generation module is used to generate a second operation instruction for the target communication terminal according to the type of the first protocol, the target service type, the second operation type and the second data item.

[0018] To achieve the above objectives, a third aspect of the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any of the foregoing embodiments.

[0019] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the preceding embodiments.

[0020] According to the various embodiments provided by the present invention, based on the representative meaning of the data items, the data items attached to the instructions issued by the external base server can be converted to generate operation instructions that can be recognized, parsed and executed by the field communication terminal. This enables the issuance of tasks, plans, etc. to the field communication terminal, so that there is no need to redevelop a complete energy consumption information collection system, and the instructions issued by the base server can be well compatible with the various services of the energy consumption information collection system.

[0021] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0022] Figure 1a This is a schematic diagram illustrating an application scenario of the operation instruction generation method provided according to one embodiment of this specification.

[0023] Figure 1b This is a flowchart illustrating an operation instruction generation method according to one embodiment of this specification.

[0024] Figure 1c This is a schematic diagram illustrating an application scenario of the operation instruction generation method provided according to one embodiment of this specification.

[0025] Figure 2a This is a flowchart illustrating an operation instruction generation method according to one embodiment of this specification.

[0026] Figure 2b This is a flowchart illustrating an operation instruction generation method according to one embodiment of this specification.

[0027] Figure 3 This is a flowchart illustrating a second business data return method provided according to one embodiment of this specification.

[0028] Figure 4 This is a schematic diagram of a three-tier architecture provided according to one embodiment of this specification.

[0029] Figure 5 This is a structural block diagram of an operation instruction generation apparatus provided according to one embodiment of this specification.

[0030] Figure 6 This is a structural block diagram of a computer device provided according to one embodiment of this specification. Detailed Implementation

[0031] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0032] With the construction of the customer-side energy internet, energy market reforms, and the continuous development of emerging businesses, the types of field terminal devices such as concentrators, electricity meters, and water meters are increasing, as are the communication protocol types of these devices. Generally, the energy consumption information collection system's main station or cloud platform, or other base server, issues operation commands to the energy consumption information collection system's front-end unit. This front-end unit then forwards the commands to the corresponding field terminal devices, instructing them to perform the appropriate operations. The energy consumption information collection system's front-end unit, as a crucial component in the communication between the base server and the field terminal devices, faces the need to support multiple terminals, multiple protocols, multiple channels, and various application services.

[0033] Typically, the protocol used by the base server connected to the existing energy consumption information collection system may be different from the protocol followed by the field terminal equipment. After the base server generates relevant operation instructions based on the data items defined by its protocol and sends them to the existing energy consumption information collection system, the existing energy consumption information collection system cannot recognize and parse the data items attached to the relevant instructions issued by the base server, resulting in the data item format used by the base server being incompatible with various data collection services.

[0034] In related technologies, a complete energy consumption information collection system is typically developed from scratch based on the protocols followed by the base server. Firstly, this approach requires a complete redesign of the energy consumption information collection system architecture, as well as the arrangement and scheduling of development personnel, resulting in significant development difficulties and substantial human and financial costs. Furthermore, after the new energy consumption information collection system is developed, each functional module needs to be tested, consuming considerable time. Secondly, the deployment of the new energy consumption information collection system requires debugging numerous devices and preparing the code environment for each system module, which increases various costs and uncertainties, potentially leading to project delays and the inability to achieve some expected functions. Thirdly, the new energy consumption information collection system requires business and technical training for relevant personnel, which can easily introduce personnel risks. Therefore, given the existence of mature energy consumption information collection systems, developing a complete system from scratch based on the protocols followed by the base server is clearly not a preferred solution.

[0035] To ensure the data item format defined by the protocol used by the base server is compatible with the various data collection services of the existing energy consumption information collection system, and to avoid any other impact on the existing energy consumption information collection system, it is necessary to provide an operation instruction generation method, apparatus, computer equipment, and storage medium. This method can convert the data items attached to the operation instructions issued by the base server into data items that can be recognized and parsed by the front-end unit of the existing energy consumption information collection system, based on the data item format provided by the base server and the device collection fields such as the operation type corresponding to each data item. This generates operation instructions that the front-end unit can recognize and parse. This method handles a large number of mapping relationships between different protocols through mapping relationship data. For example, it maps data items that satisfy the base server's protocol to data items that satisfy the front-end unit's protocol, and it maps message fields that satisfy the base server's protocol to message fields that satisfy the front-end unit's protocol, thus avoiding abnormal business operation results due to incorrect mapping relationships. Based on mapping relationship data, the operation instruction generation method provided in this specification can unify the message format of operation instructions issued by the base server and the data items attached to the instructions. This allows the base server to simply issue operation instructions without needing to be familiar with the business logic processing methods for business interaction operations with field communication terminals. Compared to related technologies that rely on the business logic processing methods of the energy consumption information collection system to generate operation instructions based on different protocol message formats and different data items corresponding to the same attribute, this method is more convenient to use, and data item queries based on mapping relationship data are simpler. This method does not require the redevelopment of a complete energy consumption information collection system, nor does it require a large number of new developers. It also reduces hardware interaction with field communication terminals and development work related to message encoding, significantly reducing the development workload. Furthermore, it supports the expansion of new services without affecting the existing energy consumption information collection system's various services, and the code maintenance and labor costs for each service are lower.

[0036] Figure 1a This diagram illustrates an application scenario of the operation instruction generation method provided in this manual. Taking an energy consumption information acquisition system including a pre-acquisition unit as an example, Figure 1a This is a schematic diagram illustrating the data item conversion process between the base server and the data acquisition front-end unit. (Reference) Figure 1aAs shown, the energy information acquisition system also includes a data item conversion unit, which converts the data items attached to the communication information between the base server and the acquisition front-end unit. The acquisition front-end unit is responsible for sending operation instructions to the field communication terminal and receiving the business data returned by the field communication terminal after executing the operation instructions. The base server is responsible for issuing operation instructions and receiving the business data returned by the acquisition front-end unit. The acquisition front-end unit can identify and parse the data items defined by the first protocol used by the field communication terminal, and the base server uses the data items defined by the second protocol to generate relevant operation instructions for the field communication terminal. Here, "publish" can correspond to the sending of instructions or data in this specification, and "subscribe" can correspond to the receiving of instructions or data in this specification.

[0037] In this scenario example, the data item conversion unit is responsible for converting the data items attached to the operation instructions issued by the base server and generating operation instructions that the acquisition front-end unit can recognize so that the acquisition front-end unit can send the operation instructions to the corresponding field communication terminal; the data item conversion unit is also responsible for converting the data items attached to the business data returned by the acquisition front-end unit to generate business data that the base server can recognize and parse, and sending it to the base server.

[0038] This document provides an example of how the data item conversion unit converts data items attached to operation instructions issued by the base server. Based on user-triggered operations targeting the on-site target communication terminal, the base server, using the second protocol adopted by the base server and data items conforming to the data format requirements of the second protocol, generates a first operation instruction for the target communication terminal and sends it to the cache space. First, the data item conversion unit retrieves the first operation instruction issued by the base server from the cache space, parses it, and obtains the first protocol type, first data item, target service type, and first operation type of the target communication terminal attached to the first operation instruction. Second, based on the mapping relationship between the first and second protocols, the data item conversion unit retrieves the second data item corresponding to the first data item from the data item set corresponding to the target service type, based on the mapping relationship between data items conforming to the first and second protocols. Finally, the data item conversion unit determines the second operation type corresponding to the first operation type based on the mapping relationship between operation types conforming to the first and second protocols. Finally, the data item conversion unit generates a second operation instruction that meets the message format requirements of the first protocol based on the corresponding target service type, the second data item, and the second operation type, and pushes it to the acquisition front-end unit. The data item conversion unit also caches information related to the first operation instruction issued by the base server, such as the issuance time, thereby completing the conversion of downlink data items and the generation of downlink operation instructions. In some embodiments, the target service type may include at least one of the following: energy type, maximum demand type, variable type, event type, load record type, parameter type, acquisition and monitoring type, control type, input / output device interface type, transparent transmission type, upgrade type, statistical type, and load identification type.

[0039] In this scenario example, different business themes are set according to the business data types corresponding to the operation instructions issued by the base server. This allows for the classification of different types of business data returned by the front-end data collection unit through business themes, facilitating querying and processing. Different business themes can each have their own corresponding cache space. In some feasible implementations, the cache space can be a message queue.

[0040] It should be noted that the mapping relationship data between the first protocol and the second protocol can be pre-stored in the data item conversion unit, and the mapping relationship data supports addition, modification, and deletion. In some embodiments, the second data item corresponding to the first data item and / or the second operation type corresponding to the first operation type may not be found in the mapping relationship data between the first protocol and the second protocol; in this case, the data item conversion unit returns an error message. (See reference...) Figure 1bAs shown, the process by which the data item conversion unit converts the data item attached to the first operation instruction and generates the second operation instruction may include: First, obtaining the first operation instruction issued by the base server; second, determining whether there exists a second data item corresponding to the first data item and a second operation type corresponding to the first operation type in the mapping relationship data between the first protocol and the second protocol, based on the first protocol type, the first data item, the target service type, and the first operation type attached to the first operation instruction; then, if there is a second data item and a second operation type, obtaining the second data item and the second operation type, and generating a second operation instruction with a data format that meets the requirements of the first protocol based on the target service type, the second data item, and the second operation type; if the second data item and / or the second operation type does not exist, returning an exception message; finally, pushing the second operation instruction to the acquisition front-end unit, enabling the acquisition front-end unit to parse and send the second operation instruction to the corresponding target communication terminal.

[0041] This example illustrates how the data item conversion unit converts the service data returned by the acquisition front-end unit. After the target communication terminal executes the second operation instruction, it returns the first service data corresponding to the target service type to the acquisition front-end unit. The data item conversion unit obtains the first service data from the acquisition front-end unit, parses the first service data, and determines the fourth data item corresponding to the third data item attached to the first service data from the mapping relationship data between the first protocol and the second protocol. Based on the type of the second protocol and the fourth data item, the data item conversion unit generates second service data in a message format that meets the requirements of the second protocol, according to the service data format corresponding to the first operation instruction pre-agreed between the base server and the data item conversion unit, and sends it to the base server so that the base server can recognize and parse the service data for subsequent processing and display.

[0042] In this scenario example, the first business data may include several data strings. After sequentially acquiring each data string, the data item conversion unit, in conjunction with the first operation instruction issued by the base server, determines whether to return each data string individually to the base server or return all data strings to the base server at once, based on the return method parameters of the business data in the previously saved information related to the first operation instruction. If all data strings are returned to the base server at once, the data item conversion unit sequentially acquires each data string until the reception of the first business data is completed. Then, it determines the fourth data item corresponding to the third data item attached to the first business data in the mapping relationship data between the first and second protocols, to generate the second business data and send it to the base server. If each data string is returned to the base server individually, the data item conversion unit, after acquiring each data string, determines the fourth data item corresponding to the third data item in each data string in the mapping relationship data between the first and second protocols, to generate data strings that meet the requirements of the second protocol, and returns each data string individually to the base server.

[0043] In this scenario example, the data item transformation unit can also send the second business data to the cache space corresponding to the business topic for which the first operation instruction was received. The base server then retrieves the second business data from the cache space corresponding to that business topic by listening to that business topic.

[0044] This specification provides a method for generating operation instructions, referencing... Figure 1c As shown, a data item conversion unit 112 is applied to the energy consumption information collection system 110, and the data item conversion unit 112 is connected to the base server 120; the energy consumption information collection system 110 also includes a data acquisition front-end unit 114, which is connected to a communication terminal 130. (Reference) Figure 2a As shown, the method for generating operation instructions may include the following steps.

[0045] S210. Obtain the first operation instruction issued by the base server for the target communication terminal. The first operation instruction includes a first data item, a target service type, a first protocol type of the target communication terminal, and a first operation type of the target communication terminal.

[0046] The first data item conforms to the data format required by the second protocol and is used to instruct the target communication terminal to perform a service interaction operation. The first operation type is used to declare the operation type when the target communication terminal performs a service interaction operation.

[0047] The base server can be a main station or a cloud platform. The data acquisition front-end unit is the data acquisition and communication part of the energy information acquisition system. The communication terminal is a field communication terminal, which can be a concentrator, transformer, electricity meter, water meter, gas meter, heat meter, or other terminal equipment. The first protocol is the communication protocol used by the target communication terminal. It is understood that the communication protocol used by the target communication terminal can be supported by the data acquisition front-end unit.

[0048] A data item is the smallest unit of data, used to specify the content of the business interaction operation that the target communication terminal needs to perform, including specific data, parameters, or control commands. The target business type can be used to specify the type of data object for the business interaction operation; the data object is a collection of attributes and methods of the target communication terminal.

[0049] Specifically, the base server uses the second protocol, and generates a first operation instruction for the target communication terminal based on the second protocol. The data item conversion unit obtains the first operation instruction issued by the base server, and can parse the first operation instruction to determine the target communication terminal, the first protocol of the target communication terminal, the target service type, the first data item, the first operation type, etc., according to the parameters attached to the first operation instruction.

[0050] Furthermore, the data item conversion unit can also cache information related to the first operation instruction, such as the issuance time.

[0051] In some embodiments, the first operation instruction may be a JSON string composed according to the communication protocol adopted by the base server.

[0052] S220. Determine the set of data items corresponding to the target business type from the mapping relationship data between the first protocol and the second protocol.

[0053] The second protocol is the communication protocol used by the base server. The mapping relationship data includes the mapping relationship data between data items that meet the data format requirements of the first protocol and data items that meet the data format requirements of the second protocol.

[0054] It is understandable that a target business type can correspond to data items in different protocol formats, and therefore, a target business type corresponds to a set of data items.

[0055] Specifically, based on the target business type, the set of data items corresponding to the target business type can be determined from the mapping relationship data between the first protocol and the second protocol.

[0056] In some embodiments, the first protocol may be the communication protocol of the power user electricity consumption information collection system in the State Grid Corporation of China's enterprise standard protocols, such as State Grid Corporation of China's enterprise standard protocols 1376.1 and 698, and the second protocol may be the collection 2.0 protocol. The mapping relationship data may be tabular data obtained by collecting and organizing data items in the data format required by the protocol adopted by the external base server of the energy consumption information collection system, and establishing a mapping relationship with the data items in the data format required by the protocols of each communication terminal supported by the internal collection front-end unit of the energy consumption information collection system.

[0057] S230. From the set of data items corresponding to the target business type, determine the second data item corresponding to the first data item. The second data item must satisfy the data format required by the first protocol.

[0058] It is understandable that there is a mapping relationship between data items with the same meaning that meet different protocol requirements in a data item set.

[0059] Specifically, within the set of data items corresponding to the target service type, data items that meet the data format requirements of the first protocol and have a mapping relationship with the first data item can be found according to the type of the first protocol. These found data items are then designated as second data items, enabling the target communication terminal to recognize and parse the second data items and determine the attributes or methods to be operated on.

[0060] In some embodiments, a second data item corresponding to the first data item may not exist in the data item set corresponding to the target business type. In this case, the data item conversion unit can return an error message. Based on the error message, relevant operators can perform operations such as adding or modifying the mapping relationship data.

[0061] S240. Determine the second operation type corresponding to the first operation type based on the mapping relationship data.

[0062] The mapping relationship data includes the mapping relationship data between operation types that meet the data format requirements of the first protocol and operation types that meet the data format requirements of the second protocol. The first operation type meets the data format requirements of the second protocol.

[0063] In some cases, data items contain attribute or method identifiers to specify the attribute or method that the target communication terminal needs to operate on. The operation type declares the type of operation performed on the attribute / method pointed to by the attribute / method identifier contained in the data item when performing business interaction operations on the target communication terminal. Different protocols define different data formats for data items with the same meaning; correspondingly, the data format definitions for the same operation type of that data item also differ. Therefore, it is necessary to establish mapping data between operation types that meet the requirements of different protocols.

[0064] Specifically, based on the first operation type and the mapping relationship data, an operation type that meets the data format requirements of the first protocol and corresponds to the first operation type can be found, and this operation type can be determined as the second operation type, so that the target communication terminal can recognize and parse the second operation type and determine the operation type that needs to be performed on the second data item.

[0065] In some embodiments, the mapping relationship data can be stored in a cache space to improve the efficiency of reading the mapping relationship data.

[0066] S250. Generate a second operation instruction for the target communication terminal based on the type of the first protocol, the target service type, the second operation type, and the second data item.

[0067] Specifically, based on the target service type, the second operation type, and the second data item, and in accordance with the message format required by the first protocol, a second operation instruction that can be recognized and parsed by the target communication terminal can be generated, enabling the target communication terminal to perform corresponding operations based on the data items attached to the second operation instruction. This completes the conversion of data items and operation instructions based on different protocols.

[0068] It should be noted that the first and second operation instructions can be instruction strings.

[0069] In the above embodiments, by establishing mapping relationship data, the operation instructions issued by the base server based on different service types and operation types are converted into operation instructions that can be recognized, parsed, and executed by the field communication terminals. This allows the base server to avoid the complex task of needing to be familiar with the data items and message formats required by different protocols of the field communication terminals to generate corresponding operation instructions. Therefore, the base server only needs to issue operation instructions and does not need to be familiar with the business logic processing methods for business interaction operations with the field communication terminals, thus reducing its dependence on the energy consumption information collection system. At the same time, the mapping relationship data can be added or modified as needed to support the access of new services.

[0070] In some implementations, the operation instruction generation method may further include: sending a second operation instruction to the acquisition front-end unit to instruct the acquisition front-end unit to send the second operation instruction to the target communication terminal.

[0071] The second operation instruction is used to instruct the target communication terminal to send service data corresponding to the target service type to the acquisition front-end unit.

[0072] The service data refers to the return result data obtained after the target communication terminal executes the second operation instruction.

[0073] In some cases, the data acquisition front-end unit can perform tasks such as establishing communication connections with the communication terminal, receiving data, and issuing parameters and instructions. Furthermore, the front-end unit can support different protocols of different communication terminals. Therefore, the data item conversion unit can send the second operation instruction to the front-end unit, which then forwards the second operation instruction to the corresponding target communication terminal.

[0074] Specifically, the data item conversion unit sends the second operation instruction to the acquisition front-end unit. The acquisition front-end unit can determine the target communication terminal based on parameters such as the device number and device type of the target communication terminal attached to the second operation instruction, so as to send the second operation instruction to the target communication terminal.

[0075] Furthermore, by maintaining the archive information of communication terminals such as electricity meters in the data item conversion unit, it is possible to avoid the situation where relevant archive information is missing when the data acquisition front-end unit issues operation instructions. For example, when issuing transparent reading instructions, there is only the electricity meter number, but no corresponding serial number of the electricity meter in the concentrator terminal or other terminals, which needs to be completed by using existing archives.

[0076] It is understandable that the second operation instruction includes the target service type. Therefore, after the target communication terminal receives and executes the second operation instruction, the obtained service data corresponds to the target service type.

[0077] In some embodiments, the data acquisition front-end unit may be a data acquisition front-end system, a data acquisition front-end device, etc.

[0078] It should be noted that the data item conversion unit can be a separate functional module or unit with data item conversion services, or it can be an interface that can convert the message format of the operation instructions issued by the base server into a message format that meets the requirements of the acquisition front-end unit. Without the limitations of development language and other technologies, it can connect with products from other suppliers that are independent of the platform and technology.

[0079] In the above embodiments, the data item conversion unit is similar to an adapter, converting the operation instructions issued by the base server into operation instructions that the data acquisition front-end unit can recognize and support, and then sending them to the data acquisition front-end unit. This is equivalent to extending the functionality of the data acquisition front-end unit, and it can be developed and deployed independently. This makes the data item conversion function simple to develop, easy to deploy, and flexible to operate and maintain. It allows data items that meet the protocol requirements of the external base server to be accessed to the data acquisition front-end unit in a simple and efficient way, reducing the dependence on the data acquisition front-end unit and improving the availability of the energy consumption information collection system.

[0080] In some implementations, the base server sends a first operation instruction to the message queue corresponding to the target service topic; wherein the first operation instruction corresponds to a requested data type; and the target service topic is the service topic corresponding to the requested data type. Obtaining the first operation instruction issued by the base server for the target communication terminal may include: obtaining the first operation instruction from the message queue corresponding to the target service topic.

[0081] The request data type refers to the type of data returned by the request corresponding to the first operation instruction.

[0082] In some cases, the data returned by the request corresponding to the first operation instruction may fall into multiple categories, such as archive data, task data, and curve data, and the data volume may be quite large. If this data is not categorized, the base server may need to traverse a large amount of data of different types when it needs to retrieve or query related data. Therefore, the data types of the requests can be categorized by business theme to improve the efficiency of the base server in retrieving or querying data.

[0083] Specifically, the base server can determine the target business topic in the business topic according to the data type of the request, and send the first operation instruction to the message queue corresponding to the target business topic, so that the data item conversion unit can obtain the first operation instruction from the message queue corresponding to the target business topic.

[0084] In some embodiments, the message queue may be a Kafka message queue or other cache space capable of asynchronous processing.

[0085] In the above implementation, the data item conversion unit interacts with the upper-layer base server through a message queue, which has low coupling, is easy to deploy, and can deploy multiple service instances to run simultaneously to improve performance.

[0086] In some implementations, reference Figure 2b As shown, the operation instruction generation method may include the following steps.

[0087] S310. Obtain first service data. The first service data includes a third data item. The first service data is the service data corresponding to the target service type obtained by the target communication terminal executing the second operation instruction.

[0088] Specifically, after the target communication terminal executes the second operation instruction to obtain the first service data, it can send the first service data to the acquisition front-end unit. The data item conversion unit can obtain the first service data from the acquisition front-end unit.

[0089] In some embodiments, the first business data can be obtained using a timed polling method. Specifically, a timed task can be set to periodically obtain the first business data to determine whether the business interaction operation task corresponding to the second operation instruction has timed out. If the task request times out, a task timeout result is returned.

[0090] S320. Determine the fourth data item corresponding to the third data item in the mapping relationship data. The fourth data item must satisfy the data format required by the second protocol.

[0091] Specifically, the data item conversion unit can parse the first business data to obtain the third data item. Based on the third data item and the second protocol of the base server, a data item that has a mapping relationship with the third data item and meets the data format requirements of the second protocol can be found in the mapping relationship data, and the found data item is determined as the fourth data item.

[0092] S330. Generate second service data according to the type of the second protocol and the fourth data item. The second service data conforms to the data format pre-agreed upon by the base server and the data item conversion unit.

[0093] Specifically, the base server and the data item conversion unit can pre-agree on the data format returned by the operation instructions for different services. The data item conversion unit can determine the target data format from the pre-agreement data format based on the information related to the first operation instruction that is cached in advance, and then generate the second service data that can be recognized and parsed by the base server according to the fourth data item, the message format required by the second protocol, and the target data format.

[0094] In the above embodiments, the data item conversion unit can convert the data items and message formats of various types of business data, thereby completing the reporting of business data to the base server. The mapping relationship data unifies the message format returned to the base server and the data item format in the business data, making it easier for the base server to obtain relevant business data from the energy consumption information collection system.

[0095] In some implementations, the first service data includes several data strings. Before acquiring the first service data, the operation instruction generation method may further include: determining a target return method for returning the second service data to the base server based on the return method parameter of the service data attached to the first operation instruction. Accordingly, acquiring the first service data may include: if the target return method is a complete data return method, acquiring each data string sequentially until the complete first service data is received.

[0096] The data string can be the result data string obtained by the target communication terminal after performing relevant operations based on the data item. The return mode parameter can be used to specify whether the data item conversion unit, after obtaining all several data strings, generates second business data based on the complete first business data and returns it to the base server at once.

[0097] Specifically, after obtaining the first operation instruction, the data item conversion unit can cache the return method parameters of the business data attached to the first operation instruction. When the first business data includes several data strings, the data item conversion unit obtains each data string from the acquisition front-end unit and, based on the cached return method parameters of the business data attached to the first operation instruction, determines whether it is necessary to generate corresponding second business data after obtaining all the data strings included in the first business data. This allows the second business data corresponding to the complete first business data to be sent to the base server all at once, thus determining whether the target return method for returning the second business data to the base server is a complete data return method.

[0098] Accordingly, when the data item conversion unit determines, based on the return method parameters, that the target return method for returning the second service data to the base server is the complete data return method, the data item conversion unit sequentially acquires each data string from the acquisition front-end unit until all data strings included in the first service data have been acquired, thus completing the reception of the complete first service data. Further, after receiving the complete first service data, the data item conversion unit can, based on the third data item in the first service data, determine, in the mapping relationship data, a fourth data item that corresponds to the third data item and meets the data format requirements of the second protocol. Based on the fourth data item, the type of the second protocol, etc., the second service data is generated, and the second service data is returned to the base server in one go.

[0099] In some embodiments, each time the data item conversion unit acquires a data string, it can determine whether all of the several data strings included in the first business data have been acquired. If it is determined that several data strings have not been acquired, the acquired data strings are cached until it is determined that all of the several data items included in the first business data have been acquired, at which point the data item conversion unit can obtain the complete first business data.

[0100] For example, the first business data includes data string 1, data string 2, and data string 3. The data item conversion unit sequentially acquires data string 1, data string 2, and data string 3. Based on the cached return method parameters, the data item conversion unit determines that the target return method for the second business data is a complete data return method. After acquiring data string 1, it determines that not all data strings included in the first business data have been acquired. Therefore, the data item conversion unit caches data string 1 and acquires data string 2. After acquiring data string 2, it determines that not all data strings included in the first business data have been acquired. Therefore, the data item conversion unit caches data string 2 and acquires data string 3. After acquiring data string 3, the data item conversion unit can determine that all three data strings included in the first business data have been acquired, and thus obtain the complete first business data based on these three data strings.

[0101] In some embodiments, the data item conversion unit can parse the complete first business data to obtain the third data item in each data string. After determining the fourth data item corresponding to each third data item in the mapping relationship data, the data item conversion unit can assemble the data into second business data that meets the requirements of the second protocol according to the type of the second protocol, each fourth data item, and the pre-agreed data format, and return it to the base server.

[0102] In some implementations, obtaining the first service data may include receiving the first service data by sequentially obtaining each data string. Correspondingly, determining the fourth data item corresponding to the third data item in the mapping relationship data may include: if the target return method is a single-string data return method, determining the fourth data item corresponding to the third data item in each obtained data string in the mapping relationship data when each data string is obtained.

[0103] The first business data can be a single data string. The single-string data return method can be used to specify that after each data string is obtained by the data item conversion unit, the corresponding second business data is generated based on the data string and returned to the base server one by one.

[0104] Specifically, when the data item conversion unit determines, based on the return method parameters, that the target return method for returning the second service data to the base server is a single-string data return method, the data item conversion unit sequentially acquires each data string from the acquisition front-end unit. Upon acquiring each data string, the data item conversion unit determines, based on the third data item in the acquired data string, the fourth data item corresponding to the third data item in the mapping relationship data. Then, based on the fourth data item, the type of the second protocol, etc., the second service data corresponding to the data string is generated, and the second service data is returned to the base server.

[0105] For example, the data string includes data string 1, data string 2, and data string 3. The data item conversion unit sequentially acquires data string 1, data string 2, and data string 3. After acquiring data string 1, the data item conversion unit determines the target return method as a single-string data return method based on the return method parameters. Then, based on the third data item 1 in data string 1, the data item conversion unit determines the fourth data item 1 corresponding to the third data item 1 in the mapping relationship data. Based on the fourth data item 1 and the type of the second protocol, the data item conversion unit generates the second business data 1 corresponding to data string 1 and returns the second business data 1 to the base server.

[0106] For example, after obtaining data string 2, the data item conversion unit determines the target return method as a single-string data return method based on the return method parameter. Then, based on the third data item 2 in data string 2, the data item conversion unit determines the fourth data item 2 corresponding to the third data item 2 in the mapping relationship data, and generates the second business data 2 corresponding to data string 2 based on the fourth data item 2, the type of the second protocol, etc., and returns the second business data 2 to the base server.

[0107] For example, after obtaining the data string 3, the data item conversion unit determines the target return method as a single-string data return method based on the return method parameter. Then, based on the third data item 3 in the data string 3, the data item conversion unit determines the fourth data item 3 corresponding to the third data item 3 in the mapping relationship data, and generates the second business data 3 corresponding to the data string 3 according to the fourth data item 3, the type of the second protocol, etc., and returns the second business data 3 to the base server.

[0108] In some implementations, the base server sends a first operation instruction to the message queue corresponding to the target service topic; wherein the first operation instruction corresponds to a requested data type; and the target service topic is the service topic corresponding to the requested data type. The operation instruction generation method may further include: sending second service data to the message queue corresponding to the target service topic for acquisition by the base server.

[0109] Specifically, the base server can determine the target business topic within the business topic based on the requested data type, and send the first operation instruction to the message queue corresponding to the target business topic, enabling the data item conversion unit to retrieve the first operation instruction from the message queue corresponding to the target business topic. After generating the second business data, the data item conversion unit can send the second business data to the message queue corresponding to the target business topic, based on the target business topic.

[0110] For example, refer to Figure 3As shown, when the target return method is a complete data return method, the process of the data item conversion unit acquiring the first business data, converting the data items of the first business data, and generating the second business data may include: First, acquiring the data strings included in the first business data from the acquisition front-end unit; second, determining whether all the data strings included in the first business data have been acquired. Third, if it is determined that not all the data strings included in the first business data have been acquired, the acquired data strings are cached and the system continues to wait to acquire more data strings; if it is determined that all the data strings included in the first business data have been acquired, all cached data strings are acquired to obtain the first business data. Then, information related to the cached first operation instruction is acquired, such as the target business type and the corresponding pre-agreed return data format. Next, the first business data is parsed, and the third data item in the first business data is converted according to the mapping relationship data to generate the second business data. Finally, the second business data is pushed to the message queue corresponding to the target business topic, enabling the base server to acquire the second business data from this message queue.

[0111] In some embodiments, the base server may listen to the target business topic to obtain the second business data sent by the data item transformation unit to the message queue corresponding to the target business topic.

[0112] In some implementations, the target service type includes at least one of the following: electrical energy type, maximum demand type, variable type, event type, load record type, parameter type, data acquisition and monitoring type, control type, input / output device interface type, transparent transmission type, upgrade type, statistical type, and load identification type.

[0113] Specifically, the target business type specifies the type of data object for business interaction operations. The data object type can include at least one of the following: electrical energy, maximum demand, variable, event, load record, parameter, data acquisition and monitoring, control, input / output device interface, transparent transmission, upgrade, statistics, and load identification. Each type of data object corresponds to a set of attributes and methods, and each attribute or method corresponds to a data item that meets the data format requirements of different protocols.

[0114] For example, the energy class includes a set of attributes 1 and methods 1, and the maximum demand class includes a set of attributes 2 and methods 2. Attribute 1 corresponds to data item SXA1 that meets the data format requirements of protocol A, and data item SXB1 that meets the data format requirements of protocol B; method 1 corresponds to data item FFA1 that meets the data format requirements of protocol A, and data item FFB1 that meets the data format requirements of protocol B. Attribute 2 corresponds to data item SXA2 that meets the data format requirements of protocol A, and data item SXB2 that meets the data format requirements of protocol B; method 2 corresponds to data item FFA2 that meets the data format requirements of protocol A, and data item FFB2 that meets the data format requirements of protocol B. Data item SXA1 and data item SXB1 have a mapping relationship, data item FFA1 and data item FFB1 have a mapping relationship; data item SXA2 and data item SXB2 have a mapping relationship, and data item FFA2 and data item FFB2 have a mapping relationship. Parsing the first operation instruction, the target service type is energy class, the first protocol is protocol B, and the first data item is data item SXA1. Based on the target service type, the set of data items corresponding to the energy class can be determined from the mapping relationship data between Protocol A and Protocol B. Within this set of data items corresponding to the energy class, data item SXB1, which has a mapping relationship with data item SXA1, can be identified. The data item conversion unit can generate a second operation instruction based on the energy class, Protocol B, and data item SXB1, instructing the target communication terminal to operate on attribute 1 of the energy class. The specific details of the first protocol being Protocol A, and the specific details of method 1 where the target communication terminal needs to operate on the energy class, will not be elaborated upon here.

[0115] For example, the first operation instruction is parsed to obtain the target service type as the maximum demand class, the first protocol as protocol A, and the first data item as data item SXB2. Based on the target service type, the set of data items corresponding to the maximum demand class can be determined from the mapping relationship data between protocol A and protocol B. In the set of data items corresponding to the energy class, data item SXA2, which has a mapping relationship with data item SXB2, can be determined. The data item conversion unit can generate a second operation instruction based on the maximum demand class, protocol A, and data item SXA2, to instruct the target communication terminal to operate on attribute 2 of the maximum demand class. The specific case where the first protocol is protocol B, and the specific case where the target communication terminal needs to operate on the maximum demand class, will not be elaborated further here.

[0116] In some implementations, the first operation instruction defines a communication object layer, a service object layer, and a service interaction item layer; the parameters on the service object layer include the operation type; the parameters on the service interaction item layer include the first data item.

[0117] The first operation instruction also includes the parameters required for the base server on the communication object layer to establish a communication connection with the target communication terminal, as well as the attribute parameters of the target communication terminal on the business object layer.

[0118] In some cases, during data item conversion based on communication protocols, there may be a one-to-many data item relationship. For example, in the data acquisition front-end unit, there might only be one data item related to an undervoltage event, but 42 data items actually need to be sent in the operation command message for the field communication terminal to return the expected result field. This situation is particularly common in event-related tasks. Therefore, a unified architecture can be used to define the operation commands sent by the base server, combined with mapping relationship data. This allows the data item conversion unit to quickly find the corresponding second data item in the mapping relationship data after parsing the relevant first data item, improving the efficiency of data item conversion and operation command generation.

[0119] Specifically, a three-layer structure comprising a communication object layer, a business object layer, and a business interaction item layer can be used to define the operation instructions issued by the base server and the parameters attached to those instructions. This allows the data item conversion unit to parse the first operation instruction based on the three-layer structure. (Reference) Figure 4 The diagram shows the overall architecture of the communication object layer, business object layer, and business interaction item layer. The communication object layer contains the main parameters required to establish communication connections with field terminal devices such as concentrators, transformers, and meters, as well as parameters such as the priority of operation commands and task timeout periods. The available parameter definitions are shown in Table 1 below.

[0120] Table 1 Communication Object Layer Parameters

[0121]

[0122]

[0123]

[0124] It should be noted that the communication object layer also includes methods for establishing communication connections with field terminal equipment such as concentrators, transformers, and meters, such as TCP connections.

[0125] The business object is the mapping of the measured equipment in the field to the system. Business objects can be concentrator terminals, meters, main power supply units, etc. (Continue to refer to...) Figure 4 As shown, a business object consists of attributes and a list of business interaction items. The available attribute parameters are defined in Table 2 below.

[0126] Table 2 Business Object Layer Parameters

[0127]

[0128]

[0129]

[0130] The business interaction item layer includes a list of business interaction items. A business interaction item is the smallest data unit of the information interaction model (which may correspond to an operation instruction in this specification). A business interaction item is a specific piece of data, parameter, or control instruction. A business interaction item can be the first data item. (Continue to refer to...) Figure 4 As shown, a business interaction item consists of a business interaction item number and the parameters corresponding to that number. The business interaction item number (dataItemId) is a required attribute, and other attribute parameters can be defined based on the business interaction item number. The available attribute parameter definitions are shown in Table 3 below.

[0131] Table 3 Parameters of Business Interaction Items

[0132]

[0133] It should be noted that, continuing to refer to Table 3, the variable data parameters for business operations can be explicitly defined for different business interaction item numbers (dataItemId), and are not specifically limited in this specification. In actual business operations, different defined parameters can be filled in according to different business interaction item numbers to achieve the corresponding specific business.

[0134] The mapping relationship data between the first protocol and the second protocol may include the mapping relationship data between business interaction items that meet the data format requirements of the first protocol and business interaction items that meet the data format requirements of the second protocol.

[0135] For example, the service interaction item 0010-10200-000 indicates that the first operation instruction is to acquire positive active power. In the mapping data, under protocol PRTL_698 (698 protocol), the corresponding service interaction item is 00100200; under protocol PRTL_376119 (376.1 protocol version 19), the corresponding service interaction item is D-0CH-F129; under protocol PRTL_376113 (376.1 protocol version 13), the corresponding service interaction item is D-0CH-F129; under protocol PRTL_376109 (376.1 protocol version 09), the corresponding service interaction item is D-0CH-F129; under protocol PRTL_376104 (376.1... Under Protocol 04, the corresponding business interaction item is D-0CH-F129; under Protocol PRTL_64597 (645 Protocol 97), the corresponding business interaction item is 0001FF00; under Protocol PRTL_64507 (645 Protocol 07), the corresponding business interaction item is 0001FF00; under Protocol PRTL_64509 (645 Protocol 09), the corresponding business interaction item is 0001FF00; under Protocol PRTL_64513 (645 Protocol 13), the corresponding business interaction item is 0001FF00.

[0136] In the above embodiments, the three-layer structure definition makes the data item conversion unit more efficient in parsing the first operation instruction. Combined with the mapping relationship data, it is easier to obtain the data items that need to be converted, thus making the data item conversion more efficient.

[0137] This specification provides an operation instruction generation device applied to a data item conversion unit in an energy consumption information collection system. The data item conversion unit is connected to a base server. The energy consumption information collection system also includes a data acquisition front-end unit connected to a communication terminal. (Reference) Figure 5 As shown, the operation instruction generation device 500 includes: an instruction acquisition module 510, a data item set determination module 520, a data item determination module 530, an operation type determination module 540, and an instruction generation module 550.

[0138] The instruction acquisition module 510 is used to acquire a first operation instruction issued by the base server for the target communication terminal; wherein the first operation instruction includes a first data item, a target service type, a first protocol type of the target communication terminal, and a first operation type of the target communication terminal; wherein the first data item meets the data format required by the second protocol, and the first data item is used to instruct the target communication terminal to perform a service interaction operation; the first operation type is used to declare the operation type when the target communication terminal performs a service interaction operation.

[0139] The data item set determination module 520 is used to determine the data item set corresponding to the target business type from the mapping relationship data between the first protocol and the second protocol.

[0140] The data item determination module 530 is used to determine the second data item corresponding to the first data item from the data item set corresponding to the target business type; wherein the second data item meets the data format required by the first protocol.

[0141] The operation type determination module 540 is used to determine the second operation type corresponding to the first operation type based on the mapping relationship data.

[0142] The instruction generation module 550 is used to generate a second operation instruction for the target communication terminal based on the type of the first protocol, the target service type, the second operation type, and the second data item.

[0143] Specific limitations regarding the operation instruction generation device can be found in the limitations on the operation instruction generation method described above, and will not be repeated here. Each module in the aforementioned operation instruction generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.

[0144] This specification also provides a computer device, see embodiments thereof. Figure 6 As shown, the computer device 600 includes a memory 610, a processor 620, and a computer program 630 stored in the memory 610 and executable on the processor 620. When the processor 620 executes the computer program 630, it implements the operation instruction generation method described in any of the foregoing embodiments.

[0145] This specification also provides a computer-readable storage medium, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the operation instruction generation method described in any of the foregoing embodiments.

[0146] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0147] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0148] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0149] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0150] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0151] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for generating operation instructions, characterized in that, A data item conversion unit is applied to an energy consumption information collection system, the data item conversion unit being connected to a base server; the energy consumption information collection system further includes a collection front-end unit, the collection front-end unit being connected to a communication terminal; the method includes: The system obtains a first operation instruction issued by the base server for the target communication terminal; wherein the first operation instruction includes a first data item, a target service type, a first protocol type of the target communication terminal, and a first operation type of the target communication terminal; the first operation instruction is generated by the base server based on a second protocol; wherein the first data item meets the data format requirements of the second protocol, and the first data item is used to instruct the target communication terminal to perform a service interaction operation; the first operation type is used to declare the operation type when the target communication terminal performs a service interaction operation; Determine the set of data items corresponding to the target service type from the mapping relationship data between the first protocol and the second protocol; In the set of data items corresponding to the target service type, a second data item corresponding to the first data item is determined; wherein, the second data item meets the data format required by the first protocol; Based on the mapping relationship data, determine the second operation type corresponding to the first operation type; Based on the type of the first protocol, the target service type, the second operation type, and the second data item, a second operation instruction is generated for the target communication terminal.

2. The method according to claim 1, characterized in that, The method further includes: The second operation instruction is sent to the acquisition front-end unit to instruct the acquisition front-end unit to send the second operation instruction to the target communication terminal; wherein, the second operation instruction is used to instruct the target communication terminal to send service data corresponding to the target service type to the acquisition front-end unit.

3. The method according to claim 1, characterized in that, The base server sends the first operation instruction to the message queue corresponding to the target service topic; wherein, the first operation instruction corresponds to a request data type; the target service topic is the service topic corresponding to the request data type; obtaining the first operation instruction issued by the base server for the target communication terminal includes: The first operation instruction is obtained from the message queue corresponding to the target business topic.

4. The method according to claim 1, characterized in that, The method includes: Acquire first service data; wherein, the first service data includes a third data item, and the first service data is service data corresponding to the target service type obtained by the target communication terminal executing the second operation instruction; A fourth data item corresponding to the third data item is determined from the mapping relationship data; wherein the fourth data item satisfies the data format required by the second protocol. Second service data is generated according to the type of the second protocol and the fourth data item; wherein the second service data satisfies the data format pre-agreed between the base server and the data item conversion unit.

5. The method according to claim 4, characterized in that, The first business data includes several data strings; prior to acquiring the first business data, the method further includes: Based on the return method parameter of the business data attached to the first operation instruction, determine the target return method for returning the second business data to the base server; The acquisition of the first business data includes: If the target return method is a complete data return method, each data string is obtained sequentially until the complete first service data is received.

6. The method according to claim 5, characterized in that, The acquisition of the first business data includes: The first service data is received by sequentially acquiring each of the data strings; Determining the fourth data item corresponding to the third data item in the mapping relationship data includes: If the target return method is a single-string data return method, when each data string is obtained, a fourth data item corresponding to the third data item in each obtained data string is determined in the mapping relationship data.

7. The method according to claim 5, characterized in that, The base server sends the first operation instruction to the message queue corresponding to the target service topic; wherein, the first operation instruction corresponds to a request data type; the target service topic is the service topic corresponding to the request data type; the method further includes: The second service data is sent to the message queue corresponding to the target service topic so that it can be obtained by the base server.

8. The method according to any one of claims 1 to 7, characterized in that, The target service type includes at least one of the following: electrical energy type, maximum demand type, variable type, event type, load record type, parameter type, data acquisition and monitoring type, control type, input / output device interface type, transparent transmission type, upgrade type, statistics type, and load identification type.

9. The method according to any one of claims 1 to 7, characterized in that, The first operation instruction defines a communication object layer, a business object layer, and a business interaction item layer; the parameters on the business object layer include the operation type; the parameters on the business interaction item layer include the first data item. The first operation instruction also includes parameters required for the base server on the communication object layer to establish a communication connection with the target communication terminal, as well as attribute parameters of the target communication terminal on the service object layer.

10. An operation instruction generation device, characterized in that, A data item conversion unit is applied to an energy consumption information collection system, the data item conversion unit being connected to a base server; the energy consumption information collection system further includes a data acquisition front-end unit, the data acquisition front-end unit being connected to a communication terminal; the device includes: The instruction acquisition module is used to acquire a first operation instruction issued by the base server for a target communication terminal; wherein the first operation instruction includes a first data item, a target service type, a first protocol type of the target communication terminal, and a first operation type of the target communication terminal; the first operation instruction is generated by the base server based on a second protocol; wherein the first data item meets the data format requirements of the second protocol, and the first data item is used to instruct the target communication terminal to perform a service interaction operation; the first operation type is used to declare the operation type when the target communication terminal performs a service interaction operation; A data item set determination module is used to determine the data item set corresponding to the target service type from the mapping relationship data between the first protocol and the second protocol; The data item determination module is used to determine a second data item corresponding to the first data item from the data item set corresponding to the target business type; wherein the second data item meets the data format required by the first protocol. An operation type determination module is used to determine a second operation type corresponding to the first operation type based on the mapping relationship data; The instruction generation module is used to generate a second operation instruction for the target communication terminal based on the type of the first protocol, the target service type, the second operation type, and the second data item.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Protocol conversion method and device, computer equipment and storage medium

    CN113542267A

  • Information processing method and device, equipment and storage medium

    CN114827298A