Data initialization method and device, computer device, medium and product

By configuring the initialization configuration mode during the power-on phase of the computer device, initial data is obtained and applied to initialize the DRAM, which solves the problem of DRAM data uncertainty, improves the stability and reliability of the memory, and avoids system anomalies.

CN122240041APending Publication Date: 2026-06-19BEIJING QINGYUN TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING QINGYUN TECHNOLOGY CO LTD
Filing Date
2026-05-22
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The uncertainty of the original data in DRAM in computer devices leads to uncertainty in the data read when accessing the same address in subsequent reads.

Method used

By configuring the initialization configuration mode during the power-on phase of the computer device, initial data is obtained from the configuration register, and data initialization operations are performed on the memory based on the initial data, so that the data in the memory is transformed from an uncertain state to a deterministic state.

Benefits of technology

It speeds up data initialization, eliminates the problem of random data corruption in the memory after the computer device is powered on, improves the stability and reproducibility of memory access, and avoids system crashes and data corruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240041A_ABST
    Figure CN122240041A_ABST
Patent Text Reader

Abstract

This application relates to a data initialization method, apparatus, computer device, medium, and product. The method includes: responding to a data initialization instruction in a memory of a computer device; obtaining an initialization configuration mode corresponding to the memory from at least one configuration register within the computer device; determining initial data to be written into the memory based on the initialization configuration mode; and performing data initialization operations on the storage space in the memory based on the initial data, so that the data in the memory is transformed from an uncertain state to a deterministic state. The initialization configuration mode is configured during the power-on phase of the computer device, and the initial data is a fixed data pattern. Using this method, data initialization can transform the data in the memory from an uncertain state to a deterministic state, enabling the memory to store known and stable initial data, providing a reliable basis for all subsequent read and write operations, and ensuring that the fixed-state data can be read when accessing the same address in subsequent reads.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data storage technology, and in particular to data initialization methods, apparatus, computer equipment, media and products. Background Technology

[0002] With the continuous development of computer technology, computer equipment generates a large amount of business data during operation, and this business data needs to be written to Dynamic Random-Access Memory (DRAM) in a timely and reliable manner.

[0003] In related technologies, business data is mainly written to DRAM through the write byte strobe (WSTRB) function of the Advanced eXtensible Interface (AXI) in computer equipment.

[0004] However, in related technologies, because the original data in DRAM is in an uncertain state, it can lead to uncertainties in the data read when accessing the same address in subsequent reads. Summary of the Invention

[0005] Therefore, it is necessary to provide a data initialization method, apparatus, computer equipment, medium, and product to address the aforementioned technical problems.

[0006] Firstly, this application provides a data initialization method, including:

[0007] In response to a data initialization instruction in a computer device's memory, an initialization configuration mode corresponding to the memory is obtained from at least one configuration register within the computer device; the initialization configuration mode is configured during the power-on phase of the computer device; based on the initialization configuration mode, initial data to be written into the memory is determined; the initial data is a fixed data format; based on the initial data, a data initialization operation is performed on the storage space in the memory to transform the data in the memory from an uncertain state to a deterministic state.

[0008] In one embodiment, prior to responding to a data initialization instruction in the memory of a computer device, the method further includes:

[0009] Monitor the initialization enable signal pre-configured in the enable register of the computer device; the initialization enable signal is configured during the power-on phase of the computer device.

[0010] When the initialization enable signal is detected to be at a preset threshold, the system controls and triggers the data initialization command of the memory.

[0011] In one embodiment, if there is only one initialization configuration mode, the initial data to be written to the memory is determined according to the initialization configuration mode, including:

[0012] Obtain the mapping information table between different preset configuration modes and different initialization data;

[0013] Matching the different preset configuration modes and initialization configuration modes in the mapping information table;

[0014] Retrieve initialization data corresponding to the preset configuration mode that matches the initialization configuration mode from the mapping information table;

[0015] Determine the initial data based on the initialization data.

[0016] In one embodiment, determining initial data based on initialization data includes:

[0017] Obtain the initial bit width and the data bit width of the initial data corresponding to the memory;

[0018] Based on the initial bit width and the data bit width, the initial data is copied to obtain the initial data; the data bit width is equal to the bit width of the initial data.

[0019] In one embodiment, if there are multiple initialization configuration modes, the initial data to be written to the memory is determined according to the initialization configuration mode, including:

[0020] Based on the initialization configuration modes and the mapping information table between different preset configuration modes and different initialization data, the different preset configuration modes in the mapping information table are matched with each initialization configuration mode.

[0021] Retrieve initialization data corresponding to the preset configuration mode that matches each initialization configuration mode from the mapping information table;

[0022] Initial data is generated based on the initialization data.

[0023] In one embodiment, initial data is generated based on the initialization data, including:

[0024] Obtain the configuration priority of each configuration register;

[0025] The sequence of initialization data is determined based on the configuration priority of each configuration register.

[0026] The initial data is obtained by concatenating the initial data according to the concatenation sequence of each initial data.

[0027] In one embodiment, a data initialization operation is performed on the storage space in the memory based on initial data, including:

[0028] Obtain the initialization address in the memory's storage space;

[0029] The initial data is written to the memory's initial address to complete the data initialization operation.

[0030] In one embodiment, the method further includes:

[0031] According to a preset initialization cycle, execute steps in response to data initialization instructions in the memory of the computer device to obtain the latest initial data;

[0032] Based on the latest initial data, perform data initialization operations on the data already stored in the memory's storage space.

[0033] In one embodiment, the method further includes:

[0034] In the case of performing data initialization operations on the storage space in the memory, it responds to data write commands in the memory of the computer device.

[0035] Based on the data write instruction and the data in the memory's storage space, a data write operation is performed on the memory's storage space to generate the target data.

[0036] In one embodiment, the data write instruction carries at least one write byte strobe signal and corresponding service data; based on the data write instruction and the initial data in the memory's storage space, a data write operation is performed on the memory's storage space to generate target data, including:

[0037] Based on the strobe signals of each write byte, determine the corresponding write addresses of the business data in the initial data;

