Record file generation method and device, electronic equipment and storage medium

By obtaining the recording data in advance when recording service exceptions and generating recording files, the problem of the recording service exceptions cannot generate effective recording and playback packets, and the reliability of data recording and playback is achieved.

CN119718854APending Publication Date: 2025-03-28GUOKE FOUNDATION STONE (CHONGQING) SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411472370.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the prior art, abnormalities or crashes in the recording service will lead to the inability to generate effective recording and playback packets, which will affect the difficulty of data playback and analysis.

Method used

The monitoring process receives the configuration information sent by the recording service process, and when listening to the preset exception signal, it obtains the recording data in advance and generates the recording file to ensure that the recording file can still be generated when the recording service is abnormal.

Benefits of technology

It realizes that effective recording files can still be generated when an abnormality occurs in a recording service, which reduces the impact on the performance of the recording service and ensures the smooth progress of data recording and playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718854A_ABST
    Figure CN119718854A_ABST
Patent Text Reader

Abstract

The invention relates to a record file generation method and device, electronic equipment and a storage medium, configuration information sent by a record service process and used for generating a record file is received through a monitoring process, and the record service process is used for recording operation data of a target application program as record data; a monitoring process monitors the recording service process, under the condition that a preset abnormal signal sent by the recording service process is monitored, the recording data are acquired before the recording service process is ended, the recording file is generated based on the configuration information, and the recording file is used for recording and playback; it is ensured that the record file can still be generated when the record service is abnormal, only the preset abnormal signal is monitored, and the influence on the performance of the record service is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data recording technology, and in particular to a method, device, electronic device and storage medium for generating a recording file. Background Art

[0002] The recording service plays a vital role in the application running process. It can record the application running data and generate recording and playback packages, which play a key role in the subsequent data playback and analysis process.

[0003] In related technologies, the stability and reliability of recording services are crucial for data recording and subsequent analysis. When the recording service is abnormal or crashes, it may result in the inability to generate valid recording and playback packages, which in turn causes difficulties in data playback and analysis. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method, device, electronic device and storage medium for generating a record file.

[0005] According to a first aspect of an embodiment of the present disclosure, a method for generating a recording file is provided, comprising a monitoring process receiving configuration information for generating a recording file sent by a recording service process, wherein the recording service process is used to record the running data of a target application as recording data; the monitoring process monitors the recording service process, and upon detecting a preset abnormal signal sent by the recording service process, obtains the recording data before the recording service process ends and generates the recording file based on the configuration information, wherein the recording file is used for recording and playback.

[0006] In some embodiments, the recorded data is the running data of the target application recorded by the recording service process at the abnormal moment; or, the recorded data is the running data of the target application recorded by the recording service process at the abnormal moment and before the abnormal moment.

[0007] In some embodiments, when a preset abnormal signal sent by the recording service process is monitored, the method further includes: the monitoring process sends a preset abnormal recording signal to the recording service process, so that the recording service process generates an abnormal diagnosis file.

[0008] In some embodiments, the method also includes at least one of the following: when the monitoring process monitors a preset interrupt signal, the monitoring process sends the preset interrupt signal to the recording service process so that the recording service process generates the recording file; when the monitoring process monitors other signals, the monitoring process sends the other signals to the recording service process so that the recording service process performs corresponding processing and continues to execute the steps of the monitoring process monitoring the recording service process; wherein the other signals refer to signals other than the preset exception signal, the preset interrupt signal and the preset exception recording signal.

[0009] In some embodiments, the preset exception signal includes at least one of the following: an illegal instruction SIGILL signal, a trace trap SIGTRAP signal, an abort SIGABRT signal, a bus error SIGBUS signal, and a segment error SIGSEG signal.

[0010] In some embodiments, the monitoring process and the recording service process adopt a process tracking method. Then, after the recording file is generated, it also includes: the monitoring process sends a preset continue execution signal to the recording service process to enable the recording service process to continue execution; when a preset exit signal sent by the recording service process is monitored, the monitoring of the recording service process by the monitoring process is released.

