Data race monitoring method and device, electronic equipment and storage medium

By parsing the memory access records of mutation test cases, automatically detecting data competition and saving call stack data, it solves the problem of manual detection dependence in the existing technology, achieves efficient data competition detection, and reduces labor costs.

CN118567966APending Publication Date: 2024-08-30BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310214563.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The detection of data competition in the existing technology mainly relies on manual detection, with a low degree of automation, resulting in high labor costs, and it is difficult to effectively detect memory access conflicts in a multi-threaded environment.

Method used

By obtaining the tracking data of mutation test cases, parsing memory access records, determining whether there is data competition based on preset judgment conditions, and saving call stack data when competition occurs, automatic detection of data competition is achieved.

Benefits of technology

It realizes automatic detection of data competition, saves a lot of labor costs, and can accurately determine memory access conflicts in a multi-threaded environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567966A
    Figure CN118567966A
Patent Text Reader

Abstract

The invention discloses a data race monitoring method and device, electronic equipment and a storage medium, and relates to the technical field of data processing, and the technical scheme comprises the steps: firstly, obtaining tracking data corresponding to a variation test case, analyzing the tracking data, and obtaining a memory access record; secondly, analyzing the memory access record, and determining whether data competition for performing write operation on the same address space exists in the memory access record or not according to a preset judgment condition; and finally, under the condition of determining that the data competition exists in the memory access record, storing call stack data corresponding to the variation test case. By analyzing the memory access record of the variation test case in the test process, whether the problem of data competition exists in the memory access record of each processor core or not is judged, and the call stack data of each processor core is stored under the condition that the data competition exists, so that automatic detection of the data competition is realized; and a large amount of labor cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a data contention monitoring method and device, an electronic device, and a storage medium. Background Art

[0002] As the parallel computing capabilities of computer hardware improve, more and more software adopts multi-threaded implementation to improve computing efficiency. With the improvement of computing efficiency, data competition may be introduced inadvertently; data competition refers to different threads in the same program performing two write operations or one write and one read operation on a shared memory location in an incorrectly synchronized manner. Data competition defects may cause inconsistent variable values, which may lead to program crashes and serious property losses.

[0003] Currently, data competition is mainly detected through manual detection, which has a low degree of automation and consumes a lot of manpower costs. Summary of the invention

[0004] The present disclosure provides a data contention monitoring method, device, electronic device and storage medium, the main purpose of which is to realize the automation of data contention detection.

[0005] According to a first aspect of the present disclosure, a data competition monitoring method is provided, which includes:

[0006] Obtaining tracking data corresponding to a mutation test case, and parsing the tracking data to obtain a memory access record, wherein the mutation test case is used to test and track data running status;

[0007] Parsing the memory access record, and determining whether there is data contention for writing operations to the same address space in the memory access record according to a preset determination condition;

[0008] When it is determined that the data competition exists in the memory access record, the call stack data corresponding to the mutation test case is saved; wherein the call stack data includes function call data.

[0009] Optionally, before obtaining the tracking data corresponding to the mutation test case, the method includes:

[0010] Obtain a target test case in a preset storage path, and perform mutation processing on the target test case to obtain a mutated test case;

[0011] The mutation test case is input into a vehicle micro control unit and the mutation test case is executed.

[0012] Optionally, after saving the call stack data corresponding to the mutation test case, the method includes:

[0013] Parsing the tracking data to obtain the code path covered by the mutation test case;

[0014] Determine whether there is untested code in the code path covered by the mutation test case;

[0015] If it is determined that the untested code exists in the code path covered by the mutation test case, the mutation test case is input into the preset storage path.

[0016] Optionally, parsing the tracking data to obtain the code path covered by the mutation test case includes:

[0017] When it is determined that there is no data competition in the memory access record, the tracking data is parsed to obtain the code path covered by the mutation test case.

[0018] Optionally, after determining whether there is untested code in the code path covered by the mutation test case, the method includes:

[0019] If it is determined that the untested code does not exist in the code path covered by the mutation test case, the mutation test case is discarded.

[0020] Optionally, before obtaining the target test case in the preset storage path, the method includes:

[0021] The vehicle micro control unit sets a tracking address range for the tracking data, and the tracking address range is determined according to a test range of the vehicle micro control unit.

[0022] According to a second aspect of the present disclosure, a data competition monitoring device is provided, comprising:

