Data processing method, apparatus, and electronic device

By generating and compiling data recording code based on data configuration files, the problem of increasing data recording workload and difficult to guarantee data integrity caused by user-defined formats and solutions in AP AUTOSAR scheme is solved, and automated data recording and playback functions are realized, reducing user workload and ensuring data integrity.

CN114035862BActive Publication Date: 2025-06-27SUZHOU ZHITU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111311900.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-08
Publication Date
2025-06-27
Estimated Expiration
2041-11-08

AI Technical Summary

Technical Problem

When using the AP AUTOSAR scheme, users need to customize the format and scheme to record communication data, resulting in large differences in data types and formats, which increases the workload of users to record data. If the published software does not integrate data recording code, it cannot record again, making it difficult to ensure the integrity of data recording.

Method used

By generating data recording code based on the pre-acquisitioned data configuration file, a data recording module is compiled and generated, and the target data is received and saved through the module. This method does not require the user to integrate the functional module for recording data in the code, which reduces the user's workload and does not affect the functions of the published data recording module.

Benefits of technology

It realizes automatic generation of data recording codes based on data configuration files, reduces the workload of users to record data, and ensures the integrity of data recording, and is suitable for scenarios where data needs to be recorded and played back.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114035862B_ABST
    Figure CN114035862B_ABST
Patent Text Reader

Abstract

The present invention provides a data processing method, apparatus and electronic device, which generate data recording codes based on a pre-acquired data configuration file; wherein, the data configuration file includes information of a first data sending port; the data recording codes carry information of a first data receiving port corresponding to the first data sending port; compile the data recording codes to generate a data recording module including the first data receiving port; start the data recording module to determine target data from a pre-acquired data list; receive and save the target data through the first data receiving port of the data recording module. This way can automatically generate data recording codes according to a pre-acquired data configuration file, without the need to separately integrate a function module for recording data in the data recording codes, reducing the workload of users for recording data, and for the already released data recording module, it will not affect the function of recording data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] AUTOSAR (Automotive Open System Architecture) is an open and standardized automotive electronic software architecture, which is jointly established by global automotive manufacturers, component suppliers, and other electronics, semiconductor, and software system companies. When using the AP AUTOSAR (Adaptive Platform Automotive Open System Architecture) solution, it is sometimes necessary to record relevant communication data. In related technologies, each user usually adopts a custom format and solution. For example, when a user needs to record camera communication data, the user usually defines the data types, formats, etc. that are required when publishing or subscribing to camera data EVENTS, and stores the data. In this method, the data types and formats stored by each user vary greatly, and it is necessary for the user to integrate a function module for recording data in the written code to record the data, which increases the workload of the user for recording data. For software that has been released, if the relevant data recording code is not integrated, it is impossible to record again, and it is difficult to ensure the integrity of data recording. Summary of the Invention

[0003] The purpose of the present invention is to provide a data processing method, apparatus, and electronic device to reduce the workload of users for recording data and ensure the integrity of data recording at the same time.

[0004] A data processing method provided by the present invention includes: generating data recording code based on a pre-acquired data configuration file; where the data configuration file includes information about a first data sending port; the data recording code carries information about a first data receiving port corresponding to the first data sending port; compiling the data recording code to generate a data recording module; where the data recording module includes the first data receiving port; starting the data recording module to determine target data from a pre-acquired data list; receiving and saving the target data through the first data receiving port of the data recording module.

[0005] Further, the step of generating a data recording code based on a pre-acquired data configuration file includes: reading the pre-acquired data configuration file through a preset script; wherein, the data configuration file includes information of a first data sending port; receiving a first instruction issued by a user and generating the data recording code; wherein, the data recording code carries information of a first data receiving port corresponding to the first data sending port.

[0006] Further, the step of starting the data recording module to determine target data from a preset data list includes: receiving a start instruction issued by a user; based on the start instruction, starting the data recording module, and determining target data that meets the subscription condition from the pre-acquired data list based on a pre-configured subscription condition.

[0007] Further, there are multiple first data sending ports and multiple first data receiving ports, and the first data sending ports and the first data receiving ports are in one-to-one correspondence; the step of receiving and saving the target data through the first data receiving port of the data recording module includes: determining, in the data recording module, a target data receiving port corresponding to a target data sending port that sends the target data; receiving and saving the target data through the target data receiving port.