[0011] According to a second aspect of an embodiment of the present disclosure, a recording file generation device is provided, comprising a receiving module, for receiving configuration information for generating a recording file sent by a recording service process based on a listening process, wherein the recording service process is used to record the running data of a target application as recording data; and a monitoring processing module, for monitoring the recording service process based on the listening process, and in the case of monitoring a preset abnormal signal sent by the recording service process, obtaining the recording data before the end of the recording service process and generating the recording file based on the configuration information, wherein the recording file is used for recording and playback.

[0012] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing executable instructions of the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method for generating a record file provided in the first aspect of the present disclosure.

[0013] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for generating a record file provided in the first aspect of the present disclosure are implemented.

[0014] According to a fifth aspect of an embodiment of the present disclosure, a vehicle is provided, storing a set of instruction sets, wherein the instruction sets are executed by the vehicle to implement the method for generating a record file provided by the first aspect of the present disclosure.

[0015] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: when the monitoring process monitors a preset abnormal signal issued by the recording service process, the monitoring process is responsible for generating a recording file for recording and playback, which ensures that a recording file can still be generated when an abnormality occurs in the recording service, and the monitoring process only monitors the preset abnormal signal, reducing the impact on the performance of the recording service.

[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0018] Figure 1 The figure is a flow chart of a method for generating a record file according to an exemplary embodiment.

[0019] Figure 2 The figure is a flowchart of another method for generating a record file according to an exemplary embodiment.

[0020] Figure 3 The present invention is a flowchart showing a method for generating a recording file applied to a monitoring process according to an exemplary embodiment.

[0021] Figure 4 The present invention is a flowchart showing a method for generating a recording file for recording a service process according to an exemplary embodiment.

[0022] Figure 5 The invention shows an interaction between a monitoring process and a recording service process according to an exemplary embodiment.

[0023] Figure 6 The present invention is a block diagram of a device for generating a record file according to an exemplary embodiment.

[0024] Figure 7 is a block diagram of a vehicle according to an exemplary embodiment.

[0025] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0026] Exemplary embodiments will be described in detail below with reference to the accompanying drawings.

[0027] It should be pointed out that the relevant embodiments and drawings are only for describing exemplary embodiments provided by the present disclosure, rather than all embodiments of the present disclosure, and it should not be understood that the present disclosure is limited to the relevant exemplary embodiments.

[0028] It should be noted that the terms "first", "second", etc. used in the present disclosure are only used to distinguish different steps, devices or modules, etc. The related terms neither represent any specific technical meanings nor indicate the order or interdependence between them.

[0029] It should be noted that the modifications of the terms "one", "multiple", and "at least one" used in the present disclosure are illustrative rather than restrictive. Unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0030] It should be noted that the term "and / or" used in this disclosure is used to describe the association relationship between associated objects, and generally indicates that there are at least three association relationships. For example, A and / or B can at least indicate the existence of three association relationships: A exists alone, A and B exist at the same time, and B exists alone.

[0031] It should be noted that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. Unless otherwise specified, the scope of the present disclosure is not limited by the order of description of the steps in the relevant embodiments.

[0032] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0033] First, the nouns involved in this disclosure are explained:

[0034] Recorder and Replayer bag (RnR bag for short): It is a record file generated by the DDS recording service, which contains the recording data file, the configuration files of the recording service and the replay service, the scripts required for runtime, and the summary of the recording service statistics file.

[0035] DDS Recording Service: An application that can record the running data of DDS applications and generate RnR bags. The generated RnR bags can be played back in chronological order through the Playback Service.

[0036] Exemplary Methods

[0037] Figure 1is a flow chart of a method for generating a record file according to an exemplary embodiment. Figure 1 As shown, the method for generating a record file is used in an electronic device deployed with a record service, and includes the following steps.

[0038] In step S110, the monitoring process receives configuration information for generating a record file sent by the record service process, and the record service process is used to record the running data of the target application as record data.

[0039] Specifically, the monitoring process and the recording service process may be run on the same controller of the electronic device, or may be run on different controllers of the electronic device, which is not limited in this embodiment.

