Data processing method, device, equipment and computer-readable storage medium

By converting the communication data format of TTU and ECU into a C language structure and transmitting it according to the preset interface relationship, the redundancy problem of code reuse on the SCU is solved, and a data processing method that is convenient for maintenance and iteration is realized.

CN114461425BActive Publication Date: 2025-09-02SHENZHEN CLOU ELECTRONICS +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210142997.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2025-09-02
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

In the prior art, the APPs of TTU and ECU are based on different communication data formats, resulting in the APPs developed on the SCU need to support two frameworks at the same time, which has the problem of code reuse and redundancy, which is not convenient for maintenance and iterative development.

Method used

By receiving communication data feedback from different communication devices, the structure data is converted, the data format is unified into a C language structure, and the data interface is determined according to the preset interface correspondence relationship for transmission, reducing code reuse.

Benefits of technology

The combined communication data transmission of the two frameworks is realized, reducing code reuse and simplifying the maintenance and iterative development process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114461425B_ABST
    Figure CN114461425B_ABST
Patent Text Reader

Abstract

The present invention discloses a data processing method, apparatus, device, and computer-readable storage medium. The data processing method includes: receiving communication data fed back by at least two communication devices, the communication data fed back by different communication devices having different data formats; performing structured data conversion on the communication data in different data formats to obtain communication data in a C language structure; determining a corresponding data interface based on a correspondence between the communication data in the C language structure and a preset interface, wherein the preset interface correspondence includes a correspondence between the communication data and the data interface; and sending the communication data to the corresponding data interface. The present invention can merge two frameworks for communication data transmission, reduce code reuse redundancy, and facilitate maintenance and iterative development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular to a data processing method, apparatus, device, and computer-readable storage medium. Background Art

[0002] Currently, TTU and ECU apps are deployed in containers, communicating with each other based on the MQTT Broker protocol. TTU and ECU use different communication data formats, requiring the development of over a dozen apps on the SCU. Each app has different functional requirements and must support multiple communication formats, including synchronous, asynchronous, and broadcast concurrent MQTT messaging. The SCU completely replicates the TTU and ECU communication frameworks in its software framework, so apps developed on the SCU need to support both frameworks. However, the merged frameworks suffer from code reuse redundancy at the code level, making maintenance and iterative development difficult. Summary of the Invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a data processing method that can merge two frameworks for communication and data transmission, reduce code reuse redundancy, and facilitate maintenance and iterative development.

[0004] The present invention also provides a data processing device.

[0005] The present invention also provides a data processing device.

[0006] The present invention also provides a computer-readable storage medium.

[0007] In a first aspect, an embodiment of the present invention provides a data processing method, comprising:

[0008] receiving communication data fed back by at least two communication devices, wherein the communication data fed back by different communication devices have different data formats;

[0009] Performing structure data conversion on the communication data in different data formats to obtain the communication data in the data format of a C language structure;

[0010] Determine a corresponding data interface according to a correspondence between the communication data in the C language structure and a preset interface, wherein the preset interface correspondence includes a correspondence between the communication data and the data interface;

[0011] The communication data is sent to the corresponding data interface.

[0012] The data processing method of an embodiment of the present invention has at least the following beneficial effects: by receiving communication data fed back by at least two communication devices, communication data in different data formats can be obtained. By converting the communication data in different data formats into structured data, communication data in a unified format, i.e., communication data in a C language structure, can be obtained. Based on the correspondence between the communication data in the C language structure and the preset interface, the corresponding data interface can be determined. Finally, the corresponding communication data is sent to the corresponding data interface, and the two frameworks can be merged for communication data transmission, reducing the redundancy of code reuse and facilitating maintenance and iterative development.

[0013] According to the data processing method of some other embodiments of the present invention, the data format includes any one of the following: ASN.1 format, JSON format.

[0014] According to some other embodiments of the data processing method of the present invention, after receiving communication data fed back by at least two communication devices, the method further includes:

[0015] Initialize the cache space corresponding to the message queue and store the communication data in the cache space;

[0016] An empty message queue and attribute parameters of the communication data are acquired, and the attribute parameters are cached in the empty message queue.

[0017] According to some other embodiments of the data processing method of the present invention, if the data format includes: ASN.1 format and JSON format, converting the communication data in different data formats into structured data to obtain the communication data in the data format of a C language structure includes:

[0018] Decoding the communication data in the ASN.1 format according to the C language structure to obtain the communication data in the C language structure;

[0019] The communication data in JSON format is decoded according to a C language structure to obtain the communication data in a C language structure.