[0008] Further, the method further includes: starting a pre-generated data playback module; wherein, the data playback module includes a second data sending port corresponding to the first data sending port; if a subscription request for sub-target data is received from a client, acquiring the sub-target data; sending the sub-target data to the client through the second data sending port so that the sub-target data can be played back through the client.

[0009] Further, the data playback module is generated in the following manner: generating a data playback code based on a pre-acquired data configuration file; wherein, the data playback code carries information of the second data sending port corresponding to the first data sending port; compiling the data playback code to generate the data playback module; wherein, the data playback module includes the second data sending port.

[0010] A data processing device provided by the present invention, the device includes: a generation module, configured to generate data recording codes based on a pre-acquired data configuration file; wherein, the data configuration file includes information of a first data sending port; the data recording codes carry information of a first data receiving port corresponding to the first data sending port; a compilation module, configured to compile the data recording codes to generate a data recording module; wherein, the data recording module includes the first data receiving port; a start module, configured to start the data recording module and determine target data from a pre-acquired data list; a receiving module, configured to receive and save the target data through the first data receiving port of the data recording module.

[0011] Further, the generation module is further configured to: read the pre-acquired data configuration file through a preset script; wherein, the data configuration file includes information of a first data sending port; receive a first instruction issued by a user and generate the data recording codes; wherein, the data recording codes carry information of a first data receiving port corresponding to the first data sending port.

[0012] An electronic device provided by the present invention includes a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the data processing method described in any one of the above.

[0013] A machine-readable storage medium provided by the present invention, the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the data processing method described in any one of the above.

[0014] The data processing method, device and electronic device provided by the present invention generate data recording codes based on a pre-acquired data configuration file; wherein, the data configuration file includes information of a first data sending port; the data recording codes carry information of a first data receiving port corresponding to the first data sending port; compile the data recording codes to generate a data recording module; wherein, the data recording module includes the first data receiving port; start the data recording module and determine target data from a pre-acquired data list; receive and save the target data through the first data receiving port of the data recording module. This method can automatically generate data recording codes according to the pre-acquired data configuration file, without the need to separately integrate a function module for recording data in the data recording codes, reducing the workload of users for recording data, and for the already released data recording module, it will not affect the function of recording data. Description of the Drawings

[0015] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0016] Figure 1 Flowchart of a data processing method provided by an embodiment of the present invention;

[0017] Figure 2 Schematic diagram of the architecture of a data recording system provided by an embodiment of the present invention;

[0018] Figure 3 Flowchart of another data processing method provided by an embodiment of the present invention;

[0019] Figure 4 Schematic diagram of the architecture of a data playback system provided by an embodiment of the present invention;

[0020] Figure 5 Schematic diagram of an event data communication structure provided by an embodiment of the present invention;

[0021] Figure 6 Flowchart of another data processing method provided by an embodiment of the present invention;

[0022] Figure 7 Schematic diagram of the structure of a data processing device provided by an embodiment of the present invention;

[0023] Figure 8 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Specific Embodiments

[0024] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the embodiments. Obviously, the described embodiments are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0025] Currently, for data recording and playback based on AP AUTOSAR, there is no defined general design solution. When using the AP AUTOSAR solution, if communication data needs to be recorded, each user usually adopts a custom format and solution. For example, when recording camera communication data, the user usually defines the required data types, formats, etc. when publishing or subscribing to camera data events and stores the data. When playback is required, the user also needs to parse and playback the data according to the defined data format. This method requires the user to integrate the function module for recording data in the written code to record the data, increasing the workload of the user for recording data. For the already released software, if the relevant data recording code is not integrated, it cannot be recorded again. The data publishing requires writing code by oneself for parsing and data playback, increasing the workload of the user for recording and playback data.

[0026] Based on this, the embodiments of the present invention provide a data processing method, apparatus and electronic device, and this technology can be applied to scenarios where data needs to be recorded and played back.

[0027] For the convenience of understanding this embodiment, first, a data processing method disclosed in the embodiments of the present invention will be introduced in detail; as Figure 1 shown, the method includes the following steps:

[0028] Step S102, generate data recording code based on a pre-obtained data configuration file; wherein, the data configuration file includes information of a first data sending port; the data recording code carries information of a first data receiving port corresponding to the first data sending port.