[0038] Based on business data and write addresses, the initial data in the storage space is updated to obtain the target data.

[0039] In one embodiment, the method further includes:

[0040] Responding to data read commands from the memory in a computer device;

[0041] The target data is read from the memory space according to the data read instruction.

[0042] Secondly, this application also provides a data initialization apparatus, comprising:

[0043] The acquisition module is used to acquire the initialization configuration mode corresponding to the memory from at least one configuration register in the computer device in response to the data initialization instruction of the memory in the computer device; the initialization configuration mode is configured during the power-on phase of the computer device; the determination module is used to determine the initial data to be written into the memory according to the initialization configuration mode; the initial data is a fixed data format; the initialization module is used to perform data initialization operation on the storage space in the memory based on the initial data, so that the data in the memory is transformed from an uncertain state to a deterministic state.

[0044] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method of any of the embodiments in the first aspect described above.

[0045] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.

[0046] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.

[0047] The aforementioned data initialization method, apparatus, computer device, medium, and product include: responding to a data initialization instruction in the memory of the computer device, obtaining an initialization configuration mode corresponding to the memory from at least one configuration register within the computer device, determining initial data to be written into the memory based on the initialization configuration mode, and performing data initialization operations on the storage space in the memory based on the initial data, so that the data in the memory is transformed from an uncertain state to a deterministic state. The initialization configuration mode is configured during the power-on phase of the computer device, and the initial data is a fixed data pattern. Based on the initialization configuration mode configured in the configuration register during the power-on phase of the computer device, the above method can conveniently and quickly initialize the storage space in the memory, accelerating the data initialization speed. Simultaneously, the above method can transform the data in the memory from an uncertain state to a deterministic state through data initialization, thus eliminating problems such as uncontrollable data and abnormal data reads caused by random data corruption in the memory after the computer device powers on. Furthermore, it ensures that known and stable initial data is stored in the memory, providing a reliable foundation for all subsequent read and write operations. When accessing the same address in subsequent reads, data in a fixed state can be read. In addition, it can improve the stability and reproducibility of memory access, avoiding system crashes, functional abnormalities, and data corruption in the computer device caused by data uncertainty. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a flowchart illustrating a data initialization method in one embodiment;

[0050] Figure 2 This is a flowchart illustrating the data initialization method in another embodiment;

[0051] Figure 3 This is a flowchart illustrating the data initialization method in another embodiment;

[0052] Figure 4 This is a flowchart illustrating the data initialization method in another embodiment;

[0053] Figure 5 This is a flowchart illustrating the data initialization method in another embodiment;

[0054] Figure 6 This is a flowchart illustrating the data initialization method in another embodiment;

[0055] Figure 7 This is a flowchart illustrating the data initialization method in another embodiment;

[0056] Figure 8 This is a flowchart illustrating the data initialization method in another embodiment;

[0057] Figure 9 This is a flowchart illustrating the data initialization method in another embodiment;

[0058] Figure 10 This is a flowchart illustrating the data initialization method in another embodiment;

[0059] Figure 11 This is a flowchart illustrating the data initialization method in another embodiment;

[0060] Figure 12 This is a structural block diagram of a data initialization device in one embodiment;

[0061] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0063] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0064] In the field of data storage, a large amount of business data generated by computer equipment during operation is written to DRAM. Related technologies primarily utilize the WSTRB function of the AXI controller in the computer equipment to write business data to DRAM. The WSTRB function is actually accomplished by the DRAM controller in the computer equipment performing a read-modify-write operation: first, the original data is read from the DRAM, then a portion of the original data is modified according to the write byte strobe signal and the business data, and finally the modified data is written back to the DRAM. However, the mixed storage of business data and original data in related technologies makes the original data in the DRAM in an uncertain state, leading to unpredictable data read when accessing the same address subsequently. Based on this, embodiments of this application provide a data initialization method, apparatus, computer equipment, medium, and product.

[0065] The data initialization method provided in this application can be applied to computer devices, including but not limited to personal computers, laptops, tablets, smartphones, smartwatches, smart TVs, smart air conditioners, smart vehicle devices, and projection devices. The computer device includes a processing chip and a memory. In practical applications, the processing chip integrates a processor and a memory controller. The processor and memory controller can communicate via high-speed buses such as Advanced High-performance Bus (AHB), Coherent Hub Interface (CHI), or Network on Chip (NoC). However, in this application embodiment, communication between the processor and memory controller via an Advanced eXtensible Interface (AXI) high-speed bus is used as an example. Simultaneously, the memory controller and memory communicate using a dedicated memory bus (Double Data Rate (DDR) physical interface), such as DDR4, DDR5, or Low Power Double Data Rate (LPDDR) parallel high-speed interfaces.

[0066] In this embodiment, the memory described above may be, but is not limited to, Static Random-Access Memory (SRAM), high-speed interface buffer memory, and non-volatile random access memory. In this embodiment, the memory is described as Dynamic Random Access Memory (DRAM). Correspondingly, the memory controller is a DRAM controller.

[0067] In one exemplary embodiment, such as Figure 1 As shown, a data initialization method is provided. Taking the application of this method to a DRAM controller in a computer device as an example, the method includes the following steps 201 to 203. Wherein:

[0068] Step 201: In response to a data initialization instruction in the memory of the computer device, obtain the initialization configuration mode corresponding to the memory from at least one configuration register within the computer device. The initialization configuration mode is configured during the power-on phase of the computer device.

[0069] It's important to note that computer equipment generates a large amount of business data during operation. This data needs to be stored in the DRAM within the computer equipment for later retrieval in applications such as system debugging, AXI interface debugging, and fault analysis. To improve the accuracy of the retrieved business data, the DRAM storage space can be initialized before data storage.

[0070] Specifically, users can input data initialization commands for the memory into the computer device via voice, gestures, buttons, or other means. Correspondingly, the DRAM controller can receive and respond to the data initialization commands for the memory in the computer device. The memory here can be Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), Low Power DDR (LPDDR), Graphics DDR (GDDR), etc. In this embodiment, DRAM is used as an example for explanation.