[0040] Taking the target application as the publisher or subscriber of DDS as an example, the recording service process is the DDS recording service. The DDS recording service can record the data exchange process between the publisher and the subscriber, including entity information, service quality parameter (Quality of Service, referred to as QoS) configuration and topic data. By recording this information, the DDS recording service generates a record file, namely, RnR bag.

[0041] In this step, when the recording service process completes the last step of generating the RnR bag in the initialization process, it will upload the configuration information required to generate the RnR bag (including the recording service configuration, part of the playback service configuration, and the running script path information) to the listening process, and the listening process completes the acquisition of the RnR bag configuration information.

[0042] In some embodiments, before step S110, the process further includes: the listening process creates anonymous pipe communication. Specifically, after the listening process is started, anonymous pipe communication is created to achieve data interaction with the recording service process. At this time, the listening process is in a read pipe blocking state. Once the recording service process is initialized, the acquired recording service configuration, part of the playback service configuration, and the running script path information and other configuration information are sent to the listening process through anonymous pipe communication.

[0043] In step S120, the monitoring process monitors the recording service process, and when a preset abnormal signal sent by the recording service process is monitored, the recording data is obtained before the recording service process ends and the recording file is generated based on the configuration information, and the recording file is used for recording and playback.

[0044] Specifically, based on Ptrace, the monitoring process monitors the recording service and monitors the signals that may cause the application to crash. Once these signals are captured, the monitoring process will obtain the recording data and generate a recording file, namely RnR bag, according to the configuration information. The RnR bag finally generated includes the recording data file generated by the DDS recording service, the recording service and playback service configuration files, the scripts required for runtime, and the recording service statistics file.

[0045] In some embodiments, the preset exception signal includes at least one of the following: illegal instruction SIGILL signal, tracking trap SIGTRAP signal, abort SIGABRT signal, bus error SIGBUS signal, segment error SIGSEG signal. Specifically, when the monitoring process monitors signals that can cause the application to crash, including SIGILL, SIGTRAP, SIGABRT, SIGBUS and SIGSEGV, the monitoring process will be responsible for generating an RnR bag.

[0046] In some embodiments, the recorded data is the running data of the target application recorded by the recording service process at the abnormal moment; or, the recorded data is the running data of the target application recorded by the recording service process at the abnormal moment and before the abnormal moment.

[0047] Specifically, the DDS recording service records the operating data during the publishing process of the publisher or the subscription process of the subscriber into the buffer, and then stores it in the RnR bag in real time and persistently from the buffer. When the recording service process is abnormal, the operating data recorded before the abnormal moment may have been persisted in the RnR bag. At this time, the monitoring process only needs to obtain the operating data recorded at the abnormal moment to generate the RnR bag; of course, the monitoring process also obtains all the operating data recorded between the start time of the DDS recording service and the abnormal moment to generate the RnR bag.

[0048] In addition, the DDS record service process may include multiple threads including the DDS thread, one of which is responsible for persisting the data in the buffer, so that in the event of an abnormality in the DDS record service, the data in the buffer can also be effectively saved, further avoiding the loss of meaningful data.

[0049] The method for generating a recording file provided in this embodiment receives configuration information for generating a recording file sent by a recording service process through a listening process, and the recording service process is used to record the running data of a target application as recording data; the listening process listens to the recording service process, and when a preset abnormal signal sent by the recording service process is listened to, the recording data is obtained before the end of the recording service process and the recording file is generated based on the configuration information, and the recording file is used for recording and playback; it ensures that a recording file can still be generated when an abnormality occurs in the recording service, and the listening process only listens to the preset abnormal signal, thereby reducing the impact on the performance of the recording service.

[0050] Based on the above embodiments, Figure 2 is a flow chart showing another method for generating a record file according to an exemplary embodiment. Figure 2 As shown, the following steps are included:

[0051] In step S210, the monitoring process receives configuration information for generating a record file sent by the record service process, where the record service process is used to record the running data of the target application as record data.