[0029] The above data configuration file can be an ARXML file or the like. In the AP AUTOSAR architecture, the ARXML file (where the full English name of XML is: eXtensible Markup Language, and XML is an extensible markup language) serves as a general configuration file or database file and plays a key role in data transmission and storage. In actual implementation, since the event communication in AP AUTOSAR is statically configured, the event data sending interfaces existing in the system servers, that is, the above-mentioned first data sending ports, are defined during system design, and an arxml file, that is, the above data configuration file, will be generated during configuration. When data needs to be recorded, it is usually necessary to first obtain this data configuration file. Based on this data configuration file, data recording code is generated. For example, the data configuration file can be read through a script to generate this data recording code. The generated data recording code usually includes information about the first data receiving port corresponding to the first data sending port. For example, information about the first data receiving port that matches the relevant attributes of the first data sending port of the server, etc.

[0030] Step S104, compile the data recording code to generate a data recording module; where the data recording module includes the first data receiving port.

[0031] The above data recording module can also be called a data recorder or data recording software, and this data recording software is a publishable software. After the above data recording code is generated, it can be compiled to generate a data recording module, where the data recording module includes the first data receiving port that matches the first data sending port.

[0032] Step S106, start the data recording module and determine the target data from the pre-obtained data list.

[0033] The above data list can be an event data list; users can view all recordable event data in the form of a command line or a host computer, etc. For example, all subscribable event data in the server can be viewed, etc. In actual implementation, a data list composed of all subscribable data can be pre-obtained from devices such as servers, the data recording module is started, and the target data is filtered out from this data list.

[0034] Step S108, receive and save the target data through the first data receiving port of the data recording module.

[0035] After obtaining the above target data, the target data can be received through the first data receiving port of the data recording module. For example, the server sends the target data through the first data sending port and sends the target data to the first data receiving port corresponding to the first data sending port in the data recording module, so that an electronic device equipped with the data recording module, such as a terminal device, can receive the target data and save the target data to the local disk. For example, it can be saved in a file set locally, or the received target data can be sent to the host computer to save the target data in the host computer. When saving the target data, the sending time, data format, content, etc. of the target data usually need to be included to facilitate subsequent playback of the target data.

[0036] The above data processing method generates data recording code based on a pre-obtained data configuration file. Among them, the data configuration file includes information about the first data sending port; the data recording code carries information about the first data receiving port corresponding to the first data sending port; the data recording code is compiled to generate a data recording module. Among them, the data recording module includes a first data receiving port; the data recording module is started to determine target data from a pre-obtained data list; the target data is received and saved through the first data receiving port of the data recording module. This method can automatically generate data recording code according to a pre-obtained data configuration file, without the need to separately integrate a function module for recording data in the data recording code, reducing the workload of users for recording data, and for an already released data recording module, it will not affect the function of recording data.

[0037] The embodiment of the present invention also provides another data processing method, which is implemented on the basis of the method in the above embodiment. In this method, there are multiple first data sending ports and multiple first data receiving ports, and the first data sending ports and the first data receiving ports are in one-to-one correspondence. For example, the server is used as the data sender, and the electronic device equipped with the data recording module is used as the data receiver. Multiple first data sending ports are pre-set on the server, and each first data sending port can have different port attributes, etc. Then, multiple first data receiving ports are usually generated on the data recording module. The number of first data receiving ports is usually the same as that of the first data sending ports and is in one-to-one correspondence. Specifically, a first data receiving port matching the port attribute of each first data sending port can be generated for each first data sending port. For example, referring to Figure 2 a schematic diagram of a data recording system architecture shown in Figure 2 (a) and Figure 2Both (b) include Server 1, Server 2, Server 3, and an event data recorder (corresponding to the data recording module). The event sending ports (corresponding to the first data sending ports) in each server are connected to the event receiving ports (corresponding to the first data receiving ports) in the event data recorder in a one-to-one correspondence.

[0038] As Figure 3 shown, the method includes the following steps:

[0039] Step S302, read the pre-acquired data configuration file through a preset script; wherein, the data configuration file includes information about the first data sending port.

[0040] The above preset script can be a script tool pre-written by the user, etc.; in actual implementation, when the data configuration file is acquired, the data configuration file can be read through the preset script.

[0041] Step S304, receive the first instruction issued by the user and generate a data recording code; wherein, the data recording code carries information about the first data receiving port corresponding to the first data sending port.

[0042] The above first instruction can be a confirmation instruction issued by the user, etc.; for example, after reading the data configuration file through a script tool pre-written by the user, the user can click the confirmation instruction in the script tool, and after clicking the confirmation, a data recording code is generated.

