Software development data management method and apparatus, and storage device

CN122903026APending Publication Date: 2026-10-13BEIJING YAOFEITU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611082529.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0005]为此,本发明提供软件开发数据管理方法、装置及存储设备,用以克服现有技术中无法回溯并利用开发者编写代码时的实时认知状态进行代码质量与风险管理,导致高风险代码识别滞后且不准确的问题

Benefits of technology

[0047]与现有技术相比,本发明的有益效果在于,通过在开发者编码阶段同步采集脑电波幅、注视轨迹等多模态生理数据,并在代码提交时刻按行解析,构建融合脑电偏差值与眼动偏差值的聚合风险指数,将源代码行自动判定为高风险或中度风险状态,实现了代码缺陷风险的客观量化与分级,将审查资源与风险等级精准耦合,从而把传统代码审查中依赖主观经验的模糊判断,转变为由开发者实时生理状态驱动的主动式风险拦截机制,在不显著增加整体审查投入的条件下,有效遏制了因认知过载导致的逻辑漏洞、边界遗漏等高危害缺陷逃逸,显著提升了软件质量保障体系的早期缺陷捕获效率与智能化水平。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903026A_ABST
    Figure CN122903026A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of software development auxiliary, especially relates to a software development data management method and device and a storage device, through synchronously collecting multi-modal physiological data such as brain wave amplitude and gaze trajectory in the coding stage of the developer, and parsing by line at the moment of code submission, an aggregated risk index is constructed by fusing the brain wave deviation value and the eye movement deviation value, the source code line is automatically determined as a high-risk or moderate-risk state, the objective quantification and grading of the code defect risk are realized, the review resources and the risk level are accurately coupled, thereby the fuzzy judgment depending on subjective experience in the traditional code review is changed into an active risk interception mechanism driven by the real-time physiological state of the developer, under the condition that the overall review investment is not significantly increased, the high-hazard defects such as logic loopholes and boundary omissions caused by cognitive overload are effectively prevented from escaping, and the early defect capture efficiency and intelligent level of the software quality assurance system are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software development support technology, and in particular to software development data management methods, apparatus and storage devices. Background Technology

[0002] In software development, code quality is closely related to the developer's cognitive state. Excessive cognitive load is one of the main causes of code defects. When developers are under high cognitive load, their attentional resources tend to be exhausted, making them more likely to introduce errors in logical judgments, boundary condition handling, and variable naming. These errors are often difficult to detect through routine code reviews later on.

[0003] Existing code quality management methods primarily focus on analyzing the static characteristics of the code itself. This includes using static analysis tools to check for coding style issues, potential null pointer exceptions, or resource leaks, or assessing the structural complexity of code modules using metrics like cyclomatic complexity. However, these traditional methods have a fundamental flaw: they can only assess the morphological complexity of the final "output," completely ignoring the real-time cognitive state of the code "producer"—the developer—when writing that code. A seemingly simple, compliant piece of code could very well have been written when the developer was extremely fatigued, distracted, or logically confused, concealing logical fallacies that static analysis cannot detect. Simply relying on the analysis of the code text cannot trace the cognitive load level of the developer when writing each line of code, creating a blind spot in code quality attribution and risk prediction, and preventing intervention at the source of high-risk code.

[0004] Therefore, it is necessary to propose software development data management methods, devices, and storage equipment to solve at least one of the above-mentioned technical problems. Summary of the Invention

[0005] To address this issue, the present invention provides a software development data management method, apparatus, and storage device to overcome the problem in the prior art that the inability to trace back and utilize the developer's real-time cognitive state when writing code for code quality and risk management leads to delayed and inaccurate identification of high-risk code.

[0006] Firstly, this disclosure provides a software development data management method for use in code editors, including:

[0007] During the process of developers writing source code, at least one single line of source code is used as a synchronization anchor point to collect the developer's target bioelectrical data, which includes at least the developer's electroencephalogram (EEG) signal and eye movement signal.

[0008] A state baseline model for the developer was constructed based on historical bioelectric data;

[0009] The multimodal feature parameters of the developer are extracted from the target bioelectric data. Based on the state baseline model and the multimodal feature parameters, the cognitive load comprehensive index of each line of source code is calculated.

[0010] During the coding phase, in response to the cognitive load index of the single line of source code exceeding a preset coding warning threshold, an attention prompt is triggered for the developer.

[0011] During the code submission phase, in response to the cognitive load comprehensive index of the single line of source code exceeding the submission record threshold, submission metadata is embedded in the single line of source code to generate the target single line of source code. The submission metadata includes at least the cognitive load comprehensive index, the cognitive load type identifier corresponding to the cognitive load comprehensive index, and the collection time of the single line of source code.

[0012] Calculate the continuous high-risk density of the target single-line source code, and obtain the aggregated risk index of the target single-line source code based on the continuous high-risk density and the cognitive load comprehensive index of the target single-line source code;

[0013] The risk status of the target single-line source code is determined based on the aggregated risk index, and the review strategy for the target single-line source code is indicated.

