Inter-process data sharing method and data interaction method under multi-core parallel framework and related equipment

By adopting the lock-free shared memory mechanism and data classification model in the multi-core parallel computing framework, deadlocks and performance bottlenecks in data sharing and interaction between processes are solved, and more efficient system performance and stability are achieved.

CN119718719APending Publication Date: 2025-03-28国网思极网安科技(北京)有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411771410.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the existing multi-core parallel computing framework, there are deadlock problems and performance bottlenecks caused by locking mechanisms in data sharing and interaction between processes, affecting the stability and scalability of the system.

Method used

The lock-free shared memory mechanism is adopted, and the original data is encapsulated into a predefined data structure through the data classification model, and the data is stored using a predetermined storage strategy in the shared memory to avoid the use of the lock mechanism.

Benefits of technology

It significantly improves system performance, avoids deadlock problems, reduces the idle time for threads to wait for locks, enhances the stability and scalability of the program, and simplifies the design process of concurrent programs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718719A_ABST
    Figure CN119718719A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide an inter-process data sharing method under a multi-core parallel framework, an inter-process data interaction method under the multi-core parallel framework and related equipment. The inter-process data sharing method under the multi-core parallel framework comprises the following steps: acquiring original data; according to the original data, packaging the original data into a predefined data structure through a data classification model to obtain shared data; and storing the shared data in a shared memory according to a predetermined shared data storage strategy through an inter-process data sharing model under a multi-core parallel framework. The inter-process data interaction method under the multi-core parallel framework comprises the following steps: loading a shared memory; and calling the shared data from the shared memory according to the identification code. According to the invention, the system performance can be improved, and the data calling difficulty is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present application relate to the field of computer technology, and in particular, to a method for sharing data between processes, a method for interacting with data, and related devices under a multi-core parallel framework. Background Art

[0002] In the current computing environment dominated by multi-core CPUs, multi-core parallel computing technology has become a key means to improve software performance. This technology significantly enhances the computing power of the processor by supporting the concurrent execution of multiple processes or threads. With the rapid development of this field, optimizing parallel computing technology in a multi-core environment has been regarded as a critical factor for national security and scientific and technological development.

[0003] The characteristic of multi-core architecture is that multiple processor cores are integrated on a single chip, and each core can independently execute instruction streams, thereby realizing chip-level parallel computing. This structure usually includes logic units such as instruction fetch units, program counters, instruction schedulers, functional units, and registers, so that each core can operate independently and work together to accelerate the execution of computing tasks.

[0004] In addition, the parallel architecture of tightly coupled multiple CPUs provides a powerful platform for parallel computing. Under this architecture, inter-process data interaction in the inter-process multi-core parallel framework becomes the key to ensure effective collaboration and information sharing between different cores or processes. Existing parallel computing frameworks and programming models provide a series of methods and tools for managing and optimizing inter-process data interaction in the inter-process multi-core parallel framework to meet the needs of specific applications. Therefore, optimizing inter-process data interaction in the inter-process multi-core parallel framework is crucial to improving the performance and scalability of parallel computing applications, and has become an important research direction in the field of computer science and parallel computing. Summary of the invention

[0005] In view of this, the purpose of one or more embodiments of the present application is to propose a data sharing method, an interaction method and related equipment between processes in a multi-core parallel framework to solve the problems raised by the background technology.

[0006] Based on the above objectives, one or more embodiments of the present application provide a method for sharing data between processes in a multi-core parallel framework, including:

[0007] Get the original data;

[0008] According to the original data, encapsulating the original data into a predefined data structure through a data classification model to obtain shared data;

[0009] The shared data is stored in the shared memory according to a predetermined shared data storage strategy through an inter-process data sharing model under a multi-core parallel framework.

[0010] Optionally, according to the original data, encapsulating the original data into a predefined data structure through a data classification model includes:

[0011] Determining the importance and type of the raw data;

[0012] Determine, according to the importance and the type, a data sharing strategy between processes in a target multi-core parallel framework corresponding to the original data;

[0013] Determine the target data structure corresponding to the original data according to the inter-process data sharing strategy under the target multi-core parallel framework;

[0014] The original data is encapsulated into a target data structure.