[0043] Step S306, compile the data recording code to generate a data recording module; wherein, the data recording module includes the first data receiving port.

[0044] Step S308, receive the start instruction issued by the user.

[0045] Step S310, based on the start instruction, start the data recording module, and based on the pre-configured subscription conditions, determine the target data that meets the subscription conditions from the pre-acquired data list.

[0046] The above subscription conditions can be understood as some conditions set by the user, such as saved files, recorded time, maximum amount of recorded data, etc. The user only subscribes to the data that meets the set conditions. Specifically, the subscription conditions can be set according to actual needs; in actual implementation, since the amount of data contained in the pre-acquired data list is large, the user may only be concerned about a small part of the data. At this time, the user can configure the required subscription conditions through the upper computer or command line, etc. After starting the data recording module, the target data that meets the subscription conditions can be determined from the data list to subscribe to these target data.

[0047] Step S312: Determine, in the data recording module, the target data receiving port corresponding to the target data sending port for sending the target data.

[0048] Since there may be multiple first data sending ports and multiple first data receiving ports, and each first data sending port corresponds to a first data receiving port one by one, when the target data that meets the subscription condition is determined, based on the target data sending port for sending the target data, the target data receiving port corresponding to the target data sending port can be determined from the multiple first data receiving ports included in the data recording module. For example, the data receiving port connected to the target data sending port is the target data receiving port.

[0049] Step S314: Receive and save the target data through the target data receiving port.

[0050] The target data can be saved to the local storage area. Considering that directly storing it in the local hard disk may cause problems such as excessive consumption of local storage space, and it is relatively difficult to increase the storage space after the hardware design is completed. In addition, when the data volume is very large, problems such as the inability to store data in a timely manner due to the hard disk IO performance may occur. Therefore, the above target data can also be saved to the host computer. If the target data is saved to the host computer, the above data recording module is usually used for data forwarding, that is, the data recording module can be used as a data recording forwarder. A sub-recording module can be preset in the host computer. When an electronic device with a data recording module, such as a terminal device, receives the target data through the target data receiving port, the target data can be sent to the sub-recording module in the host computer. After receiving the target data, the sub-recording module can save the target data to the corresponding storage space in the host computer; as Figure 2 (b) shows, the output end of the event data recorder is connected to the input end of the event data sub-recorder of the host computer, and the target data can be forwarded to the event data sub-recorder of the host computer. This way of saving the target data to the host computer does not need to be recorded locally, so it does not need to occupy local storage space and is not affected by the IO performance of local storage, thus ensuring the timeliness of storing data. In addition, putting the data recording function on the host computer software, since the expansion performance of the storage space corresponding to the host computer is better, and the IO performance of the host computer is better than the hardware IO performance, this method can alleviate the problems of insufficient local storage space and insufficient local storage IO performance when recording a large amount of data such as from a camera.

[0051] The above data processing method reads a pre-acquired data configuration file through a preset script, receives a first instruction issued by a user, generates a data recording code, compiles the data recording code, and generates a data recording module; wherein, the data recording module includes a first data receiving port. Receive a start instruction issued by the user. Based on the start instruction, start the data recording module, and determine target data that meets the subscription conditions from the pre-acquired data list based on the pre-configured subscription conditions. Determine the target data receiving port corresponding to the target data sending port that sends the target data in the data recording module. Receive and save the target data through the target data receiving port. This method can automatically generate a data recording code according to the pre-acquired data configuration file, without the need to separately integrate a function module for recording data in the data recording code, reducing the workload of the user for recording data, and for the already released data recording module, it will not affect the function of recording data.

[0052] The embodiment of the present invention also provides another data processing method, which is implemented on the basis of the method in the above embodiment; the method includes the following steps:

[0053] Step 402, generate a data recording code based on the pre-acquired data configuration file; wherein, the data configuration file includes information of a first data sending port; the data recording code carries information of a first data receiving port corresponding to the first data sending port.

[0054] Step 404, compile the data recording code to generate a data recording module; wherein, the data recording module includes a first data receiving port.

[0055] Step 406, start the data recording module and determine target data from the pre-acquired data list.

[0056] Step 408, receive and save the target data through the first data receiving port of the data recording module.

[0057] Step 410, start a pre-generated data playback module; wherein, the data playback module includes a second data sending port corresponding to the first data sending port.