[0014] Furthermore, the step of collecting the developer's target bioelectrical data using at least one single line of source code as a synchronization anchor includes:

[0015] Monitor the position of the cursor in the code editor, and record the time when the cursor breaks to a new line.

[0016] Based on the line break time, the developer's EEG signal fragments and eye movement signal fragments are extracted as the target bioelectrical data corresponding to that single line of source code.

[0017] Furthermore, the construction of the developer's state baseline model based on historical bioelectrical data includes:

[0018] Obtain the developer's historical bioelectric data;

[0019] Gaussian mixture model was used to fit the historical bioelectric data to obtain a multidimensional joint probability distribution;

[0020] Based on the mean vector and covariance matrix of the multidimensional joint probability distribution, the developer's state baseline model is constructed.

[0021] Further, the calculation of the cognitive load composite index for each of the individual lines of source code includes:

[0022] Extract the developer's electroencephalogram (EEG) feature vector and eye movement feature vector from the target bioelectrical data;

[0023] Based on the state baseline model, calculate the EEG deviation value and eye movement deviation value corresponding to the EEG feature vector and the eye movement feature vector;

[0024] The weighted sum of the EEG deviation value and the eye movement deviation value is used to obtain the basic cognitive load index;

[0025] In response to the EEG deviation value exceeding a preset EEG abnormality threshold or the eye movement deviation value exceeding a preset eye movement abnormality threshold, a penalty increment is calculated on the basic cognitive load index to obtain the comprehensive cognitive load index.

[0026] Further, the calculation of the continuous high-risk density of the target single-line source code, and the obtaining of the aggregated risk index of the target single-line source code based on the continuous high-risk density and the cognitive load comprehensive index of the target single-line source code, includes:

[0027] Based on the cognitive load comprehensive index of the N adjacent single-line source codes before and after the target single-line source code, the continuous high-risk density of the target single-line source code is determined, where N is an integer greater than or equal to 1.

[0028] The aggregated risk index is obtained by multiplying the continuous high-risk density by the cognitive load comprehensive index of the target single-line source code.

[0029] Furthermore, determining the risk status of the target single-line source code based on the aggregated risk index and indicating the review strategy for the target single-line source code includes:

[0030] In response to the aggregated risk index exceeding the preset high-risk status determination threshold, the target single line of source code is determined to be a high-risk code line, and the target single line of source code is assigned to the enhanced code review process;

[0031] In response to the aggregated risk index not exceeding the preset high-risk state determination threshold, the target single-line source code is determined to be a medium-risk state code line, a cognitive load attention mark is added to the target single-line source code, and the target single-line source code is assigned to the first type of review process;

[0032] The enhanced code review process has a higher review level than the first type of review process.

[0033] Secondly, this disclosure provides a software development data management device for use in a code editor, including:

[0034] The acquisition module is configured to acquire the developer's target bioelectrical data during the developer's source code writing process, using at least one single line of source code as a synchronous anchor point. The target bioelectrical data includes at least the developer's electroencephalogram (EEG) signal and eye movement signal.

[0035] The build module is configured to construct the developer's state baseline model based on historical bioelectrical data;

[0036] The extraction module is configured to extract the developer's multimodal feature parameters from the target bioelectrical data, and calculate the cognitive load composite index for each line of source code based on the state baseline model and the multimodal feature parameters.

[0037] The attention prompting module is configured to trigger an attention prompt to the developer during the coding phase in response to the cognitive load index of the single line of source code exceeding a preset coding warning threshold.

[0038] The generation module is configured to, during the code submission phase, in response to the cognitive load comprehensive index of the single line of source code exceeding the submission record threshold, embed submission metadata into the single line of source code to generate the target single line of source code, wherein the submission metadata includes at least the cognitive load comprehensive index, the cognitive load type identifier corresponding to the cognitive load comprehensive index, and the collection time of the single line of source code;

[0039] The calculation module is configured to calculate the continuous high-risk density of the target single-line source code, and obtain the aggregated risk index of the target single-line source code based on the continuous high-risk density and the cognitive load comprehensive index of the target single-line source code.

[0040] The strategy module is configured to determine the risk status of the target single-line source code based on the aggregated risk index and to indicate the review strategy for the target single-line source code.

[0041] Thirdly, this disclosure provides a storage device, including:

[0042] One or more processors;

[0043] Storage device, on which one or more programs are stored,

[0044] When the above-described one or more programs are executed by the above-described one or more processors, the above-described one or more processors implement the method as described in any embodiment of the first aspect of this disclosure.

[0045] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by one or more processors, implements the method described in any embodiment of the first aspect of this disclosure.

[0046] Fifthly, this disclosure provides a computer program product including a computer program / instructions that, when executed by a processor, implement the method described in any embodiment of the first aspect of this disclosure.