[0052] In step S220, the monitoring process monitors the recording service process.

[0053] If a preset abnormal signal is monitored, steps S230 and S240 are executed; if a preset interruption signal is monitored, step S250 is executed; if other signals are monitored, step S260 is executed.

[0054] In step S230, when a preset abnormal signal sent by the recording service process is monitored, the recording data is acquired before the recording service process ends and the recording file is generated based on the configuration information.

[0055] In step S240, the monitoring process sends a preset abnormal recording signal to the recording service process, so that the recording service process generates an abnormal diagnosis file.

[0056] In step S250, when the monitoring process monitors the preset interrupt signal, it sends the preset interrupt signal to the recording service process, so that the recording service process generates the recording file.

[0057] In step S260, when the monitoring process monitors other signals, it sends the other signals to the recording service process so that the recording service process performs corresponding processing, and returns to execute step S220.

[0058] It should be noted that the implementation of steps S210-S230 in this embodiment is similar to the implementation of steps S110 and S120 in the aforementioned embodiment, and will not be repeated here.

[0059] The difference from the above-mentioned embodiment is that the abnormal recording signal, interrupt signal and other signals are taken into account. In this embodiment, when the monitoring process captures a preset abnormal signal, the monitoring process generates an RnR bag and sends the preset abnormal recording signal (such as coredump) to the recording service process. The recording service process responds to the preset abnormal recording signal and generates an abnormal diagnosis file (dump) to help diagnose and solve the crash exception; when the monitoring process captures the preset interrupt signal (SIGINT) input by the user, it sends the SIGINT signal to the recording service process. The recording service process responds to the SIGINT signal and immediately stops the current recording operation and generates an RnR bag; when the monitoring process captures other signals, it sends these signals directly to the recording service process so that the recording service process performs the corresponding default processing. After the processing is completed, the recording service process continues to execute, and the monitoring process returns to step S220 to continue monitoring.

[0060] It should be noted that the SIGINT signal is sent when the user wants to stop the recording operation of the DDS recording service, usually by pressing the ctrl+c key combination. This is regarded as a normal recording stop behavior, so the generation of the RnR bag is handled by the recording service process itself.

[0061] In some embodiments, the monitoring process and the recording service process adopt a process tracking method. Then, after the recording file is generated, it also includes: the monitoring process sends a preset continue execution signal to the recording service process to enable the recording service process to continue execution; when a preset exit signal sent by the recording service process is monitored, the monitoring of the recording service process by the monitoring process is released.

[0062] Specifically, after the recording service process sends the configuration information of the RnR bag to the listening process through an anonymous pipe, the process tracking method (ptrace me) is used to track the monitored process; when the listening process or the recording service process generates an RnR bag, the listening process will send a continue execution signal (ptrace cont signal) to the recording service process. If the recording service process sends an exit signal due to an abnormal or normal exit, the listening process will stop monitoring to release system resources.

[0063] Based on the foregoing embodiments, an interaction mechanism for abnormal situations, normal exits, and other signals of non-abnormal and non-normal exits is established between the monitoring process and the recording service process, which can ensure the security, integrity and reliability of the recorded data, and perform exception handling and diagnosis when necessary.

[0064] Figure 3 is a flowchart of a method for generating a recording file applied to a monitoring process according to an exemplary embodiment. Figure 4 is a flow chart of a method for generating a recording file for recording a service process according to an exemplary embodiment. Figure 3 , Figure 4 Provide detailed explanation.

[0065] like Figure 3 As shown, the process of the recording file generation method based on the monitoring process is as follows:

[0066] The first step is to start and set up data communication.

[0067] Specifically, the monitoring process is started, anonymous pipe communication is created, and then the recording service process is forked, so that the two processes can use the created anonymous pipe for data communication, such as Figure 5 The invention shows an interaction between a monitoring process and a recording service process according to an exemplary embodiment.

[0068] The second step is to wait for the configuration information of the RnR bag.

[0069] Specifically, the listening process enters the read pipe blocking state, waiting for the recording service process to send the configuration information of the RnR bag.

