CN115525415B - Data processing method, device, equipment and medium - Google Patents

Data processing method, device, equipment and medium Download PDF

Info

Publication number
CN115525415B
CN115525415B CN202211291680.8A CN202211291680A CN115525415B CN 115525415 B CN115525415 B CN 115525415B CN 202211291680 A CN202211291680 A CN 202211291680A CN 115525415 B CN115525415 B CN 115525415B
Authority
CN
China
Prior art keywords
data
target
external device
target external
protocol stack
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211291680.8A
Other languages
Chinese (zh)
Other versions
CN115525415A (en
Inventor
黄�俊
靳鑫
周文龙
容铭康
苏校
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kedong Guangzhou Software Technology Co Ltd
Original Assignee
Kedong Guangzhou Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kedong Guangzhou Software Technology Co Ltd filed Critical Kedong Guangzhou Software Technology Co Ltd
Priority to CN202211291680.8A priority Critical patent/CN115525415B/en
Publication of CN115525415A publication Critical patent/CN115525415A/en
Application granted granted Critical
Publication of CN115525415B publication Critical patent/CN115525415B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a data processing method, a device, equipment and a medium. The method comprises the following steps: when the data scheduling component detects that the data reading condition corresponding to the target external equipment is reached, a data access interface of the target external equipment is called, and the equipment data storage module of the target external equipment is accessed to acquire an equipment data message to be transmitted of the target external equipment; determining a target protocol stack corresponding to target external equipment through a data scheduling component, and sending equipment data messages to be transmitted to the target protocol stack, so that the target protocol stack extracts equipment data in the equipment data messages to be transmitted based on a communication protocol corresponding to the equipment data messages to be transmitted; and transmitting the device data to the corresponding target application program through the data scheduling component. According to the embodiment of the invention, the device data of the external device can be timely acquired according to the device data acquisition requirement of the application program and transmitted to the application program, so that the data information lag is avoided.

Description

Data processing method, device, equipment and medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data processing method, apparatus, device, and medium.
Background
The industrial network operating system belongs to a microkernel real-time operating system and can run a plurality of virtual machines. Such as the intelwell industrial level network operating system. Each virtual machine in the industrial-level network operating system of the industrial server is managed by the microkernel, and safety isolation from the hardware level is realized. Each virtual machine may run an application program separately. Each application program can control different external devices to meet different industrial production requirements. In order to precisely control an external device, each application program needs to acquire device data of the controlled external device in real time or write specified data into the external device.
In the related art, the device data transmission process is generally: the protocol stack in the operating system sends out inquiry at regular time, and sequentially inquires whether the driving module of each connected external device has a device data message which needs to be sent to the application program. If so, the protocol stack acquires the equipment data message, analyzes the equipment data message based on a communication protocol corresponding to the equipment data message, extracts the equipment data in the equipment data message, and adds the equipment data into an equipment data queue. When the application program calls the protocol stack, the protocol stack acquires the device data from the device data queue and sends the device data to the application program.
In the related art data transmission scheme, a protocol stack acquires a device data message by using a polling mode, analyzes the device data message, extracts device data in the device data message, adds the device data to a device data queue, and then sends the device data in the device data queue to an application program when the application program calls a preset interface of the protocol stack, so that the device data of an external device cannot be timely transmitted to a corresponding application program, thereby causing data information lag.
Disclosure of Invention
The invention provides a data processing method, a device, equipment and a medium, which are used for solving the problem that in a data transmission scheme of the related technology, appointed equipment data of external equipment cannot be timely transmitted to a corresponding application program, so that data information is delayed.
According to an aspect of the present invention, there is provided a data processing method applied to an industrial-level network operating system, including:
when the data scheduling component detects that the data reading condition corresponding to the target external equipment is reached, a data access interface of the target external equipment is called, and an equipment data storage module of the target external equipment is accessed to acquire an equipment data message to be transmitted of the target external equipment;
Determining a target protocol stack corresponding to the target external device through the data scheduling component, and sending a device data message to be transmitted of the target external device to the target protocol stack, so that the target protocol stack extracts device data in the device data message to be transmitted based on a communication protocol corresponding to the device data message to be transmitted;
and sending the device data to a target application program corresponding to the target external device through the data scheduling component.
According to another aspect of the present invention, there is provided a data processing apparatus configured in an industrial-level network operating system, comprising:
the device data reading module is used for calling a data access interface of the target external device to access the device data storage module of the target external device to acquire a device data message to be transmitted of the target external device when the data reading condition corresponding to the target external device is detected to be reached through the data scheduling component;
the device data extraction module is used for determining a target protocol stack corresponding to the target external device through the data scheduling component, and sending a device data message to be transmitted of the target external device to the target protocol stack so that the target protocol stack extracts device data in the device data message to be transmitted based on a communication protocol corresponding to the device data message to be transmitted;
And the device data sending module is used for sending the device data to a target application program corresponding to the target external device through the data scheduling component.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data processing method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a data processing method according to any one of the embodiments of the present invention.
According to the technical scheme, when the data scheduling component detects that the data reading condition corresponding to the target external device is reached, a data access interface of the target external device is called, a device data storage module of the target external device is accessed, and a device data message to be transmitted of the target external device is obtained; then, a target protocol stack corresponding to the target external device is determined through a data scheduling component, and a device data message to be transmitted of the target external device is sent to the target protocol stack, so that the target protocol stack extracts device data in the device data message to be transmitted based on a communication protocol corresponding to the device data message to be transmitted; finally, the device data is sent to the target application program corresponding to the target external device through the data scheduling component, the problem that in a data transmission scheme of the related technology, the device data of the external device cannot be timely transmitted to the corresponding application program, so that data information is lagged is solved, the device data storage module of the external device controlled by the application program is accessed according to the device data acquisition requirement of the application program, the device data message containing the device data is quickly acquired, the device data of the external device in the device data message is then extracted and transmitted to the application program, the device data of the external device is ensured to be timely transmitted to the corresponding application program, the data information is prevented from lagging, and the application program is convenient to accurately control the external device.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1A is a flowchart of a data processing method according to an embodiment of the present invention.
FIG. 1B is a diagram illustrating a data processing architecture according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a data processing apparatus according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an electronic device implementing a data processing method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "object," "first," "second," and the like in the description and the claims of the present invention and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1A is a flowchart of a data processing method according to an embodiment of the present invention. The present embodiment is applicable to a case where data transmission is performed between an application program and an external device controlled by the application program. The method may be performed by a data processing device, which may be implemented in hardware and/or software, which may be configured in an industrial-scale network operating system. As shown in fig. 1A, the method includes:
Step 101, when a data scheduling component detects that a data reading condition corresponding to a target external device is reached, a data access interface of the target external device is called, a device data storage module of the target external device is accessed, and a device data message to be transmitted of the target external device is obtained.
Alternatively, the target external device is an external device that operates under the control of an industrial-level network operating system. The plurality of external devices operate under control of the industrial-level network operating system.
Optionally, each external device is configured to collect its own device data, generate a device data packet to be transmitted according to the collected device data, and store the device data packet to be transmitted in a device data storage module. The device data message to be transmitted is a message containing device data.
Optionally, each external device generates a device data packet to be transmitted according to the collected device data based on the communication protocol used by the external device. Communication protocols include, but are not limited to: etherCAT communication protocol, PROFINET communication protocol, canopen communication protocol, and Modbus communication protocol. The equipment data message to be transmitted is an EtherCAT message, a PROFINET message, a Canopen message or a Modbus message containing the equipment data.
Alternatively, the device data may be one or more device parameters associated with the external device. Illustratively, the external device is a motor and the device data of the external device includes, but is not limited to, an operating voltage and an actual rotational speed of the motor.
Optionally, the device data storage module is a storage module set in the external device and used for storing a device data packet to be transmitted of the external device. The memory module may be a direct memory access (Direct Memory Access, DMA) controller or register in the external device. Each external device periodically collects own device data, generates a device data message to be transmitted according to the collected device data, and stores the device data message to be transmitted in a device data storage module.
Alternatively, the target application corresponding to the target external device is an application running in an industrial-level network operating system of the industrial server responsible for controlling the target external device. The target application corresponding to the target external device needs to acquire device data of the target external device in real time or write the specified data into the target external device.
Optionally, the target protocol stack corresponding to the target external device is set in the industrial level network operating system of the industrial server, and can establish communication connection with the driving module of the target external device based on the communication protocol used by the target external device, so as to perform information interaction with the target external device. Communication protocols include, but are not limited to: etherCAT communication protocol, PROFINET communication protocol, canopen communication protocol, and Modbus communication protocol. The target protocol stack may acquire a message sent by the target external device based on the established communication connection, and then extract data, which needs to be sent to a target application program responsible for controlling the target external device, in the message based on a communication protocol corresponding to the message. The target protocol stack may also obtain data to be sent to the target external device, generate a message containing the data to be sent to the target external device, and then send the message containing the data to be sent to the target external device based on the established communication connection.
Optionally, the data scheduling component is a functional component written by a development user and set in an industrial-level network operating system of the industrial server, and is used for assisting an application program in timely acquiring device data of the controlled external device or writing specified data into the controlled external device.
Optionally, the data scheduling component is connected with each protocol stack, and can perform information interaction with each protocol stack. The data scheduling component is connected with each external device through a physical interface of the working server and can perform information interaction with each external device.
Optionally, when the data scheduling component detects that a data reading condition corresponding to a target external device is reached, the data scheduling component invokes a data access interface of the target external device to access a device data storage module of the target external device, and before obtaining a device data packet to be transmitted of the target external device, the method further includes: transmitting preset protocol stack configuration information to each protocol stack; transmitting preset driving module configuration information to driving modules of all external devices; the preset protocol stack configuration information is used for disabling codes and/or processes related to the data reading and writing process of the external device in the protocol stack, and the preset driving module configuration information is used for canceling the working mode related to the data reading and writing process of the external device in the driving module. After the industrial network operating system is started, the industrial network operating system sends preset protocol stack configuration information to each protocol stack, configures each protocol stack, sends preset driving module configuration information to the driving module of each external device, and configures the driving module of each external device.
Optionally, when the data reading condition corresponding to the target external device is detected to be reached, invoking a data access interface of the target external device, accessing a device data storage module of the target external device, and obtaining a device data packet to be transmitted of the target external device, including: and when a data reading request corresponding to the target external equipment is received, calling a data access interface of the target external equipment, accessing an equipment data storage module of the target external equipment, and acquiring an equipment data message to be transmitted of the target external equipment.
Optionally, the data read request corresponding to the target external device is used to request to acquire device data of the target external device. The target application program in charge of controlling the target external device transmits a data read request corresponding to the target external device to the data scheduling component. When receiving a data reading request corresponding to a target external device, the data scheduling component calls a data access interface of the target external device, accesses a device data storage module of the target external device, and acquires a device data message to be transmitted of the target external device.
Optionally, when the data reading condition corresponding to the target external device is detected to be reached, invoking a data access interface of the target external device, accessing a device data storage module of the target external device, and obtaining a device data packet to be transmitted of the target external device, including: when the current time reaches the preset data reading time corresponding to the target external equipment, calling a data access interface of the target external equipment, accessing an equipment data storage module of the target external equipment, and acquiring an equipment data message to be transmitted of the target external equipment.
Optionally, the preset data reading time corresponding to the target external device is preset time for acquiring a plurality of device data messages to be transmitted of the target external device, and the device data messages to be transmitted of the target external device are acquired periodically by the auxiliary data scheduling component. For example, the device data packet to be transmitted of the target external device is acquired every 5 minutes.
Optionally, the target external device is provided with a data access interface. And the data access interface is arranged on the target external equipment and is used for accessing the designated storage module of the target external equipment when receiving a read operation request or a write operation request sent by other equipment or function modules, feeding back the data in the designated storage module to the other equipment or function modules or writing the designated data into the designated storage module. The read operation request is for requesting acquisition of data in a specified memory module. The write operation request is for requesting writing of specified data into the specified memory module.
Optionally, when the data scheduling component detects that the data reading condition corresponding to the target external device is reached, the data scheduling component sends a reading operation request corresponding to the target external device to a data access interface of the target external device through a communication interface of the industrial server, so that the data access interface of the target external device is invoked. The read operation request corresponding to the target external device carries the address of the device data storage module of the target external device. The communication interface includes, but is not limited to, a serial port, a network port, and a CAN port. When the data access interface of the target external device receives the read operation request, accessing the device data storage module of the target external device according to the address of the device data storage module of the target external device, acquiring a device data message to be transmitted of the target external device from the device data storage module of the target external device, feeding back the device data message to be transmitted of the target external device to the data scheduling component, and determining that the read operation request processing is completed.
Optionally, the calling the data access interface of the target external device accesses the device data storage module of the target external device to obtain a device data packet to be transmitted of the target external device, including: invoking a data access interface of the target external device, and controlling the data access interface of the target external device to enter a polling non-blocking mode; and accessing the device data storage module of the target external device through the data access interface of the target external device to acquire the device data message to be transmitted of the target external device.
Optionally, when the data scheduling component detects that the data reading condition corresponding to the target external device is reached, the data scheduling component sends a reading operation request corresponding to the target external device to a data access interface of the target external device through a communication interface of the industrial server, so that the data access interface of the target external device is called, and the data access interface of the target external device is controlled to enter a polling non-blocking mode. The read operation request corresponding to the target external device carries the address of the device data storage module of the target external device. The communication interface includes, but is not limited to, a serial port, a network port, and a CAN port. And when the data access interface of the target external device receives the read operation request, accessing the device data storage module of the target external device according to the address of the device data storage module of the target external device, and entering a polling non-blocking mode. The data access interface of the target external device acquires a device data message to be transmitted of the target external device from the device data storage module of the target external device, feeds back the device data message to be transmitted of the target external device to the data scheduling component, determines that the read operation request processing is completed, and releases the polling non-blocking mode.
Step 102, determining a target protocol stack corresponding to the target external device through the data scheduling component, and sending a device data message to be transmitted of the target external device to the target protocol stack, so that the target protocol stack extracts device data in the device data message to be transmitted based on a communication protocol corresponding to the device data message to be transmitted.
Optionally, when the data scheduling component detects that a data reading condition corresponding to a target external device is reached, the data scheduling component invokes a data access interface of the target external device to access a device data storage module of the target external device, and before obtaining a device data packet to be transmitted of the target external device, the method further includes: setting the priority of a target protocol stack corresponding to the target external equipment as a preset priority; and distributing the target physical core to the target protocol stack, and establishing a binding relation between the target physical core and the target protocol stack. After the industrial network operating system is started, one protocol stack in the industrial network operating system is set as a target protocol stack corresponding to the target external equipment, then the priority of the target protocol stack corresponding to the target external equipment is set as a preset priority, a target physical core is distributed to the target protocol stack, and a binding relation between the target physical core and the target protocol stack is established. The preset priority is a higher priority. The target physical core is one physical core in the operating system. The target protocol stack may process the message of the target external device based on the bound target physical core.
Optionally, the determining a target protocol stack corresponding to the target external device includes: through the data scheduling component, the following operations are performed: sending a protocol stack query request to a target application program corresponding to the target external equipment; and acquiring a protocol stack identifier fed back by the target application program, and determining a target protocol stack corresponding to the target external equipment according to the protocol stack identifier.
Optionally, the protocol stack query request is used for requesting to acquire a protocol stack identifier of a target protocol stack corresponding to the target external device. And the protocol stack identification of the target protocol stack corresponding to the target external equipment is stored in the target application program. And sending a protocol stack query request to a target application program corresponding to the target external equipment through the data scheduling component. The protocol stack query request carries the device identifier of the target external device. And the target application program feeds back the protocol stack identification of the target protocol stack corresponding to the target external equipment to the data scheduling component after receiving the protocol stack query request.
Optionally, the protocol stack identification of the protocol stack is information for uniquely identifying the protocol stack. The protocol stack identities of the different protocol stacks are different. The protocol stack identification may be a digital number. The device identification of the external device is information for uniquely identifying the external device. The device identification of different external devices is different. The device identification may be a digital number.
Optionally, the determining a target protocol stack corresponding to the target external device includes: and determining a target protocol stack corresponding to the target external device according to the corresponding relation between the device identifier and the protocol stack identifier through the data scheduling component. The data scheduling component stores the equipment identifiers of the external equipment and the protocol stack identifiers of the protocol stacks corresponding to the external equipment, and establishes the corresponding relation between the equipment identifiers of the external equipment and the protocol stack identifiers of the protocol stacks corresponding to the external equipment, namely the corresponding relation between the equipment identifiers and the protocol stack identifiers. The data scheduling component queries the equipment identifiers of all the stored external equipment for the equipment identifiers which are the same as the equipment identifiers of the target external equipment, determines the protocol stack identifier of the protocol stack corresponding to the queried equipment identifier as the protocol stack identifier of the target protocol stack corresponding to the target external equipment, and determines the target protocol stack corresponding to the target external equipment according to the protocol stack identifier.
Optionally, the data scheduling component determines a target protocol stack corresponding to the target external device, and then sends the device data message to be transmitted of the target external device to the target protocol stack. The target protocol stack receives a device data message to be transmitted of the target external device, extracts device data in the device data message to be transmitted based on a communication protocol corresponding to the device data message to be transmitted, and then feeds back the device data in the device data message to be transmitted to the data scheduling component.
And step 103, sending the device data to a target application program corresponding to the target external device through the data scheduling component.
Optionally, the device data in the device data packet to be transmitted fed back by the target protocol stack is sent to a target application program corresponding to the target external device through the data scheduling component. And the target application program receives the equipment data and processes the equipment data.
Optionally, the method further comprises: receiving a data writing request corresponding to the target external device through the data scheduling component; the data writing request carries data to be written and a writing position identifier, wherein the writing position identifier is an address of a target storage module of the target external equipment; and calling a data access interface of the target external equipment according to the data writing request through the data scheduling component, accessing a target storage module of the target external equipment, and writing the data to be written into the target storage module.
Optionally, the data writing request corresponding to the target external device is used for requesting to write the specified data into the specified storage module of the target external device. And the target application program sends a data writing request corresponding to the target external equipment to the data scheduling component. And when receiving a data writing request corresponding to the target external equipment, the data scheduling component calls a data access interface of the target external equipment, accesses a designated storage module of the target external equipment and writes designated data into the designated storage module of the target external equipment.
Optionally, the data to be written is data to be written into a target storage module of the target external device. The target storage module is a storage module for storing data in one of the target external devices.
Optionally, according to the data writing request, invoking a data access interface of the target external device, accessing a target storage module of the target external device, and writing the data to be written into the target storage module, including: calling a data access interface of the target external device, and controlling the data access interface of the target external device to enter a polling non-blocking mode; and accessing a target storage module of the target external equipment through a data access interface of the target external equipment, and writing the data to be written into the target storage module.
Optionally, when receiving the data writing request corresponding to the target external device, the data scheduling component sends the writing operation request corresponding to the target external device to the data access interface of the target external device through the communication interface of the industrial server, so as to call the data access interface of the target external device and control the data access interface of the target external device to enter a polling non-blocking mode. The data writing request corresponding to the target external device carries data to be written and an address of a target storage module of the target external device. And when the data access interface of the target external equipment receives the write operation request, accessing the target storage module of the target external equipment according to the address of the target storage module of the target external equipment, and entering a polling non-blocking mode. And the data access interface of the target external equipment writes the data to be written into the target storage module, and then feeds back the writing completion prompt information to the data scheduling component, determines that the writing operation request processing is completed, and releases the polling non-blocking mode. The write completion prompt information is used for prompting the write operation request to process completion.
Therefore, according to the data writing requirements of the application program, the appointed storage module of the external device controlled by the application program is accessed, the appointed data is written into the appointed storage module, the application program is ensured to write the data into the corresponding external device in time, the data information lag is avoided, and the application program is convenient for accurately controlling the external device.
According to the technical scheme, when the data scheduling component detects that the data reading condition corresponding to the target external device is reached, a data access interface of the target external device is called, a device data storage module of the target external device is accessed, and a device data message to be transmitted of the target external device is obtained; then, a target protocol stack corresponding to the target external device is determined through a data scheduling component, and a device data message to be transmitted of the target external device is sent to the target protocol stack, so that the target protocol stack extracts device data in the device data message to be transmitted based on a communication protocol corresponding to the device data message to be transmitted; finally, the device data is sent to the target application program corresponding to the target external device through the data scheduling component, the problem that in a data transmission scheme of the related technology, the device data of the external device cannot be timely transmitted to the corresponding application program, so that data information is lagged is solved, the device data storage module of the external device controlled by the application program is accessed according to the device data acquisition requirement of the application program, the device data message containing the device data is quickly acquired, the device data of the external device in the device data message is then extracted and transmitted to the application program, the device data of the external device is ensured to be timely transmitted to the corresponding application program, the data information is prevented from lagging, and the application program is convenient to accurately control the external device.
In an optional implementation manner of the embodiment of the present invention, optionally, as shown in fig. 1B, the data scheduling component 111 is connected to the target external device 112 through a physical interface of the working server, and may perform information interaction with the target external device 112. The data scheduling component 111 is connected with the target protocol stack 113, and can interact information with the target protocol stack 113. The data scheduling component 111 may send the device data of the target external device 112 fed back by the target protocol stack 113 to the target application 114 corresponding to the target external device 112.
Example two
Fig. 2 is a schematic structural diagram of a data processing apparatus according to a second embodiment of the present invention. The apparatus may be configured in an industrial-scale network operating system. As shown in fig. 2, the apparatus includes: a device data reading module 201, a device data extracting module 202, and a device data transmitting module 203.
The device data reading module 201 is configured to, through the data scheduling component, invoke a data access interface of a target external device when detecting that a data reading condition corresponding to the target external device is reached, access a device data storage module of the target external device, and obtain a device data packet to be transmitted of the target external device; the device data extraction module 202 is configured to determine, by using the data scheduling component, a target protocol stack corresponding to the target external device, and send a device data packet to be transmitted of the target external device to the target protocol stack, so that the target protocol stack extracts device data in the device data packet to be transmitted based on a communication protocol corresponding to the device data packet to be transmitted; and the device data sending module 203 is configured to send, through the data scheduling component, the device data to a target application program corresponding to the target external device.
According to the technical scheme, when the data scheduling component detects that the data reading condition corresponding to the target external device is reached, a data access interface of the target external device is called, a device data storage module of the target external device is accessed, and a device data message to be transmitted of the target external device is obtained; then, a target protocol stack corresponding to the target external device is determined through a data scheduling component, and a device data message to be transmitted of the target external device is sent to the target protocol stack, so that the target protocol stack extracts device data in the device data message to be transmitted based on a communication protocol corresponding to the device data message to be transmitted; finally, the device data is sent to the target application program corresponding to the target external device through the data scheduling component, the problem that in a data transmission scheme of the related technology, the device data of the external device cannot be timely transmitted to the corresponding application program, so that data information is lagged is solved, the device data storage module of the external device controlled by the application program is accessed according to the device data acquisition requirement of the application program, the device data message containing the device data is quickly acquired, the device data of the external device in the device data message is then extracted and transmitted to the application program, the device data of the external device is ensured to be timely transmitted to the corresponding application program, the data information is prevented from lagging, and the application program is convenient to accurately control the external device.
In an optional implementation manner of the embodiment of the present invention, optionally, the data processing apparatus further includes: the first information sending module is used for sending preset protocol stack configuration information to each protocol stack; the second information sending module is used for sending preset driving module configuration information to driving modules of all external devices; the preset protocol stack configuration information is used for disabling codes and/or processes related to the data reading and writing process of the external device in the protocol stack, and the preset driving module configuration information is used for canceling the working mode related to the data reading and writing process of the external device in the driving module.
In an optional implementation manner of the embodiment of the present invention, optionally, the data processing apparatus further includes: the priority setting module is used for setting the priority of a target protocol stack corresponding to the target external equipment as a preset priority; and the physical core binding module is used for distributing a target physical core to the target protocol stack and establishing a binding relation between the target physical core and the target protocol stack.
In an optional implementation manner of the embodiment of the present invention, optionally, when performing an operation of determining a target protocol stack corresponding to the target external device, the device data extraction module 202 is specifically configured to: through the data scheduling component, the following operations are performed: sending a protocol stack query request to a target application program corresponding to the target external equipment; and acquiring a protocol stack identifier fed back by the target application program, and determining a target protocol stack corresponding to the target external equipment according to the protocol stack identifier.
In an optional implementation manner of the embodiment of the present invention, optionally, when performing an operation of determining a target protocol stack corresponding to the target external device, the device data extraction module 202 is specifically configured to: and determining a target protocol stack corresponding to the target external device according to the corresponding relation between the device identifier and the protocol stack identifier through the data scheduling component.
In an optional implementation manner of the embodiment of the present invention, optionally, the data processing apparatus further includes: the write request receiving module is used for receiving a data write request corresponding to the target external device through the data scheduling component; the data writing request carries data to be written and a writing position identifier, wherein the writing position identifier is an address of a target storage module of the target external equipment; and the data writing module is used for calling the data access interface of the target external equipment according to the data writing request through the data scheduling component, accessing the target storage module of the target external equipment and writing the data to be written into the target storage module.
In an optional implementation manner of the embodiment of the present invention, optionally, when executing the operation of calling the data access interface of the target external device to access the device data storage module of the target external device to obtain the device data packet to be transmitted of the target external device, the device data reading module 201 is specifically configured to: invoking a data access interface of the target external device, and controlling the data access interface of the target external device to enter a polling non-blocking mode; and accessing the device data storage module of the target external device through the data access interface of the target external device to acquire the device data message to be transmitted of the target external device.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Example III
Fig. 3 shows a schematic diagram of an electronic device 10 that may be used to implement the data processing method of an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 3, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program built into the Random Access Memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as data processing methods.
In some embodiments, the data processing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When a computer program is built into RAM 13 and executed by processor 11, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data processing method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out data processing methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (9)

1. A data processing method applied to an industrial network operating system, comprising:
when the data scheduling component detects that the data reading condition corresponding to the target external equipment is reached, a data access interface of the target external equipment is called, and an equipment data storage module of the target external equipment is accessed to acquire an equipment data message to be transmitted of the target external equipment;
Determining a target protocol stack corresponding to the target external device through the data scheduling component, and sending a device data message to be transmitted of the target external device to the target protocol stack, so that the target protocol stack extracts device data in the device data message to be transmitted based on a communication protocol corresponding to the device data message to be transmitted;
transmitting the device data to a target application program corresponding to the target external device through the data scheduling component;
the determining a target protocol stack corresponding to the target external device includes:
through the data scheduling component, the following operations are performed:
sending a protocol stack query request to a target application program corresponding to the target external equipment;
and acquiring a protocol stack identifier fed back by the target application program, and determining a target protocol stack corresponding to the target external equipment according to the protocol stack identifier.
2. The method according to claim 1, wherein when the data scheduling component detects that a data reading condition corresponding to a target external device is reached, invoking a data access interface of the target external device, accessing a device data storage module of the target external device, and before obtaining a device data packet to be transmitted of the target external device, further comprising:
Transmitting preset protocol stack configuration information to each protocol stack;
transmitting preset driving module configuration information to driving modules of all external devices;
the preset protocol stack configuration information is used for disabling codes and/or processes related to the data reading and writing process of the external device in the protocol stack, and the preset driving module configuration information is used for canceling the working mode related to the data reading and writing process of the external device in the driving module.
3. The method according to claim 1, wherein when the data scheduling component detects that a data reading condition corresponding to a target external device is reached, invoking a data access interface of the target external device, accessing a device data storage module of the target external device, and before obtaining a device data packet to be transmitted of the target external device, further comprising:
setting the priority of a target protocol stack corresponding to the target external equipment as a preset priority;
and distributing the target physical core to the target protocol stack, and establishing a binding relation between the target physical core and the target protocol stack.
4. The method of claim 1, wherein the determining a target protocol stack corresponding to the target external device comprises:
And determining a target protocol stack corresponding to the target external device according to the corresponding relation between the device identifier and the protocol stack identifier through the data scheduling component.
5. The method as recited in claim 1, further comprising:
receiving a data writing request corresponding to the target external device through the data scheduling component; the data writing request carries data to be written and a writing position identifier, wherein the writing position identifier is an address of a target storage module of the target external equipment;
and calling a data access interface of the target external equipment according to the data writing request through the data scheduling component, accessing a target storage module of the target external equipment, and writing the data to be written into the target storage module.
6. The method of claim 1, wherein the calling the data access interface of the target external device to access the device data storage module of the target external device to obtain the device data packet to be transmitted of the target external device comprises:
invoking a data access interface of the target external device, and controlling the data access interface of the target external device to enter a polling non-blocking mode;
And accessing the device data storage module of the target external device through the data access interface of the target external device to acquire the device data message to be transmitted of the target external device.
7. A data processing apparatus configured in an industrial-scale network operating system, comprising:
the device data reading module is used for calling a data access interface of the target external device to access the device data storage module of the target external device to acquire a device data message to be transmitted of the target external device when the data reading condition corresponding to the target external device is detected to be reached through the data scheduling component;
the device data extraction module is used for determining a target protocol stack corresponding to the target external device through the data scheduling component, and sending a device data message to be transmitted of the target external device to the target protocol stack so that the target protocol stack extracts device data in the device data message to be transmitted based on a communication protocol corresponding to the device data message to be transmitted;
the device data sending module is used for sending the device data to a target application program corresponding to the target external device through the data scheduling component;
The device data extraction module is specifically configured to, when executing an operation of determining a target protocol stack corresponding to the target external device: through the data scheduling component, the following operations are performed: sending a protocol stack query request to a target application program corresponding to the target external equipment; and acquiring a protocol stack identifier fed back by the target application program, and determining a target protocol stack corresponding to the target external equipment according to the protocol stack identifier.
8. An electronic device, the electronic device comprising:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data processing method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions for causing a processor to implement the data processing method of any one of claims 1-6 when executed.
CN202211291680.8A 2022-10-19 2022-10-19 Data processing method, device, equipment and medium Active CN115525415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211291680.8A CN115525415B (en) 2022-10-19 2022-10-19 Data processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211291680.8A CN115525415B (en) 2022-10-19 2022-10-19 Data processing method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN115525415A CN115525415A (en) 2022-12-27
CN115525415B true CN115525415B (en) 2023-08-11

Family

ID=84703809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211291680.8A Active CN115525415B (en) 2022-10-19 2022-10-19 Data processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115525415B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637329A (en) * 2020-12-21 2021-04-09 网络通信与安全紫金山实验室 Identification method, device, equipment and storage medium of multiple application programs
CN113225344A (en) * 2021-05-10 2021-08-06 深信服科技股份有限公司 Access control method, device, equipment and readable storage medium
CN114697391A (en) * 2022-04-08 2022-07-01 北京百度网讯科技有限公司 Data processing method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637329A (en) * 2020-12-21 2021-04-09 网络通信与安全紫金山实验室 Identification method, device, equipment and storage medium of multiple application programs
CN113225344A (en) * 2021-05-10 2021-08-06 深信服科技股份有限公司 Access control method, device, equipment and readable storage medium
CN114697391A (en) * 2022-04-08 2022-07-01 北京百度网讯科技有限公司 Data processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115525415A (en) 2022-12-27

Similar Documents

Publication Publication Date Title
CN115794313B (en) Virtual machine debugging method, system, electronic device and storage medium
CN114564435A (en) Inter-core communication method, device and medium for heterogeneous multi-core chip
CN112905314A (en) Asynchronous processing method and device, electronic equipment, storage medium and road side equipment
CN115525415B (en) Data processing method, device, equipment and medium
CN116301676A (en) Printing equipment connection method, device, equipment and storage medium
CN115103024B (en) Sequence number generation method and device, electronic equipment and storage medium
CN113419880B (en) Cloud mobile phone root authority acquisition method, related device and computer program product
CN116743587B (en) Virtual network interface implementation method and device based on heterogeneous computing accelerator card
CN115174447B (en) Network communication method, device, system, equipment and storage medium
CN111124923B (en) Running state query method and device, server equipment and storage medium
CN116279215A (en) Data processing method and device, electronic equipment and storage medium
CN108694571A (en) A kind of method for processing business and device based on multi-process
CN117453613A (en) Multi-channel serial port communication method, device, system, equipment and storage medium
CN116126409A (en) Method, device, equipment and medium for acquiring and modifying system configuration information
CN116095196A (en) Data transparent transmission method, device, equipment and medium
CN118092280A (en) Controller data calibration system, method and device, electronic equipment and storage medium
CN117785264A (en) Interface configuration method, device and storage medium for server operation and maintenance
CN117081939A (en) Traffic data processing method, device, equipment and storage medium
CN117651078A (en) Data transmission method and device, electronic equipment and storage medium
CN117271398A (en) Low-power interface control method, device, equipment and storage medium
CN116185695A (en) Log processing method and device, electronic equipment and storage medium
CN116781572A (en) Service availability detection method, device, equipment and storage medium
CN114416040A (en) Page construction method, device, equipment and storage medium
CN118093211A (en) Distributed lock processing method, device, equipment and medium
CN117493000A (en) Task processing method, device, equipment and medium

Legal Events

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