[0015] Optionally, storing the shared data in a shared memory according to a predetermined shared data storage strategy through an inter-process data sharing model under a multi-core parallel framework includes:

[0016] Loading the shared memory;

[0017] Determine whether there is a writable data unit in the shared memory;

[0018] In response to determining that there is a writable data unit, the shared data is written into the data unit according to a predetermined shared data storage strategy and an identification code of the data unit is obtained.

[0019] Optionally, the shared data is stored in the shared memory according to a predetermined data structure, and the data structure includes an identification code of a data unit into which the shared data is written.

[0020] Optionally, before determining the category of the original data, the method further includes:

[0021] According to the original data, the original data is filtered through a data preprocessing model; the data preprocessing model is used for data repair and data cleaning.

[0022] Based on the same inventive concept, one or more embodiments of the present application provide a method for data interaction between processes in a multi-core parallel framework, including:

[0023] Load shared memory;

[0024] The shared data is called from the shared memory according to the identification code; the shared data is generated according to any one of the methods of claims 1 to 5.

[0025] Based on the same inventive concept, one or more embodiments of the present application further provide a device for sharing data between processes in a multi-core parallel framework, including:

[0026] An acquisition module, configured to acquire raw data;

[0027] The encapsulation module is configured to encapsulate the original data into a predefined data structure according to the original data through a data classification model to obtain shared data;

[0028] The storage module is configured to store the shared data in the shared memory according to a predetermined shared data storage strategy.

[0029] Based on the same inventive concept, one or more embodiments of the present application further provide a device for data interaction between processes in a multi-core parallel framework, including:

[0030] Load module, which is configured to load shared memory;

[0031] The calling module is configured to call the shared data from the shared memory according to the identification code; the shared data is generated according to any one of the methods of claims 1 to 5.

[0032] Based on the same inventive concept, one or more embodiments of the present application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for sharing data between processes in a multi-core parallel framework and the method for interacting data between processes in a multi-core parallel framework are implemented as described in any one of the above.

[0033] Based on the same inventive concept, one or more embodiments of the present application also provide a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute any of the above-mentioned methods for sharing data between processes under a multi-core parallel framework and methods for interacting data between processes under a multi-core parallel framework.

[0034] From the above, it can be seen that the method for sharing data between processes in a multi-core parallel framework provided by one or more embodiments of the present application avoids deadlock problems, reduces the idle time of threads waiting for locks, and enhances the stability and scalability of the program. The method for interacting data between processes in a multi-core parallel framework provided by one or more embodiments of the present application reduces the difficulty of data retrieval and improves system performance.

[0035] The present application provides an inter-process data sharing device and an inter-process data interaction device under a multi-core parallel framework, an inter-process data interaction device under a multi-core parallel framework, an electronic device and a computer-readable storage medium, all of which can implement the steps of the above-mentioned inter-process data sharing method under a multi-core parallel framework and the inter-process data interaction method under a multi-core parallel framework, and therefore also have the beneficial effects of the above-mentioned inter-process data sharing method under a multi-core parallel framework and the inter-process data interaction method under a multi-core parallel framework. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate one or more embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only one or more embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A flowchart of a method for sharing data between processes in a multi-core parallel framework according to one or more embodiments of the present application;

[0038] Figure 2 A schematic diagram of the structure of an inter-process data sharing device under a multi-core parallel framework of one or more embodiments of the present application;

[0039] Figure 3 A schematic diagram of a data cleaning process for one or more embodiments of the present application;

[0040] Figure 4 A flowchart of a method for sharing data between processes in a multi-core parallel framework according to one or more embodiments of the present application;

[0041] Figure 5 A flowchart of a method for data interaction between processes in a multi-core parallel framework according to one or more embodiments of the present application;

[0042] Figure 6 A schematic diagram of a flow chart of an inter-process data interaction device under a multi-core parallel framework of one or more embodiments of the present application;

[0043] Figure 7 A schematic diagram of the hardware structure of an electronic device according to one or more embodiments of the present application. DETAILED DESCRIPTION

[0044] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0045] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of the present application should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in one or more embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0046] As described in the background technology, optimizing inter-process data interaction in an inter-process multi-core parallel framework is crucial to improving the performance and scalability of parallel computing applications, and has become an important research direction in the field of computer science and parallel computing.