[0070] The third step is to obtain the configuration information of the RnR bag.

[0071] Specifically, the listening process obtains the configuration information of the RnR bag through an anonymous pipe, including the recording service configuration, partial playback service configuration, and running script path information; after the listening process obtains the configuration information of the RnR bag, it automatically generates the data structure required by the RnR bag, exits the reading pipe blocking state, and continues to run.

[0072] The fourth step is signal processing.

[0073] Specifically, the monitoring process monitors the recording service process, that is, waits for ptrace events. If an application crash signal (such as SIGSEGV) is received, the monitoring process will obtain the recording data and generate an RnR bag based on the configuration information, and the monitoring process will pass the abnormal recording signal to the recording service process, so that the recording service process generates an abnormal diagnosis file for fault analysis; if it is not a crash signal, it is determined whether it is a SIGINT signal input by the user. If so, a related message is output, such as a message of successful operation, and the SIGINT signal is passed to the recording service process, so that the recording service process generates an RnR bag; if it is not a crash signal or a SIGINT signal, the signal is directly passed to the recording service process, so that the recording service process performs the corresponding default processing, and the monitoring process continues to monitor the recording service process.

[0074] Step 5: End the process.

[0075] Specifically, the monitoring process sends a preset continue execution signal (ptrace cont signal) to the recording service process. If the recording service process exits abnormally or normally, it will exit directly. If it is other signals, the recording service process continues to execute until it receives the exit signal of the recording service process. The monitoring process releases the monitoring of the recording service process, that is, performs the ptracedetach operation, and then the monitoring process exits.

[0076] like Figure 4 As shown, the flow chart of the method for generating a record file based on the record service process is as follows:

[0077] The first step is to initialize and configure information sending.

[0078] Specifically, the recording service process is started, the initialization process is executed, and the acquisition and generation of the RnR bag configuration information are completed; the RnR bag configuration information is sent to the listening process through an anonymous pipe, so that the listening process exits the blocking state and continues to run.

[0079] The second step is tracking settings.

[0080] Specifically, the service process is recorded to execute the ptrace me operation and enter the monitored process tracking state.

[0081] The third step is to execute normal business logic.

[0082] Specifically, the recording service process executes normal business logic, that is, records the running data of the running target application.

[0083] The fourth step is to handle signals and exceptions.

[0084] Specifically, if an application crash signal occurs, the recording service process will suspend execution and wait for the monitoring process to transmit the corresponding signal. For example, upon receiving the abnormal recording signal sent by the monitoring process, relevant processing will be performed to generate a dump file. If it is not a crash signal, it will be determined whether it is a SIGINT signal. If so, an RnR bag will be generated by the recording service process. If it is neither a crash signal nor a SIGINT signal, the recording service process will continue to run.

[0085] Step 5: End the process.

[0086] Specifically, when an exception or a normal exit occurs, the service process exits and the listening process is notified, so that the listening process performs a ptrace detach operation and then exits.

[0087] In summary, this embodiment takes into account that after the recording service becomes abnormal due to various reasons, the data that has been recorded for a long time is still meaningful. Therefore, by determining the interaction and processing flow between the monitoring process and the recording service process, it is ensured that a valid RnR bag can still be generated in the event of an abnormal recording service, so that the data recording and playback process proceeds smoothly, and can handle application crashes or other signal situations.

[0088] Exemplary Devices

[0089] Figure 6 is a block diagram of a device for generating a record file according to an exemplary embodiment. Figure 6 The device 600 includes a receiving module 610 and a monitoring processing module 620.

[0090] The receiving module 610 is used to receive configuration information for generating a record file sent by a record service process based on a monitoring process, wherein the record service process is used to record the running data of the target application as record data;

[0091] The monitoring processing module 620 is used to monitor the recording service process based on the monitoring process. When a preset abnormal signal sent by the recording service process is monitored, the recording data is obtained before the end of the recording service process and the recording file is generated based on the configuration information. The recording file is used for recording and playback.