[0020] According to the data processing method of some other embodiments of the present invention, the data interface includes any one of the following: a serial port management interface, a Bluetooth management interface, a system management interface, and a remote pulse sampling interface.

[0021] In a second aspect, an embodiment of the present invention provides a data processing device, comprising:

[0022] a data receiving module, configured to receive communication data fed back by at least two communication devices, wherein the communication data fed back by different communication devices have different data formats;

[0023] A data conversion module, configured to convert the communication data in different data formats into structured data to obtain the communication data in the data format of a C language structure;

[0024] a data processing module, configured to determine a corresponding data interface according to a correspondence between the communication data in the C language structure and a preset interface, wherein the preset interface correspondence includes a correspondence between the communication data and the data interface;

[0025] The data sending module is used to send the communication data to the corresponding data interface.

[0026] The data processing device of the embodiment of the present invention has at least the following beneficial effects: the data receiving module receives communication data fed back by at least two communication devices and can obtain communication data in different data formats. The data conversion module can obtain communication data in a unified format, that is, communication data in a C language structure, by converting the communication data in different data formats into structured data. The data processing module can determine the corresponding data interface based on the correspondence between the communication data in the C language structure and the preset interface. Finally, the data sending module sends the corresponding communication data to the corresponding data interface, which can merge the two frameworks for communication data transmission, reduce the redundancy of code reuse, and facilitate maintenance and iterative development.

[0027] According to some other embodiments of the data processing apparatus of the present invention, the data receiving module includes:

[0028] A data receiving unit is configured to receive communication data fed back by at least two communication devices; the data receiving module further includes:

[0029] A data initialization unit, configured to initialize a cache space corresponding to a message queue and store the communication data in the cache space;

[0030] The data management unit is configured to obtain an empty message queue and attribute parameters of the communication data, and cache the attribute parameters in the empty message queue.

[0031] According to some other embodiments of the data processing apparatus of the present invention, the data conversion module includes:

[0032] A first decoding unit is configured to decode the communication data in the ASN.1 format according to a C language structure to obtain the communication data in the C language structure;

[0033] The second decoding unit is used to decode the communication data in JSON format according to the C language structure to obtain the communication data in the data format of the C language structure.

[0034] In a third aspect, an embodiment of the present invention provides a data processing device, comprising:

[0035] at least one processor, and

[0036] a memory communicatively connected to the at least one processor; wherein,

[0037] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data processing method as described in the first aspect.

[0038] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the data processing method as described in the first aspect.

[0039] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained through the structures particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a flow chart of a specific embodiment of a data processing method according to an embodiment of the present invention;

[0041] Figure 2 yes Figure 1 A flow chart of a specific embodiment of step S200;

[0042] Figure 3 yes Figure 1 A flow chart of a specific embodiment of step S300;

[0043] Figure 4 is a block diagram of a specific embodiment of a data processing device in an embodiment of the present invention;

[0044] Figure 5 yes Figure 4 A block diagram of a specific embodiment of the data receiving module 100;

[0045] Figure 6 yes Figure 4 FIG. 2 is a block diagram of a data conversion module 200 according to a specific embodiment of the present invention. Description of the drawings:

[0047] Data receiving module 100, data conversion module 200, data processing module 300, data sending module 400;

[0048] Data receiving unit 110, data initialization unit 120, data management unit 130;

[0049] A first decoding unit 210 and a second decoding unit 220 . DETAILED DESCRIPTION

[0050] The following will clearly and completely describe the concept and technical effects of the present invention in conjunction with the embodiments to fully understand the purpose, features and effects of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative work are all within the scope of protection of the present invention.

[0051] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0052] It should be noted that although the system diagram is divided into functional modules and the flow chart shows a logical order, in some cases, the steps shown or described may be performed in an order different from the module division in the system or the order in the flow chart.

[0053] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0054] In the description of the embodiments of the present invention, if the word "several" is mentioned, it means more than one; if the word "plurality" is mentioned, it means more than two; if the word "greater than," "less than," or "exceeds," it should be understood as excluding the number itself; if the word "above," "below," or "within" is mentioned, it should be understood as including the number itself. If the word "first" or "second" is mentioned, it should be understood as distinguishing technical features and should not be understood as indicating or implying relative importance, implicitly specifying the number of the indicated technical features, or implicitly specifying the order of the indicated technical features.

[0055] First, let’s analyze some of the terms used in this application:

[0056] TTU: Smart distribution transformer terminal, based on the concept of hardware platformization and software APP, meets the requirements of high-performance concurrency, large-capacity storage, and multiple collection objects. It is deployed on the distribution transformer side and integrates distribution substation measurement data collection, equipment status monitoring, communication networking management, on-site analysis and decision-making, collaborative computing and other functions into one intelligent terminal device.

[0057] ECU: Energy control and monitoring terminal unit, installed in public or private transformer substations, enables flexible access to metering and sensing equipment on the customer and distribution sides. It has functions such as data collection, intelligent fee control, clock synchronization, precise metering, orderly charging, energy consumption management, circuit status inspection, household-to-transformer relationship identification, and power outage event reporting.

[0058] SCU: Smart distribution transformer combine terminal unit (SCU), an intelligent collection and control terminal installed in the low-voltage substation, meets the needs of high-performance concurrency, large-capacity storage, multiple collection objects, on-site analysis and decision-making, and collaborative computing. It has functions such as data collection, equipment operation status monitoring, and power metering to support marketing, power distribution and emerging business development needs.

[0059] ASN.1 (Abstract Syntax Notation One) is an ISO / ITU-T standard that describes a data format for representing, encoding, transmitting, and decoding data. It provides a standardized format for describing the structure of objects, regardless of the implementation language, the specific data references, or the specific application.

[0060] JSON (JavaScript Object Notation) is a lightweight data exchange format. Based on a subset of ECMAScript (the JavaScript specification developed by the European Computer Society), it uses a text format that is completely independent of the programming language to store and represent data. Its simplicity and clear hierarchical structure make JSON an ideal data exchange language. It is easy for humans to read and write, as well as for machines to parse and generate, and significantly improves network transmission efficiency.

[0061] MQTT: Message Queuing Telemetry Transport is a publish / subscribe messaging protocol based on the ISO standard (ISO / IEC PRF 20922). It operates on the TCP / IP protocol suite and is designed for remote devices with low hardware performance and poor network conditions.

[0062] DATA STRUCT: Data structure. Data structure is the way computers store and organize data. Data is organized according to a certain logical structure, and appropriate storage representation methods are selected to store the logically structured data in the computer's memory.

[0063] MQTT Broker: Responsible for receiving messages from Publishers and sending them to the corresponding Subscribers. It is the core of the entire MQTT subscription / publishing process.

[0064] Publisher and Subscriber: These are identities relative to a Topic. If a Client publishes a message to a Topic, then the Client is a Publisher; if a Client subscribes to a Topic, then it is a Subscriber.

[0065] An API (Application Programming Interface) is a set of predefined interfaces (such as functions or HTTP interfaces) or conventions that connect different components of a software system. It provides a set of routines that applications and developers can access based on a piece of software or hardware without requiring access to the source code or understanding the details of the internal workings.

[0066] Reference Figure 1 , shows a flow chart of a data processing method in an embodiment of the present invention. In addition, this embodiment discloses a data processing method, which specifically includes but is not limited to steps S100 to S400.

[0067] Step S100: receiving communication data fed back by at least two communication devices, where the communication data fed back by different communication devices have different data formats;

[0068] In step S100, communication data in different data formats is obtained by receiving feedback communication data from multiple communication devices.

[0069] It should be noted that receiving communication data from multiple communication devices also involves: first, binding to an MQTT topic and publishing and subscribing to messages from the MQTT broker. Then, establishing a link with the MQTT broker and obtaining the message callback function for the MQTT subscription. Secondly, binding a delegate for the data transmission channel. Finally, distributing and managing the communication data received from MQTT.

[0070] Step S200, performing structure data conversion on communication data in different data formats to obtain communication data in a C language structure format;

[0071] In step S200 , the communication data fed back by the communication device is structure-converted, that is, the communication data in different data formats are structure-converted into communication data in the same data format, and the communication data in the data format of the C language structure is obtained.

[0072] Step S300, determining a corresponding data interface according to a correspondence relationship between communication data in a C language structure and a preset interface, wherein the preset interface correspondence relationship includes a correspondence relationship between communication data and a data interface;

[0073] In step S300 , the data interface corresponding to the communication data of each C language structure is obtained according to the corresponding relationship between the communication data of the corresponding C language structure and the preset interface.

[0074] Step S400: sending the communication data to the corresponding data interface.

[0075] In step S400, communication data in a C language structure format is sent to a corresponding data interface.