[0058] The above data playback module can be referred to as a data playback device. The data playback module includes a second data sending port corresponding to the first data sending port. For example, when the server is the data sender, multiple first data sending ports are preset on the server, and each first data sending port can have different port attributes, etc. Then, multiple second data sending ports are usually generated on the data playback module. The number of the first data sending ports and the second data sending ports is usually the same and they correspond one by one. Specifically, a second data sending port that matches the port attribute of each first data sending port can be generated for each first data sending port.

[0059] The above data playback module is generated through the following Step 1 and Step 2:

[0060] Step 1: Generate data playback code based on the pre-acquired data configuration file. Among them, the data playback code carries information about the second data sending port corresponding to the first data sending port.

[0061] When data needs to be played back, usually the data configuration file needs to be obtained first. Based on the data configuration file, data playback code is generated. For example, the data configuration file can be read through a script to generate the data playback code. The generated data playback code usually includes information about the second data sending port corresponding to the first data sending port. For example, information about the second data sending port that matches the relevant attributes of the first data sending port of the server, etc.

[0062] Step 2: Compile the data playback code to generate a data playback module. Among them, the data playback module includes a second data sending port.

[0063] After the above data playback code is generated, the data playback code can be compiled to generate a data playback module. Among them, the data playback module includes a second data sending port that matches the first data sending port. If there are multiple first data sending ports, usually a second data sending port that matches the port attribute of each first data sending port will be generated for each first data sending port.

[0064] Step 412: If a subscription request for sub-target data is received from the client, obtain the sub-target data.

[0065] The above sub-target data can be at least a part of the above target data. In actual implementation, if the target data is stored in the local storage area, after the electronic device with the data playback module receives a subscription request for sub-target data from the client, the sub-target data can be filtered out from the local storage area where the target data is saved.

[0066] If the target data is stored in the host computer, the above data playback module is usually used for data forwarding, that is, the data playback module can be used as a data playback forwarder. Usually, a sub-playback module is preset in the above host computer; if the electronic device equipped with the data playback module receives a subscription request for sub-target data from the client, it can forward the subscription request to the sub-playback module in the host computer. Through the sub-playback module in the host computer, obtain the sub-target data from the host computer storing the target data, and send the sub-target data to the data playback module.

[0067] Step 414, send the sub-target data to the client through the second data sending port, so as to playback the sub-target data through the client.

[0068] After screening out the above sub-target data, the sub-target data can be sent to the corresponding client through the second data sending port of the data playback module. The client can perform playback tests and simulations on the received sub-target data. For example, sensor data such as cameras, lidars, millimeter-wave radars, etc. can be played back to facilitate the optimization and simulation of algorithms. For example, see Figure 4 A schematic diagram of a data playback system architecture shown in Figure 4 (a) and Figure 4 (b) both include an event data playback device (corresponding to the data playback module), Client 1, Client 2, and Client 3. To facilitate simulation, the same functions as the normal server will be provided, including the interfaces in the ap autosar communication module, and interfaces for service discovery and subscription will be provided. The event sending port in the event data playback device (corresponding to the second data sending port) has a one-to-one correspondence with the event sending port in the server (corresponding to the first data sending port). For example, if there are four event sending ports in the server, correspondingly, there are also four event sending ports in the event data playback device.

[0069] For the above data processing method, start the pre-generated data playback module; if a subscription request for sub-target data is received from the client, obtain the sub-target data from the local storage area or the host computer storing the target data. Send the sub-target data to the client through the second data sending port, so as to playback the sub-target data through the client. In this way, when data needs to be played back, there is no need to write code for parsing. After the client subscribes to the relevant data, it can directly perform playback, reducing the workload of the user for playing back data and making the operation simpler and more convenient.

[0070] To further understand the above embodiments, the following introduces the event data communication method of AP AUTOSAR. In AP AUTOSAR, most data is communicated through events. The following provides a schematic diagram of an event data communication structure as shown in Figure 5 ; In event communication, there is usually a server that publishes data externally as needed, such as collecting a frame of data through a camera. At the same time, there can be any number of clients in the system. The clients need to subscribe to the server's data. After the subscription is completed, they can receive the relevant data. In this solution, when configuring the client and the server, a data recorder that can subscribe to all the data sent by the server programs can be automatically generated according to the data configuration file. Multiple clients can subscribe to event data simultaneously. That is, in this solution, a subscription interface is added. When the server sends data to other clients, the data can be sent to the data recorder at the same time.