[0023] A first acquisition unit is used to acquire tracking data corresponding to a mutation test case, and parse the tracking data to acquire a memory access record, wherein the mutation test case is used to test and track data running status;

[0024] A determination unit, configured to parse the memory access record and determine whether there is data contention for writing to the same address space in the memory access record according to a preset determination condition;

[0025] A saving unit is used to save the call stack data corresponding to the mutation test case when it is determined that the data competition exists in the memory access record; wherein the call stack data includes function call data.

[0026] Optionally, the device comprises:

[0027] The mutation unit is used to obtain the target test case in a preset storage path before the first acquisition unit obtains the tracking data corresponding to the mutation test case, and mutate the target test case to obtain the mutation test case;

[0028] The execution unit is used to input the mutation test case into the vehicle micro control unit and execute the mutation test case.

[0029] Optionally, the device comprises:

[0030] A second acquisition unit is used to parse the tracking data to obtain the code path covered by the mutation test case after the storage unit saves the call stack data corresponding to the mutation test case;

[0031] A judging unit, used to judge whether there is untested code in the code path covered by the mutation test case;

[0032] An input unit is used to input the mutation test case into the preset storage path when it is determined that the untested code exists in the code path covered by the mutation test case.

[0033] Optionally, the second acquiring unit is further used for:

[0034] When it is determined that there is no data competition in the memory access record, the tracking data is parsed to obtain the code path covered by the mutation test case.

[0035] Optionally, the device comprises:

[0036] The discarding unit is used to discard the mutation test case after the judging unit judges whether there is untested code in the code path covered by the mutation test case, when it is determined that there is no untested code in the code path covered by the mutation test case.

[0037] Optionally, the device comprises:

[0038] A setting unit is used to set a tracking address range of the tracking data in the vehicle micro control unit before the mutation unit obtains the target test case under the preset storage path, and the tracking address range is determined according to the test range of the vehicle micro control unit.

[0039] Optionally, the device comprises:

[0040] The detection unit is used to reconfirm the target test case in the preset storage path according to the storage order of each test case after the judgment unit determines whether there is untested code in the code path covered by the variant test case, and continue to perform the detection of the vehicle micro control unit.

[0041] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0042] at least one processor; and

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

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

[0045] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0046] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.

[0047] The data competition monitoring method, device, electronic device and storage medium provided by the present disclosure include the following technical solutions: first, obtaining the tracking data corresponding to the variant test case, parsing the tracking data, and obtaining the memory access record, wherein the variant test case is used to test and track the data operation status; second, parsing the memory access record, and determining whether there is data competition for writing operations to the same address space in the memory access record according to a preset judgment condition; finally, in the case where it is determined that there is data competition in the memory access record, saving the call stack data corresponding to the variant test case; wherein the call stack data contains function call data. Compared with the related art, the embodiment of the present application parses the memory access record of the variant test case during the test process, determines whether there is a data competition problem in the memory access record of each processor core, and saves the call stack data of each processor core in the case of data competition, thereby realizing automatic detection of data competition and saving a lot of manpower costs.

[0048] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0050] Figure 1 A flowchart of a data contention monitoring method provided by an embodiment of the present disclosure;

[0051] Figure 2 A flowchart of another data contention monitoring method provided by an embodiment of the present disclosure;

[0052] Figure 3 A flowchart of another data contention monitoring method provided by an embodiment of the present disclosure;

[0053] Figure 4 A schematic diagram of the structure of a data contention monitoring device provided by an embodiment of the present disclosure;

[0054] Figure 5 A schematic diagram of the structure of another data contention monitoring device provided by an embodiment of the present disclosure;

[0055] Figure 6 A schematic block diagram of an exemplary electronic device provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0056] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0057] The following describes the data contention monitoring method, device, electronic device, and storage medium according to the embodiments of the present disclosure with reference to the accompanying drawings.

[0058] Figure 1 A flowchart of a data contention monitoring method provided in an embodiment of the present disclosure.

[0059] like Figure 1 As shown, the method comprises the following steps:

[0060] Step 101, obtaining tracking data corresponding to a mutation test case, and parsing the tracking data to obtain memory access records, wherein the mutation test case is used to test and track data running status.