[0047] Compared with existing technologies, the beneficial effects of this invention are as follows: by simultaneously collecting multimodal physiological data such as EEG amplitude and gaze trajectory during the developer's coding phase, and analyzing the data line by line at the time of code submission, an aggregated risk index integrating EEG deviation value and eye movement deviation value is constructed. This automatically determines the source code line as high-risk or medium-risk, achieving objective quantification and classification of code defect risks. It precisely couples review resources with risk levels, thereby transforming the vague judgment relying on subjective experience in traditional code review into an active risk interception mechanism driven by the developer's real-time physiological state. Without significantly increasing the overall review input, it effectively curbs the escape of high-risk defects such as logical loopholes and boundary omissions caused by cognitive overload, and significantly improves the early defect capture efficiency and intelligence level of the software quality assurance system. Attached Figure Description

[0048] Figure 1 This is a system architecture diagram of one embodiment of the software development data management method disclosed herein;

[0049] Figure 2A This is a flowchart of one embodiment of the software development data management method disclosed herein;

[0050] Figure 2B This is an exploded flowchart of one embodiment of step 201 of the present disclosure;

[0051] Figure 2C This is an exploded flowchart of one embodiment of step 203 of this disclosure;

[0052] Figure 2D This is an exploded flowchart of one embodiment of step 207 of this disclosure;

[0053] Figure 3 This is a schematic diagram of a structure of an embodiment of a software development data management device according to the present disclosure. Detailed Implementation

[0054] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0055] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0056] It should be noted that in the description of this invention, the terms "upper", "lower", "left", "right", "inner", "outer", etc., which indicate directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of this invention.

[0057] Furthermore, it should be noted that, in the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0058] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the software development data management methods, apparatus, storage devices, and storage media of this disclosure can be applied.

[0059] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0060] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as software development and data management applications, voice interaction applications, video conferencing applications, short video social applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0061] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various storage devices with microphones and speakers, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), portable computers, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are made here.

[0062] Server 105 can be a server that provides various services, such as a backend server that processes the target bioelectrical data of developers collected on terminal devices 101, 102, and 103. The backend server can perform corresponding processing based on the target bioelectrical data of developers collected from the terminal devices.

[0063] In some cases, the software development data management method provided in this disclosure can be jointly executed by terminal devices 101, 102, and 103 and server 105. For example, the step of "constructing a developer's state baseline model based on historical bioelectrical data" can be executed by terminal devices 101, 102, and 103, and the step of "extracting the developer's multimodal feature parameters from the target bioelectrical data and calculating the cognitive load comprehensive index of each single line of source code based on the state baseline model and the multimodal feature parameters" can be executed by server 105. This disclosure does not limit this. Correspondingly, the software development data management device can also be respectively set in terminal devices 101, 102, and 103 and server 105.

[0064] In some cases, the software development data management method provided in this disclosure can be executed by server 105. Accordingly, the software development data management device can also be set in server 105. In this case, the system architecture 100 may not include terminal devices 101, 102, and 103.

[0065] In some cases, the software development data management method provided in this disclosure can be executed by terminal devices 101, 102, and 103. Correspondingly, the software development data management device can also be set in terminal devices 101, 102, and 103. In this case, the system architecture 100 may not include server 105.

[0066] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (for example, used to provide distributed services), or as a single software program or software module. No specific limitations are made here.

[0067] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0068] Continue to refer to Figure 2A , Figure 2A A flow 200 is shown as an embodiment of a software development data management method according to the present disclosure. Figure 2A The software development data management method shown can be applied to Figure 1 The terminal device or server shown. This process 200 is applied to a code editor and includes the following steps:

[0069] Step 201: During the process of the developer writing the source code, collect the developer's target bioelectric data using at least one single line of source code as a synchronization anchor point.

[0070] In this embodiment, the executing entity of the software development data management method (e.g.) Figure 1 The server (105) can first collect the developer's target bioelectrical data at the smallest granularity unit, using a single line of source code, during the developer's source code writing process. The target bioelectrical data includes at least the developer's electroencephalogram (EEG) and eye-tracking signals, which are electrophysiological signals that can directly or indirectly characterize the developer's cognitive activity and visual attention allocation. The EEG signals are collected through a non-invasive electrode cap deployed on the developer's scalp, reflecting the electrical activity of neurons in the cerebral cortex and are closely related to working memory load, attention concentration, and information processing intensity. The eye-tracking signals are collected through an eye tracker, including pupil diameter changes, fixation point coordinates, fixation duration, and saccade trajectory, and are key indicators for measuring the depth of visual information search and cognitive processing. Synchronization anchors refer to precisely segmenting and binding the continuous bioelectrical data stream to a specific line of source code in the time dimension, so that each line of source code has its own exclusive segment of physiological data reflecting the developer's cognitive state when writing it.

[0071] In some alternative implementations, step 201 may include, for example: Figure 2B The following steps 2011 to 2012 are shown:

[0072] Step 2011: Monitor the position of the cursor in the code editor. When a line break is detected, record the time of the line break.