[0071] In practical applications, after responding to the data initialization command of the memory in the computer device, the computer device can obtain the memory initialization configuration mode from at least one configuration register in the computer device.

[0072] The computer device may include multiple registers, among which at least one configuration register may be included. Each configuration register stores an initialization configuration mode required for data initialization of the memory's storage space. Each configuration register can store one corresponding initialization configuration mode, and the initialization configuration modes stored in different configuration registers may be equal or unequal. Optionally, the memory may correspond to one or more initialization configuration modes; this example uses one initialization configuration mode. The number of initialization configuration modes may be equal to the number of configuration registers.

[0073] Meanwhile, the initialization configuration mode corresponding to the aforementioned memory, that is, the initialization configuration mode stored in each configuration register, is configured in the early hardware initialization stage of the computer device's system startup code after the computer device is powered on.

[0074] Step 202: Determine the initial data to be written to the memory according to the initialization configuration mode; the initial data is a fixed data format.

[0075] Specifically, the DRAM controller can acquire a pre-trained algorithm model, and then input the initialization configuration mode corresponding to the memory into the algorithm model, which outputs the initial data to be written into the memory.

[0076] At the same time, the DRAM controller can call the data acquisition tool, input the initialization configuration mode into the data acquisition tool, and the data acquisition tool outputs the initial data to be written into the memory.

[0077] The initial data mentioned above is a fixed data format, that is, fixed data. It should be noted that before the data initialization operation is performed on the storage space of the memory, the data in the memory is in a random, unknown, and unpredictable state, that is, the data in the memory is in an uncertain state. At this time, the data in the memory is a non-fixed data format.

[0078] Optionally, the above initialization configuration mode can be represented by binary or octal numbers. However, in this embodiment, the initialization configuration mode is represented by hexadecimal numbers. The initialization configuration mode can be, but is not limited to, 00, ff, 55, and aa. Among them, the initialization configuration mode 00 is converted to the corresponding 8-bit binary initialization data 00000000, the initialization configuration mode ff is converted to the corresponding 8-bit binary initialization data 11111111, the initialization configuration mode 55 is converted to the corresponding 8-bit binary initialization data 01010101, and the initialization configuration mode aa is converted to the corresponding 8-bit binary initialization data 10101010.

[0079] Step 203: Based on the initial data, perform data initialization operations on the storage space in the memory to transform the data in the memory from an uncertain state to a deterministic state.

[0080] In this case, the size of the memory storage space can be equal to the size of the memory required to store the initial data. The DRAM controller can directly send the initial data to the memory, instructing the memory to store the initial data, thereby performing a data initialization operation on the storage space in the memory and transforming the data in the memory from an uncertain state to a deterministic state.

[0081] In the embodiments of this application, after the data in the memory is transformed from an uncertain state to a certain state, subsequent write operations based on the write byte strobe signal can read predictable and stable original data from the memory when performing read-modify-write operations.

[0082] It should be noted that when storing initial data, the memory can directly overwrite the existing data within it.

[0083] To prevent omissions in data initialization operations on the memory space before temporarily storing business data and to speed up the data storage to memory, the DRAM controller can be configured to automatically execute a data initialization process during the power-on phase of the computer device. The process of automatically entering the data initialization process is described below. In one embodiment, before executing the data initialization instruction in response to the memory in the computer device in step S201 above, such as... Figure 2 As shown, the above method may further include the following steps:

[0084] Step S204 involves monitoring the pre-configured initialization enable signal in the enable register within the computer device. This initialization enable signal is configured during the power-on phase of the computer device.

[0085] It should be noted that during the power-on phase of the computer device, the system startup code can configure the corresponding memory initialization enable signal in the enable register of the computer device. Correspondingly, during the power-on phase of the computer device, the DRAM controller can use a signal monitoring method to monitor the pre-configured initialization enable signal in the enable register of the computer device in real time. Optionally, the above signal monitoring method can be an enable sequence monitoring method or a level monitoring method, which corresponds to the form of the initialization enable signal.

[0086] Optionally, the initialization enable signal can be an enable sequence signal; different enable sequence signals indicate whether data initialization of the storage space in the memory is required or not.

[0087] The initialization enable signal can also be a logic signal, such as 0 or 1. A logic signal of 0 indicates that data initialization of the storage space in the memory is required; a logic signal of 1 indicates that data initialization of the storage space in the memory is not required.

[0088] Step S205: When the initialization enable signal is detected to be at a preset threshold, control the trigger to initiate a data initialization command for the memory.

[0089] In practical applications, when the DRAM controller detects that the initialization enable signal is at a preset threshold, it can control the automatic triggering of the memory's data initialization instructions and further begin to execute the above step S201.

[0090] Optionally, the aforementioned preset threshold can be user-defined or determined based on historical experience. In this embodiment, the preset threshold can be a logic signal 1, indicating that data initialization of the storage space in the memory is required; otherwise, it indicates that data initialization of the storage space in the memory is not required.

[0091] The technical solution in this application embodiment responds to a data initialization instruction in a computer device's memory, obtains the initialization configuration mode corresponding to the memory from at least one configuration register within the computer device, determines the initial data to be written into the memory based on the initialization configuration mode, and performs data initialization operations on the storage space in the memory based on the initial data, so that the data in the memory is transformed from an uncertain state to a deterministic state. The initialization configuration mode is configured during the power-on phase of the computer device, and the initial data is a fixed data format. The above method, based on the initialization configuration mode configured in the configuration register during the power-on phase of the computer device, can conveniently and quickly initialize the data in the storage space of the memory, accelerating the data initialization speed. At the same time, the above method can transform the data in the memory from an uncertain state to a deterministic state through data initialization, thus eliminating problems such as uncontrollable data and abnormal data reading caused by random data scrambling in the memory after the computer device is powered on, and enabling the memory to store known and stable initial data, providing a reliable foundation for all subsequent read and write operations. In addition, it can also improve the stability and reproducibility of memory access, avoiding system crashes, functional abnormalities, and data corruption of the computer device due to data uncertainty.