[0061] In one implementable method of an embodiment of the present application, the tracing data of the variant test case can be collected using the Trace function. The Trace function can realize the tracing and recording of the instruction stream without affecting the operation of the MCU (Microcontroller Unit). In the embodiment of the present application, the collection of tracing data by the Trace function is used as an example for explanation, but this narrative method is not a limitation on the specific tracing data collection method, and other methods can also be used to track the data, which is not limited by the embodiment of the present application.

[0062] It should be noted that different processor cores run different processes, and therefore have corresponding memory access records.

[0063] Step 102: parse the memory access record, and determine whether there is data contention for writing to the same address space in the memory access record according to a preset determination condition.

[0064] Analyze the memory access records of different processor cores respectively to determine whether the data on different processor cores access the same address space; the preset judgment condition is that the data on at least two cores access the unified memory, and there is at least one write operation, and no multi-core synchronization measures are used; if there is data that meets the preset judgment condition in the memory access records on the multiple cores, it can be determined that there is data contention.

[0065] In one implementable method of the embodiment of the present application, when determining whether there is data contention, the following method can be used: the memory access records corresponding to different processor cores in the same time period are saved in corresponding queues. If it is found that data on different processor cores access the same address space, and one of them is a data write operation, and no multi-core synchronization measures are used, it is considered that there is a data contention problem.

[0066] Step 103, when it is determined that the data competition exists in the memory access record, save the call stack data corresponding to the mutation test case; wherein the call stack data includes function call data.

[0067] When data contention is confirmed, the process call stack data corresponding to each processor core is output, and the current data contention error is recorded to facilitate subsequent manual review.

[0068] The data competition monitoring method provided by the present disclosure includes the following technical solutions: first, obtaining the tracking data corresponding to the variant test case, and parsing the tracking data to obtain the memory access record, wherein the variant test case is used to test and track the data operation status; second, parsing the memory access record, and determining whether there is data competition for writing operations to the same address space in the memory access record according to a preset judgment condition; finally, in the case where it is determined that there is data competition in the memory access record, saving the call stack data corresponding to the variant test case; wherein the call stack data includes function call data. Compared with the related art, the embodiment of the present application parses the memory access record of the variant test case during the test process, determines whether there is a data competition problem in the memory access record of each processor core, and saves the call stack data of each processor core in the case of data competition, thereby realizing automatic detection of data competition and saving a lot of manpower costs.

[0069] Before executing step 101, the vehicle microcontroller unit needs to be tested according to the mutation test case to obtain the tracking data of the mutation test case. Figure 2 , Figure 2 A flow chart of a data competition monitoring method provided by an embodiment of the present disclosure is provided. Before obtaining the tracking data corresponding to the mutation test case, the method includes:

[0070] Step 201, obtain a target test case in a preset storage path, and perform mutation processing on the target test case to obtain a mutated test case.

[0071] Before executing this step, a certain number of test cases are first manually edited and stored in a preset storage path. When the vehicle test is executed, a test case is extracted from the preset storage path as the target test case. For example, 20 or 25 test cases can be edited, etc., which is not limited to this embodiment of the present application.

[0072] When mutating the target test case, different mutation strategies and methods can be determined according to different business scenarios, such as bit flipping or byte flipping, etc., which can be determined according to needs. The embodiments of the present application do not limit the mutation strategies and mutation methods of the test case.

[0073] Step 202: input the mutation test case into the vehicle micro control unit and execute the mutation test case.

[0074] After the target test case is mutated, multiple mutation test cases will be generated. Therefore, when selecting mutation test cases to test the vehicle microcontroller unit, they can be selected in the chronological order of the mutation, or mutation test cases can be randomly selected. The embodiments of the present application do not limit this.

[0075] After determining whether there is multi-core data competition, you also need to analyze the code paths covered by mutation test cases; see Figure 3 , Figure 3 A flow chart of a data competition monitoring method provided by an embodiment of the present disclosure is provided. After saving the call stack data corresponding to the mutation test case, the method includes:

[0076] Step 301: parse the tracking data to obtain the code path covered by the mutation test case.

[0077] In one implementable method of an embodiment of the present application, when collecting path information of a variant test case through Trace, if the complete path information is collected, the amount of data will be too large, thereby affecting the test speed. Therefore, when testing a vehicle, for the code data in the microcontroller unit to be tested, the tracking address range of the tracking data in the vehicle microcontroller unit setting is determined according to the test range of the vehicle microcontroller unit; that is, only the code path within the tracking address range is recorded through Trace.