[0073] Here, the cursor position refers to the row and column coordinates of the current text insertion point in the screen coordinate system, precisely identifying the developer's current editing focus. A cursor line break refers to the event where the cursor moves from the end of the current line to the beginning of the next new line after the developer presses the Enter key, marking the logical completion of the previous line of source code writing. The line break moment refers to the precise timestamp capturing the press of the Enter key and the completion of the cursor line break action; this timestamp will serve as the alignment reference for bioelectrical data acquisition of that line of source code.

[0074] By monitoring the cursor position and recording the precise line break time, a unique and reliable time boundary point is provided for extracting bioelectrical signal fragments, enabling the collected physiological data to fully cover the developer's complete cognitive processing.

[0075] Step 2012: Extract the developer's EEG signal fragments and eye movement signal fragments based on the line break time, as the target bioelectrical data corresponding to the single line of source code.

[0076] Here, an EEG signal segment refers to a record of spontaneous electrical activity of the developer's cerebral cortex, taken within a preset time window (e.g., the first 2 seconds) from the line break point. This EEG signal segment is obtained using a wearable EEG acquisition device and reflects neural activities such as attention and working memory load during the writing of that single line of source code. An eye movement signal segment refers to data on the developer's eye movement trajectory and pupil diameter changes, taken within the same preset time window from the line break point. This eye movement signal segment is obtained using an eye tracker and reflects information retrieval, visual attention allocation, and processing depth. This preset time window must cover the average time it takes for the developer to conceive and type the entire line of code.

[0077] By using line break moments as a baseline and retrospectively extracting EEG and eye movement signal segments, it is possible to accurately capture the cognitive state of developers when writing code, enabling the collected target bioelectrical data to completely and accurately map the entire cognitive processing load of the single line of source code from thought initiation to completion output.

[0078] Step 202: Construct a state baseline model for the developer based on historical bioelectric data.

[0079] Here, historical bioelectrical data refers to the collection of EEG and eye-tracking signals from multiple preceding coding periods, labeled with the corresponding coding tasks and contexts. The state baseline model is a mathematical function or parameter set obtained by fitting the historical bioelectrical data with a probability distribution, which quantifies the normal fluctuation range of the developer's cognitive state. It represents the benchmark of the developer's cognitive physiological characteristics under normal conditions.

[0080] In some alternative implementations, step 202 may include steps one through three:

[0081] Step 1: Obtain the developer's historical bioelectric data.

[0082] Here, we first retrieve and load the de-identified and preprocessed historical bioelectrical data associated with the developer's identity from a dedicated physiological data repository. The acquired historical bioelectrical data needs to cover various cognitive states of the developer under different working memory loads, different coding difficulties, and different time periods.

[0083] Step 2: Fit the historical bioelectric data using a Gaussian mixture model to obtain a multidimensional joint probability distribution.

[0084] Here, Gaussian mixture models are generative models that approximate arbitrarily complex data distributions using a weighted sum of multiple Gaussian probability density functions. Multidimensional joint probability distributions refer to a high-dimensional probability density function fitted to a feature vector composed of multiple frequency band features of EEG signals (such as theta wave, alpha wave, and beta wave power spectra) and multiple indicators of eye movement signals (such as fixation duration and saccade amplitude). This function describes the probability of various combinations of (EEG features, eye movement features) occurring in the given developer.

[0085] Step 3: Based on the mean vector and covariance matrix of the multidimensional joint probability distribution, construct the developer's state baseline model.

[0086] Here, the mean vector refers to the center point of the feature combination representing the most common cognitive state of the developer, extracted from each component of the fitted Gaussian mixture model. The covariance matrix is ​​a parameter matrix describing the magnitude and direction of the linkage changes between various physiological feature dimensions; it quantifies the normal fluctuation range and pattern of the developer's cognitive state. The mean vector and covariance matrix together constitute the core parameters of the state baseline model.

[0087] By using a Gaussian mixture model to fit historical data and extracting the mean vector and covariance matrix, the constructed state baseline model can not only capture the most typical cognitive state center of developers, but also quantify the boundaries and forms of their normal fluctuations. This provides an accurate probability measure for calculating the deviation of target data from the baseline, thus improving the anomaly judgment of cognitive load from simple threshold comparison to probability-based anomaly detection.

[0088] Step 203: Extract the developer's multimodal feature parameters from the target bioelectrical data, and calculate the cognitive load composite index for each line of source code based on the state baseline model and the multimodal feature parameters.

[0089] Here, multimodal feature parameters refer to time-frequency domain or statistical features with cognitive state discrimination capabilities extracted from physiological signals of two different modalities: EEG and eye movement. Examples include the theta / β ratio and sample entropy in EEG, and the average fixation duration and scan rate in eye movement. The cognitive load comprehensive index is a quantitative value that integrates the degree of deviation between multimodal feature parameters and the baseline model, and is corrected for anomaly penalties. The higher the value, the higher the mental burden, attention concentration, and working memory usage of the developer when writing that line of source code.

[0090] In some alternative implementations, step 203 may include, for example: Figure 2C The following steps 2031 to 2034 are shown:

[0091] Step 2031: Extract the developer's EEG feature vector and eye movement feature vector from the target bioelectric data.

[0092] Here, EEG feature vectors refer to one-dimensional arrays calculated from truncated EEG signal segments after signal processing such as Fourier transform and wavelet packet decomposition, consisting of relative power spectral density of each frequency band, amplitude and latency of event-related potentials, etc., which can reflect the brain's alertness level and information processing intensity. Eye movement feature vectors refer to one-dimensional arrays calculated from eye movement signal segments after analysis, consisting of indicators such as average fixation duration, fixation point area, saccade distance, and pupil diameter change rate, which can reflect visual information search strategies and cognitive processing depth.

[0093] By extracting feature vectors from different modes, the specific representation of different physiological signals on different dimensions of cognitive load is preserved, providing an independent feature space for fine-grained bias analysis and weighting.

[0094] Step 2032: Calculate the EEG deviation value and eye movement deviation value corresponding to the EEG feature vector and eye movement feature vector based on the state baseline model.

[0095] Here, the EEG deviation value refers to the negative log-likelihood or Mahalanobis distance of the extracted EEG feature vector when it is input into the multidimensional joint probability distribution of the state baseline model. This value quantitatively describes the degree to which the current brain activity state deviates from the developer's normal EEG state pattern. Similarly, the eye movement deviation value is a measure of the probability distribution deviation between the current eye movement pattern and the baseline eye movement pattern. These two deviation values ​​eliminate individual differences and represent the normalized degree of cognitive abnormality.

[0096] By calculating the EEG and eye movement deviation values ​​corresponding to the EEG feature vectors and eye movement feature vectors based on the state baseline model, the magnitude of the deviation of the target cognitive state relative to the individual's normal state can be objectively measured, providing a standardized measurement standard for comparing cognitive loads across different developers.

[0097] Step 2033: Weighted summation of EEG deviation value and eye movement deviation value to obtain the basic cognitive load index.

[0098] Here, the basic cognitive load index is an initial measure of cognitive load derived from a linear combination of the abnormalities observed in the EEG and OMG channels. The weighting coefficients in the weighted summation were determined using historical data and represent the relative importance of EEG and OMG in revealing code-related cognitive load.

[0099] By using weighted summation, complementary information from the central nervous system and the sensorimotor system is integrated, making the basic cognitive load index more robust and comprehensive in reflecting the overall cognitive state of developers when writing code than single-modal indicators, thus avoiding inaccurate judgments caused by noise interference in single-modal indicators.

[0100] Step 2034: In response to the EEG deviation value exceeding the preset EEG abnormality threshold or the eye movement deviation value exceeding the preset eye movement abnormality threshold, the penalty increment of the basic cognitive load index is calculated to obtain the comprehensive cognitive load index.

[0101] Here, the preset EEG abnormality threshold and preset eye movement abnormality threshold are artificially set extreme critical points based on the statistical distribution of historical data (such as the outer boundary of the 95% confidence interval of the baseline model), used to identify severe cognitive overload or cognitive disconnection states. The penalty increment calculation refers to multiplying the basic cognitive load index by a penalty factor greater than 1 (such as 1.5) or adding a preset penalty base value to emphasize the extreme abnormality of the cognitive state at the time the source code was written. The resulting comprehensive cognitive load index, used as the final indicator value, is more sensitive to occasional extreme abnormal states.

[0102] As examples, specific embodiments one and two of step 2034 are listed here: Specific Implementation Example 1:

[0104] While developer A was writing a single line of source code, their current EEG deviation value was measured to be 11.6. Developer A's preset EEG abnormality threshold was 9.8, and the current deviation value of 11.6 significantly exceeded this threshold, triggering the penalty increment condition. At this time, developer A's baseline cognitive load index was 78. Due to the abnormality in the EEG channel, a penalty increment multiplication method was used, with the penalty factor set to 1.6. The calculated comprehensive cognitive load index was 78 × 1.6 = 124.8. After rounding, the comprehensive cognitive load index for this single line of source code was 125. Specific Implementation Example 2:

[0106] While writing a single line of source code, Developer B's current eye movement deviation value was measured in real time to be 8.7. Developer B's preset eye movement abnormality threshold is 7.2, and the current deviation value of 8.7 exceeds this threshold, triggering the penalty increment condition. At this time, Developer B's baseline cognitive load index is 65. Due to the abnormality in the eye movement channel, a penalty increment addition method is used for calculation, with the penalty base value set to 30. The calculated comprehensive cognitive load index is 65 + 30 = 95.

[0107] By setting thresholds and introducing a penalty increment mechanism, it is possible to effectively distinguish between ordinary cognitive fluctuations and extreme cognitive overload or even cognitive disconnection, such as "emptiness" caused by extreme fatigue. This ensures that single lines of source code with extremely high cognitive risks during development can be clearly marked, preventing them from being masked by the averaging effect and improving the recall rate of high-risk code.

[0108] Step 204: During the coding phase, in response to the cognitive load index of a single line of source code exceeding the preset coding warning threshold, an attention prompt is triggered for the developer.