[0092] The process of determining the initial data to be written to the memory based on the initialization configuration mode is described below. In one embodiment, if there is only one initialization configuration mode, then as follows: Figure 3 As shown, the process in step S202 above can be implemented in the following way:

[0093] Step 212: Obtain the mapping information table between different preset configuration modes and different initialization data.

[0094] This section uses the initialization configuration mode as an example to illustrate the process of determining initial data based on the initialization configuration mode. In this embodiment, the DRAM controller can obtain a pre-built mapping information table between different preset configuration modes and different initialization data.

[0095] Step 222: Match the different preset configuration modes and initialization configuration modes in the mapping information table.

[0096] Specifically, the DRAM controller can employ a matching method to match different preset configuration modes and initialization configuration modes in the mapping information table. Optionally, the matching method can be a precise matching method, a fuzzy matching method based on edit distance, a clustering and machine learning matching method, etc.

[0097] In practical applications, the DRAM controller can compare different preset configuration modes with the initialization configuration mode in the mapping information table to complete the matching process.

[0098] Step 232: Obtain the initialization data corresponding to the preset configuration mode that matches the initialization configuration mode from the mapping information table.

[0099] Furthermore, the DRAM controller can obtain initialization data corresponding to the preset configuration mode that matches the initialization configuration mode from the mapping information table.

[0100] Step 242: Determine the initial data based on the initialization data.

[0101] Specifically, the DRAM controller can generate initial data based on the initialization data according to preset rules. Optionally, the preset rules may include the specific method of generating initial data from the initialization data, such as the number of times the initial data is copied and the copying method, the filtering method of the initial data, etc.

[0102] In addition, the DRAM controller can call the initial data generation tool and input the initialization data into the initial data generation tool, which then outputs the initial data.

[0103] In one embodiment, such as Figure 4 As shown, the process of determining the initial data based on the initialization data in step S242 above may include:

[0104] Step S2421: Obtain the initial bit width and the data bit width of the initial data corresponding to the memory.

[0105] Specifically, the DRAM controller can use a parsing method to parse the initialization data to obtain the data bit width of the initialization data. Alternatively, the DRAM controller can also call a bit width detection tool to detect the initialization data and obtain the data bit width of the initialization data.

[0106] The initialization bit width of the memory is the data bit width that needs to be initialized in the memory. This initialization bit width is preset and is a fixed value.

[0107] Step S2422: Based on the initial bit width and data bit width, copy the initial data to obtain the initial data. The data bit width is equal to the bit width of the initial data.

[0108] In practical applications, the DRAM controller can determine the relationship between the initial bit width of the memory and the data bit width of the initial data. If the initial bit width is equal to the data bit width of the memory, then the initial data is determined as the initial data.

[0109] If the initialization bit width is greater than the corresponding data bit width of the memory and is an integer multiple of the data bit width, the DRAM controller can copy the initialization data to generate initial data. It should be noted that the number of times the initialization data is copied can be an integer multiple of the initialization bit width. For example, if the initialization bit width is 16 and the data bit width is 8, then copying the initialization data ABCDEFGH twice will generate the initial data ABCDEFGHABCDEFGH. In this embodiment, the bit width of the initial data can be equal to the corresponding data bit width of the memory.

[0110] The embodiments of this application can generate initial data that meets the initialization bit width based on the initialization bit width of the memory and the data bit width of the initialization data, so as to ensure that all uncertain data in the memory can be initialized during subsequent data initialization operations.

[0111] The technical solution in this application embodiment obtains a mapping information table between different preset configuration modes and different initialization data, performs matching processing on the different preset configuration modes and initialization configuration modes in the mapping information table, obtains the initialization data corresponding to the preset configuration mode that matches the initialization configuration mode from the mapping information table, and determines the initial data based on the initialization data. The above method can quickly obtain the initialization data required for data initialization operations through the mapping information table between different preset configuration modes and different initialization data, and this process does not require the participation of complex algorithms, thereby reducing the complexity of data initialization, reducing data initialization errors, and improving the accuracy of data initialization.

[0112] In some scenarios, multiple initialization configuration modes are obtained. The process of determining initial data based on the initialization configuration modes in such scenarios is described below. In one embodiment, if there are multiple initialization configuration modes, then as follows... Figure 5 As shown, the process in step S202 above can be implemented in the following way:

[0113] Step S252: Based on each initialization configuration mode and the mapping information table between different preset configuration modes and different initialization data, perform matching processing on the different preset configuration modes and each initialization configuration mode in the mapping information table.

[0114] Specifically, the DRAM controller can employ a matching method to match different preset configuration modes with each initialization configuration mode in the mapping information table. Optionally, the matching method can be a precise matching method, a fuzzy matching method based on edit distance, a clustering and machine learning matching method, etc.

[0115] In practical applications, the DRAM controller can compare the different preset configuration modes in the mapping information table with each initialization configuration mode to complete the matching process.

[0116] Step S262: Obtain the initialization data corresponding to the preset configuration mode that matches each initialization configuration mode from the mapping information table.

[0117] The DRAM controller can obtain initialization data corresponding to the preset configuration mode that matches each initialization configuration mode from the mapping information table.

[0118] Step S272: Generate initial data based on the initialization data.

[0119] Specifically, the DRAM controller can generate initial data based on each initialization data according to a preset data generation strategy. Optionally, the data generation strategy may include the assembly order of each initialization data, the number of copies, etc.

[0120] In addition, the DRAM controller can call the initial data generation tool and input the initial data into the initial data generation tool, which then outputs the initial data.

[0121] In one embodiment, such as Figure 6 As shown, the process of generating initial data based on each initialization data in step S262 above may include:

[0122] Step S2621: Obtain the configuration priority of each configuration register.

[0123] In practical applications, the DRAM controller can assign corresponding configuration priorities to each configuration register according to the setting position of each configuration register in the computer device, in the order of left to right, right to left, top to bottom, or bottom to top.