[0047] In the related art, a shared memory method is used to realize inter-process communication. The shared memory method allows multiple processes to access the same memory area, and a lock mechanism is usually used to ensure data consistency and synchronization.

[0048] Among them, mutex locks are one of the most commonly used synchronization mechanisms, which are used to protect shared resources and ensure that only one process can access shared resources at the same time. For example, in the producer-consumer model, producers and consumers exchange data through shared memory. Before accessing the shared memory, both parties need to lock to ensure the consistency and integrity of the data. The producer will check whether the memory is full before adding data, and the consumer will check whether the memory is empty before reading data. Once the operation is completed, both parties will unlock so that other processes can access it. This process ensures the synchronization and mutual exclusion of shared memory in a multi-process environment, avoiding data competition and data inconsistency.

[0049] However, although the locked shared memory model of the related art can solve the problem of data consistency in concurrent programming, it also introduces a series of disadvantages. First, the use of locks may cause the overhead of context switching and thread scheduling, increasing the complexity of the system. Secondly, locks may become a performance bottleneck, especially in high-concurrency scenarios, where multiple threads competing for the same lock will cause thread blocking and delays, affecting the throughput of the program. In addition, locks may also cause deadlocks. When multiple threads wait for each other to release the locks held by each other, the program may fall into an infinite waiting state. At the same time, improper control of the granularity of locks may also cause waste of resources and hot spots, reducing the scalability of the system.

[0050] Therefore, the present application proposes a method for inter-process data sharing and an inter-process data interaction method under a multi-core parallel framework, based on a lock-free shared memory mechanism, to enable multiple threads or processes to access shared memory without using a traditional lock mechanism.

[0051] refer to Figure 1 The method for sharing data between processes in a multi-core parallel framework according to one or more embodiments of the present application comprises the following steps:

[0052] Step S101: Acquire original data.

[0053] Step S102: Based on the original data, the original data is encapsulated into a predefined data structure through a data classification model to obtain shared data.

[0054] Step S103: storing the above shared data in a shared memory according to a predetermined shared data storage strategy through an inter-process data sharing model under a multi-core parallel framework.

[0055] The original data in step S101 represents the data to be shared and stored. In an embodiment of the present application, after the original data is obtained and before the original data is classified, the data may also be filtered. Specifically, in an embodiment of the present application, the original data may be filtered by a data preprocessing model, and the data preprocessing model is used for data repair and data cleaning.

[0056] In the embodiment of the present application, the data preprocessing model may also include an initialization submodel, an attribute error repair submodel, a redundant data repair submodel, a missing data repair submodel, an abnormal data repair submodel, and an inconsistent data repair submodel. Through these submodels, data quality issues can be automatically identified and resolved, providing a more accurate and reliable data foundation for data analysis and decision-making, and ensuring the systematicness and effectiveness of the data cleaning process.

[0057] like Figure 3 As shown, the initialization sub-model is used to initialize the decision tree and initialize the feature library so that the subsequent sub-modules can perform data filtering based on the initialized decision tree and the initialized feature library. The data processing process of the initialization sub-model can include event registration, building a data processing queue, configuring parsing, initializing the decision tree and initializing the feature library.

[0058] The attribute error repair submodel is used to identify and correct data in the data set that does not conform to the predetermined format or attribute rules. For example, if a field requires a date format but the input is text, this module will detect the data inconsistency and convert it to the correct date format. In addition, this submodule can also be used to standardize data and unify different abbreviations or terms into a standard form. The data processing process of the attribute error repair submodel can include attribute acquisition statistics, attribute or format error identification, and repair of erroneous data. Attribute or format error identification can be implemented based on the relevant information in the above-mentioned feature library. The repaired data can be used as the basis of a decision tree.

[0059] The redundant data repair submodel is used to identify and process duplicate information in the data set to reduce data redundancy and improve the quality and efficiency of the data set. This includes merging duplicate records, deleting completely duplicate entries, and identifying and deduplicating partially duplicated data through algorithms to ensure the accuracy of data analysis and avoid misleading results due to data duplication. The data processing process of the redundant data repair submodel can include redundant data identification and redundant data deletion. Redundant data identification can be based on data in the feature library.