[0071] See Figure 6 for a flowchart of a data processing method. Generate event data recorder code containing all event receiving ports (corresponding to the first data receiving ports) according to the arxml file, compile the event data recorder code (corresponding to the above data recording code), generate event data recorder software (corresponding to the above data recording module). This event data recorder software can be set on a terminal device, etc., to obtain a list of event data that can be subscribed to. For example, the terminal device can obtain all the event data lists that can be subscribed to from the server. After starting the event data recorder software, the event data to be subscribed to (saved files, recording time, maximum data volume to be recorded, etc.) can be configured through the host computer or the command line, then subscribe to the configured event data, receive the event data, and save it in a defined local file. Or, through a sub-recording module preset in the host computer, save the event data in the host computer. Usually, the saving of event data needs to include necessary contents such as the data sending time, data format, content, etc., for the subsequent use of the data playback software.

[0072] The above method provides a general data recording function based on the AP AUTOSAR event communication mechanism and a data playback function according to the recorded data. It can record any event data on the controller as needed and can playback the data. All subscribable ports can be automatically generated using arxml. When the system generates code, it will parse arxml to automatically generate an event data receiving port in the event data recorder. The above method has been verified by actual projects and can be used normally, and the results meet expectations.

[0073] An embodiment of the present invention provides a data processing device, such as Figure 7 shown. The device includes: a generation module 70, configured to generate data recording codes based on a pre-acquired data configuration file; wherein, the data configuration file includes information of a first data sending port; the data recording codes carry information of a first data receiving port corresponding to the first data sending port; a compilation module 71, configured to compile the data recording codes to generate a data recording module; wherein, the data recording module includes the first data receiving port; a start module 72, configured to start the data recording module and determine target data from a pre-acquired data list; a receiving module 73, configured to receive and save the target data through the first data receiving port of the data recording module.

[0074] The above data processing device generates data recording codes based on a pre-acquired data configuration file; wherein, the data configuration file includes information of a first data sending port; the data recording codes carry information of a first data receiving port corresponding to the first data sending port; compiles the data recording codes to generate a data recording module; wherein, the data recording module includes the first data receiving port; starts the data recording module and determines target data from a pre-acquired data list; receives and saves the target data through the first data receiving port of the data recording module. The device can automatically generate data recording codes according to a pre-acquired data configuration file, without the need to separately integrate a function module for recording data in the data recording codes, reducing the workload of users for recording data and not affecting the data recording function for an already released data recording module.

[0075] Further, the generation module is further configured to: read the pre-acquired data configuration file through a preset script; wherein, the data configuration file includes information of a first data sending port; receive a first instruction issued by a user and generate data recording codes; wherein, the data recording codes carry information of a first data receiving port corresponding to the first data sending port.

[0076] Further, the start module is further configured to: receive a start instruction issued by a user; based on the start instruction, start the data recording module and determine target data that meets a subscription condition from a pre-acquired data list based on a pre-configured subscription condition.

[0077] Further, there are multiple first data sending ports and multiple first data receiving ports, and the first data sending ports and the first data receiving ports are in one-to-one correspondence; the receiving module is further configured to: determine a target data receiving port corresponding to a target data sending port for sending target data in the data recording module; receive and save the target data through the target data receiving port.

[0078] Further, the device is also used for: starting a pre-generated data playback module; wherein, the data playback module includes a second data sending port corresponding to the first data sending port; if a subscription request for sub-target data from a client is received, obtaining the sub-target data; and sending the sub-target data to the client through the second data sending port for the client to playback the sub-target data.

[0079] Further, the device further includes a data playback module generation module, and the data playback module generation module is used for: generating data playback code based on a pre-obtained data configuration file; wherein, the data playback code carries information about the second data sending port corresponding to the first data sending port; and compiling the data playback code to generate a data playback module; wherein, the data playback module includes the second data sending port.

[0080] The data processing device provided by the embodiments of the present invention has the same implementation principle and the same technical effects as those of the foregoing data processing method embodiments. For the sake of brief description, for the parts not mentioned in the data processing device embodiments, reference may be made to the corresponding content in the foregoing data processing method embodiments.

[0081] Embodiments of the present invention also provide an electronic device. Refer to Figure 8 As shown, the electronic device includes a processor 130 and a memory 131. The memory 131 stores machine-executable instructions that can be executed by the processor 130, and the processor 130 executes the machine-executable instructions to implement the above data processing method.