[0124] In addition, the DRAM controller can assign corresponding configuration priorities to each configuration register according to the distance between each configuration register and the processor in the computer device, from largest to smallest or smallest to largest.

[0125] The configuration priority of this configuration register can represent the priority level of the initialization configuration mode stored in the configuration register.

[0126] Step S2622: Determine the concatenation sequence of each initialization data according to the configuration priority of each configuration register.

[0127] Specifically, the DRAM controller can generate a sequence or order of initialization data in the initial data based on the configuration priority of each configuration register. There is a one-to-one correspondence between the configuration registers, the initialization configuration modes, and the corresponding initialization data.

[0128] It is understandable that the initialization configuration mode is stored first in the configuration register, indicating that the initialization data corresponding to the initialization configuration mode will be located earlier in the final generated initial data; the initialization configuration mode is stored later in the configuration register, indicating that the initialization data corresponding to the initialization configuration mode will be located later in the final generated initial data.

[0129] Step S2623: Perform splicing processing on each initialization data according to the splicing sequence of each initialization data to obtain the initial data.

[0130] In practical applications, the DRAM controller can sequentially concatenate each initialization data according to the concatenation sequence to obtain the initial data.

[0131] For example, if the initial data are AA, BB and CC, and the concatenation sequence of the initial data is 01, 02 and 03, then the corresponding generated initial data is AABBCC.

[0132] The technical solution in this application embodiment, based on each initialization configuration mode and a mapping information table between different preset configuration modes and different initialization data, performs matching processing on different preset configuration modes and each initialization configuration mode in the mapping information table, obtains the initialization data corresponding to the preset configuration mode that matches each initialization configuration mode from the mapping information table, and generates initial data based on each initialization data; the above method can quickly obtain multiple initialization data required for data initialization operation through the mapping information table between different preset configuration modes and different initialization data, and this process does not require the participation of complex algorithms, thereby reducing the complexity of data initialization, reducing data initialization errors, and improving the accuracy of data initialization.

[0133] The process of initializing the storage space in the memory based on the initial data is described below. In one embodiment, as... Figure 7 As shown, the process in step S203 above may include:

[0134] Step S213: Obtain the initialization address in the memory's storage space.

[0135] In practical applications, the DRAM controller can read the initialization address from a pre-stored memory location within the computer. Alternatively, the DRAM controller can obtain the pre-recorded initialization address from the memory location, such as the cloud, local storage, or hard drive.

[0136] It should be noted that the storage space of the memory can be larger than the memory size required to store the initial data. The initial address in the storage space of the aforementioned memory can be preset; the initial address in the storage space of the memory can correspond to any part of the storage space of the memory, and this embodiment of the application does not limit this.

[0137] Step S223: Write the initial data to the initial address of the memory to complete the data initialization operation.

[0138] Furthermore, the DRAM controller can send initial data to the memory to instruct the memory to write the initial data to the memory's initial address, thus completing the data initialization operation.

[0139] The technical solution in this application embodiment can first obtain the initial address in the memory storage space, and then write the initial data into the memory initial address to complete the data initialization operation. This can avoid the problem that the original uncertain data in the memory is not completely covered by the initial data, and achieve accurate data initialization operation for the storage space in the memory.

[0140] In practical applications, to ensure the correctness of data read from the memory in subsequent applications, the storage space in the memory can be periodically initialized. This process is described below. In one embodiment, after executing the process in step S203 above, as... Figure 8 As shown, the above method may further include:

[0141] Step S206: Execute the steps corresponding to the data initialization instructions in the memory of the computer device according to the preset initialization cycle to obtain the latest initial data.

[0142] It can be understood that after a data initialization operation is completed during the power-on of the computer device and the computer device continues to run, the DRAM controller can continue to periodically perform data initialization operations on the storage space in the memory.

[0143] Specifically, the DRAM controller can repeatedly execute steps S201-S203 according to a preset initialization cycle to obtain the latest initial data. Optionally, the initialization cycle can be any user-defined value or determined based on empirical values.

[0144] Step S207: Based on the latest initial data, perform data initialization operation on the data already stored in the memory's storage space.

[0145] Furthermore, the DRAM controller can send the latest initial data to the memory to instruct the memory to store the latest initial data at the memory's initialization address, that is, to overwrite the initial data after the last data initialization, so as to complete the data initialization operation on the data already stored in the memory's storage space.

[0146] The technical solution in this application embodiment executes a step in response to a data initialization instruction in the memory of a computer device according to a preset initialization cycle, so as to obtain the latest initial data, and perform data initialization operation on the data already stored in the memory space based on the latest initial data; the above method can periodically perform data initialization operation on the memory space, which can avoid uncertainty in the data read from the memory during subsequent applications and improve the correctness of the data read from the memory later.

[0147] In some scenarios, after performing data initialization operations, business data generated during the operation of the computer device can be stored in a memory for easy retrieval by subsequent applications. The process of storing business data in this memory under such circumstances is described below. In one embodiment, after performing the process in step S203 above, as follows... Figure 9 As shown, the above method may further include:

[0148] Step S301: In the case of performing a data initialization operation on the storage space in the memory, responding to a data write instruction in the memory of the computer device.

[0149] Specifically, when performing data initialization operations on the storage space in the memory, the DRAM controller can receive data write instructions from the processor in the computer device to the memory in the computer device, and respond to the data write instructions in the memory in the computer device.

[0150] It should be noted that after the processor obtains the corresponding business data, it can store the business data in the memory through the DRAM controller.

[0151] Step S302: Based on the data write instruction and the data in the memory's storage space, perform a data write operation on the memory's storage space to generate the target data.

[0152] In practical applications, the DRAM controller can obtain a pre-trained data writing model, then input the data writing instruction and the data in the memory storage space into the data writing model for processing, output the data writing address, and perform data writing operation on the memory storage space according to the data writing address to generate the target data.

[0153] In addition, the DRAM controller can analyze the data write command to obtain the data to be written, and then send the data to be written to the memory, instructing the memory to use the data to be written to overwrite at least a portion of the data in the memory's storage space, so as to complete the data write operation on the memory's storage space and generate the current data in the memory's storage space, i.e., the target data.