[0092] In some embodiments, the recorded data is the operation data of the target application program recorded by the recording service process at the abnormal moment;

[0093] Alternatively, the recorded data is the operation data of the target application program recorded by the recording service process at the abnormal moment and before the abnormal moment.

[0094] In some embodiments, the monitoring processing module 620 is further used to:

[0095] In the case of monitoring a preset abnormal signal sent by the recording service process, the monitoring process sends the preset abnormal recording signal to the recording service process, so that the recording service process generates an abnormal diagnosis file.

[0096] In some embodiments, the monitoring processing module 620 is further used for at least one of the following:

[0097] When the monitoring process monitors the preset interrupt signal, the monitoring process sends the preset interrupt signal to the recording service process, so that the recording service process generates the recording file;

[0098] When the monitoring process monitors other signals, it sends the other signals to the recording service process, so that the recording service process performs corresponding processing and continues to execute the step of the monitoring process monitoring the recording service process;

[0099] The other signals refer to other signals except the preset abnormality signal, the preset interruption signal and the preset abnormality recording signal.

[0100] In some embodiments, the preset abnormal signal includes at least one of the following:

[0101] Illegal instruction SIGILL signal, tracking trap SIGTRAP signal, abort SIGABRT signal, bus error SIGBUS signal, segmentation error SIGSEG signal.

[0102] In some embodiments, the monitoring process and the recording service process adopt a process tracking method, and the monitoring processing module 620 is further used to:

[0103] After generating the record file, the monitoring process sends a preset execution continuation signal to the record service process so that the record service process continues to execute;

[0104] In the case of monitoring a preset exit signal sent by the recording service process, the monitoring process is released from monitoring the recording service process.

[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and corresponding beneficial effects of the recording file generation device described above can refer to the corresponding process in the aforementioned method example, and will not be repeated here.

[0106] Example Vehicles

[0107] Figure 7is a block diagram of a vehicle 700 according to an exemplary embodiment. The vehicle 700 may be a fuel vehicle, a hybrid vehicle, an electric vehicle, a fuel cell vehicle or other types of vehicles.

[0108] Reference Figure 7 The vehicle 700 may include multiple subsystems, for example, a driving system 710, a control system 720, a perception system 730, a communication system 740, an information display system 750, and a computing system 760. The vehicle 700 may also include more or fewer subsystems, and each subsystem may also include multiple components, which are not described one by one here.

[0109] The driving system 710 includes components that provide power movement for the vehicle 700, such as an engine, an energy source, a transmission device, etc.

[0110] The control system 720 includes components that provide control for the vehicle 700, such as vehicle control, cockpit equipment control, and driving assistance control.

[0111] The perception system 730 includes components that provide surrounding environment perception for the vehicle 700, such as a vehicle positioning system, a laser sensor, a voice sensor, an ultrasonic sensor, a camera device, etc.

[0112] The communication system 740 includes components that provide communication connections for the vehicle 700, such as mobile communication networks (such as 3G, 4G, 5G networks, etc.), WiFi, Bluetooth, and Internet of Vehicles.

[0113] The information display system 750 includes components that provide various information displays for the vehicle 700, such as vehicle information display, navigation information display, entertainment information display, etc.

[0114] The computing and processing system 760 includes components that provide data computing and processing capabilities for the vehicle 700. The computing and processing system 760 may include at least one processor 761 and a memory 762. The processor 761 may execute instructions stored in the memory 762.

[0115] The processor 761 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.

[0116] Memory 762 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0117] In the embodiment of the present disclosure, a set of instruction sets is stored in the memory 762, and the processor 761 can execute the instruction set to implement all or part of the steps of the method for generating a record file described in any of the above exemplary embodiments.

[0118] Exemplary Electronic Devices

[0119] Figure 8 1 is a block diagram of an electronic device 800 according to an exemplary embodiment. The electronic device 800 may be a vehicle controller, a vehicle terminal, a vehicle computer or other types of electronic devices.