[0082] Further, Figure 8 The shown electronic device further includes a bus 132 and a communication interface 133. The processor 130, the communication interface 133, and the memory 131 are connected through the bus 132.

[0083] Among them, the memory 131 may include a high-speed random access memory (RAM, Random Access Memory), and may also include a non-volatile memory, such as at least one disk memory. Through at least one communication interface 133 (which may be wired or wireless), a communication connection between the system network element and at least one other network element can be realized, and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 132 may be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 8 only a bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0084] The processor 130 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 130 or the instructions in the form of software. The above-mentioned processor 130 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute each method, step, and logic block diagram disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present invention can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131 and combines its hardware to complete the steps of the method in the foregoing embodiments.

[0085] The embodiments of the present invention also provide a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above data processing method. For the specific implementation, reference may be made to the method embodiments and will not be elaborated here.

[0086] The computer program product of the data processing method provided by the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the foregoing method embodiments. For the specific implementation, reference may be made to the method embodiments and will not be elaborated here.

[0087] When the above-described functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of various embodiments of the present invention.

Claims

1. A data processing method, characterized in that, The method includes: Generating data recording code based on a pre-acquired data configuration file; wherein, the data configuration file includes information of a first data sending port; the data recording code carries information of a first data receiving port corresponding to the first data sending port; the data configuration file is an ARXML file; Compiling the data recording code to generate a data recording module; wherein, the data recording module includes the first data receiving port; Starting the data recording module and determining target data from a pre-acquired data list; Receiving and saving the target data through the first data receiving port of the data recording module; The step of starting the data recording module and determining target data from a pre-acquired data list includes: Receiving a start instruction issued by a user; Based on the start instruction, starting the data recording module and determining target data that meets the subscription condition from a pre-acquired data list based on a pre-configured subscription condition.

2. The method according to claim 1, characterized in that, The step of generating data recording code based on a pre-acquired data configuration file includes: Reading the pre-acquired data configuration file through a preset script; wherein, the data configuration file includes information of a first data sending port; Receiving a first instruction issued by a user and generating the data recording code; wherein, the data recording code carries information of a first data receiving port corresponding to the first data sending port.

3. The method according to claim 1, wherein There are multiple first data sending ports and multiple first data receiving ports, and the first data sending ports and the first data receiving ports are in one-to-one correspondence; The step of receiving and saving the target data through the first data receiving port of the data recording module includes: Determining a target data receiving port corresponding to a target data sending port that sends the target data in the data recording module; Receiving and saving the target data through the target data receiving port.

4. The method according to claim 1, wherein The method further includes: Starting a pre-generated data playback module; wherein, the data playback module includes a second data sending port corresponding to the first data sending port; If a subscription request for sub-target data is received from a client, acquiring the sub-target data; Sending the sub-target data to the client through the second data sending port so that the client can playback the sub-target data.

5. The method according to claim 4, wherein The data playback module is generated in the following manner: Generating data playback code based on a pre-acquired data configuration file; wherein, the data playback code carries information of a second data sending port corresponding to the first data sending port; Compiling the data playback code to generate the data playback module; wherein, the data playback module includes the second data sending port.

6. A data processing device, characterized in that, The device includes: A generation module, configured to generate data recording code based on a pre-acquired data configuration file; wherein, the data configuration file includes information of a first data sending port; the data recording code carries information of a first data receiving port corresponding to the first data sending port; the data configuration file is an ARXML file; A compilation module, configured to compile the data recording code to generate a data recording module; wherein, the data recording module includes the first data receiving port; A start-up module, configured to start the data recording module and determine target data from a pre-acquired data list; A receiving module, configured to receive and save the target data through the first data receiving port of the data recording module; The start-up module is further configured to: Receive a start instruction issued by a user; based on the start instruction, start the data recording module, and based on pre-configured subscription conditions, determine target data that meets the subscription conditions from a pre-acquired data list.

7. The device according to claim 6, characterized in that, The generation module is further configured to: Read the pre-acquired data configuration file through a preset script; wherein, the data configuration file includes information of a first data sending port; Receive a first instruction issued by a user and generate the data recording code; wherein, the data recording code carries information of a first data receiving port corresponding to the first data sending port.

8. An electronic device, characterized in that, It includes a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the data processing method according to any one of claims 1-5.

9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the data processing method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Automatic run-time environment (RTE) code generating method for automobile system architecture (AUTOSAR)

    CN102214099A

  • General car code conversion method

    CN102622470A