[0076] By executing steps S100 to S400, communication data in different data formats is first received by receiving feedback from multiple communication devices. Then, the communication data in different data formats is converted into communication data in the same data format, thereby obtaining communication data in a C language structure. Next, based on the corresponding correspondence between the communication data in the C language structure and a preset interface, a data interface corresponding to the communication data in each C language structure is obtained. Finally, all the communication data in the C language structure is sent to the corresponding data interface.

[0077] In one embodiment of the present application, communication data fed back by multiple communication devices is received, and communication data in different data formats is obtained: communication data in ASN.1 format and communication data in JSON format.

[0078] In one embodiment of the present application, the data interface includes any one of the following: a serial port management interface, a Bluetooth management interface, a system management interface, and a remote pulse sampling interface. However, the present application does not specifically limit the type of data interface.

[0079] It should be noted that after receiving the communication data in the C language structure format, the corresponding functional requirements are implemented according to the APP classification and topic classification based on "MQTT and ASN.1 interface definition" and "MQTT and JSON interface definition".

[0080] Reference Figure 2 , shows a flow chart of a data processing method in an embodiment of the present invention. In addition, this embodiment discloses a data processing method, which specifically includes but is not limited to steps S210 to S220.

[0081] Step S210, initializing the cache space corresponding to the message queue and storing the communication data in the cache space;

[0082] In step S210, the cache space corresponding to the message queue is initialized, and the received communication data of different data structures is stored in the cache space.

[0083] Step S220: Acquire the empty message queue and attribute parameters of the communication data, and cache the attribute parameters into the empty message queue.

[0084] In step S220 , an empty message queue and attribute parameters of communication data with different data structures are acquired, and the attribute parameters are cached in the empty message queue.

[0085] It should be noted that the attribute parameters include: attribute parameters of message synchronization of communication data and asynchronous request of communication data. After caching the attribute parameters in an empty message queue, the message queue is released and managed. Managing the message queue includes: performing message synchronization, asynchronous management and message reporting notification. Managing the message queue also includes: timeout processing of the applied message to prevent the applied message queue from not releasing the queue space due to timeout.

[0086] By executing steps S210 to S220, the cache space corresponding to the message queue is initialized, the received communication data of different data structures is stored in the cache space, an empty message queue and attribute parameters of the communication data of different data structures are obtained, and the attribute parameters are cached in the empty message queue.

[0087] Reference Figure 3 , shows a flow chart of a data processing method in an embodiment of the present invention. In addition, this embodiment discloses a data processing method, which specifically includes but is not limited to steps S310 to S320.

[0088] Step S310, decoding the communication data in the ASN.1 format according to the C language structure to obtain the communication data in the C language structure;

[0089] In step S310 , communication data in a C language structure format, specifically communication data in a C language struct structure format, is obtained.

[0090] Step S320 : decoding the communication data in JSON format according to the C language structure to obtain communication data in a C language structure.

[0091] In step S320 , communication data in a C language structure format, specifically communication data in a C language struct structure format, is obtained.

[0092] By converting communication data in two different data formats into communication data in the same data format, the two frameworks can be merged for communication data transmission, reducing the redundancy of code reuse and facilitating maintenance and iterative development.

[0093] In addition, refer to Figure 4 One embodiment of the present invention discloses a data processing device. The data processing device includes: a data receiving module 100, a data conversion module 200, a data processing module 300 and a data sending module 400. The data receiving module 100, the data conversion module 200, the data processing module 300 and the data sending module 400 are all communication connections. The data receiving module 100 is used to receive communication data fed back by at least two communication devices, and the data formats of the communication data fed back by different communication devices are different. The data conversion module 200 is used to perform structure data conversion on communication data of different data formats to obtain communication data with a data format of a C language structure. The data processing module 300 is used to determine the corresponding data interface based on the communication data with a data format of a C language structure and the preset interface correspondence relationship, and the preset interface correspondence relationship includes the correspondence between communication data and data interface. The data sending module 400 is used to send the communication data to the corresponding data interface.

[0094] First, the data receiving module 100 receives communication data fed back by multiple communication devices and obtains communication data in different data formats. Then, the data conversion module 200 performs structure data conversion on the communication data in different data formats, converting them into communication data in the same data format, thereby obtaining communication data in the C language structure. Secondly, the data processing module 300 obtains the data interface corresponding to the communication data of each C language structure based on the corresponding relationship between the communication data of the corresponding C language structure and the preset interface. Finally, the data sending module 400 sends all the communication data in the C language structure to the corresponding data interface.

[0095] The operation process of the data processing device of this embodiment is specifically described as follows: Figure 1 Steps S100 to S400 of the method are not repeated here.