[0120] Reference Figure 8 , the electronic device 800 may include at least one processor 810 and a memory 820. The processor 810 may execute instructions stored in the memory 820. The processor 810 is communicatively connected to the memory 820 via a data bus. In addition to the memory 820, the processor 810 may also be communicatively connected to an input device 830, an output device 840, and a communication device 850 via a data bus.

[0121] The processor 810 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.

[0122] The memory 820 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0123] In the embodiment of the present disclosure, executable instructions are stored in the memory 820, and the processor 810 can read the executable instructions from the memory 820 and execute the instructions to implement all or part of the steps of the method for generating a record file described in any of the above exemplary embodiments.

[0124] Exemplary computer-readable storage media

[0125] In addition to the above methods and devices, the exemplary embodiments of the present disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product. The computer product includes computer program instructions that can be executed by a processor to implement all or part of the steps described in any method in the above exemplary embodiments.

[0126] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and also conventional procedural programming languages, such as "C" language or similar programming languages ​​and scripting languages ​​(e.g., Python). The program code may be executed entirely on the user computing device, partially on the user computing device, as an independent software package, partially on the user computing device and partially on the remote computing device, or entirely on the remote computing device or server.

[0127] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of readable storage media include: a static random access memory (SRAM) with one or more wires electrically connected, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk or an optical disk, or any suitable combination of the above.

[0128] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0129] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for generating a record file, characterized in that: include: The monitoring process receives configuration information for generating a record file sent by the record service process, wherein the record service process is used to record the running data of the target application as the record data; The monitoring process monitors the recording service process, and when a preset abnormal signal sent by the recording service process is monitored, the recording data is obtained before the recording service process ends and the recording file is generated based on the configuration information, and the recording file is used for recording and playback.

2. The method according to claim 1, characterized in that The recorded data is the operation data of the target application program recorded by the recording service process at the abnormal moment; Alternatively, the recorded data is the operation data of the target application program recorded by the recording service process at the abnormal moment and before the abnormal moment.

3. The method according to claim 1 or 2, characterized in that: In the case where a preset abnormal signal sent by the recording service process is monitored, the method further includes: The monitoring process sends a preset abnormal recording signal to the recording service process, so that the recording service process generates an abnormal diagnosis file.

4. The method according to claim 3, characterized in that The method further comprises at least one of the following: When the monitoring process monitors the preset interrupt signal, the monitoring process sends the preset interrupt signal to the recording service process, so that the recording service process generates the recording file; When the monitoring process monitors other signals, it sends the other signals to the recording service process, so that the recording service process performs corresponding processing and continues to execute the step of the monitoring process monitoring the recording service process; The other signals refer to other signals except the preset abnormality signal, the preset interruption signal and the preset abnormality recording signal.

5. The method according to claim 1 or 2, characterized in that: The preset abnormal signal includes at least one of the following: Illegal instruction SIGILL signal, tracking trap SIGTRAP signal, abort SIGABRT signal, bus error SIGBUS signal, segmentation error SIGSEG signal.

6. The method according to claim 1 or 2, characterized in that: The monitoring process and the recording service process adopt a process tracking mode, and after generating the recording file, the following steps are further included: The monitoring process sends a preset continuing execution signal to the recording service process so that the recording service process continues to execute; In the case of monitoring a preset exit signal sent by the recording service process, the monitoring process is released from monitoring the recording service process.

7. A device for generating a record file, characterized in that: include: A receiving module, used for receiving, based on the monitoring process, configuration information for generating a record file sent by a record service process, wherein the record service process is used for recording the running data of the target application as record data; A monitoring processing module is used to monitor the recording service process based on a monitoring process. When a preset abnormal signal sent by the recording service process is monitored, the recording data is obtained before the end of the recording service process and the recording file is generated based on the configuration information. The recording file is used for recording and playback.

8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method for generating a record file as described in any one of claims 1-6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method for generating a record file described in any one of claims 1 to 6 are implemented.

10. A vehicle, characterized in that: A set of instruction sets is stored, and the instruction sets are executed by the vehicle to implement the method for generating a record file as described in any one of claims 1-6.