Brain electrical signal processing method, device, equipment and computer readable medium
By segmenting the video content and aligning the EEG signals, and calculating the EEG indicators, the problem of inconsistency between the video content and the EEG signal timeline is solved, the analysis accuracy is improved, and the human brain's processing of visual information is deeply understood.
Patent Information
- Application Number
- CN202410723979.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-05
AI Technical Summary
In the existing technology, the timeline of the video content and the EEG signal are inconsistent, and there is a lack of logical and structural consideration of the video content, resulting in inaccurate data synchronization and affecting the accuracy of the analysis results.
Collect EEG signals by detecting when the target video starts playing, and obtain the scene segmentation information of the video, align the EEG signal segments according to the scene start and end times, and calculate the EEG indicators of each segment to analyze the viewer's cognitive investment in the video. and emotional responses.
It improves the mapping accuracy between EEG indicators and video content, deeply understands the human brain's processing and response to complex visual information, and solves the problems of inconsistent timelines and failure to consider logical structures.
Smart Images

Figure CN118303899B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data acquisition technology, and in particular to an electroencephalogram signal processing method, device, equipment and computer-readable medium. Background Art
[0002] The human brain's understanding of video and image data is a complex scientific field involving deep cognitive mechanisms, including not only the surface recognition process, but also the deep understanding of emotions, cultural background and context. When watching videos or pictures, the brain's visual cortex actively processes and interprets this information, inspiring scientists to use deep learning technology to simulate the image processing method of the human brain. For example, images may cause different emotional reactions based on personal experience and cultural background, which helps us understand how the brain interprets visual information at multiple levels, including dynamic encoding and memory playback, thereby promoting the development of artificial intelligence in image recognition and processing. Scientists have developed a variety of equipment and technologies to analyze how the brain processes visual information, including using electroencephalograms (EEGs) to record brain activity and eye tracking technology to understand the attention allocation of individuals when viewing images. By analyzing EEG data and eye movement data, researchers can focus on specific EEG indicators such as emotions and engagement, and deeply understand how the brain responds to visual stimuli in different situations. In the field of modern advertising and marketing, these neuroscience tools, such as EEG and eye tracking technology, can accurately measure and analyze the audience's immediate response to advertising videos, revealing their deep cognition and emotional response to the content.
[0003] At present, in the relevant technology, when collecting video data and its corresponding EEG signals, there is a significant synchronization problem, that is, the time axis of the video content is usually inconsistent with the acquisition time of the EEG signal. This time difference requires manual alignment, which is not only a time-consuming process, but also may lead to inaccurate data synchronization. Since the changes in EEG signals are very fast and subtle, even a small alignment error may cause deviations in the analysis results. In addition, the current practice of matching video content and EEG signals is to directly match the second-level video screen with the EEG signal and analyze the changes in the EEG signal within the xth second. However, this method does not fully take into account the logic and structure of the video content.
[0004] Currently, no effective solution has been proposed to address the problems of the asynchrony between the video content and the EEG signal timeline and the lack of consideration of the logic and structure of the video content. Summary of the invention
[0005] The present application provides an EEG signal processing method, device, equipment and computer-readable medium to solve the technical problems of the video content being out of sync with the EEG signal time axis and the lack of consideration of the logic and structure of the video content.
[0006] According to one aspect of an embodiment of the present application, the present application provides an EEG signal processing method, comprising: when detecting that a target video starts to play, collecting the EEG signal of a first object watching the target video, and recording the collection time of the EEG signal; obtaining scene segmentation information of the target video, wherein the content of the target video includes multiple scenes, and the scene segmentation information includes the start and end time of each scene of the target video; aligning the start and end time of each scene with the collection time of the EEG signal to obtain an EEG signal segment that matches the scene of the target video; and calculating the EEG indicators of each of the EEG signal segments respectively, so as to analyze the cognitive involvement and emotional response of the first object to each scene when the first object watches the target video based on the EEG signal.
[0007] Optionally, obtaining the scene segmentation information of the target video includes: using a target cryptographic hash function to calculate a target hash value of the target video; using the target hash value to search in a preset database to confirm whether the target video stored in the preset database mapped with the target hash value exists; when it is confirmed that the target video already exists in the preset database, searching for associated data of the target video; when the scene segmentation information exists in the associated data, obtaining the scene segmentation information.
[0008] Optionally, when it is confirmed that the target video does not exist in the preset database, or the scene segmentation information does not exist in the associated data of the target video, the method includes obtaining the scene segmentation information of the target video in any one of the following ways: extracting video frames of the target video; calculating the color histogram of each of the video frames; sequentially calculating the histogram difference values of the color histograms of two adjacent frames in the extraction order of the video frames; marking adjacent video frames whose histogram difference values reach a first threshold; segmenting the target video according to the marks in the entire video to obtain the scene segmentation information; extracting video frames of the target video; Analyze the content of each of the video frames using a content recognition model; calculate content difference values of the contents of two adjacent frames in sequence according to the extraction order of the video frames; mark adjacent video frames whose content difference values reach a second threshold; segment the target video according to the marks in the entire video to obtain the scene segmentation information; extract video frames of the target video; calculate the average brightness of each of the video frames; calculate the brightness difference values of the average brightness of two adjacent frames in sequence according to the extraction order of the video frames; mark adjacent video frames whose brightness difference values reach a third threshold; segment the target video according to the marks in the entire video to obtain the scene segmentation information.
[0009] Optionally, after obtaining the scene segmentation information, the method also includes: displaying the scene segmentation information to a second object; upon receiving adjustment parameters of the scene segmentation information from the second object, adjusting the scene segmentation information using the adjustment parameters, and displaying the adjusted scene segmentation information to the second object; upon receiving confirmation information of the scene segmentation information from the second object, associating the scene segmentation information with the target video, and storing the target video and the scene segmentation information in the preset database with the target hash value of the target video as an index.
[0010] Optionally, in the separate calculation of the EEG index of each of the EEG signal segments, calculating the EEG index of any of the EEG signal segments includes: calculating the local EEG index of each sampling point in the EEG signal segment; calculating the sum of the local EEG indexes of all the sampling points in the EEG signal segment to obtain the sum of the indexes; dividing the sum of the indexes by the total number of sampling points of the EEG signal segment to obtain the overall EEG index of the EEG signal segment.
[0011] Optionally, calculating the local EEG index of each sampling point in the EEG signal segment includes calculating the emotion index in the following manner:
[0012] ;
[0013] in, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, the higher the gear, the higher the corresponding signal frequency.
[0014] Optionally, calculating the local EEG index of each sampling point in the EEG signal segment includes calculating a cognitive engagement index in the following manner:
[0015] ;
[0016] in, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, the higher the gear, the higher the corresponding signal frequency.
[0017] According to another aspect of an embodiment of the present application, the present application provides an EEG signal processing device, including: an acquisition module, for acquiring the EEG signal of a first object watching the target video when it is detected that the target video starts to play, and recording the acquisition time of the EEG signal; an acquisition module, for acquiring scene segmentation information of the target video, wherein the content of the target video includes multiple scenes, and the scene segmentation information includes the start and end time of each scene of the target video; an alignment module, for aligning the start and end time of each scene with the acquisition time of the EEG signal to obtain an EEG signal segment that matches the scene of the target video; a calculation module, for respectively calculating the EEG index of each of the EEG signal segments, so as to analyze the cognitive involvement and emotional response of the first object to each scene when the first object watches the target video based on the EEG signal.
[0018] According to another aspect of an embodiment of the present application, the present application provides an electronic device, including a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, the memory and the processor communicate through the communication bus and the communication interface, and the steps of the above method are implemented when the processor executes the computer program.
[0019] According to another aspect of an embodiment of the present application, the present application also provides a computer-readable medium having a non-volatile program code executable by a processor, and the program code enables the processor to execute the above method.
[0020] The above technical solution provided by the embodiment of the present application has the following advantages compared with the related art:
[0021] This application can be applied to data capability development for data collection. This application provides a method for processing EEG signals, including: when detecting that a target video starts playing, collecting the EEG signal of a first object watching the target video, and recording the collection time of the EEG signal; obtaining the scene segmentation information of the target video, wherein the content of the target video contains multiple scenes, and the scene segmentation information includes the start and end time of each scene of the target video; aligning the start and end time of each scene with the collection time of the EEG signal to obtain an EEG signal segment that matches the scene of the target video; calculating the EEG index of each EEG signal segment respectively, so as to analyze the cognitive investment and emotional response of the first object to each scene when the first object watches the target video based on the EEG signal. This application combines EEG signals with the temporal changes of video content, thereby greatly improving the accuracy of the mapping between EEG indicators and video content, which can provide a deeper understanding of how the human brain processes and responds to complex visual information, and solves the technical problems of the video content being out of sync with the EEG signal timeline and the lack of consideration of the logic and structure of the video content. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 A schematic diagram of an optional EEG signal processing method according to an embodiment of the present application;
[0025] Figure 2 A schematic diagram of the technical architecture of an optional method for processing electroencephalogram signals according to an embodiment of the present application;
[0026] Figure 3 A block diagram of an optional electroencephalogram signal processing device provided according to an embodiment of the present application;
[0027] Figure 4 A schematic diagram of an optional electronic device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0029] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.
[0030] In order to solve the problems mentioned in the background technology, according to one aspect of the embodiments of the present application, an embodiment of a method for processing an electroencephalogram signal is provided, such as Figure 1 As shown, the method may include the following steps:
[0031] Step S102, when it is detected that the target video starts to play, collecting the EEG signal of the first subject watching the target video, and recording the collection time of the EEG signal;
[0032] Step S104, obtaining scene segmentation information of the target video, wherein the content of the target video includes multiple scenes, and the scene segmentation information includes the start and end time of each scene of the target video;
[0033] Step S106, aligning the start and end time of each scene with the acquisition time of the EEG signal to obtain an EEG signal segment matching the scene of the target video;
[0034] Step S108, respectively calculating the EEG index of each of the EEG signal segments, so as to analyze the first subject's cognitive involvement and emotional response to each scene when the first subject watches the target video based on the EEG signals.
[0035] In this application, electroencephalography (EEG) refers to electrical signals generated by the activity of a group of brain neurons recorded from the surface of the human scalp. These signals are usually collected through electroencephalography (EEG) equipment and can be used to monitor brain activity, including but not limited to the study of sleep, cognitive function and neurological diseases. EEG indicators are interpretable indicators extracted from EEG signals through specific calculation formulas. These indicators are usually used to analyze different states and functions of the brain, such as emotional responses, cognitive processes and memory functions. In this patent, EEG indicators may include emotional value, cognitive memory, etc. These indicators can help researchers better understand the relationship between EEG signals and brain functions.
[0036] In the related art, the way to match EEG signals with videos is to directly match the second-level video images with EEG signals and analyze the changes in EEG signals within the xth second. However, this method does not fully take into account the logic and structure of the video content. If the video and EEG signals are matched only by seconds, the subtle changes and details between these split screens may be ignored, and too much data from certain frames may be collected, introducing errors. Most importantly, this matching method may lead to an insufficient understanding of the video content and an inability to accurately capture the changes in EEG signals caused by specific images or scenes. The related technology is also overly dependent on human resources. The current methods require a large amount of manpower participation. The main tasks of these personnel include data cleaning, alignment of video and EEG signals, and calculation of downstream indicators. This not only increases the workload, but may also introduce human errors, thereby affecting the accuracy and reliability of the final results.
[0037] In order to overcome the above problems, this application divides a video into multiple scene segments based on changes in video content, such as scene changes, time jumps, or plot transitions, and aligns EEG signals according to the scenes, thereby capturing richer information and details in the video based on the matching of storyboards or scenes, and more accurately analyzing changes in EEG signals. Through the above improvements, this application can more deeply analyze how the human brain processes and responds to complex visual information.
[0038] Through steps S102 to S108, the present application combines the temporal changes of EEG signals with the video content, thereby greatly improving the accuracy of the mapping between EEG indicators and video content. It can provide a deeper understanding of how the human brain processes and responds to complex visual information, and solves the technical problems of the video content and the EEG signal timeline being out of sync and the lack of consideration of the logic and structure of the video content.
[0039] In step S102, the first subject is the subject of EEG signal collection. The first subject wears an EEG signal collection device in advance. The EEG signal collection device is an EEG signal collection device with at least 4 electrodes and has the ability to receive and record EEG signals.
[0040] In step S104, the scene segmentation information of the target video records the time segmentation nodes at which the target video is segmented into multiple scenes.
[0041] In an optional embodiment, the acquiring the scene segmentation information of the target video includes:
[0042] Step 1: Calculate a target hash value of the target video using a target cryptographic hash function.
[0043] In the embodiment of the present application, a specific cryptographic hash function (such as SHA-256, MD5, etc.) is used to calculate the target video to generate a unique hash value (or hash value). This hash value represents the content of the video and is highly unique. Even if the video content is slightly changed, its hash value will change significantly.
[0044] Step 2: Use the target hash value to search in a preset database to confirm whether the target video mapped with the target hash value exists in the preset database.
[0045] In the embodiment of the present application, after the hash value is calculated, it is searched in a preset database. This database should store hash values of multiple videos and related information. By comparing the target hash value with the hash value stored in the database, it can be confirmed whether the target video already exists in the database.
[0046] Step 3: When it is confirmed that the target video already exists in the preset database, search for the associated data of the target video.
[0047] In the embodiment of the present application, if the target video does exist in the database, then other data related to the video can be searched. Such data may include metadata of the video (such as title, description, uploader, etc.), scene segmentation information, key frames, etc.
[0048] Step 4: When the scene segmentation information exists in the associated data, obtain the scene segmentation information.
[0049] In the embodiment of the present application, in the associated data, it is searched whether there is scene segmentation information. The scene segmentation information generally includes the start and end time of each scene in the video, scene description, etc. If this information exists, it is extracted for subsequent alignment and analysis with the EEG signal.
[0050] In an optional embodiment, when it is confirmed that the target video does not exist in the preset database, or the scene segmentation information does not exist in the associated data of the target video, the method includes further obtaining the scene segmentation information of the target video in any one of the following ways:
[0051] The first one is the RGB color histogram method, which detects scene changes by comparing the color histograms of consecutive frames. The color histogram represents the number of pixels of each color in the image. When the histogram difference between consecutive frames exceeds a certain threshold, the algorithm detects a new scene. It includes the following steps:
[0052] Step 1, extracting the video frame of the target video;
[0053] Step 2, calculating the color histogram of each of the video frames;
[0054] Step 3, calculating the histogram difference values of the color histograms of two adjacent frames in sequence according to the extraction order of the video frames;
[0055] Step 4, marking the adjacent video frames whose histogram difference values reach a first threshold;
[0056] Step 5: segment the target video according to the tags in the entire video to obtain the scene segmentation information.
[0057] The second method, Content Detection, detects scene changes by analyzing the content changes of video frames. It calculates the content difference between consecutive frames and marks it as a new scene when the difference exceeds a certain threshold. This method is very effective for detecting cuts and scene changes, especially when these changes involve significant visual differences. It includes the following steps:
[0058] Step 1, extracting the video frame of the target video;
[0059] Step 2, analyzing the content of each of the video frames using a content recognition model;
[0060] Step 3, calculating the content difference value of the contents of two adjacent frames in sequence according to the extraction order of the video frames;
[0061] Step 4, marking the adjacent video frames whose content difference values reach a second threshold;
[0062] Step 5: segment the target video according to the tags in the entire video to obtain the scene segmentation information.
[0063] The third method, Luminance Detection, detects scene changes based on pixel brightness changes. It calculates the average brightness of each frame and compares it to the previous frame. When the brightness change exceeds a preset threshold, the algorithm marks the beginning of a new scene. This method is suitable for videos with significant brightness changes between scenes.
[0064] Step 1, extracting the video frame of the target video;
[0065] Step 2, calculating the average brightness of each of the video frames;
[0066] Step 3, calculating the brightness difference value of the average brightness of two adjacent frames in sequence according to the extraction order of the video frames;
[0067] Step 4, marking the adjacent video frames whose brightness difference value reaches a third threshold;
[0068] Step 5: segment the target video according to the tags in the entire video to obtain the scene segmentation information.
[0069] It can be understood that the above-mentioned video scene segmentation algorithm is only used as an example. This application does not specify a video scene segmentation algorithm, and any segmentation algorithm can be used for processing.
[0070] In an optional embodiment, after obtaining the scene segmentation information, the method further includes:
[0071] Step 1, displaying the scene segmentation information to the second object;
[0072] Step 2, when receiving the adjustment parameters of the scene segmentation information from the second object, adjusting the scene segmentation information using the adjustment parameters, and displaying the adjusted scene segmentation information to the second object;
[0073] Step 3, upon receiving confirmation information of the second object on the scene segmentation information, the scene segmentation information is associated with the target video, and the target video and the scene segmentation information are stored in the preset database using the target hash value of the target video as an index.
[0074] In an embodiment of the present application, in order to allow the second object to intuitively view the scene segmentation information, the result of the video scene segmentation can be displayed to the second object. The second object can be the first object, that is, a person simultaneously uploads videos, watches video EEG signal recordings, performs storyboard operations, etc. The second object can also be a video editor, analyst, or other relevant personnel. If the second object believes that the scene segmentation information is inaccurate or needs further optimization, they can provide adjustment parameters. These parameters may involve modifying the start and end time of the scene, adding or deleting scenes, etc. The system will adjust the scene segmentation information accordingly according to these parameters and display it to the second object again so that the second object can confirm the adjustment effect. Once the second object is satisfied with the scene segmentation information and sends a confirmation message, the system will associate the scene segmentation information with the target video. In order to efficiently retrieve and manage this information, the system will use the target hash value of the target video as an index to store the target video and the scene segmentation information together in a preset database. In this way, when you need to access or use this information again, you can quickly retrieve them through the target hash value.
[0075] In an optional embodiment, in the separately calculating the EEG index of each of the EEG signal segments, calculating the EEG index of any of the EEG signal segments includes:
[0076] Step 1, calculating the local EEG index of each sampling point in the EEG signal segment;
[0077] Step 2, calculating the sum of the local EEG indices of all sampling points in the EEG signal segment to obtain the index sum;
[0078] Step 3: Divide the sum of the indicators by the total number of sampling points of the EEG signal segment to obtain the overall EEG indicator of the EEG signal segment.
[0079] In the embodiment of the present application, it is first necessary to analyze the EEG signal segment point by point. The local EEG index of each sampling point reflects the first subject's cognitive investment and emotional changes in the video scene from a micro level. According to the length of the scene, it is necessary to average each index, that is, the sum of the indexes of multiple sampling points in the scene / the number of sampling points, to obtain the overall EEG index of the EEG signal segment. The overall EEG index of the EEG signal segment reflects the first subject's cognitive investment and emotional changes in the video scene from a macro level.
[0080] In the embodiment of the present application, the input can be divided into general input, mild concentration, moderate concentration, high concentration and extremely concentrated states according to the Lefven Involvement Level Scale (LIS), and its distribution is similar to the long-tail distribution. The state of general input (noactivity) is such as shopping or situations that require very little thinking. This situation occurs a lot, accounting for 68.85%. The state of mild concentration (frequently interrupted activity) is such as when people think about simple problems or meditate, this situation occurs more, accounting for 18.86%. The state of moderate concentration (more or less continuous activity) is such as when people are dealing with problems with a certain degree of difficulty such as exams, and this situation occurs less, accounting for 6.73%. Highly concentrated (activity with intense moments): For example, when people are dealing with complex problems such as scientific research, this situation rarely occurs, accounting for 2.87%. The state of extreme concentration (sustained intense activity) is such as when people are dealing with things with high precision or zero error rate, such as surgery or more extreme situations such as life and death, this situation rarely occurs, accounting for 1.26%.
[0081] In the embodiment of the present application, emotional reactions can be divided into severe avoidance, moderate avoidance, mild avoidance, general mood, mild approach, moderate approach and severe approach, and their distribution is similar to long-tail distribution. The state of severe avoidance, for example, will enter the severe avoidance state when seeing things related to life and death. The frequency of this situation is very rare, accounting for only 1.13%. The state of moderate avoidance, for example, will enter the moderate avoidance state when seeing disgusting things such as insect details, intensive fear, etc., and this situation occurs less, accounting for 7.30%. The state of mild avoidance, for example, sees disgusting things such as fighting and quarreling, and this situation occurs more, accounting for 22.84%. The state of general mood, such as reading books and other general things, occurs more, accounting for 37.80%. The state of mild approach, for example, when seeing a comfortable and beautiful environment, this situation occurs more, accounting for 22.82%. The state of moderate approach, for example, sees exciting scenes, which rarely occurs, accounting for 7.81%. The state of severe approach includes seeing extremely cheerful scenes such as comedies, the four great joys of life. This situation rarely occurs, accounting for 1.01%.
[0082] In an embodiment of the present application, after the target video is divided into scenes, scene numbers can be assigned to different scenes. Specifically, the hash value of a video clip of a scene can be used as the scene number of the scene, so that the EEG signals and corresponding EEG indicators of each scene can be sorted out by scene number.
[0083] In the embodiment of the present application, the calculation method of the EEG index can be customized by the user, so that the indexes of more scene dimensions can be calculated based on the EEG signals.
[0084] Optionally, calculating the local EEG index of each sampling point in the EEG signal segment includes calculating the emotion index in the following manner:
[0085] ;
[0086] in, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, the higher the gear, the higher the corresponding signal frequency.
[0087] Optionally, calculating the local EEG index of each sampling point in the EEG signal segment includes calculating a cognitive engagement index in the following manner:
[0088] ;
[0089] in, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, the higher the gear, the higher the corresponding signal frequency.
[0090] On the EEG, the brain can produce four types of brain waves. When entering deep sleep, the brain produces delta waves; the frequency range of delta waves is 0.5-3Hz; when you feel drowsy, the brain waves become theta waves, the frequency range of theta waves is 4-8Hz; when the body is relaxed, the brain is more active, and inspiration is continuous, alpha waves are derived, the frequency range of alpha waves is 8-13Hz; when in a tense state, the brain produces beta waves, the frequency range of beta waves is greater than 14Hz. Alpha waves are divided into three types, namely slow alpha waves, intermediate alpha waves (i.e. second-level alpha waves) and fast alpha waves (i.e. third-level alpha waves). The frequency of slow alpha waves is 8-9Hz, corresponding to the state of confusion before going to sleep. Consciousness gradually becomes blurred. The frequency of intermediate alpha waves is 9-12Hz, corresponding to the state of inspiration and intuition exerting power, and concentration. The frequency of fast alpha waves is 12-13Hz, corresponding to a state of high alertness and no time to care about other things. Beta waves are divided into three ranges, namely low, medium and high. The frequency of low-range beta waves is 12.5-16Hz. In this state, people are relaxed but focused. Then the frequency of medium-range beta waves (i.e. second-level beta waves) is 16.5-20Hz. In this state, people not only think, but also process or receive information from the outside world, including hearing or thinking. Finally, the frequency of high-range beta waves (i.e. third-level beta waves) is 20.5-28Hz. In this state, people are excited and anxious.
[0091] The EEG signal processing method provided in this application can be rebuilt based on the SDK of the EEG signal acquisition device to obtain the following Figure 2 The technical architecture shown in the figure includes a video upload module, an EEG signal acquisition device, a video scene segmentation module, an EEG index calculation module and a software core database. The user submits the original video through the video upload module, and the video is stored in the software core database. The video scene segmentation module is used to segment the video according to the scene, and the segmentation is recorded in the software core database. When the user watches the video, the original signal is submitted through the EEG signal acquisition device, and the original signal is stored in the software core database. After aligning the EEG signal according to the video scene, the EEG index calculation module calculates various indicators, and the calculation results are stored in the software core database.
[0092] This application combines the temporal changes of EEG signals with those of video content, thereby greatly improving the accuracy of the mapping between EEG indicators and video content. This allows for a deeper understanding of how the human brain processes and responds to complex visual information, and solves the technical problems of the video content being out of sync with the EEG signal timeline and the lack of consideration of the logic and structure of the video content.
[0093] According to another aspect of the embodiment of the present application, Figure 3 As shown, a device for processing electroencephalogram signals is provided, comprising:
[0094] The acquisition module 301 is used to acquire the EEG signal of the first subject who is watching the target video and record the acquisition time of the EEG signal when detecting that the target video starts to play;
[0095] The acquisition module 303 is used to acquire scene segmentation information of the target video, wherein the content of the target video includes multiple scenes, and the scene segmentation information includes the start and end time of each scene of the target video;
[0096] An alignment module 305 is used to align the start and end time of each scene with the acquisition time of the EEG signal to obtain an EEG signal segment that matches the scene of the target video;
[0097] The calculation module 307 is used to calculate the EEG index of each EEG signal segment respectively, so as to analyze the cognitive input and emotional response of the first subject to each scene when the first subject watches the target video based on the EEG signal.
[0098] It should be noted that the acquisition module 301 in this embodiment can be used to execute step S102 in the embodiment of the present application, the acquisition module 303 in this embodiment can be used to execute step S104 in the embodiment of the present application, the alignment module 305 in this embodiment can be used to execute step S106 in the embodiment of the present application, and the calculation module 307 in this embodiment can be used to execute step S108 in the embodiment of the present application.
[0099] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be implemented by software or hardware.
[0100] Optionally, the acquisition module is specifically used to: use a target cryptographic hash function to calculate a target hash value of the target video; use the target hash value to search in a preset database to confirm whether the target video stored in the preset database is mapped to the target hash value; when it is confirmed that the target video already exists in the preset database, search for associated data of the target video; when the scene segmentation information exists in the associated data, obtain the scene segmentation information.
[0101] Optionally, the acquisition module is also used to: extract video frames of the target video; calculate the color histogram of each of the video frames; calculate the histogram difference values of the color histograms of two adjacent frames in sequence according to the extraction order of the video frames; mark the adjacent video frames whose histogram difference values reach a first threshold; segment the target video according to the marks in the entire video to obtain the scene segmentation information; extract video frames of the target video; analyze the content of each of the video frames using a content recognition model; calculate the content difference values of the contents of two adjacent frames in sequence according to the extraction order of the video frames; mark the adjacent video frames whose content difference values reach a second threshold; segment the target video according to the marks in the entire video to obtain the scene segmentation information; extract video frames of the target video; calculate the average brightness of each of the video frames; calculate the brightness difference values of the average brightness of two adjacent frames in sequence according to the extraction order of the video frames; mark the adjacent video frames whose brightness difference values reach a third threshold; segment the target video according to the marks in the entire video to obtain the scene segmentation information.
[0102] Optionally, the acquisition module is also used to: display the scene segmentation information to a second object; upon receiving adjustment parameters of the scene segmentation information from the second object, adjust the scene segmentation information using the adjustment parameters, and display the adjusted scene segmentation information to the second object; upon receiving confirmation information of the scene segmentation information from the second object, associate the scene segmentation information with the target video, and store the target video and the scene segmentation information in the preset database using the target hash value of the target video as an index.
[0103] Optionally, the calculation module is specifically used to: calculate the local EEG index of each sampling point in the EEG signal segment; calculate the sum of the local EEG indexes of all sampling points in the EEG signal segment to obtain the sum of indicators; divide the sum of indicators by the total number of sampling points of the EEG signal segment to obtain the overall EEG index of the EEG signal segment.
[0104] Optionally, the calculation module is further used to calculate the emotion index in the following manner:
[0105] ;
[0106] in, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, the higher the gear, the higher the corresponding signal frequency.
[0107] Optionally, the calculation module is further used to calculate the cognitive investment index in the following manner:
[0108] ;
[0109] in, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, the higher the gear, the higher the corresponding signal frequency.
[0110] According to another aspect of the embodiments of the present application, the present application provides an electronic device, such as Figure 4 As shown, it includes a memory 401, a processor 403, a communication interface 405 and a communication bus 407. The memory 401 stores a computer program that can be run on the processor 403. The memory 401 and the processor 403 communicate through the communication interface 405 and the communication bus 407. When the processor 403 executes the computer program, the steps of the above method are implemented.
[0111] The memory and processor in the above electronic device communicate via a communication bus and a communication interface. The communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
[0112] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0113] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0114] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any of the above embodiments.
[0115] Optionally, in an embodiment of the present application, the computer-readable medium is configured to store program codes for the processor to perform the following steps:
[0116] When it is detected that the target video starts to play, collecting an electroencephalogram signal of a first subject watching the target video, and recording the collection time of the electroencephalogram signal;
[0117] Acquire scene segmentation information of the target video, wherein the content of the target video includes multiple scenes, and the scene segmentation information includes the start and end time of each scene of the target video;
[0118] Aligning the start and end time of each scene with the acquisition time of the EEG signal to obtain an EEG signal segment matching the scene of the target video;
[0119] The EEG index of each EEG signal segment is calculated respectively to analyze the first subject's cognitive involvement and emotional response to each scene when the first subject watches the target video based on the EEG signal.
[0120] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0121] When the embodiments of the present application are specifically implemented, reference may be made to the above-mentioned embodiments, which have corresponding technical effects.
[0122] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0123] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0124] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0125] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0126] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0128] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0129] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0130] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A method for processing electroencephalogram signals, It is characterized in that include: When it is detected that the target video starts to play, collecting an electroencephalogram signal of a first subject watching the target video, and recording the collection time of the electroencephalogram signal; Acquire scene segmentation information of the target video, wherein the content of the target video includes multiple scenes, and the scene segmentation information includes the start and end time of each scene of the target video; Aligning the start and end time of each scene with the acquisition time of the EEG signal to obtain an EEG signal segment matching the scene of the target video; Calculating the EEG index of each EEG signal segment respectively, so as to analyze the cognitive involvement and emotional response of the first subject to each scene when the first subject watches the target video based on the EEG signals, including capturing the EEG signal changes caused by specific pictures or scenes based on the understanding of the video content; In the step of respectively calculating the EEG index of each EEG signal segment, calculating the EEG index of any EEG signal segment includes: calculating the local EEG index of each sampling point in the EEG signal segment; calculating the sum of the local EEG indexes of all sampling points in the EEG signal segment to obtain the sum of the indexes; dividing the sum of the indexes by the total number of sampling points of the EEG signal segment to obtain the overall EEG index of the EEG signal segment; The calculating of the local EEG index of each sampling point in the EEG signal segment includes calculating the emotion index in the following manner: ; in, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, the higher the gear, the higher the corresponding signal frequency; The calculating of the local EEG index of each sampling point in the EEG signal segment includes calculating the cognitive engagement index in the following manner: ; in, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, the higher the gear, the higher the corresponding signal frequency.
2. The method according to claim 1, It is characterized in that The step of obtaining the scene segmentation information of the target video includes: Calculating a target hash value of the target video using a target cryptographic hash function; Using the target hash value to search in a preset database to confirm whether the target video mapped with the target hash value is stored in the preset database; When confirming that the target video already exists in the preset database, searching for associated data of the target video; When the scene segmentation information exists in the associated data, the scene segmentation information is acquired.
3. The method according to claim 2, It is characterized in that When it is confirmed that the target video does not exist in the preset database, or the scene segmentation information does not exist in the associated data of the target video, the method includes further obtaining the scene segmentation information of the target video in any one of the following ways: Extracting video frames of the target video; calculating a color histogram of each of the video frames; calculating a histogram difference value of the color histograms of two adjacent frames in sequence according to the extraction order of the video frames; marking adjacent video frames whose histogram difference values reach a first threshold; segmenting the target video according to the marks in the entire video to obtain the scene segmentation information; Extracting a video frame of the target video; Analyze the content of each of the video frames using a content recognition model; calculate content difference values of the contents of two adjacent frames in sequence according to the extraction order of the video frames; mark adjacent video frames whose content difference values reach a second threshold; segment the target video according to the marks in the entire video to obtain the scene segmentation information; Extract video frames of the target video; calculate the average brightness of each of the video frames; calculate the brightness difference value of the average brightness of two adjacent frames in the order of extraction of the video frames; mark the adjacent video frames whose brightness difference value reaches a third threshold; segment the target video according to the marks in the entire video to obtain the scene segmentation information.
4. The method according to claim 3, It is characterized in that After obtaining the scene segmentation information, the method further includes: Displaying the scene segmentation information to a second object; When receiving the adjustment parameter of the scene segmentation information from the second object, adjusting the scene segmentation information using the adjustment parameter, and displaying the adjusted scene segmentation information to the second object; When confirmation information of the scene segmentation information is received from the second object, the scene segmentation information is associated with the target video, and the target video and the scene segmentation information are stored in the preset database using the target hash value of the target video as an index.
5. An electroencephalogram signal processing device, It is characterized in that include: A collection module, used for collecting the EEG signal of the first subject watching the target video when detecting that the target video starts to play, and recording the collection time of the EEG signal; An acquisition module, used to acquire scene segmentation information of the target video, wherein the content of the target video includes multiple scenes, and the scene segmentation information includes the start and end time of each scene of the target video; An alignment module, used to align the start and end time of each scene with the acquisition time of the EEG signal to obtain an EEG signal segment matching the scene of the target video; a calculation module, configured to respectively calculate the EEG index of each EEG signal segment, so as to analyze the cognitive involvement and emotional response of the first subject to each scene when the first subject watches the target video based on the EEG signals, including capturing the EEG signal changes caused by specific pictures or scenes based on the understanding of the video content; The calculation module is specifically used to: calculate the local EEG index of each sampling point in the EEG signal segment; calculate the sum of the local EEG indexes of all sampling points in the EEG signal segment to obtain the index sum; divide the index sum by the total number of sampling points of the EEG signal segment to obtain the overall EEG index of the EEG signal segment; The calculation module is also used to calculate the emotion index in the following manner: ; in, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, the higher the gear, the higher the corresponding signal frequency; The calculation module is also used to calculate the cognitive input index in the following manner: ; in, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, is the second level of the current sampling point in the EEG signal The value of the wave, is the third level of the current sampling point in the EEG signal The value of the wave, the higher the gear, the higher the corresponding signal frequency.
6. An electronic device comprising a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, and the memory and the processor communicate through the communication bus and the communication interface. It is characterized in that When the processor executes the computer program, the electroencephalogram signal processing method described in any one of claims 1 to 4 is implemented.
7. A computer readable medium having a non-volatile program code executable by a processor, It is characterized in that The program code enables the processor to execute the EEG signal processing method described in any one of claims 1 to 4.