[0154] In one embodiment, the above data write instruction carries at least one write byte strobe signal and corresponding service data; such as Figure 10 As shown, the process in step S302 above may include:

[0155] Step S312: Determine the corresponding write addresses of the service data in the initial data according to the strobe signals of each write byte.

[0156] In practical applications, the processor can use the Write Strobe (WSTRB) function via the AXI interface to control the DRAM controller to write service data into the memory. The AXI interface conforms to the AXI protocol.

[0157] It should be noted that the processor can interact with the DRAM controller via the AXI interface through the AXI write data channel. The WSTRB function is a standard function of the AXI interface, used for byte-by-byte control of write operations; and WSTRB is an inherent signal of the AXI write data channel, which can be transmitted to the DRAM controller along with the service data.

[0158] Specifically, the processor can generate corresponding write byte strobe signals according to the actual writing requirements of each service data, or it can receive the write byte strobe signals corresponding to each service data input by the user, and send the obtained write byte strobe signals and the service data to be written to the DRAM controller. Correspondingly, the DRAM controller can obtain the write byte strobe signals and the service data to be written, parse the write byte strobe signals, and determine the write addresses corresponding to the service data to be written based on the parsing results.

[0159] In addition, the DRAM controller can acquire a pre-trained analysis model, and then input the write byte strobe signals and the service data to be written into the analysis model. The analysis model outputs the write addresses corresponding to the service data to be written. Optionally, the above analysis model can be a combination of at least one of the following: a fully connected neural network model, a residual neural network model, a recurrent recurrent neural network model, and a long short-term memory neural network model.

[0160] Step S322: Based on the business data and each write address, update the initial data in the storage space to obtain the target data.

[0161] In practical applications, the DRAM controller can determine whether each write address is empty, and extract the business data according to the determination result to obtain at least one piece of data to be written. It then sends each non-empty write address and the corresponding data to be written to the memory, instructing the memory to store each piece of data to be written into the corresponding write address, overwriting at least part of the original initial data, so as to update the initial data in the storage space to obtain the target data.

[0162] If the write address is empty, there is no need to extract the corresponding bit data from the business data; if the write address is not empty, the corresponding bit data from the business data is extracted.

[0163] Meanwhile, the DRAM controller can input service data and each write address into a pre-trained algorithm model. The algorithm model outputs the corresponding data to be written and sends each data to be written to the memory, instructing the memory to store each data to be written into the corresponding write address, overwriting at least part of the original initial data.

[0164] For example, the processor can acquire 128-bit write byte strobe signals, i.e., 128 write byte strobe signals, and one write byte strobe signal can map one byte of service data. In this embodiment, both the service data and the initial data in the memory storage space are 1024 bits. Specifically, the DRAM controller can receive the 128-bit write byte strobe signals and 1024 bits of service data sent by the processor through the AXI interface using the write data channel. Then, it analyzes the 128-bit write byte strobe signals according to the WSTRB function to determine the write address of the 8-bit data (8 bits of data in the 1024 bits of service data) corresponding to each 1-bit write byte strobe signal. Furthermore, the 8-bit data can be written to the write address in the memory, that is, the 8-bit data overwrites the data originally stored at the write address in the memory.

[0165] The function of WSTRB can be described as follows: when WSTRB is 1, it indicates that the corresponding 1 byte of data in the service data should be written to memory; when WSTRB is 0, it indicates that the corresponding 1 byte of data in memory should be retained. The write address of the above 8 bits of data can also be the corresponding consecutive 8 bits of address in the initialization address. It should be noted that if it is determined from the 1-bit write byte strobe signal that the 8 bits of data in the service data corresponding to the write byte strobe signal do not need to be written to memory, then the write address of the 8 bits of data is empty.

[0166] This embodiment can update the initial data in the storage space based on the WSTRB function of the write data channel when performing data initialization operations on the storage space in the memory, thus ensuring the accuracy of the WSTRB function implementation.

[0167] In practical applications, after completing the data writing operation to the storage space in the memory, the target data currently stored in the memory can be read in subsequent applications. The reading process is described below. In one embodiment, after executing the process in step S322 above, as... Figure 11 As shown, the above method may further include:

[0168] Step S323, responding to a data read instruction from the memory in the computer device.

[0169] The DRAM controller can receive and respond to data read commands from the computer device's memory, input by the user. Optionally, the user can input data read commands via voice, gestures, buttons, keypads, etc.

[0170] Step S324: Read the target data in the memory space according to the data read instruction.

[0171] Optionally, the above data read instruction may carry a data read address, which can be any address in the initialization address.

[0172] Specifically, the DRAM controller can parse the data read instruction to obtain the data read address, and send the data read address to the memory, instructing the memory to feed back at least a portion of the target data in its own storage space to the DRAM controller to complete the read operation.

[0173] The technical solution in this application embodiment, when performing data initialization operation on the storage space in the memory, responds to the data write instruction of the memory in the computer device, and generates target data by performing data write operation on the storage space of the memory according to the data write instruction and the data in the storage space of the memory; the above method can realize reliable data writing to the memory on the basis of performing data initialization operation on the storage space in the memory so that the data in the memory is in a definite state. This avoids the problem of the data in the memory becoming unpredictable after the data write operation is completed, and keeps all the data in the memory in a definite and predictable state.

[0174] To facilitate understanding by those skilled in the art, the data initialization method provided in this application is described in detail below. This method may include:

[0175] Step S601: Monitor the pre-configured initialization enable signal in the enable register of the computer device; the initialization enable signal is configured during the power-on phase of the computer device.

[0176] Step S602: When the initialization enable signal is detected to be at a preset threshold, control the triggering of the memory's data initialization command;

[0177] Step S603: In response to a data initialization instruction in the memory of the computer device, obtain the initialization configuration mode corresponding to the memory from at least one configuration register in the computer device; the initialization configuration mode is configured during the power-on phase of the computer device; Step S604: Determine the initial data to be written into the memory according to the initialization configuration mode; the initial data is a fixed data format; Step S605: Obtain the initialization address in the memory's storage space;