[0096] After receiving the communication data in the C language structure format, the data processing module 300 implements the corresponding functional requirements according to the APP classification and subject classification, in accordance with the "based on MQTT and ASN.1 interface definition" and "based on MQTT and JSON interface definition".

[0097] The data processing module 300 calls the corresponding APP interface class according to the requested structure. The APP interface class processes the corresponding data content according to the API requested by the C language structure. The APP interface class includes: serial port management interface, Bluetooth management interface, system management interface and remote pulse sampling interface.

[0098] Reference Figure 5 The data receiving module 100 includes a data receiving unit 110, a data initialization unit 120, and a data management unit 130. The data receiving unit 110, the data initialization unit 120, and the data management unit 130 are all communication connections. The data receiving unit 110 is used to receive communication data fed back by at least two communication devices. The data initialization unit 120 is used to initialize the cache space corresponding to the message queue and store the communication data in the cache space. The data management unit 130 is used to obtain attribute parameters of an empty message queue and the communication data, and cache the attribute parameters in the empty message queue.

[0099] The data receiving unit 110 receives communication data fed back by at least two communication devices. The data initialization unit 120 initializes the cache space corresponding to the message queue and stores the received communication data of different data structures in the cache space. The data management unit 130 obtains an empty message queue and attribute parameters of the communication data of different data structures, and caches the attribute parameters in the empty message queue.

[0100] The operation process of the data processing device of this embodiment is specifically described as follows: Figure 2 Steps S210 to S220 of the method are not repeated here.

[0101] It should be noted that the management part of the data receiving module 100 is mainly responsible for MQTT message requests and responses, reporting notifications and message timeout processing, and provides cached messages to the data conversion module 200 for use. The functions of the management part of the data receiving module 100 include:

[0102] The data receiving unit 110 is an MQTT unit, and the data receiving module further includes: a delegation unit, a data initialization unit 120 and a data management unit 130 which can be collectively referred to as a message management unit;

[0103] The MQTT unit is associated with a variety of common MQTT interface libraries, and uses the open source libraries mosquitto and paho to edit the MQTT unit. The API used by mosquitto and paho is defined as a base class function, and the specific API functions are implemented by the edited derived classes class CMqttMosq and class CMqttPaho.

[0104] The base class functions defined are: BindTopic: Binds an MQTT topic for publishing and subscribing to messages with the MQTT Broker; Connect: Establishes a link with the MQTT Broker; OnRecv: Callback function for messages subscribed to MQTT; and BindDelegate: Binds the delegate, which bridges the MQTT and message management modules and serves as a data transmission channel. The base class functions defined by the derived classes CMqttMosq and CMqttPaho include BindTopic, Connect, OnRecv, and BindDelegate. Furthermore, the base class functions defined by the derived class CMqttPaho also include BindTopic, Connect, OnRecv, and BindDelegate.

[0105] The delegation unit includes: an MQTT message receiving subunit and an MQTT message distributing subunit. The MQTT message receiving subunit is used to receive messages from the MQTT module. The MQTT message distributing subunit is used to distribute MQTT messages to the message management unit.

[0106] The message management unit class CMsgMgr is mainly responsible for MQTT message requests and responses, reporting notifications and message timeout processing, and provides cached messages to the data conversion module 200 for use. The functions of the message management unit include:

[0107] The data initialization unit 120 initializes the cache space corresponding to the message queue and stores the received communication data of different data structures into the cache space;

[0108] The data management unit 130 obtains an empty message queue for caching attribute parameters of message synchronization and asynchronous requests of communication data;

[0109] Release the message queue;

[0110] Manage message queues: perform message synchronization, asynchronous management, and message reporting notifications; handle requested message timeouts to prevent the requested message queue from not releasing queue space due to timeout.

[0111] Reference Figure 6 The data conversion module 200 includes a first decoding unit 210 and a second decoding unit. The first decoding unit 210 is configured to decode the communication data in the ASN.1 format according to the C language structure to obtain the communication data in the C language structure. The second decoding unit 220 is configured to decode the communication data in the JSON format according to the C language structure to obtain the communication data in the C language structure.

[0112] The operation process of the data processing device of this embodiment is specifically described as follows: Figure 2 Steps S310 to S320 of the method are not repeated here.

[0113] It should be noted that the data conversion module 200 mainly converts communication data in ASN.1 format and JSON format into C language structure, and is used to convert communication data in ASN.1 format and JSON format into communication data in C language struct structure format.

