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

Data processing method, device, equipment and medium Download PDF

Info

Publication number
CN115525415A
CN115525415A CN202211291680.8A CN202211291680A CN115525415A CN 115525415 A CN115525415 A CN 115525415A CN 202211291680 A CN202211291680 A CN 202211291680A CN 115525415 A CN115525415 A CN 115525415A
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.)
Granted
Application number
CN202211291680.8A
Other languages
Chinese (zh)
Other versions
CN115525415B (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

Images

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 data processing device, data processing equipment and a data processing medium. The method comprises the following steps: calling a data access interface of the target external equipment through the data scheduling component when detecting that a data reading condition corresponding to the target external equipment is reached, 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; determining a target protocol stack corresponding to target external equipment through a data scheduling component, and sending an equipment data message to be transmitted to the target protocol stack so that the target protocol stack extracts equipment data in the equipment data message to be transmitted based on a communication protocol corresponding to the equipment data message to be transmitted; and sending 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 acquired in time and transmitted to the application program according to the device data acquisition requirement of the application program, so that 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-level network operating system belongs to a microkernel real-time operating system and can run a plurality of virtual machines. Such as Intewell industrial-grade network operating systems. Each virtual machine in the industrial level network operating system of the industrial server is managed by the microkernel, and the 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, and different industrial production requirements are met. In order to accurately control the external device, each application 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 as follows: the protocol stack in the operating system sends out inquiries at regular time, and sequentially inquires whether the driver module of each connected external device has a device data message which needs to be sent to the application program. If the device data queue exists, the protocol stack acquires the device data message, analyzes the device data message based on the communication protocol corresponding to the device data message, extracts the device data in the device data message, and adds the device data to the device data queue. And when the application program calls the protocol stack, the protocol stack acquires the equipment data from the equipment data queue and sends the equipment data to the application program.
In a data transmission scheme of the related art, a protocol stack acquires an equipment data message by using a polling mode, analyzes the equipment data message, extracts equipment data in the equipment data message, adds the equipment data to an equipment data queue, and then sends the equipment data in the equipment data queue to an application program when the application program calls a preset interface of the protocol stack, so that the equipment data of external equipment cannot be transmitted to a corresponding application program in time, and data information lags.
Disclosure of Invention
The invention provides a data processing method, a data processing device, data processing equipment and a data processing medium, which are used for solving the problem that data information lags because specified equipment data of external equipment cannot be transmitted to a corresponding application program in time in a data transmission scheme of the related technology.
According to an aspect of the present invention, there is provided a data processing method applied to an industrial network operating system, including:
through a data scheduling component, when detecting that a data reading condition corresponding to a target external device is reached, calling a data access interface of the target external device, accessing a device data storage module of the target external device, and acquiring a device data message to be transmitted of the target external device;
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 network operating system, including:
the device data reading module is used for calling a data access interface of the target external device through the data scheduling component when detecting that a data reading condition corresponding to the target external device is reached, accessing a device data storage module of the target external device and acquiring a device data message to be transmitted of the target external device;
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 equipment data sending module is used for sending the equipment data to a target application program corresponding to the target external equipment 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, the computer program being executable by the at least one processor to enable the at least one processor to perform the data processing method according to any of the embodiments of the 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 implement a data processing method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, when the data reading condition corresponding to the target external equipment is detected to be reached, the data access interface of the target external equipment is called through the data scheduling component, the equipment data storage module of the target external equipment is accessed, and the equipment data message to be transmitted of the target external equipment is obtained; then, a target protocol stack corresponding to the target external equipment is determined through a data scheduling component, and the equipment data message to be transmitted of the target external equipment is sent to the target protocol stack, so that the target protocol stack extracts the equipment data in the equipment data message to be transmitted based on the communication protocol corresponding to the equipment data message to be transmitted; and finally, the device data is sent to a target application program corresponding to the target external device through a data scheduling component, so that the problem of data information lag caused by incapability of transmitting the device data of the external device to the corresponding application program in a data transmission scheme of the related art is solved, the device data acquisition requirement according to the application program is acquired, a device data storage module of the external device controlled by the application program is accessed, a device data message containing the device data is quickly acquired, the device data of the external device in the device data message is extracted and transmitted to the application program, the device data of the external device is ensured to be transmitted to the corresponding application program in time, the data information lag is avoided, and the external device is conveniently and accurately controlled by the application program.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1A is a flowchart of a data processing method according to an embodiment of the present invention.
Fig. 1B is a schematic diagram of 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 the data processing method according to the embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "object," "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or 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 one
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 and an external device controlled by the application. The method may be performed by a data processing apparatus, which may be implemented in hardware and/or software, which may be configured in an industrial-grade network operating system. As shown in fig. 1A, the method includes:
step 101, calling a data access interface of a target external device through a data scheduling component when detecting that a data reading condition corresponding to the target external device is reached, accessing a device data storage module of the target external device, and acquiring a device data message to be transmitted of the target external device.
Optionally, the target external device is an external device operating under the control of an industrial network operating system. A plurality of external devices operate under the control of an industrial-level network operating system.
Optionally, each external device is configured to collect device data of itself, generate a device data packet to be transmitted according to the collected device data, and store the device data packet to be transmitted in the 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 acquired device data based on a 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 device data message to be transmitted is an EtherCAT message, a PROFINET message, a canopy message or a Modbus message containing device data.
Alternatively, the device data may be one or more device parameters associated with the external device. Illustratively, the external device is an electric 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 electric motor.
Optionally, the device data storage module is a storage module, which is arranged in the external device and is used for storing a device data packet to be transmitted by the external device. The Memory module may be a Direct Memory Access (DMA) controller or a 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.
Optionally, the target application corresponding to the target external device is an application running in an industrial-level network operating system of the industrial server and 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 specified data into the target external device.
Optionally, the target protocol stack corresponding to the target external device is disposed in an industrial network operating system of the industrial server, and may establish a communication connection with a driver module of the target external device based on a communication protocol used by the target external device, and may 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 obtain 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, from the message based on a communication protocol corresponding to the message. The target protocol stack can also acquire 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 network operating system of the industrial server, and is used for assisting the application program to obtain device data of the controlled external device in time, or write specified data into the controlled external device.
Optionally, the data scheduling component is connected to each protocol stack, and may 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 method further includes, before invoking a data access interface of the target external device, accessing a device data storage module of the target external device, and acquiring a device data packet to be transmitted of the target external device: sending preset protocol stack configuration information to each protocol stack; sending preset drive module configuration information to the drive modules of the external devices; the preset protocol stack configuration information is used for disabling codes and/or processes in the protocol stack related to the data read-write process of the external device, and the preset drive module configuration information is used for canceling working modes in the drive module related to the data read-write process of the external device. After the industrial network operating system is started, preset protocol stack configuration information is sent to each protocol stack, each protocol stack is configured, preset driving module configuration information is sent to a driving module of each external device, and the driving module of each external device is configured.
Optionally, when it is detected 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 acquiring a device data packet to be transmitted of the target external device, includes: when a data reading request corresponding to 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 reading request corresponding to the target external device is used to request to obtain device data of the target external device. And the target application program responsible for controlling the target external equipment sends the data reading request corresponding to the target external equipment to the data scheduling component. And when receiving a data reading request corresponding to the target external equipment, the data scheduling component calls a data access interface of the target external equipment, accesses an equipment data storage module of the target external equipment and acquires an equipment data message to be transmitted of the target external equipment.
Optionally, when detecting 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 acquiring a device data packet to be transmitted of the target external device, including: and 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 multiple device data messages to be transmitted of the target external device, and is used for the auxiliary data scheduling component to periodically acquire the device data messages to be transmitted of the target external device. Illustratively, the device data message 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 device and used for accessing the specified storage module of the target external device when receiving a read operation request or a write operation request sent by other equipment or the function module, feeding data in the specified storage module back to the other equipment or the function module, or writing the specified data into the specified storage module. The read operation request is used for requesting to acquire data in a specified storage module. The write operation request is used for requesting to write specified data into a specified storage module.
Optionally, when detecting that the data reading condition corresponding to the target external device is reached, the data scheduling component sends the reading 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. The reading operation request corresponding to the target external device carries the address of the device data storage module of the target external device. Communication interfaces include, but are not limited to, serial, network, and CAN ports. When receiving the read operation request, the data access interface of the target external device accesses 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, obtains a device data message to be transmitted of the target external device from the device data storage module of the target external device, feeds the device data message to be transmitted of the target external device back to the data scheduling component, and determines that the read operation request processing is completed.
Optionally, the invoking a data access interface of the target external device, accessing a device data storage module of the target external device, and acquiring a device data packet to be transmitted of the target external device includes: calling a data access interface of the target external equipment, and controlling the data access interface of the target external equipment 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 detecting that a 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 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 reading operation request corresponding to the target external device carries the address of the device data storage module of the target external device. Communication interfaces include, but are not limited to, serial, network, and CAN ports. And when the data access interface of the target external device receives the reading 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. And the data access interface of the target external equipment acquires the equipment data message to be transmitted of the target external equipment from the equipment data storage module of the target external equipment, feeds the equipment data message to be transmitted of the target external equipment back to the data scheduling component, determines that the processing of the reading operation request is finished, 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 method further includes, before calling a data access interface of the target external device, accessing a device data storage module of the target external device, and acquiring a device data packet to be transmitted of the target external device: 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 relationship between the target physical core and the target protocol stack. After the industrial network operating system is started, setting one protocol stack in the industrial network operating system as a target protocol stack corresponding to the target external device, then setting the priority of the target protocol stack corresponding to the target external device as a preset priority, allocating a target physical core to the target protocol stack, and establishing a binding relationship between the target physical core and the target protocol stack. The predetermined priority is a higher priority. The target physical core is a physical core in the operating system. The target protocol stack may process the packet 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: performing, by the data scheduling component, the following: sending a protocol stack query request to a target application program corresponding to the target external device; 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 to request to acquire a protocol stack identifier of a target protocol stack corresponding to the target external device. The target application program stores the protocol stack identification of the target protocol stack corresponding to the target external device. And sending a protocol stack query request to a target application program corresponding to the target external equipment through the data scheduling component. And the protocol stack query request carries the equipment identifier of the target external equipment. And after receiving the protocol stack query request, the target application program feeds back the protocol stack identifier of the target protocol stack corresponding to the target external equipment to the data scheduling component.
Optionally, the protocol stack identifier of the protocol stack is information for uniquely identifying the protocol stack. The protocol stack identities of the different protocol stacks differ. The protocol stack identification may be a numerical 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 numeric 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 equipment according to the corresponding relation between the equipment identifier and the protocol stack identifier through the data scheduling component. The data scheduling component stores the device identifier of each external device and the protocol stack identifier of the protocol stack corresponding to each external device, and establishes a correspondence between the device identifier of the external device and the protocol stack identifier of the protocol stack corresponding to each external device, that is, a correspondence between the device identifier and the protocol stack identifier. The data scheduling component inquires the device identification which is the same as the device identification of the target external device from the stored device identifications of the external devices, determines the protocol stack identification of the protocol stack corresponding to the inquired device identification as the protocol stack identification of the target protocol stack corresponding to the target external device, and determines the target protocol stack corresponding to the target external device according to the protocol stack identification.
Optionally, the data scheduling component determines a target protocol stack corresponding to the target external device, and then sends the device data packet to be transmitted of the target external device to the target protocol stack. The target protocol stack receives the device data message to be transmitted of the target external device, extracts the device data in the device data message to be transmitted based on the 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 103, sending the device data to a target application program corresponding to the target external device through the data scheduling component.
Optionally, the data scheduling component sends the device data in the device data packet to be transmitted, which is fed back by the target protocol stack, to a target application program corresponding to the target external device. And the target application program receives the equipment data and processes the equipment data.
Optionally, the method further includes: receiving, by the data scheduling component, a data write request corresponding to the target external device; 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 device; 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 write request corresponding to the target external device is used to request to write the specified data into a 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 specified storage module of the target external equipment and writes specified data into the specified storage module of the target external equipment.
Optionally, the data to be written is data that needs 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, calling a data access interface of the target external device according to the data writing request, 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 equipment, and controlling the data access interface of the target external equipment 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 a data write request corresponding to the target external device, the data scheduling component sends the write 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, then feeds back writing completion prompt information to the data scheduling component, determines that the writing operation request is processed completely, and releases a polling non-blocking mode. The write completion prompt information is used to prompt the completion of the processing of the write operation request.
Therefore, according to the data writing requirement 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 guaranteed to write the data into the corresponding external device in time, data information lag is avoided, and the application program can conveniently and accurately control the external device.
According to the technical scheme of the embodiment of the invention, when the data reading condition corresponding to the target external equipment is detected to be reached, the data access interface of the target external equipment is called through the data scheduling component, the equipment data storage module of the target external equipment is accessed, and the equipment data message to be transmitted of the target external equipment is obtained; then, a target protocol stack corresponding to the target external equipment is determined through a data scheduling component, and the equipment data message to be transmitted of the target external equipment is sent to the target protocol stack, so that the target protocol stack extracts the equipment data in the equipment data message to be transmitted based on the communication protocol corresponding to the equipment data message to be transmitted; and finally, the device data is sent to a target application program corresponding to the target external device through a data scheduling component, so that the problem of data information lag caused by incapability of transmitting the device data of the external device to the corresponding application program in a data transmission scheme of the related art is solved, the device data acquisition requirement according to the application program is acquired, a device data storage module of the external device controlled by the application program is accessed, a device data message containing the device data is quickly acquired, the device data of the external device in the device data message is extracted and transmitted to the application program, the device data of the external device is ensured to be transmitted to the corresponding application program in time, the data information lag is avoided, and the external device is conveniently and accurately controlled by the application program.
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 work server, and may perform information interaction with the target external device 112. The data scheduling component 111 is connected to the target protocol stack 113, and may perform information interaction with the target protocol stack 113. The data scheduling component 111 may transmit 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-grade 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, when detecting that a data reading condition corresponding to a target external device is reached through a data scheduling component, invoke a data access interface of the target external device, access a device data storage module of the target external device, and acquire a device data packet to be transmitted of the target external device; the device data extraction module 202 is configured to determine, through 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; a device data sending module 203, configured to send the device data to a target application corresponding to the target external device through the data scheduling component.
According to the technical scheme of the embodiment of the invention, when the data reading condition corresponding to the target external equipment is detected to be reached, the data access interface of the target external equipment is called through the data scheduling component, the equipment data storage module of the target external equipment is accessed, and the equipment data message to be transmitted of the target external equipment is obtained; then, a target protocol stack corresponding to the target external equipment is determined through a data scheduling component, and the equipment data message to be transmitted of the target external equipment is sent to the target protocol stack, so that the target protocol stack extracts the equipment data in the equipment data message to be transmitted based on the communication protocol corresponding to the equipment data message to be transmitted; and finally, the device data is sent to a target application program corresponding to the target external device through a data scheduling component, so that the problem of data information lag caused by incapability of transmitting the device data of the external device to the corresponding application program in a data transmission scheme of the related art is solved, the device data acquisition requirement according to the application program is acquired, a device data storage module of the external device controlled by the application program is accessed, a device data message containing the device data is quickly acquired, the device data of the external device in the device data message is extracted and transmitted to the application program, the device data of the external device is ensured to be transmitted to the corresponding application program in time, the data information lag is avoided, and the external device is conveniently and accurately controlled by the application program.
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 drive module configuration information to the drive modules of the external devices; the preset protocol stack configuration information is used for disabling codes and/or processes in the protocol stack related to the data read-write process of the external device, and the preset drive module configuration information is used for canceling working modes in the drive module related to the data read-write process of the external device.
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 the target physical core to the target protocol stack and establishing the binding relationship between the target physical core and the target protocol stack.
In an optional implementation manner of the embodiment of the present invention, optionally, when the device data extraction module 202 executes an operation of determining the target protocol stack corresponding to the target external device, specifically, the operation is to: performing, by the data scheduling component, the following: sending a protocol stack query request to a target application program corresponding to the target external device; 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 the device data extraction module 202 executes an operation of determining the target protocol stack corresponding to the target external device, specifically, the operation is to: and determining a target protocol stack corresponding to the target external equipment according to the corresponding relation between the equipment 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: a write request receiving module, configured to receive, through the data scheduling component, a data write request corresponding to the target external device; 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 device; and the data writing module is used for 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.
In an optional implementation manner of the embodiment of the present invention, optionally, when the device data reading module 201 executes an operation of invoking a data access interface of the target external device, accessing the device data storage module of the target external device, and acquiring the device data packet to be transmitted of the target external device, specifically, the operation is to: calling a data access interface of the target external equipment, and controlling the data access interface of the target external equipment 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.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
EXAMPLE III
Fig. 3 shows a schematic structural diagram of an electronic device 10 that can be used to implement the data processing method of the embodiment of the present 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. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, 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 communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program built from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 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.
A number of 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, or the like; 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 dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as a data processing method.
In some embodiments, the data processing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as 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 the computer program is built into the RAM 13 and executed by the 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 by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a 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 that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the data processing method 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 performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a 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. A 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 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) by 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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. A client and server are generally 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 host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A data processing method is applied to an industrial network operating system and is characterized by comprising the following steps:
calling a data access interface of the target external equipment through a data scheduling component when detecting that a data reading condition corresponding to the target external equipment is reached, 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;
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.
2. The method according to claim 1, wherein 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 to access a device data storage module of the target external device, and before a device data packet to be transmitted of the target external device is acquired, the method further comprises:
sending preset protocol stack configuration information to each protocol stack;
sending preset drive module configuration information to the drive modules of the external devices;
the preset protocol stack configuration information is used for disabling codes and/or processes in the protocol stack related to the data read-write process of the external device, and the preset drive module configuration information is used for canceling working modes in the drive module related to the data read-write process of the external device.
3. The method according to claim 1, wherein 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 to access a device data storage module of the target external device, and before a device data packet to be transmitted of the target external device is acquired, the method further comprises:
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 relationship between the target physical core and the target protocol stack.
4. The method of claim 1, wherein determining the target protocol stack corresponding to the target external device comprises:
performing, by the data scheduling component, the following:
sending a protocol stack query request to a target application program corresponding to the target external device;
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.
5. The method of claim 1, wherein determining the target protocol stack corresponding to the target external device comprises:
and determining a target protocol stack corresponding to the target external equipment according to the corresponding relation between the equipment identifier and the protocol stack identifier through the data scheduling component.
6. The method of claim 1, further comprising:
receiving, by the data scheduling component, a data write request corresponding to the target external device; 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 device;
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.
7. The method according to claim 1, wherein the invoking a data access interface of the target external device to access a device data storage module of the target external device to obtain the device data packet to be transmitted of the target external device comprises:
calling a data access interface of the target external equipment, and controlling the data access interface of the target external equipment 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.
8. 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 through the data scheduling component when detecting that a data reading condition corresponding to the target external device is achieved, accessing the device data storage module of the target external device and acquiring a device data message to be transmitted of the target external device;
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 equipment data sending module is used for sending the equipment data to a target application program corresponding to the target external equipment through the data scheduling component.
9. An electronic device, characterized in that the electronic device comprises:
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, the computer program being 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-7.
10. A computer-readable storage medium, characterized in that it stores computer instructions for causing a processor to implement the data processing method of any of claims 1-7 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 true CN115525415A (en) 2022-12-27
CN115525415B 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
CN115525415B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
CN114936064B (en) Access method, device, equipment and storage medium of shared memory
CN115794313B (en) Virtual machine debugging method, system, electronic device and storage medium
EP2804361B1 (en) Integrated interface system for power-system monitoring and control system
CN112905314A (en) Asynchronous processing method and device, electronic equipment, storage medium and road side equipment
CN114936173B (en) Read-write method, device, equipment and storage medium of eMMC device
CN101980170B (en) Communication method, system and device for software module in microkernel system
CN115525415A (en) Data processing method, device, equipment and medium
CN115756322A (en) Data storage method and device, electronic equipment and storage medium
CN115933591A (en) Controller diagnosis method, device, equipment and storage medium
CN115571790A (en) Tower crane binding control method and device, handheld terminal and tower crane controller
CN115599438A (en) Method, device, equipment and medium for constructing application program publishing package
CN114500105A (en) Network packet interception method, device, equipment and storage medium
CN116633955A (en) Communication method, device, vehicle, medium and equipment
CN116743587B (en) Virtual network interface implementation method and device based on heterogeneous computing accelerator card
CN116450120B (en) Method, device, equipment and medium for analyzing kernel of real-time operating system
CN115086164B (en) Policy issuing method, system, device and computer readable storage medium
CN109669422B (en) Real-time data acquisition system
CN117081939A (en) Traffic data processing method, device, equipment and storage medium
CN118250313A (en) Target equipment monitoring method, internet of things system, electronic equipment and storage medium
CN117453613A (en) Multi-channel serial port communication method, device, system, equipment and storage medium
CN114416040A (en) Page construction method, device, equipment and storage medium
CN118058831A (en) Mechanical arm configuration method, device and equipment of surgical robot system and storage medium
CN118377677A (en) Multi-server process monitoring method and device, electronic equipment and storage medium
CN115526507A (en) Battery replacement station management method and device, electronic equipment and storage medium
CN117555650A (en) Method and device for communication between virtual machines, electronic equipment and storage 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