[0178] Step S606: Write the initial data to the initial address of the memory to complete the data initialization operation;

[0179] Step S607: Execute the steps corresponding to the data initialization instructions in the memory of the computer device according to the preset initialization cycle to obtain the latest initial data;

[0180] Step S608: Based on the latest initial data, perform data initialization operation on the data already stored in the memory's storage space;

[0181] Step S609, responding to a data write instruction in the memory of the computer device;

[0182] Step S610: Determine the corresponding write addresses of the service data in the initial data according to the strobe signals of each write byte in the data write instruction;

[0183] Step S611: Based on the business data and write addresses carried in the data write instruction, update the initial data in the storage space to obtain the target data;

[0184] Step S612, responding to a data read instruction from the memory in the computer device;

[0185] Step S613: Perform a read operation on the target data in the memory storage space according to the data read instruction;

[0186] If the initialization configuration mode is one, the process in step S604 above may include:

[0187] Step S614a: Obtain the mapping information table between different preset configuration modes and different initialization data;

[0188] Step S614b: Match the different preset configuration modes and initialization configuration modes in the mapping information table;

[0189] Step S614c: Obtain the initialization data corresponding to the preset configuration mode that matches the initialization configuration mode from the mapping information table;

[0190] Step S614d: Obtain the initial bit width and the data bit width of the initial data corresponding to the memory;

[0191] Step S614e: Based on the initial bit width and the data bit width, copy the initial data to obtain the initial data; the data bit width is equal to the bit width of the initial data.

[0192] If there are multiple initialization configuration modes, the process in step S604 above may include:

[0193] Step S624a: Based on each initialization configuration mode and the mapping information table between different preset configuration modes and different initialization data, perform matching processing between the different preset configuration modes and each initialization configuration mode in the mapping information table.

[0194] Step S624b: Obtain the initialization data corresponding to the preset configuration mode that matches each initialization configuration mode from the mapping information table;

[0195] Step S624c: Obtain the configuration priority of each configuration register;

[0196] Step S624d: Determine the concatenation sequence of each initialization data according to the configuration priority of each configuration register;

[0197] Step S624e: Perform splicing processing on each initialization data according to the splicing sequence of each initialization data to obtain the initial data.

[0198] It should be noted that the descriptions of steps S601-S613 above can be found in the relevant descriptions in the above embodiments, and their effects are similar. Therefore, they will not be repeated here.

[0199] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0200] Based on the same inventive concept, this application also provides a data initialization apparatus for implementing the data initialization method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data initialization apparatus embodiments provided below can be found in the limitations of the data initialization method described above, and will not be repeated here.

[0201] In one exemplary embodiment, such as Figure 12 As shown, a data initialization device is provided, comprising: an acquisition module 11, a determination module 12, and an initialization module 13, wherein:

[0202] The acquisition module 11 is used to obtain the initialization configuration mode corresponding to the memory from at least one configuration register in the computer device in response to the data initialization instruction of the memory in the computer device; the initialization configuration mode is configured during the power-on phase of the computer device; the determination module 12 is used to determine the initial data to be written into the memory according to the initialization configuration mode; the initial data is a fixed data format; the initialization module 13 is used to perform data initialization operation on the storage space in the memory based on the initial data, so that the data in the memory is transformed from an uncertain state to a deterministic state.

[0203] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0204] In one embodiment, the data initialization device further includes: a signal monitoring module and a command triggering module, wherein:

[0205] The signal monitoring module is used to monitor the initialization enable signal pre-configured in the enable register of the computer device; the initialization enable signal is configured during the power-on phase of the computer device.

[0206] The instruction triggering module is used to control and trigger the data initialization instruction of the memory when the initialization enable signal is detected to be at a preset threshold.

[0207] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0208] In one embodiment, if the initialization configuration mode is one, the determining module 12 includes: an information table acquisition unit, a first matching unit, a first data acquisition unit, and a data determining unit, wherein:

[0209] The information table acquisition unit is used to acquire the mapping information table between different preset configuration modes and different initialization data;

[0210] The first matching unit is used to match different preset configuration modes and initialization configuration modes in the mapping information table.

[0211] The first data acquisition unit is used to obtain initialization data corresponding to the preset configuration mode that matches the initialization configuration mode from the mapping information table;

[0212] The data determination unit is used to determine the initial data based on the initialization data.

[0213] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0214] In one embodiment, the first determining unit is specifically used for:

[0215] Obtain the initial bit width and the data bit width of the initial data corresponding to the memory;

[0216] Based on the initial bit width and the data bit width, the initial data is copied to obtain the initial data; the data bit width is equal to the bit width of the initial data.

[0217] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0218] In one embodiment, if there are multiple initialization configuration modes, the determining module 12 includes: a second matching unit, a second data acquisition unit, and a data generation unit, wherein:

[0219] The second matching unit is used to perform matching processing between different preset configuration modes and each initialization configuration mode in the mapping information table, based on each initialization configuration mode and the mapping information table between different preset configuration modes and different initialization data.

[0220] The second data acquisition unit is used to obtain initialization data corresponding to the preset configuration mode that matches each initialization configuration mode from the mapping information table;

[0221] The data generation unit is used to generate initial data based on the initialization data.

[0222] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0223] In one embodiment, the data generation unit is specifically used for:

[0224] Obtain the configuration priority of each configuration register;

[0225] The sequence of initialization data is determined based on the configuration priority of each configuration register.

[0226] The initial data is obtained by concatenating the initial data according to the concatenation sequence of each initial data.

[0227] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0228] In one embodiment, the initialization module 13 includes: an address acquisition unit and a data writing unit, wherein:

[0229] The address acquisition unit is used to acquire the initialization address in the memory's storage space;

[0230] The data writing unit is used to write initial data to the initial address of the memory to complete the data initialization operation.

[0231] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0232] In one embodiment, the data initialization device includes an execution module and a data update module, wherein:

[0233] The execution module is used to execute steps in response to data initialization instructions in the memory of the computer device according to a preset initialization cycle, so as to obtain the latest initial data;