[0109] In this embodiment, during the developer's real-time coding phase, once the aforementioned execution entity detects that the real-time calculated cognitive load index of a line of source code exceeds a preset coding warning threshold, it will initiate a lightweight prompt on the code editor's user interface without interrupting the developer's workflow. The coding phase refers to the real-time development process where the developer first types and modifies code in the editor, before the code is saved or committed to the version control system. The preset coding warning threshold is a relatively low trigger value used to intervene when the developer's cognitive load begins to enter a dangerous range but has not yet resulted in errors. Attention prompts refer to non-intrusive reminders such as highlighting the current line of code in the editor sidebar, displaying an icon near the cursor in a fade-in / fade-out manner, or displaying short text in the status bar. These aim to gently guide the developer to realize that they may be under high load and suggest that they take a break or review the current line of logic.

[0110] By introducing real-time attention cues during the coding phase, preventative intervention against potential code defects is achieved. This helps developers adjust their mindset in a timely manner when their mental resources are overloaded, fundamentally reducing low-level logical errors caused by cognitive negligence.

[0111] Step 205: During the code submission phase, in response to the cognitive load index of a single line of source code exceeding the submission record threshold, submission metadata is embedded in the single line of source code to generate the target single line of source code.

[0112] Here, the commit record threshold is a threshold set for the code commit phase, typically higher than the preset coding warning threshold in the coding phase. It's used to identify single lines of source code that experienced extremely high cognitive load during the writing process and are highly likely to contain hidden problems. Commit metadata refers to an automatically generated set of structured information. As an implicit attribute of the single line of source code, it is encoded into the commit object or code comments. Commit metadata includes at least a comprehensive cognitive load index, the cognitive load type identifier corresponding to the comprehensive cognitive load index, and the collection time of the single line of source code. The target single line of source code refers to the single line of source code instance embedded with the commit metadata; it is the basic unit for subsequent code review and risk tracing.

[0113] By embedding immutable cognitive load metadata into high-risk lines of code during the submission phase, the developer's instantaneous and intangible cognitive state is permanently solidified and anchored in a single line of source code. This provides code reviewers with a black box to trace back the developer's mental state when writing that single line of source code, giving static code analysis dynamic cognitive context information and greatly enriching the dimensions of code risk assessment.

[0114] Step 206: Calculate the continuous high-risk density of the target single-line source code. Based on the continuous high-risk density and the cognitive load comprehensive index of the target single-line source code, obtain the aggregated risk index of the target single-line source code.

[0115] Here, continuous high-risk density refers to the proportion of lines in a local code window, centered on the target single line of source code and including several adjacent lines, where the cognitive load comprehensive index exceeds the commit record threshold, out of the total number of lines in the local code window. This reflects the concentration and clustering of high-load code.

[0116] The aggregated risk index is a new risk value obtained by jointly calculating the continuous high risk density and cognitive load comprehensive index of the target single line of source code. It can more accurately reflect the overall logical vulnerability caused by continuous high load coding.

[0117] In some alternative implementations, step 206 may include steps A and B:

[0118] Step A: Determine the continuous high-risk density of the target single-line source code based on the comprehensive cognitive load index of the N adjacent single-line source codes before and after the target single-line source code.

[0119] Here, the aforementioned execution entity first defines a local code window, namely, N lines forward and N lines backward from the target single line of source code. N is an integer greater than or equal to 1, and its value can be set according to the average span of the logical coupling of the code, such as 3 or 5 lines, covering a typical short function or logic block.

[0120] Step B involves multiplying the continuous high-risk density by the cognitive load comprehensive index of the target single line of source code to obtain the aggregated risk index.

[0121] Step 207: Determine the risk status of the target single line of source code based on the aggregated risk index, and indicate the review strategy for the target single line of source code.

[0122] In some alternative implementations, step 207 may include, for example: Figure 2D The following steps 2071 to 2072 are shown:

[0123] Step 2071: In response to the aggregated risk index exceeding the preset high-risk status judgment threshold, the target single line of source code is judged as a high-risk code line and assigned to the enhanced code review process.

[0124] Here, the aggregated risk index refers to the comprehensive risk quantification result obtained by weighted fusion of multidimensional physiological indicators such as EEG deviation value and eye movement deviation value. It is used to characterize the severity of cognitive overload of the developer when writing the source code of this line and the probability of introducing defects as a result.

[0125] The preset high-risk status threshold is a risk cutoff value determined based on the receiver operating characteristic curve of historical defect data. It is used to distinguish between high-risk and moderate-risk statuses, ensuring that the judgment results are statistically significant. High-risk status code lines refer to source code lines with a high aggregation risk index that are judged to be highly likely to hide logical fallacies, missing boundary conditions, or security vulnerabilities.

[0126] Enhanced code review process refers to the most rigorous code review channel, requiring at least two senior reviewers to conduct independent reviews back-to-back, and mandating the initiation of formal verification or targeted dynamic testing to expose hidden defects to the greatest extent possible.