[0078] In one possible implementation of the embodiment of the present application, when it is determined that there is no data competition in the memory access record, the tracking data is parsed to obtain the code path covered by the mutation test case.

[0079] Step 302: determine whether there is untested code in the code path covered by the mutation test case.

[0080] Since each mutation test case is obtained by random mutation, the mutation direction cannot be controlled, and there may be a situation where there is no untested code path in the covered code path in the mutation test card.

[0081] Step 303: If it is determined that the untested code exists in the code path covered by the mutation test case, the mutation test case is input into the preset storage path.

[0082] When it is determined that there is untested code in the code path covered by the mutation test case, it means that this mutation test case is a valid mutation. If mutation is performed again based on this mutation test case, the possibility that there is untested code in the code path covered by the obtained sub-mutation test case is relatively high. Therefore, for mutation test cases that have untested code in the covered code path, they are re-entered into the preset storage path.

[0083] In one implementable method of the embodiment of the present application, if it is determined that the untested code does not exist in the code path covered by the mutation test case, the mutation test case is discarded; when there is no untested code in the code path covered by the mutation test case, if a mutation is performed on the basis of this mutation test case, the code path covered by the mutated sub-mutation test case may not contain untested code, so this part of the mutation test case is discarded.

[0084] In one implementable manner of an embodiment of the present application, after determining whether there is untested code in the code path covered by the mutation test case, the method includes: in the preset storage path, reconfirming the target test case according to the storage order of each test case, and continuing to execute the detection of the vehicle microcontroller unit; it should be noted that a target test case in the preset storage path may obtain multiple mutation test cases after mutation processing. After the vehicle test is completed with multiple mutation test cases, a target test case is selected in the preset storage path according to the storage order to mutate again, and the test of the vehicle is continued.

[0085] Corresponding to the above-mentioned data contention monitoring method, the present invention further proposes a data contention monitoring device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.

[0086] In one implementable method of an embodiment of the present application, before executing this scheme, it is necessary to set an end test condition. For example, the end test condition can be set to end the test after testing the vehicle micro control unit a predetermined number of times, or it can be set to stop the test after the code test coverage of the vehicle position control unit reaches a preset threshold. Specifically, the embodiment of the present application does not limit the setting of the end test condition.

[0087] Figure 4 A schematic diagram of a data contention monitoring device provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, including:

[0088] A first acquisition unit 41 is used to acquire tracking data corresponding to a mutation test case, and parse the tracking data to acquire a memory access record, wherein the mutation test case is used to test and track data running status;

[0089] A determination unit 42, configured to parse the memory access record and determine whether there is data contention for writing to the same address space in the memory access record according to a preset determination condition;

[0090] The saving unit 43 is used to save the call stack data corresponding to the mutation test case when it is determined that the data competition exists in the memory access record; wherein the call stack data includes function call data.

[0091] The data competition monitoring device provided by the present disclosure has a technical solution including: first, obtaining the tracking data corresponding to the variant test case, and parsing the tracking data to obtain the memory access record, wherein the variant test case is used to test and track the data operation status; second, parsing the memory access record, and determining whether there is data competition for writing operations to the same address space in the memory access record according to a preset judgment condition; finally, in the case where it is determined that there is data competition in the memory access record, saving the call stack data corresponding to the variant test case; wherein the call stack data includes function call data. Compared with the related art, the embodiment of the present application parses the memory access record of the variant test case during the test process, determines whether there is a data competition problem in the memory access record of each processor core, and saves the call stack data of each processor core in the case of data competition, thereby realizing automatic detection of data competition and saving a lot of manpower costs.

[0092] Furthermore, in a possible implementation of this embodiment, as Figure 5 As shown, the device comprises:

[0093] The mutation unit 44 is used to obtain the target test case in the preset storage path and perform mutation processing on the target test case to obtain the mutated test case before the first acquisition unit 41 obtains the tracking data corresponding to the mutated test case;

[0094] The execution unit 45 is used to input the mutation test case into the vehicle micro control unit and execute the mutation test case.

[0095] Furthermore, in a possible implementation of this embodiment, as Figure 5 As shown, the device comprises:

[0096] A second acquisition unit 46 is used to parse the tracking data to obtain the code path covered by the mutation test case after the storage unit 43 saves the call stack data corresponding to the mutation test case;