[0234] The data update module is used to perform data initialization operations on the data already stored in the memory space based on the latest initial data.

[0235] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0236] In one embodiment, the data initialization device further includes: a write instruction response module and a data writing module, wherein:

[0237] The write instruction response module is used to respond to data write instructions in the memory of a computer device when performing data initialization operations on the storage space in the memory.

[0238] The data writing module is used to perform data writing operations on the storage space of the memory according to the data writing instruction and the data in the storage space of the memory, and generate the target data.

[0239] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0240] In one embodiment, the data write instruction carries at least one write byte strobe signal and corresponding service data; the data write module is specifically used for:

[0241] Based on the strobe signals of each write byte, determine the corresponding write addresses of the business data in the initial data;

[0242] Based on business data and write addresses, the initial data in the storage space is updated to obtain the target data.

[0243] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0244] In one embodiment, the data initialization device further includes: a read instruction response module and a data read module, wherein:

[0245] A read instruction response module is used to respond to data read instructions from the memory in a computer device;

[0246] The data reading module is used to read target data from the storage space of the memory according to data reading instructions.

[0247] The data initialization device provided in this application embodiment can be used to execute the technical solutions in the above-described data initialization method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0248] Each module in the aforementioned data initialization device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0249] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores the initialization configuration mode and initial data corresponding to the memory. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a data initialization method.

[0250] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0251] In one embodiment, a computer device is also provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the technical solution in the above-described data initialization method embodiment of this application. The implementation principle and technical effect are similar, and will not be repeated here.

[0252] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the technical solution of the data initialization method described above in this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0253] In one embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the technical solution of the data initialization method described above in this application. The implementation principle and technical effects are similar and will not be repeated here.

[0254] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0255] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0256] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data initialization method, characterized in that, The method includes: In response to a data initialization command for a memory in a computer device, an initialization configuration mode corresponding to the memory is obtained from at least one configuration register within the computer device; the initialization configuration mode is configured during the power-on phase of the computer device; based on the initialization configuration mode, initial data to be written into the memory is determined; the initial data is a fixed data format; based on the initial data, a data initialization operation is performed on the storage space in the memory to transform the data in the memory from an uncertain state to a deterministic state.

2. The method according to claim 1, characterized in that, Prior to responding to a data initialization instruction in the memory of a computer device, the method further includes: The initialization enable signal pre-configured in the enable register of the computer device is monitored; the initialization enable signal is configured during the power-on phase of the computer device. If the initialization enable signal is detected to be at a preset threshold, the data initialization command of the memory is triggered.

3. The method according to claim 1 or 2, characterized in that, If the initialization configuration mode is one, determining the initial data to be written into the memory according to the initialization configuration mode includes: Obtain the mapping information table between different preset configuration modes and different initialization data; The different preset configuration modes in the mapping information table are matched with the initialization configuration mode; Retrieve initialization data corresponding to the preset configuration mode that matches the initialization configuration mode from the mapping information table; The initial data is determined based on the initialization data.

4. The method according to claim 3, characterized in that, Determining the initial data based on the initialization data includes: Obtain the initial bit width corresponding to the memory and the data bit width of the initial data; The initial data is obtained by copying the initial data according to the initial bit width and the data bit width; the data bit width is equal to the bit width of the initial data.

5. The method according to claim 1 or 2, characterized in that, If there are multiple initialization configuration modes, determining the initial data to be written into the memory according to the initialization configuration modes includes: Based on the initialization configuration modes and the mapping information table between different preset configuration modes and different initialization data, the different preset configuration modes in the mapping information table are matched with the initialization configuration modes. Obtain initialization data corresponding to the preset configuration mode that matches each of the initialization configuration modes from the mapping information table; The initial data is generated based on the initialization data described above.

6. The method according to claim 5, characterized in that, The step of generating the initial data based on each of the initialization data includes: Obtain the configuration priority of each of the configuration registers; The concatenation sequence of each initialization data is determined according to the configuration priority of each configuration register; The initial data is obtained by splicing the initial data according to the splicing sequence of the initial data.

7. The method according to claim 1 or 2, characterized in that, The step of performing data initialization operations on the storage space in the memory based on the initial data includes: Obtain the initialization address in the storage space of the memory; The initial data is written to the initial address of the memory to complete the data initialization operation.

8. The method according to claim 1 or 2, characterized in that, The method further includes: According to a preset initialization cycle, the steps of responding to the data initialization instructions in the memory of the computer device are executed to obtain the latest initial data; Based on the latest initial data, a data initialization operation is performed on the data already stored in the memory's storage space.

9. The method according to claim 1 or 2, characterized in that, The method further includes: In the event of a data initialization operation on the storage space in the memory, the data write command in response to the memory in the computer device is invoked. Based on the data write instruction and the data in the storage space of the memory, a data write operation is performed on the storage space of the memory to generate the target data.

10. The method according to claim 9, characterized in that, The data write instruction carries at least one write byte strobe signal and corresponding service data; the step of performing a data write operation on the storage space of the memory according to the data write instruction and the initial data in the storage space of the memory to generate target data includes: Based on the write byte strobe signals, determine the corresponding write addresses of the service data in the initial data; Based on the business data and each of the write addresses, the initial data in the storage space is updated to obtain the target data.

11. The method according to claim 9, characterized in that, The method further includes: Responding to data read commands from the memory in a computer device; The target data in the storage space of the memory is read according to the data read instruction.

12. A data initialization device, characterized in that, The device includes: An acquisition module is configured to, in response to a data initialization command of a memory in a computer device, acquire an initialization configuration mode corresponding to the memory from at least one configuration register within the computer device; the initialization configuration mode is configured during the power-on phase of the computer device; a determination module is configured to determine initial data to be written into the memory based on the initialization configuration mode; the initial data is a fixed data format; and an initialization module is configured to perform data initialization operations on the storage space in the memory based on the initial data, so that the data in the memory is transformed from an uncertain state to a deterministic state.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-11.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-11.