[0114] Among them, the data conversion module 200's processing of serialization and deserialization conversion of ASN.1, JSON, and struct includes: initialization of the conversion layer, decoding of the ASN.1 format into a C language struct structure, encoding of the C language struct structure into the ASN.1 format, decoding of the JSON format into a C language struct structure, and encoding of the C language struct structure into the JSON format.

[0115] Another embodiment of the present invention discloses a data processing device, the data processing device comprising: at least one processor, and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform Figure 1 Steps S100 to S400 of the method, Figure 2 Method steps S210 and S220 and Figure 3 Any data processing method in step S310 and step S320 of the method.

[0116] Another embodiment of the present invention discloses a computer-readable storage medium, the computer-readable storage medium comprising: a computer-readable storage medium storing computer-executable instructions, the computer-executable instructions being used to enable a computer to execute Figure 1 Steps S100 to S400 of the method, Figure 2 Method steps S210 and S220 and Figure 3 Any data processing method in step S310 and step S320 of the method.

[0117] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0118] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0119] While the embodiments of the present invention have been described in detail above with reference to the accompanying drawings, the present invention is not limited to the embodiments described above. Various modifications may be made within the scope of knowledge possessed by a person skilled in the art without departing from the spirit of the present invention. Furthermore, the embodiments of the present invention and the features thereof may be combined with one another unless there is a conflict.

Claims

1. A data processing method, characterized in that: include: receiving communication data fed back by at least two communication devices, wherein the communication data fed back by different communication devices have different data formats; Performing structure data conversion on the communication data in different data formats to obtain the communication data in the data format of a C language structure; Determine a corresponding data interface according to a correspondence between the communication data in the C language structure and a preset interface, wherein the preset interface correspondence includes a correspondence between the communication data and the data interface; Sending the communication data to the corresponding data interface; After receiving the communication data fed back by at least two communication devices, the method further includes: Initialize the cache space corresponding to the message queue and store the communication data in the cache space; Obtain the attribute parameters of an empty message queue and the communication data, cache the attribute parameters to the empty message queue, and manage the message queue, wherein the attribute parameters include the attribute parameters of message synchronization of the communication data and the asynchronous request of the communication data; wherein, managing the message queue includes: performing message synchronization, asynchronous management and message reporting notification.

2. The data processing method according to claim 1, wherein: The data format includes any one of the following: ASN.1 format, JSON format.

3. The data processing method according to claim 2, characterized in that: If the data formats include: ASN.1 format and JSON format, performing structure data conversion on the communication data in different data formats to obtain the communication data in the data format of a C language structure includes: Decoding the communication data in the ASN.1 format according to the C language structure to obtain the communication data in the C language structure; The communication data in JSON format is decoded according to a C language structure to obtain the communication data in a C language structure.

4. The data processing method according to any one of claims 1 to 3, characterized in that: The data interface includes any one of the following: a serial port management interface, a Bluetooth management interface, a system management interface, and a remote pulse sampling interface.

5. A data processing device, characterized in that: include: a data receiving module, configured to receive communication data fed back by at least two communication devices, wherein the communication data fed back by different communication devices have different data formats; A data conversion module, configured to convert the communication data in different data formats into structured data to obtain the communication data in the data format of a C language structure; a data processing module, configured to determine a corresponding data interface according to a correspondence between the communication data in the C language structure and a preset interface, wherein the preset interface correspondence includes a correspondence between the communication data and the data interface; A data sending module, configured to send the communication data to a corresponding data interface; The data receiving module includes: A data receiving unit, configured to receive communication data fed back by at least two communication devices; A data initialization unit, configured to initialize a cache space corresponding to a message queue and store the communication data in the cache space; A data management unit is used to obtain the attribute parameters of an empty message queue and the communication data, cache the attribute parameters to the empty message queue, and manage the message queue, wherein the attribute parameters include the attribute parameters of message synchronization of the communication data and asynchronous requests of the communication data; wherein managing the message queue includes: performing message synchronization, asynchronous management and message reporting notification.

6. The data processing device according to claim 5, characterized in that The data conversion module includes: A first decoding unit is configured to decode the communication data in the ASN.1 format according to a C language structure to obtain the communication data in the C language structure; The second decoding unit is used to decode the communication data in JSON format according to the C language structure to obtain the communication data in the data format of the C language structure.

7. A data processing device, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data processing method according to any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the data processing method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Internet of things gateway protocol consistency realization method

    CN102255908A

  • Information processing method and information processing device

    CN106776497A