[0060] The missing data repair submodel is used to predict and fill missing values. Specifically, it identifies missing values ​​by comparing data headers, checksums and other information, and then takes methods such as deleting records with missing values, using the mean or median to fill missing values, or interpolation to predict and fill missing values. The data processing process of the missing data repair submodel can include missing data identification, filling or deleting missing data, and missing data repair. The repaired missing data can be used as the basis for the decision tree.

[0061] The abnormal data repair submodel is used to repair abnormal data. Abnormal data, also known as outliers, refers to data points that are significantly different from other data in the data set. They may be caused by incorrect input, measurement errors, or real extreme situations. These abnormal values ​​are identified by comparing information such as data headers and checksums, and then the abnormal values ​​are classified according to the abnormality to determine whether to delete, correct, or retain them. The data processing process of the abnormal data repair submodel can include abnormal data identification, abnormal data processing, and updating the feature library. Abnormal data identification can be implemented based on feature library data, and the updated feature library can be used as the basis for updating the feature library.

[0062] The inconsistent data repair sub-model is used to take measures to correct inconsistent data or issue alarms to ensure the accuracy and reliability of the data. Data inconsistency refers to the presence of illogical information in the data. For example, if a person's date of birth is earlier than his or her parents' date of birth, this data can be considered inconsistent data. Inconsistent data can be determined by comparing the data with the feature library data source. The data processing process of the inconsistent data repair sub-model can include inconsistent data identification, inconsistent data processing, and updating the feature library. Inconsistent data identification can be implemented based on the feature library data, and the updated feature library can be used as the basis for updating the feature library.

[0063] Afterwards, the original data or the original data after data preprocessing can be classified through the data classification model. The purpose of classification is to take appropriate processing measures and protection measures according to the type of data, so as to more effectively manage and utilize data resources, improve the quality and security level of data, and reduce the risk of data leakage and abuse.

[0064] In the embodiments of the present application, data can be divided according to data type, data importance or data characteristics. The present application does not limit the standard or basis for data division. In the present application, data can be divided according to one or more division criteria. For example, data can be divided according to both data type and data importance.

[0065] Taking data types as an example, in one embodiment of the present application, data types may include business data and management data. Business data, as basic business interaction data, covers actual uplink and downlink data, and its volume is usually large. Management data focuses on the management level, changes infrequently, and mainly reflects the configuration information dependency between programs, covering topics, resources, scenarios, logs, alarms, equipment and other information data.

[0066] According to the importance of data, data can be divided into important data, general data and notification data. As core data, important data integrates the key parts of business data and management data, and its privacy and integrity must be ensured through encryption and decryption. General data involves data generated during system operation. Although it is not as sensitive as important data, it still needs to be properly managed to ensure data integrity and availability. Notification data mainly covers data for external communication, alarm data, etc., such as system notifications and user notifications, which are crucial to maintaining system stability.

[0067] According to data characteristics, data can be divided into terminal data, link data, record data and abnormal data. Terminal data mainly comes from user device information and can reflect user behavior patterns. Link data involves the establishment of data channels, network connections and data exchange. Record data includes log record information, which is an important basis for auditing and system maintenance inspections. Abnormal data refers to data that deviates from normal patterns, which may indicate potential problems and require special attention and in-depth analysis.

[0068] This structured and systematic classification method can help manage and utilize data resources more effectively, improve data quality and security, and reduce the risk of data leakage and abuse.

[0069] In this application, the original data can be encapsulated into a predefined data structure according to the above classification. For example, for important business data, the data structure can be set as:

[0070]

[0071]

[0072] For management data, the data structure can be set as:

[0073]

[0074]

[0075] For important terminal data, the data structure can be set as:

[0076]

[0077] For important link data, the data structure can be set as:

[0078]

[0079]

[0080] For log information and record information, the data structure can be set as:

[0081]

[0082] Different types of general data can also be set to different data structures. For example, the data structure of the registration event can be set to:

[0083]

[0084] The data structure of encrypted card information can be set as:

[0085]

[0086] The data structure of the process thread table can be set as:

[0087]

[0088] The data structure of the table structure in use can be set as:

[0089]

[0090] The data structure of the mapping table can be set as:

[0091]

[0092] After obtaining the shared data through the above steps, the data can be stored in the shared memory.

[0093] In order to utilize the shared memory more efficiently, this application needs to further encapsulate the above shared data.

[0094] That is, in step S103 of the present application, the inter-process data sharing model under the multi-core parallel framework is used to further encapsulate the shared data so that the cleaned and classified structured data can be efficiently stored in the shared memory. When other processes access these data, they can directly access them quickly based on the index number and available flag without using a locking mechanism, thereby significantly improving performance.

[0095] The encapsulated data structure can be represented as:

[0096]

[0097] In an embodiment of the present application, the process of storing shared data in a shared memory may include: loading the shared memory; cyclically searching whether there are any unwritten data units in the shared memory, and if so, determining an identification code (Identity Document, ID) of the data unit; judging whether the data unit can be written (whether the status of the data unit is 0), and if so (status is 0), writing the shared data and obtaining the status.

[0098] According to the above content, in the above data structure, id is used to locate the location of the data unit, status is used to mark the availability of the data unit (such as 0 means available), buffer_size and buffer_max_size define the relevant parameters of the cache operation, and queue_size reflects the amount of data in the current queue. Count and size record the total number of data and the number of used data respectively, while item_size and next_item_index specify the length of the data value area and the index of the next valid value respectively.

[0099] It can be understood that in a multi-process system, the inter-process data sharing method under the multi-core parallel framework provided by the present application can be implemented by multiple processes. Figure 4 As shown, the method of the present application can execute the above steps S101-S103 through a shared data aggregation model, involving six processes. Figure 4 In the example, process 1 and process 2 are mainly responsible for data collection and raw data collection. These data are then sent to the shared data aggregation model for further processing; process 3, process 4, process 5 and process 6 can be tools for data processing, analysis, and forwarding. Data sharing between processes in a multi-core parallel framework is the key to achieving collaborative work in a multi-process system. It ensures the real-time and flexibility of data, allowing each process to obtain the required data in a timely manner and perform corresponding processing and analysis.

[0100] Inside the model, the data first goes through a cleaning step, which is a process that is performed by a specific process to remove noise and inconsistencies in the data and ensure the quality and accuracy of the data. Data cleaning is a key step in data preprocessing, which lays a solid foundation for subsequent data analysis and processing.

[0101] After cleaning, the data enters the classification stage, which is a step to classify the data into different categories according to its characteristics and uses. Data classification not only helps improve the efficiency of data management, but also reduces the risk of data leakage and abuse. Through classification, the data becomes more orderly and convenient for subsequent retrieval and use.

[0102] The dotted arrows in the whole process represent the flow of data between different processes, while the solid arrows represent the processing steps of data within the shared data aggregation model. This design not only improves the data processing efficiency, but also enhances the scalability and stability of the system. Through the shared data aggregation model, the multi-process system can achieve effective management and utilization of data and provide support for various applications.

[0103] refer to Figure 2 The method for data interaction between processes in a multi-core parallel framework of one or more embodiments of the present application includes the following steps:

[0104] Step S201, loading shared memory;

[0105] Step S202: calling shared data from the shared memory according to the identification code; the shared data is generated according to any one of the methods of claims 1 to 5.

[0106] The shared data in step S202 is generated according to any method in claims 1 to 5, which will not be described in detail here.

[0107] The identification code in step S202 represents the ID mentioned above. In this application, when reading data, other processes only need to check the id and status to quickly locate and read the required data without experiencing the waiting time of the lock, thereby greatly improving the performance and efficiency of data access.

[0108] The process of retrieving data may include: loading shared memory; determining the corresponding data unit in the shared memory according to the ID; after determining the target data unit, checking whether it can be read (whether status is 0), and if it can be read (status is 0), reading the data.