[0097] A judging unit 47, used to judge whether there is untested code in the code path covered by the mutation test case;

[0098] The input unit 48 is used to input the mutation test case into the preset storage path when it is determined that the untested code exists in the code path covered by the mutation test case.

[0099] Furthermore, in a possible implementation of this embodiment, the second acquiring unit 46 is further configured to:

[0100] When it is determined that there is no data competition in the memory access record, the tracking data is parsed to obtain the code path covered by the mutation test case.

[0101] Furthermore, in a possible implementation of this embodiment, as Figure 5 As shown, the device comprises:

[0102] The discarding unit 49 is used to discard the mutation test case after the judging unit 47 judges whether there is untested code in the code path covered by the mutation test case, when it is determined that there is no untested code in the code path covered by the mutation test case.

[0103] Furthermore, in a possible implementation of this embodiment, as Figure 5 As shown, the device comprises:

[0104] The setting unit 410 is used to set the tracking address range of the tracking data in the vehicle micro control unit before the mutation unit 44 obtains the target test case under the preset storage path, and the tracking address range is determined according to the test range of the vehicle micro control unit.

[0105] Furthermore, in a possible implementation of this embodiment, as Figure 5 As shown, the device comprises:

[0106] The detection unit 411 is used to reconfirm the target test case in the preset storage path according to the storage order of each test case after the judgment unit 47 determines whether there is untested code in the code path covered by the variant test case, and continue to execute the detection of the vehicle micro control unit.

[0107] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principle is the same, which is not limited in this embodiment.

[0108] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0109] Figure 6A schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0110] like Figure 6 As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 502 or a computer program loaded from a storage unit 508 to a RAM (Random Access Memory) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An I / O (Input / Output) interface 505 is also connected to the bus 504.

[0111] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0112] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as a data competition monitoring method. For example, in some embodiments, the data competition monitoring method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the aforementioned data contention monitoring method in any other appropriate manner (for example, by means of firmware).

[0113] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0114] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0115] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball), through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0117] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0118] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0119] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0121] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data competition monitoring method, characterized in that: include: Obtaining tracking data corresponding to a mutation test case, and parsing the tracking data to obtain a memory access record, wherein the mutation test case is used to test and track data running status; Parsing the memory access record, and determining whether there is data contention for writing operations to the same address space in the memory access record according to a preset determination condition; When it is determined that the data competition exists in the memory access record, the call stack data corresponding to the mutation test case is saved; wherein the call stack data includes function call data.

2. The method according to claim 1, characterized in that Before obtaining the tracking data corresponding to the mutation test case, the method includes: Obtain a target test case in a preset storage path, and perform mutation processing on the target test case to obtain a mutated test case; The mutation test case is input into a vehicle micro control unit and the mutation test case is executed.

3. The method according to claim 2, characterized in that After saving the call stack data corresponding to the mutation test case, the method includes: Parsing the tracking data to obtain the code path covered by the mutation test case; Determine whether there is untested code in the code path covered by the mutation test case; If it is determined that the untested code exists in the code path covered by the mutation test case, the mutation test case is input into the preset storage path.

4. The method according to claim 3, characterized in that Parsing the tracking data to obtain the code path covered by the mutation test case includes: When it is determined that there is no data competition in the memory access record, the tracking data is parsed to obtain the code path covered by the mutation test case.

5. The method according to claim 3, characterized in that: After determining whether there is untested code in the code path covered by the mutation test case, the method includes: If it is determined that the untested code does not exist in the code path covered by the mutation test case, the mutation test case is discarded.

6. The method according to claim 5, characterized in that Before obtaining the target test case in the preset storage path, the method includes: The vehicle micro control unit sets a tracking address range for the tracking data, and the tracking address range is determined according to a test range of the vehicle micro control unit.

7. A data competition monitoring device, characterized in that: include: A first acquisition unit is used to acquire tracking data corresponding to a mutation test case, and parse the tracking data to acquire a memory access record, wherein the mutation test case is used to test and track data running status; A determination unit, configured to parse the memory access record and determine whether there is data contention for writing to the same address space in the memory access record according to a preset determination condition; A saving unit is used to save the call stack data corresponding to the mutation test case when it is determined that the data competition exists in the memory access record; wherein the call stack data includes function call data.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Method and device for detecting video memory competition of GPU (Graphics Processing Unit) end based on CPU end

    CN122019311A