[0127] By removing high-risk status code lines from the regular process and importing them into the enhanced review process, high-end review resources can be concentrated to lock down code with a high probability of defects. By utilizing a dual mechanism of independent verification by multiple people and automated verification, the probability of serious defects caused by cognitive overload flowing into the code repository is significantly reduced, thereby improving the reliability of critical code.

[0128] Step 2072: In response to the aggregated risk index not exceeding the preset high-risk state judgment threshold, the target single-line source code is judged as a medium-risk state code line, a cognitive load attention mark is added to the target single-line source code, and the target single-line source code is assigned to the first type of review process.

[0129] Here, the enhanced code review process has a higher review level than the first type of review process. The first type of review process refers to the regular code review process, which is usually conducted by a qualified reviewer to check readability, compliance with specifications, and general logic, and to initiate targeted reviews of specific lines under the guidance of cognitive load attention markers.

[0130] A moderate-risk status code line refers to a line of source code where the aggregate risk index is in the moderate range. This indicates that the developer experienced perceptible fluctuations in cognitive load while writing the code, but these fluctuations have not yet reached extreme anomalies. The defect risk is manageable but still requires attention. A cognitive load attention tag is a structured metadata label attached to a moderate-risk status code line. It is used to explicitly convey to subsequent reviewers information such as "The developer's cognitive load was high when writing this line; it is recommended to focus on checking logical coherence and race conditions."

[0131] By applying a lightweight label to moderately risky lines instead of forcibly upgrading the review level, information on abnormal fluctuations in developers' cognitive load can be seamlessly transmitted to the review process without excessively consuming review resources. This enables routine reviews to have a targeted and focused capability, effectively intercepting low- to medium-risk defects while ensuring review efficiency, and achieving a precise match between review resource investment and risk level.

[0132] The software development data management method provided in the above embodiments of this disclosure collects multimodal physiological data such as EEG amplitude and gaze trajectory during the developer's coding phase, and parses it line by line at the time of code submission. It constructs an aggregated risk index that integrates EEG deviation value and eye movement deviation value, and automatically determines the source code line as high-risk or medium-risk. This achieves objective quantification and classification of code defect risk, and precisely couples review resources with risk levels. This transforms the vague judgment that relies on subjective experience in traditional code review into an active risk interception mechanism driven by the developer's real-time physiological state. Without significantly increasing the overall review input, it effectively curbs the escape of high-risk defects such as logical loopholes and boundary omissions caused by cognitive overload, and significantly improves the early defect capture efficiency and intelligence level of the software quality assurance system.

[0133] Further reference Figure 3 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a software development data management device, which is similar to... Figure 2A The method embodiments shown correspond to code editors, and the device can be specifically applied to various electronic devices.

[0134] like Figure 3As shown, the software development data management device 300 of this embodiment includes: a collection module 301, a construction module 302, an extraction module 303, an attention prompting module 304, a generation module 305, a calculation module 306, and a strategy module 307. The collection module 301 is configured to collect the developer's target bioelectrical data during the source code writing process, using at least one line of source code as a synchronous anchor point. The target bioelectrical data includes at least the developer's electroencephalogram (EEG) signal and eye movement signal. The construction module 302 is configured to construct a state baseline model of the developer based on historical bioelectrical data. The extraction module 303 is configured to extract the developer's multimodal feature parameters from the target bioelectrical data and calculate the cognitive load comprehensive index of each line of source code based on the state baseline model and the multimodal feature parameters. The attention prompting module 304 is configured to trigger attention prompts for the developer during the coding phase in response to the cognitive load comprehensive index of a line of source code exceeding a preset coding warning threshold. The generation module 305 is configured to, during the code submission phase, embed submission metadata into the single-line source code in response to the cognitive load comprehensive index of the single-line source code exceeding the submission record threshold, to generate the target single-line source code. The submission metadata includes at least the cognitive load comprehensive index, the cognitive load type identifier corresponding to the cognitive load comprehensive index, and the collection time of the single-line source code. The calculation module 306 is configured to calculate the continuous high-risk density of the target single-line source code, and obtain the aggregated risk index of the target single-line source code based on the continuous high-risk density and the cognitive load comprehensive index of the target single-line source code. The strategy module 307 is configured to determine the risk status of the target single-line source code based on the aggregated risk index and indicate the review strategy for the target single-line source code.

[0135] It should be noted that the implementation details and technical effects of each module and unit in the software development data management device provided in the embodiments of this disclosure can be referred to the descriptions of other embodiments in this disclosure, and will not be repeated here.