[0109] In summary, the inter-process data sharing method under the multi-core parallel framework and the inter-process data interaction method under the multi-core parallel framework proposed in this application significantly improve system performance, avoid deadlock problems, reduce the idle time of threads waiting for locks, and enhance the stability and scalability of the program. At the same time, the lock-free mechanism simplifies the design process of concurrent programs, reduces the difficulty of development, and enables developers to focus more on the implementation of business logic. In addition, through the data cleaning and classification model, the present invention ensures the consistency and accuracy of the data, and provides a reliable foundation for subsequent data processing and analysis. The inter-process data sharing model under the multi-core parallel framework can also select appropriate sharing methods according to the real-time requirements of different data types, ensuring the real-time and flexibility of the data.

[0110] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides a device for sharing data between processes in a multi-core parallel framework. Figure 5 As shown, the device comprises:

[0111] An acquisition module 11 is configured to acquire original data;

[0112] The encapsulation module 12 is configured to encapsulate the original data into a predefined data structure according to the original data through a data classification model to obtain shared data;

[0113] The storage module 13 is configured to store the shared data in the shared memory according to a predetermined shared data storage strategy.

[0114] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides a data interaction device between processes in a multi-core parallel framework. Figure 6 As shown, the device comprises:

[0115] A loading module 21 is configured to load a shared memory;

[0116] The calling module 22 is configured to call the shared data from the shared memory according to the identification code; the shared data is generated according to any one of the methods of claims 1-5.

[0117] For the convenience of description, the above devices are described in terms of functions and modules. Of course, when implementing one or more embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0118] The apparatus of the above-mentioned embodiment is used to implement the corresponding method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0119] Figure 7 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0120] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0121] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solution provided in the embodiment of the present application is implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0122] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0123] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0124] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0125] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiment of the present application, and does not necessarily include all the components shown in the figure.

[0126] The electronic device of the above embodiment is used to implement the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0127] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0128] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0129] In addition, to simplify the description and discussion, and in order not to make one or more embodiments of the present application difficult to understand, the known power / ground connections to the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making one or more embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which one or more embodiments of the present application will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present disclosure, it is obvious to those skilled in the art that one or more embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0130] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0131] One or more embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present application should be included in the scope of protection of this disclosure.

Claims

1. A method for sharing data between processes in a multi-core parallel framework, characterized in that: include: Get the original data; According to the original data, encapsulating the original data into a predefined data structure through a data classification model to obtain shared data; The shared data is stored in the shared memory according to a predetermined shared data storage strategy through an inter-process data sharing model under a multi-core parallel framework.

2. The method according to claim 1, characterized in that According to the original data, the original data is encapsulated into a predefined data structure through a data classification model, including: Determining the importance and type of the raw data; Determine, according to the importance and the type, a data sharing strategy between processes in a target multi-core parallel framework corresponding to the original data; Determine the target data structure corresponding to the original data according to the inter-process data sharing strategy under the target multi-core parallel framework; The original data is encapsulated into a target data structure.

3. The method according to claim 1, characterized in that: The shared data is stored in a shared memory according to a predetermined shared data storage strategy through an inter-process data sharing model under a multi-core parallel framework, including: Loading the shared memory; Determine whether there is a writable data unit in the shared memory; In response to determining that there is a writable data unit, the shared data is written into the data unit according to a predetermined shared data storage strategy and an identification code of the data unit is obtained.

4. The method according to claim 3, characterized in that The shared data is stored in the shared memory according to a predetermined data structure, and the data structure includes an identification code of a data unit into which the shared data is written.

5. The method according to claim 1, characterized in that Before determining the category of the original data, it also includes: According to the original data, the original data is filtered through a data preprocessing model; the data preprocessing model is used for data repair and data cleaning.

6. A method for data interaction between processes in a multi-core parallel framework, characterized in that: include: Load shared memory; Calling shared data from the shared memory according to the identification code; The shared data is generated according to any one of the methods of claims 1-5.

7. A device for sharing data between processes in a multi-core parallel framework, characterized in that: include: An acquisition module, configured to acquire raw data; The encapsulation module is configured to encapsulate the original data into a predefined data structure according to the original data through a data classification model to obtain shared data; The storage module is configured to store the shared data in the shared memory according to a predetermined shared data storage strategy.

8. A device for data interaction between processes in a multi-core parallel framework, characterized in that: include: Load module, which is configured to load shared memory; A calling module, configured to call shared data from the shared memory according to the identification code; The shared data is generated according to any one of the methods of claims 1-5.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.

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