Data read-write method and device for chip storage area and computer equipment
By splitting the chip storage area into multiple sub-storage areas and performing data splitting and splicing processing, the problem of low data reading and writing efficiency in traditional chip storage areas is solved, and efficient and secure data storage and reading are achieved.
Patent Information
- Application Number
- CN202411609434.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-12
AI Technical Summary
The data read and write efficiency improvement in traditional chip storage areas is poor, and cannot meet the high requirements of modern chips for read and write speed and security.
By splitting the storage area of the chip into multiple sub-storage areas, each sub-storage area stores data of the same data type, and splits and stores the stored data according to the data type and remaining capacity of the sub-storage area. When data is retrieved, data splicing is performed through data identification and data link identification to achieve effective extraction of target data.
It improves the data reading and writing efficiency of the chip storage area, enhances the security and integrity of data storage, and avoids the risk of data leakage and extraction disorder.
Smart Images

Figure CN119473155A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip technology, and in particular to a method, device, computer equipment, storage medium and computer program product for reading and writing data in a chip storage area. Background Art
[0002] With the continuous updating of chip hardware, the chip's anti-interference ability, computing efficiency, service life, and scope of application are constantly improving. The chip storage area needs to read and write data frequently, which requires the storage area to have a faster reading and writing efficiency to meet the chip's reading and writing needs.
[0003] The traditional method of improving the data read and write efficiency of the chip storage area is to increase the storage capacity of the storage area or apply multi-threaded chips to improve the data read and write efficiency. However, this method requires a lot of cost, and for conventional chips or conventional storage areas, it cannot solve the problem of improving the chip read and write efficiency, resulting in poor improvement of the data read and write efficiency of the chip storage area.
[0004] Therefore, the conventional technology has the problem that the data reading and writing efficiency of the chip storage area is not effectively improved. Summary of the invention
[0005] Based on this, it is necessary to provide a data reading and writing method, device, computer equipment, computer-readable storage medium and computer program product for a chip storage area that can improve the data reading and writing efficiency of the chip storage area in order to address the above technical problems.
[0006] A method for reading and writing data in a chip storage area, comprising:
[0007] Obtaining a storage area splitting strategy for the chip, and splitting the storage area of the chip into multiple sub-storage areas according to the storage area splitting strategy; data belonging to the same data type is stored in any sub-storage area;
[0008] Acquire multiple data to be stored, and split each data to be stored according to the data type that can be stored in each sub-storage area and the remaining capacity of each sub-storage area to obtain each sub-storage data of each data to be stored; any sub-storage data is associated with a data ownership identifier and a data link identifier; the data ownership identifier associated with any sub-storage data is used to determine the data to be stored to which the sub-storage data belongs; the data link identifier associated with any sub-storage data is used to determine the associated sub-storage data connected to the sub-storage data;
[0009] Each sub-storage data of each data to be stored is stored in each sub-storage area respectively, so as to complete the storage of each data to be stored;
[0010] In response to the data retrieval operation, determining the data type and data identifier corresponding to the target retrieved data required by the data retrieval operation;
[0011] Retrieve the target sub-storage data belonging to the target retrieved data in each target sub-storage area according to the data type and data identifier corresponding to the target retrieved data;
[0012] According to the data link identifier associated with each target sub-storage data, each target sub-storage data is spliced and processed to obtain the target retrieval data.
[0013] In one embodiment, according to the storage area splitting strategy, the storage area of the chip is split into multiple sub-storage areas, including:
[0014] Determine the range proportion of each area range in the storage area, and determine the area capacity of each area range according to the total capacity of the storage area and the range proportion corresponding to each area range; different area ranges are used to store data of different data types;
[0015] Determine the preset sub-storage area capacity for different area ranges, and divide each area range according to the preset sub-storage area capacity and area capacity of different area ranges to obtain sub-storage areas corresponding to each area range; each sub-storage area within the same area range stores data of the same data type.
[0016] In one embodiment, data to be stored is split according to the type of data that can be stored in each sub-storage area and the remaining capacity of each sub-storage area to obtain each sub-storage data of each data to be stored, including:
[0017] According to the data type of each data to be stored, each data to be stored is grouped to obtain a data group of each data type;
[0018] Determine the remaining area capacity of each sub-storage area corresponding to each data type. For a data group of any data type, split the data to be stored in the data group of the data type according to the remaining area capacity of each sub-storage area corresponding to the data type and the data amount of the data group of the data type to obtain sub-storage data of each data to be stored in the data group of the data type.
[0019] In one embodiment, in response to a data retrieval operation, determining a data type and a data identifier corresponding to target retrieved data required by the data retrieval operation includes:
[0020] In response to the data retrieval operation, obtaining data retrieval requirement information corresponding to the data retrieval operation;
[0021] According to the data retrieval requirement information, determine the data identifier of the target retrieval data to be retrieved;
[0022] The data type associated with the data identifier is queried in the database to determine the data type of the target retrieved data.
[0023] In one embodiment, according to the data type and data identifier corresponding to the target retrieved data, the target sub-storage data belonging to the target retrieved data in each target sub-storage area are retrieved respectively, including:
[0024] According to the data type of the target retrieved data, in each sub-storage area, determining each target sub-storage area storing the target retrieved data;
[0025] Based on the data identifier of the target retrieved data, the sub-storage data containing the data identifier is searched in each target sub-storage area as the target sub-storage data of the target retrieved data.
[0026] In one embodiment, the data link information of the target sub-storage data includes a front-end data link identifier and a back-end data link identifier. According to the data link information of each target sub-storage data, each target sub-storage data is subjected to data splicing processing to obtain target retrieved data, including:
[0027] Determine the front-end linked target sub-storage data and the back-end linked target sub-storage data corresponding to each target sub-storage data according to the front-end data link identifier and the back-end data connection identifier of each target sub-storage data;
[0028] According to the front-end linked target sub-storage data and the back-end linked target sub-storage data corresponding to each target sub-storage data, each target sub-storage data is spliced and processed to obtain a data splicing result as the target retrieval data.
[0029] A data reading and writing device for a chip storage area, the device comprising:
[0030] A first acquisition module is used to acquire a storage area splitting strategy for a chip, and split the storage area of the chip into a plurality of sub-storage areas according to the storage area splitting strategy; data belonging to the same data type is stored in any sub-storage area;
[0031] The second acquisition module is used to acquire multiple data to be stored, and split each data to be stored according to the data type that can be stored in each sub-storage area and the remaining capacity of each sub-storage area to obtain each sub-storage data of each data to be stored; any sub-storage data is associated with a data ownership identifier and a data link identifier; the data ownership identifier associated with any sub-storage data is used to determine the data to be stored to which the sub-storage data belongs; the data link identifier associated with any sub-storage data is used to determine the associated sub-storage data connected to the sub-storage data;
[0032] A storage module, used to store each sub-storage data of each data to be stored in each sub-storage area, so as to complete the storage of each data to be stored;
[0033] A response module, used to respond to the data retrieval operation and determine the data type and data identifier corresponding to the target retrieved data required by the data retrieval operation;
[0034] A retrieving module, used for retrieving each target sub-storage data belonging to the target retrieved data in each target sub-storage area according to the data type and data identifier corresponding to the target retrieved data;
[0035] The splicing module is used to perform data splicing processing on each target sub-storage data according to the data link identifier associated with each target sub-storage data to obtain target retrieval data.
[0036] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0037] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.
[0038] A computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0039] The data reading and writing method, device, computer equipment, storage medium and computer program product of the chip storage area above split the storage area of the chip into sub-storage areas for storing different data types, and split the data to be stored of each data type for storage, so that when storing data, multiple storage areas can store data at the same time, thereby improving the efficiency of data storage, and the split storage can avoid the risk of data leakage, thereby improving the security and efficiency of data storage; then, when retrieving data, data is retrieved through data identification, and data splicing is performed based on the data link information of each target sub-storage data, so that data from multiple areas can be extracted at the same time, thereby improving the data extraction efficiency; then, data splicing is used to avoid the risk of disordered extracted data, thereby improving the integrity of data reading and writing and the accuracy of data reading while improving the efficiency of data reading and writing and the security of stored data, thereby comprehensively improving the effect of improving the data reading and writing efficiency of the chip storage area. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] FIG1 is an application environment diagram of a method for reading and writing data in a chip storage area in one embodiment;
[0042] Figure 2 A schematic diagram of a flow chart of a method for reading and writing data in a chip storage area in one embodiment;
[0043] Figure 3 A schematic diagram of a process of splitting a storage area in one embodiment;
[0044] Figure 4 A schematic flow chart of a method for reading and writing data in a chip storage area in another embodiment;
[0045] Figure 5 A structural block diagram of a data reading and writing device for a chip storage area in an embodiment;
[0046] FIG. 6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] The data reading and writing method of the chip storage area provided in the embodiment of the present application can be applied to the chip storage area optimization application environment as shown in Figure 1. The method can be applied to the terminal 102, can also be applied to the server 104, can also be applied to the system including the terminal 102 and the server 104, and is implemented through the interaction between the terminal 102 and the server 104. Among them, the terminal 102 splits the traditional storage area into sub-storage areas of different storage data types, and then splits and stores the data to be stored of each data type, so that when data is stored, multiple storage areas can be used for data storage at the same time, which improves the efficiency of data storage, and the split area storage can ensure that the storage area can avoid the risk of data being cracked when there is a risk of data leakage, thereby improving the security and efficiency of data storage. Then, when the data is retrieved, the data is retrieved through the data identification information, and the data is spliced based on the data link information of each target sub-storage data, which can not only extract data from multiple areas of the same data at the same time, but also improve the efficiency of data extraction. Then, by data splicing, the risk of extracting disordered data can be avoided, and while improving data reading and writing efficiency and storing data safely, the integrity of data reading and writing and the accuracy of data reading can be effectively improved, thereby comprehensively improving the effect of improving the data reading and writing efficiency of the chip storage area. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0049] In an exemplary embodiment, Figure 2 As shown, a method for reading and writing data in a chip storage area is provided, and the method is applied to the terminal 102 in FIG. 1 as an example for description, including the following steps 202 to 206. Among them:
[0050] Step S202, obtaining a storage area splitting strategy for the chip, and splitting the storage area of the chip into a plurality of sub-storage areas according to the storage area splitting strategy; data belonging to the same data type is stored in any sub-storage area.
[0051] Each sub-storage area corresponds to a storage data type, and the sub-storage areas of the same storage data type have the same size, and the sizes of the sub-storage areas of different storage data types may be the same or different.
[0052] Optionally, the terminal needs to first obtain the chip specification information of the chip, which includes the storage area size of the chip, the storage area model, and the type of data that the storage area can store. Then, the terminal obtains the storage area splitting strategy of the chip and splits the storage area of the chip into multiple sub-storage areas according to the storage area splitting strategy.
[0053] Step S204, obtain multiple data to be stored, and split each data to be stored according to the type of data that can be stored in each sub-storage area and the remaining capacity of each sub-storage area to obtain each sub-storage data of each data to be stored; any sub-storage data is associated with a data ownership identifier and a data link identifier; the data ownership identifier associated with any sub-storage data is used to determine the data to be stored to which the sub-storage data belongs; the data link identifier associated with any sub-storage data is used to determine the associated sub-storage data connected to the sub-storage data.
[0054] The data splitting process may be an equal splitting process or an unequal splitting process.
[0055] Each sub-storage data may include data identification information of the data to be stored to which the sub-storage data belongs, and a data link identifier of the sub-storage data connected to the sub-storage data when each sub-storage data is split. The data link identifier may be an identifier such as a code identifier, a symbol identifier, a letter identifier, a character segment identifier, etc. The data link identifier of the sub-storage data linked to the front end of the sub-storage data is different from the data link identifier of the sub-storage data linked to the back end of the sub-storage data. The data link identifiers between the sub-storage data in the same data identification information are all different.
[0056] Optionally, the terminal collects data that needs to be stored in the chip through a data monitoring device preset in the chip, and obtains multiple data to be stored. Then, the terminal splits each data to be stored according to the storage data type of each sub-storage area and the remaining area capacity of each sub-storage area, and obtains sub-storage data of each sub-storage area corresponding to each data to be stored.
[0057] Step S206, storing each sub-storage data of each data to be stored in each sub-storage area respectively, so as to complete the storage of each data to be stored.
[0058] The remaining area capacity of each sub-storage area is the capacity of each sub-storage area obtained by subtracting the data capacity of the current storage data of each sub-storage area from all the storage capacities of each sub-storage area.
[0059] Optionally, the terminal stores each sub-storage data of each data to be stored in a sub-storage area corresponding to each sub-storage data, and completes the storage operation of each data to be stored.
[0060] Step S208, in response to the data retrieval operation, determining the data type and data identifier corresponding to the target retrieval data required by the data retrieval operation.
[0061] The data retrieval operation of the user includes data requirement information of each target retrieval data required by the user. The data requirement information includes a data identifier of each target retrieval data required by the user. The data identifier can be a symbol identifier, a text identifier, a color identifier, a letter identifier, etc. The data identifier is used to identify the target retrieval data corresponding to each sub-storage data in the sub-storage area.
[0062] Optionally, the terminal collects the data type and data identifier of each target retrieved data in response to the user's data retrieval operation.
[0063] Step S210 , according to the data type and data identifier corresponding to the target retrieved data, retrieve the target sub-storage data belonging to the target retrieved data in each target sub-storage area respectively.
[0064] Optionally, the terminal determines each target sub-storage area for storing data of the data type according to the data type corresponding to the target retrieved data, and retrieves each target sub-storage data in each target sub-storage area respectively through the data identifier of the target retrieved data.
[0065] Step S212, according to the data link identifier associated with each target sub-storage data, the target sub-storage data are spliced to obtain the target retrieval data.
[0066] Optionally, the terminal performs data splicing processing on each target sub-storage data based on the data link information of each target sub-storage data, and the obtained data splicing result is the target retrieval data.
[0067] In the data reading and writing method of the above-mentioned chip storage area, by splitting the storage area of the chip into sub-storage areas for storing different data types, the data to be stored of each data type is split and stored, so that when storing data, multiple storage areas can store data at the same time, thereby improving the efficiency of data storage, and the split storage can avoid the risk of data leakage, thereby improving the security and efficiency of data storage; then, when retrieving data, data retrieval is performed through data identification, and data splicing is performed based on the data link information of each target sub-storage data, so that data from multiple areas can be extracted at the same time, thereby improving the data extraction efficiency; then, data splicing is used to avoid the risk of disorder in the extracted data, thereby improving the integrity of data reading and writing and the accuracy of data reading while improving the data reading and writing efficiency and the storage data security, thereby comprehensively improving the data reading and writing efficiency improvement effect of the chip storage area.
[0068] In an exemplary embodiment, Figure 3 As shown, step S202 includes steps S302 to S304. Among them:
[0069] Step S302, determining the range proportion of each area range in the storage area, and determining the area capacity of each area range according to the total capacity of the storage area and the range proportion corresponding to each area range.
[0070] Each area range of the storage area is a area range preset in the chip, and the sizes of the area ranges can be the same or different. The sizes of all area ranges do not overlap, do not intersect, and are adjacent. The edges of each area range are adjacent. Different area ranges are used to store data of different data types.
[0071] In actual applications, the terminal identifies the currently stored data in each area range, and based on the data type of the currently stored data in each area range, identifies the data type that can be stored in each area range. Then, the terminal determines the data type that can be stored in each area range by identifying the data type of the currently stored data in each area range.
[0072] Optionally, the terminal identifies the regional capacity of each regional range based on the total capacity of the storage area, and splits the capacity of each regional range based on the regional capacity of each regional range to obtain each sub-storage area corresponding to each regional range. The regional capacity of each regional range is obtained by multiplying the proportion of each regional range in the storage area by the total capacity of the storage area.
[0073] Step S304, determine the preset sub-storage area capacity for different area ranges, and divide each area range according to the preset sub-storage area capacity and area capacity of different area ranges to obtain sub-storage areas corresponding to each area range; each sub-storage area within the same area range stores data of the same data type.
[0074] The sub-storage areas belonging to the same area range are arranged adjacently in the same area range and are sub-areas obtained after the grid is split.
[0075] Optionally, the terminal determines a preset sub-storage area capacity for each area range, and then the terminal equally splits each area range according to the area capacity of each area range and the preset sub-storage area capacity to obtain sub-storage areas corresponding to each area range.
[0076] In this embodiment, since different area ranges are preset storage ranges for storing data of different data types, each area range can be evenly divided into sub-storage areas based on the preset sub-storage area capacity and area capacity corresponding to each area range.
[0077] In one of the embodiments, data to be stored are split according to the type of data that can be stored in each sub-storage area and the remaining area capacity of each sub-storage area to obtain sub-storage data of each data to be stored, including: grouping the data to be stored according to the data type of each data to be stored to obtain data groups of each data type; determining the remaining area capacity of each sub-storage area corresponding to each data type, and for a data group of any data type, splitting the data to be stored in the data group of the data type according to the remaining area capacity of each sub-storage area corresponding to the data type and the data amount of the data group of the data type to obtain sub-storage data of each data to be stored in the data group of the data type.
[0078] Optionally, the terminal groups the data to be stored according to their data types to obtain data groups of each data type. Then, based on the remaining area capacity of each sub-storage area corresponding to each data type, the terminal splits the data to be stored in the data group of each data type through a regional data splitting strategy to obtain sub-storage data of each data to be stored, and determines the sub-storage area corresponding to each sub-storage data.
[0079] The data splitting strategy for this region is:
[0080] First, the data to be stored in the data group is sorted in order of small to large data volume to obtain a storage sequence for the data group;
[0081] Then, based on the sub-storage areas corresponding to the data type to which the data group belongs and the number of sub-storage areas corresponding to each data type in the data group, the terminal performs data splitting processing on each data to be stored in the data group, and obtains initial sub-storage data of each sub-storage area; wherein, the data splitting method is to split each data to be stored, and the number of splits of each data to be stored is the number of sub-storage areas of the data type to which the data to be stored belongs, so that it can be ensured that each data to be stored is stored in each sub-storage area corresponding to the data type of the data to be stored, so as to ensure that each sub-storage area can store part of the storage data of each data to be stored; wherein, the initial sub-storage data of any sub-storage area is the part of the storage data that needs to be stored in the sub-storage area, for example, data type A corresponds to 5 sub-storage areas, and each data to be stored in the data group of data type A needs to be equally divided into 5 parts, and each part is respectively distributed to each sub-storage area, then the initial sub-storage data of each sub-storage area is 1 part of the data of each data to be stored;
[0082] Then, the terminal calculates the initial total amount of data to be stored in each sub-storage area based on the amount of sub-data of each initial sub-storage data, where the initial total amount of data to be stored is the sum of the amount of sub-data of each initial sub-storage data;
[0083] Then, a sub-storage area that cannot be used for storage is determined in each sub-storage area. For example, if the remaining area capacity of sub-storage area A is 500Mb, and the initial total amount of data to be stored in sub-storage area A is 550Mb, then at this time, when the remaining area capacity of sub-storage area A cannot completely store all the initial sub-storage data, the sub-storage area A is a sub-storage area that cannot be used for storage;
[0084] Then, for the sub-storage area that cannot be stored, the deviation value between the remaining area capacity of the sub-storage area and the initial total amount of data to be stored in the sub-storage area is calculated. For example, if the remaining area capacity of sub-storage area A is 500Mb, and the initial total amount of data to be stored in sub-storage area A is 550Mb, then at this time, the deviation value between the remaining area capacity of sub-storage area A and the initial total amount of data to be stored in sub-storage area A is -50Mb.
[0085] Then, based on the deviation value, identify the auxiliary sub-storage area whose remaining area capacity is higher than the initial total amount of data to be stored; the data type that can be stored in the auxiliary sub-storage area is the same as the data type that can be stored in the sub-storage area that cannot store data, that is, the two store data of the same data type; the remaining area capacity of the identified auxiliary sub-storage area needs to be greater than the sum of the initial total amount of data to be stored in the auxiliary sub-storage area and the deviation value; the deviation value corresponding to each auxiliary sub-storage area is greater than the deviation value corresponding to the sub-storage area that cannot store data, and the value of the deviation value is a positive value. Among them, the deviation value includes positive and negative values, and a positive value indicates that the remaining area capacity of the sub-storage area is greater than the initial total amount of data to be stored in the sub-storage area, and a negative value indicates that the remaining area capacity of the sub-storage area is less than the initial total amount of data to be stored in the sub-storage area;
[0086] Then, from the sub-storage areas that cannot be stored, in the order of the data amount of each sub-data to be stored from large to small, the sub-data to be stored with the largest data amount is selected as the data to be exchanged, and in the auxiliary sub-storage areas, in the order of the data amount of each sub-data to be stored in the auxiliary sub-storage areas, the sub-data to be stored with the smallest data amount is selected as the data to be exchanged;
[0087] Then, data exchange processing is performed on the data to be exchanged in the sub-storage area that cannot be stored and the data to be exchanged in the auxiliary sub-storage area to obtain sub-storage data corresponding to each sub-storage area.
[0088] In this embodiment, data is split and stored by identifying the remaining area capacity of each sub-storage area and the amount of each data type to be stored. This ensures that each data to be stored can be stored normally while ensuring that each sub-storage area can accommodate all the sub-storage data.
[0089] In one of the embodiments, in response to a data retrieval operation, determining a data type and a data identifier corresponding to target retrieval data required for the data retrieval operation includes: in response to the data retrieval operation, obtaining data retrieval requirement information corresponding to the data retrieval operation; determining a data identifier of the target retrieval data required to be retrieved based on the data retrieval requirement information; and querying a database for the data type associated with the data identifier to determine the data type of the target retrieval data.
[0090] Optionally, the terminal obtains the user's data retrieval demand information in response to the user's data retrieval operation, and identifies the data identifier of each target retrieval data corresponding to the data retrieval demand information. Then, the terminal queries the data type corresponding to each data identifier in the database, and determines the data type of each target retrieval data based on the data type corresponding to each data identifier. The database stores the data type corresponding to each data identifier, for example, the data identification information of the image data type is text identification information, the data identification information of the text data type is symbol identification information, the data identification information of the audio data type is letter representation information, etc.
[0091] In this embodiment, the data type corresponding to each target retrieved data is identified through the data identifier in the data retrieval demand information, thereby improving the recognition efficiency and recognition accuracy.
[0092] In one of the embodiments, according to the data type and data identifier corresponding to the target retrieved data, each target sub-storage data belonging to the target retrieved data in each target sub-storage area is retrieved respectively, including: according to the data type of the target retrieved data, in each sub-storage area, each target sub-storage area storing the target retrieved data is determined; based on the data identifier of the target retrieved data, in each target sub-storage area, the sub-storage data containing the data identifier is searched as the target sub-storage data of the target retrieved data.
[0093] Optionally, for each target retrieved data, the terminal screens, based on the data type of the target retrieved data, each target sub-storage area corresponding to the data type of the target retrieved data in each sub-storage area. Then, based on the data identifier of the target retrieved data, the terminal queries for the sub-storage data containing the data identifier of the target retrieved data in each sub-storage area respectively, and uses the sub-storage data containing the data identifier of the target retrieved data as the target sub-storage data of the target retrieved data.
[0094] In this embodiment, each sub-storage data in different sub-storage areas is read simultaneously through data identification, thereby improving the reading efficiency of the target retrieved data.
[0095] In one of the embodiments, the data link information of the target sub-storage data includes a front-end data link identifier and a back-end data link identifier. According to the data link information of each target sub-storage data, each target sub-storage data is subjected to data splicing processing to obtain target retrieval data, including: determining the front-end link target sub-storage data and the back-end link target sub-storage data corresponding to each target sub-storage data according to the front-end data link identifier and the back-end data connection identifier of each target sub-storage data; according to the front-end link target sub-storage data and the back-end link target sub-storage data corresponding to each target sub-storage data, splicing each target sub-storage data to obtain a data splicing result as the target retrieval data.
[0096] Optionally, the terminal identifies the front-end linked target sub-storage data corresponding to each target sub-storage data and the back-end linked target sub-storage data corresponding to each target sub-storage data based on the front-end linked target sub-storage data corresponding to each target sub-storage data and the back-end linked target sub-storage data corresponding to each target sub-storage data. Then, the terminal performs data splicing processing on each target sub-storage data based on the front-end linked target sub-storage data corresponding to each target sub-storage data and the back-end linked target sub-storage data corresponding to each target sub-storage data, obtains the data content of the target storage data corresponding to each data identification information, and completes the retrieval operation of each target storage data.
[0097] In actual applications, the terminal divides each target sub-storage data into target sub-storage data corresponding to each data identifier. For any data identifier, in each target sub-storage data of the data identifier, the front-end data link identifier of each target sub-storage data and the back-end data link identifier of each target sub-storage data are identified.
[0098] The target sub-storage data of data types including text data types, audio data types, and video data types, which include data types in a sequential order, include a front-end data link identifier and a back-end data link identifier, and the front-end data link identifier and the back-end data link identifier in the target sub-storage data of data types including a sequential order only include an identification identifier.
[0099] The target sub-storage data of data types without a sequence, such as picture data types and table data types, include edge data link identifiers, and the edge data connection identifiers include data link identifiers between each adjacent sub-storage data. For example, if an image is split into grid-shaped target sub-storage data, then the four sides of each target sub-storage data correspond to an edge data link identifier, and the edge data link identifier includes an identification identifier and an orientation identifier. The identification identifier is used to identify the identification information of two adjacent target sub-storage data, and the orientation identifier is a direction identifier of the splicing direction of the two target sub-storage data. The orientation identification information can be a string of edge character strings distributed on the data edge of the target sub-storage data. When two adjacent target sub-storage data are spliced, data splicing can be performed when the characters of the edge adjacent position points in the edge character strings of the two data edges are the same.
[0100] In this embodiment, data splicing processing of each target sub-storage data is performed through the data link information of each target sub-storage data, thereby avoiding the problem of abnormal data reading and improving the comprehensiveness and accuracy of the retrieved target storage data. .
[0101] In another embodiment, Figure 4 As shown, a method for reading and writing data in a chip storage area is provided, and the method is applied to the terminal 102 in FIG. 1 as an example for description, including the following steps:
[0102] Step S402, obtaining a storage area splitting strategy for the chip, and splitting the storage area of the chip into a plurality of sub-storage areas according to the storage area splitting strategy; data belonging to the same data type is stored in any sub-storage area.
[0103] Step S404, obtain multiple data to be stored, and split each data to be stored according to the type of data that can be stored in each sub-storage area and the remaining capacity of each sub-storage area to obtain each sub-storage data to be stored; any sub-storage data is associated with a data ownership identifier and a data link identifier; the data ownership identifier associated with any sub-storage data is used to determine the data to be stored to which the sub-storage data belongs; the data link identifier associated with any sub-storage data is used to determine the associated sub-storage data connected to the sub-storage data.
[0104] Step S406, storing each sub-storage data of each data to be stored in each sub-storage area respectively, so as to complete the storage of each data to be stored.
[0105] Step S408, in response to the data retrieval operation, determining the data type and data identifier corresponding to the target retrieval data required by the data retrieval operation.
[0106] Step S410 , according to the data type of the target retrieved data, in each sub-storage area, each target sub-storage area storing the target retrieved data is determined.
[0107] Step S412, based on the data identifier of the target retrieved data, in each target sub-storage area, search for the sub-storage data containing the data identifier as the target sub-storage data of the target retrieved data.
[0108] Step S414, according to the data link identifier associated with each target sub-storage data, each target sub-storage data is subjected to data splicing processing to obtain target retrieval data.
[0109] It should be noted that the specific definition of the above steps can refer to the specific definition of the data reading and writing method of a chip storage area mentioned above.
[0110] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0111] Based on the same inventive concept, the embodiment of the present application also provides a chip storage area data reading and writing device for implementing the chip storage area data reading and writing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiment of the data reading and writing device for one or more chip storage areas provided below can refer to the limitations of the chip storage area data reading and writing method above, and will not be repeated here.
[0112] In an exemplary embodiment, Figure 5 As shown, a data reading and writing device for a chip storage area is provided, including: a first acquisition module 502, a second acquisition module 504, a storage module 506, a response module 508 and a call module 510, wherein:
[0113] The first acquisition module 502 is used to acquire a storage area splitting strategy for the chip, and split the storage area of the chip into multiple sub-storage areas according to the storage area splitting strategy; any sub-storage area stores data belonging to the same data type;
[0114] The second acquisition module 504 is used to acquire multiple data to be stored, and split each data to be stored according to the data type that can be stored in each sub-storage area and the remaining capacity of each sub-storage area to obtain each sub-storage data of each data to be stored; any sub-storage data is associated with a data ownership identifier and a data link identifier; the data ownership identifier associated with any sub-storage data is used to determine the data to be stored to which the sub-storage data belongs; the data link identifier associated with any sub-storage data is used to determine the associated sub-storage data connected to the sub-storage data;
[0115] The storage module 506 is used to store each sub-storage data of each data to be stored in each sub-storage area, so as to complete the storage of each data to be stored;
[0116] A response module 508 is used to determine, in response to the data retrieval operation, a data type and a data identifier corresponding to the target retrieved data required by the data retrieval operation;
[0117] The retrieval module 510 is used to retrieve the target sub-storage data belonging to the target retrieved data in each target sub-storage area according to the data type and data identifier corresponding to the target retrieved data;
[0118] The splicing module 512 is used to perform data splicing processing on each target sub-storage data according to the data link identifier associated with each target sub-storage data to obtain target retrieval data.
[0119] In one embodiment, the first acquisition module 502 is specifically used to determine the range proportion of each area range in the storage area, and determine the area capacity of each area range based on the total capacity of the storage area and the range proportion corresponding to each area range; different area ranges are used to store data of different data types; the preset sub-storage area capacity for different area ranges is determined, and each area range is divided according to the preset sub-storage area capacity and area capacity of different area ranges to obtain sub-storage areas corresponding to each area range; each sub-storage area within the same area range stores data of the same data type.
[0120] In one embodiment, the second acquisition module 504 is specifically used to group the data to be stored according to the data type of each data to be stored to obtain data groups of each data type; determine the remaining area capacity of each sub-storage area corresponding to each data type, and for a data group of any data type, split the data to be stored in the data group of the data type according to the remaining area capacity of each sub-storage area corresponding to the data type and the data amount of the data group of the data type to obtain sub-storage data of each data to be stored in the data group of the data type.
[0121] In one embodiment, the response module 508 is specifically used to respond to the data retrieval operation, obtain data retrieval requirement information corresponding to the data retrieval operation; determine the data identifier of the target retrieval data to be retrieved according to the data retrieval requirement information; query the data type associated with the data identifier in the database, and determine the data type of the target retrieval data.
[0122] In one of the embodiments, the retrieval module 510 is specifically used to determine, in each sub-storage area, each target sub-storage area storing the target retrieval data according to the data type of the target retrieval data; based on the data identifier of the target retrieval data, in each target sub-storage area, query the sub-storage data containing the data identifier as the target sub-storage data of the target retrieval data.
[0123] In one of the embodiments, the data link information of the target sub-storage data includes a front-end data link identifier and a back-end data link identifier. The splicing module 512 is specifically used to determine the front-end link target sub-storage data and the back-end link target sub-storage data corresponding to each target sub-storage data according to the front-end data link identifier and the back-end data connection identifier of each target sub-storage data; according to the front-end link target sub-storage data and the back-end link target sub-storage data corresponding to each target sub-storage data, each target sub-storage data is spliced to obtain a data splicing result as the target retrieval data.
[0124] Each module in the data reading and writing device of the chip storage area can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0125] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data reading and writing data in the chip storage area. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data reading and writing method of a chip storage area is implemented.
[0126] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0127] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned method for reading and writing data in a chip storage area. The steps of the method for reading and writing data in a chip storage area here may be the steps of the method for reading and writing data in a chip storage area in each of the above-mentioned embodiments.
[0128] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the method for reading and writing data in a chip storage area. The steps of the method for reading and writing data in a chip storage area here can be the steps of the method for reading and writing data in a chip storage area in each of the above embodiments.
[0129] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the processor executes the steps of the above-mentioned method for reading and writing data in a chip storage area. The steps of the method for reading and writing data in a chip storage area here can be the steps of the method for reading and writing data in a chip storage area in each of the above-mentioned embodiments.
[0130] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile 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), magnetoresistive 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0131] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 specification.
[0132] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for reading and writing data in a chip storage area, characterized in that: The method comprises: Acquire a storage area splitting strategy for a chip, and split the storage area of the chip into a plurality of sub-storage areas according to the storage area splitting strategy; data belonging to the same data type is stored in any of the sub-storage areas; Acquire multiple data to be stored, and split each data to be stored according to the data type that can be stored in each sub-storage area and the remaining capacity of each sub-storage area to obtain each sub-storage data of each data to be stored; any of the sub-storage data is associated with a data ownership identifier and a data link identifier; the data ownership identifier associated with any of the sub-storage data is used to determine the data to be stored to which the sub-storage data belongs; the data link identifier associated with any of the sub-storage data is used to determine the associated sub-storage data connected to the sub-storage data; storing each sub-storage data of each data to be stored in each sub-storage area respectively, so as to complete the storage of each data to be stored; In response to a data retrieval operation, determining a data type and a data identifier corresponding to target retrieved data required by the data retrieval operation; Retrieving, according to the data type and data identifier corresponding to the target retrieved data, each target sub-storage data belonging to the target retrieved data in each target sub-storage area; According to the data link identifier associated with each of the target sub-storage data, each of the target sub-storage data is subjected to data splicing processing to obtain the target retrieval data.
2. The method according to claim 1, characterized in that The step of dividing the storage area of the chip into a plurality of sub-storage areas according to the storage area division strategy includes: Determine the range proportion of each area range in the storage area, and determine the area capacity of each area range according to the total capacity of the storage area and the range proportion corresponding to each area range; different area ranges are used to store data of different data types; Determine the preset sub-storage area capacity for the different area ranges, and divide each area range according to the preset sub-storage area capacity and area capacity of the different area ranges to obtain the sub-storage areas corresponding to each area range; each sub-storage area within the same area range stores data of the same data type.
3. The method according to claim 2, characterized in that The step of splitting the data to be stored according to the data types that can be stored in each sub-storage area and the remaining capacity of each sub-storage area to obtain each sub-storage data of the data to be stored includes: According to the data type of each of the data to be stored, each of the data to be stored is grouped to obtain a data group of each of the data types; Determine the remaining area capacity of each sub-storage area corresponding to each of the data types; for a data group of any of the data types, split the data to be stored in the data group of the data type according to the remaining area capacity of each sub-storage area corresponding to the data type and the data amount of the data group of the data type to obtain the sub-storage data of each of the data to be stored in the data group of the data type.
4. The method according to claim 1, characterized in that: In response to the data retrieval operation, determining the data type and data identifier corresponding to the target retrieved data required by the data retrieval operation includes: In response to the data retrieval operation, obtaining data retrieval requirement information corresponding to the data retrieval operation; Determine the data identifier of the target data to be retrieved according to the data retrieval requirement information; The data type associated with the data identifier is queried in a database to determine the data type of the target retrieved data.
5. The method according to claim 1, characterized in that Retrieving the target sub-storage data belonging to the target retrieved data in each target sub-storage area according to the data type and data identifier corresponding to the target retrieved data, respectively, comprises: According to the data type of the target retrieved data, in each of the sub-storage areas, determining each target sub-storage area storing the target retrieved data; Based on the data identifier of the target retrieved data, in each of the target sub-storage areas, the sub-storage data containing the data identifier is searched as the target sub-storage data of the target retrieved data.
6. The method according to claim 1, characterized in that The data link information of the target sub-storage data includes a front-end data link identifier and a back-end data link identifier. The data link information of each target sub-storage data is used to perform data splicing processing on each target sub-storage data to obtain the target retrieved data, including: Determine the front-end link target sub-storage data and the back-end link target sub-storage data corresponding to each target sub-storage data according to the front-end data link identifier and the back-end data connection identifier of each target sub-storage data; According to the front-end linked target sub-storage data and the back-end linked target sub-storage data corresponding to each of the target sub-storage data, each of the target sub-storage data is spliced to obtain a data splicing result as the target retrieval data.
7. A data reading and writing device for a chip storage area, characterized in that: The device comprises: A first acquisition module is used to acquire a storage area splitting strategy for a chip, and split the storage area of the chip into a plurality of sub-storage areas according to the storage area splitting strategy; any of the sub-storage areas stores data belonging to the same data type; A second acquisition module is used to acquire a plurality of data to be stored, and to split each of the data to be stored according to the type of data that can be stored in each of the sub-storage areas and the remaining capacity of each of the sub-storage areas, so as to obtain each sub-storage data of each of the data to be stored; any of the sub-storage data is associated with a data ownership identifier and a data link identifier; the data ownership identifier associated with any of the sub-storage data is used to determine the data to be stored to which the sub-storage data belongs; the data link identifier associated with any of the sub-storage data is used to determine the associated sub-storage data connected to the sub-storage data; A storage module, used for storing each sub-storage data of each data to be stored in each sub-storage area, so as to complete the storage of each data to be stored; A response module, configured to determine, in response to a data retrieval operation, a data type and a data identifier corresponding to target retrieval data required for the data retrieval operation; A retrieving module, used for retrieving each target sub-storage data belonging to the target retrieved data in each target sub-storage area according to the data type and data identifier corresponding to the target retrieved data; The splicing module is used to perform data splicing processing on each of the target sub-storage data according to the data link identifier associated with each of the target sub-storage data to obtain the target retrieval data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for updating PSU firmware through Bootloader and storage medium
CN113741929A
Sharing management method for user data and user data management system
CN115495422A
Method, electronic device, and computer program product for storage management
US20220342564A1