[0136] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A software development data management method, characterized in that, Applied to code editors, including: During the process of developers writing source code, at least one single line of source code is used as a synchronization anchor point to collect the developer's target bioelectrical data, which includes at least the developer's electroencephalogram (EEG) signal and eye movement signal. A state baseline model for the developer was constructed based on historical bioelectric data; The multimodal feature parameters of the developer are extracted from the target bioelectric data. Based on the state baseline model and the multimodal feature parameters, the cognitive load comprehensive index of each line of source code is calculated. During the coding phase, in response to the cognitive load index of the single line of source code exceeding a preset coding warning threshold, an attention prompt is triggered for the developer. During the code submission phase, in response to the cognitive load comprehensive index of the single line of source code exceeding the submission record threshold, submission metadata is embedded in the single line of source code to generate the target single line of source code. The submission metadata includes at least the cognitive load comprehensive index, the cognitive load type identifier corresponding to the cognitive load comprehensive index, and the collection time of the single line of source code. Calculate the continuous high-risk density of the target single-line source code, and obtain the aggregated risk index of the target single-line source code based on the continuous high-risk density and the cognitive load comprehensive index of the target single-line source code; The risk status of the target single-line source code is determined based on the aggregated risk index, and the review strategy for the target single-line source code is indicated.

2. The method according to claim 1, characterized in that, The process of collecting the developer's target bioelectrical data using at least one single line of source code as a synchronization anchor includes: Monitor the position of the cursor in the code editor, and record the time when the cursor breaks to a new line. Based on the line break time, the developer's EEG signal fragments and eye movement signal fragments are extracted as the target bioelectrical data corresponding to that single line of source code.

3. The method according to claim 1, characterized in that, The process of constructing the developer's state baseline model based on historical bioelectrical data includes: Obtain the developer's historical bioelectric data; Gaussian mixture model was used to fit the historical bioelectric data to obtain a multidimensional joint probability distribution; Based on the mean vector and covariance matrix of the multidimensional joint probability distribution, the developer's state baseline model is constructed.

4. The method according to claim 1, characterized in that, The calculation of the cognitive load index for each line of source code includes: Extract the developer's electroencephalogram (EEG) feature vector and eye movement feature vector from the target bioelectrical data; Based on the state baseline model, calculate the EEG deviation value and eye movement deviation value corresponding to the EEG feature vector and the eye movement feature vector; The weighted sum of the EEG deviation value and the eye movement deviation value is used to obtain the basic cognitive load index; In response to the EEG deviation value exceeding a preset EEG abnormality threshold or the eye movement deviation value exceeding a preset eye movement abnormality threshold, a penalty increment is calculated on the basic cognitive load index to obtain the comprehensive cognitive load index.

5. The method according to claim 1, characterized in that, The calculation of the continuous high-risk density of the target single-line source code, and the obtaining of the aggregated risk index of the target single-line source code based on the continuous high-risk density and the cognitive load comprehensive index of the target single-line source code, includes: Based on the cognitive load comprehensive index of the N adjacent single-line source codes before and after the target single-line source code, the continuous high-risk density of the target single-line source code is determined, where N is an integer greater than or equal to 1. The aggregated risk index is obtained by multiplying the continuous high-risk density by the cognitive load comprehensive index of the target single-line source code.

6. The method according to claim 1, characterized in that, The process of determining the risk status of the target single-line source code based on the aggregated risk index and instructing the review strategy for the target single-line source code includes: In response to the aggregated risk index exceeding the preset high-risk status determination threshold, the target single line of source code is determined to be a high-risk code line, and the target single line of source code is assigned to the enhanced code review process; In response to the aggregated risk index not exceeding the preset high-risk state determination threshold, the target single-line source code is determined to be a medium-risk state code line, a cognitive load attention mark is added to the target single-line source code, and the target single-line source code is assigned to the first type of review process; The enhanced code review process has a higher review level than the first type of review process.

7. A software development data management device, characterized in that, Applied to code editors, including: The acquisition module is configured to acquire the developer's target bioelectrical data during the developer's source code writing process, using at least one single line of source code as a synchronous anchor point. The target bioelectrical data includes at least the developer's electroencephalogram (EEG) signal and eye movement signal. The build module is configured to construct the developer's state baseline model based on historical bioelectrical data; The extraction module is configured to extract the developer's multimodal feature parameters from the target bioelectrical data, and calculate the cognitive load composite index for each line of source code based on the state baseline model and the multimodal feature parameters. The attention prompting module is configured to trigger an attention prompt to the developer during the coding phase in response to the cognitive load index of the single line of source code exceeding a preset coding warning threshold. The generation module is configured to, during the code submission phase, in response to the cognitive load comprehensive index of the single line of source code exceeding the submission record threshold, embed submission metadata into the single line of source code to generate the target single line of source code, wherein the submission metadata includes at least the cognitive load comprehensive index, the cognitive load type identifier corresponding to the cognitive load comprehensive index, and the collection time of the single line of source code; The calculation module is configured to calculate the continuous high-risk density of the target single-line source code, and obtain the aggregated risk index of the target single-line source code based on the continuous high-risk density and the cognitive load comprehensive index of the target single-line source code. The strategy module is configured to determine the risk status of the target single-line source code based on the aggregated risk index and to indicate the review strategy for the target single-line source code.

8. A storage device, comprising: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method as described in any one of claims 1-6.

9. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.

10. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the method as described in any one of claims 1-6.