[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2024187779A1 - Procédé et appareil de stockage de données de service, dispositif informatique et support de stockage - Google Patents

Procédé et appareil de stockage de données de service, dispositif informatique et support de stockage Download PDF

Info

Publication number
WO2024187779A1
WO2024187779A1 PCT/CN2023/129235 CN2023129235W WO2024187779A1 WO 2024187779 A1 WO2024187779 A1 WO 2024187779A1 CN 2023129235 W CN2023129235 W CN 2023129235W WO 2024187779 A1 WO2024187779 A1 WO 2024187779A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
target
sub
space
queried
Prior art date
Application number
PCT/CN2023/129235
Other languages
English (en)
Chinese (zh)
Inventor
谈少民
Original Assignee
金蝶软件(中国)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 金蝶软件(中国)有限公司 filed Critical 金蝶软件(中国)有限公司
Publication of WO2024187779A1 publication Critical patent/WO2024187779A1/fr

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of computer technology, and in particular to a business data storage method, apparatus, computer equipment, storage medium and computer program product.
  • heap storage technology With the development of data storage technology, heap storage technology has emerged. It stores massive amounts of data of different lengths in a heap and records the indexes corresponding to each piece of data. The index stores the pointer corresponding to the data in the heap. The value of the data can be obtained by accessing the heap through the pointer.
  • the present application provides a method for storing business data.
  • the method comprises:
  • the target sub-data is written into the target index space to obtain a target index sequence
  • the target sub-data is written into the target heap space corresponding to the target business data, the target pointer corresponding to the target sub-data is obtained, and the target pointer is written into the target index space to obtain the target index sequence.
  • the present application also provides a business data storage device.
  • the device comprises:
  • An index sequence acquisition module is used to acquire an initial index sequence corresponding to target business data
  • a target sub-data storage module used for writing the target sub-data into the target index space to obtain a target index sequence when the target data length corresponding to the target sub-data is less than or equal to the spatial data length of the target index space;
  • a computer device includes a memory and a processor.
  • the memory stores a computer program.
  • the processor executes the computer program, the steps of the business data storage method are implemented.
  • a computer-readable storage medium stores a computer program, which implements the steps of the above-mentioned business data storage method when executed by a processor.
  • a computer program product includes a computer program, which implements the steps of the above-mentioned business data storage method when executed by a processor.
  • FIG1 is an application environment diagram of a business data storage method in one embodiment
  • FIG2 is a schematic diagram of a flow chart of a method for storing business data in one embodiment
  • FIG3 is a schematic diagram of a process for determining the length of spatial data in one embodiment
  • FIG4 is a schematic diagram of business data storage in one embodiment
  • FIG5 is a schematic diagram of business data storage in another embodiment
  • FIG6 is a block diagram of a business data storage device in one embodiment
  • FIG7 is a block diagram of a service data storage device in another embodiment
  • FIG8 is a diagram showing the internal structure of a computer device in one embodiment
  • FIG. 9 is a diagram showing the internal structure of a computer device in another embodiment.
  • the business data storage method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1.
  • the terminal 102 communicates with the server 104 through the network.
  • the data storage system can store the data that the server 104 needs to process.
  • the data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers.
  • 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 TVs, smart car-mounted devices, etc.
  • Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc.
  • the server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
  • the terminal 102 and the server 104 can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.
  • Both the terminal and the server can be used independently to execute the business data storage method provided in the embodiments of the present application.
  • the terminal obtains the initial index sequence corresponding to the target business data.
  • the terminal determines the target sub-data from the various sub-business data contained in the target business data, and uses the index space corresponding to the target sub-data in the initial index sequence as the target index space.
  • the terminal writes the target sub-data into the target index space to obtain a target index sequence.
  • the terminal When the target data length corresponding to the target sub-data is greater than the spatial data length of the target index space, the terminal writes the target sub-data into the target heap space corresponding to the target business data, obtains the target pointer corresponding to the target sub-data, writes the target pointer into the target index space, and obtains the target index sequence.
  • the terminal and the server can also be used together to execute the business data storage method provided in the embodiments of the present application.
  • the terminal sends a business data storage request carrying the target business data identifier to the server, and the server obtains the initial index sequence corresponding to the target business data based on the target business data identifier.
  • the server determines the target sub-data from the various sub-business data contained in the target business data, and uses the index space corresponding to the target sub-data in the initial index sequence as the target index space.
  • the server writes the target sub-data into the target index space to obtain the target index sequence.
  • the server When the target data length corresponding to the target sub-data is greater than the spatial data length of the target index space, the server writes the target sub-data into the target heap space corresponding to the target business data, obtains the target pointer corresponding to the target sub-data, writes the target pointer into the target index space, and obtains the target index sequence.
  • the server returns the business data storage result to the terminal.
  • a business data storage method is provided, and the method is applied to a computer device as an example for explanation.
  • the computer device may be a terminal or a server, and the method may be executed by the terminal or the server itself alone, or may be implemented through interaction between the terminal and the server.
  • the business data storage method includes the following steps:
  • Step S202 Acquire an initial index sequence corresponding to the target business data.
  • business data refers to a business object containing a large amount of sub-business data to be stored.
  • a business object can be an information registration form, and the data information in the cells in the form is the sub-business data;
  • a business object can be a document, and the data information to be stored contained in the document is the sub-business data; and so on.
  • Target business data refers to business data that needs to be stored.
  • Index sequence refers to a sequence composed of index spaces corresponding to each sub-business data in the target business data.
  • the initial index sequence refers to the index sequence corresponding to the target business data before the storage operation is performed on the target sub-data.
  • the target business data when the target business data is stored using a heap storage solution, first, a corresponding storage space is allocated for the target sub-data in the heap, and then the target sub-data is written into the corresponding storage space in the heap, and the pointer corresponding to the storage space is written into the target index space corresponding to the target business data in the initial index sequence.
  • the target business data contains a large amount of sub-business data of variable length, that is, the data length of the sub-business data is not fixed, and there is a large amount of sub-business data whose data length is less than or equal to the index space length, blindly storing the sub-business data in the heap will cause a waste of resources.
  • the computer device when performing a storage operation on the target business data, the computer device first obtains the initial index sequence corresponding to the target business data, and then compares the spatial data length of the target index space in the initial index sequence with the target data length of the target sub-data to determine the storage method corresponding to the target sub-data, so that the target sub-data can be stored in the corresponding storage method.
  • Step S204 determine target sub-data from each sub-service data included in the target service data, and use the index space corresponding to the target sub-data in the initial index sequence as the target index space.
  • the target sub-data refers to the sub-business data that is determined from the various sub-business data contained in the target business data and needs to perform data storage operations.
  • the index space refers to the storage space used to store pointers corresponding to the sub-business data or directly store the sub-business data.
  • the corresponding sub-business data can be read in the heap through the pointer stored in the index space.
  • the sub-business data can be directly read in the index space.
  • the target index space refers to the index space corresponding to the target sub-data.
  • the computer device determines the target sub-data in each sub-business data included in the target business data according to the sub-business data storage order.
  • the target business data does not have a corresponding sub-business data storage order
  • any sub-business data among the sub-business data to be stored included in the target business data is used as the target sub-data.
  • the index space corresponding to the target sub-data is determined in the initial index sequence, and the index space is used as the target index space corresponding to the target sub-data.
  • Step S206 when the target data length corresponding to the target sub-data is less than or equal to the spatial data length of the target index space, the target sub-data is written into the target index space to obtain a target index sequence.
  • the target data length refers to the data length of the target sub-data. For example, when the target sub-data is character data, the target data length is 1 byte. When the target sub-data is integer data, the target data length is 4 bytes, etc.
  • the space data length refers to the size of the storage space occupied by the index space. For example, the space data length of the target index space can be 4 bytes, 8 bytes, etc.
  • the target index sequence refers to the index sequence obtained after the target sub-data is stored, that is, after the target index space in the initial index sequence is updated based on the target sub-data.
  • the target data length of the target sub-data and the spatial data length of the target index space are compared.
  • the target data length is less than or equal to the spatial data length of the target index space
  • the target sub-data is directly written into the target index space to obtain an updated target index sequence.
  • the target sub-data is continuously determined in each sub-business data contained in the target business data, and the step of returning to obtain the initial index sequence corresponding to the target business data is executed until all sub-business data contained in the target business data are written into the corresponding storage space.
  • the security level corresponding to the target sub-data is obtained.
  • the target data length of the target sub-data is less than or equal to the space data length and the security level of the target sub-data is less than the preset security level
  • the target sub-data is stored in the target index space.
  • the security level of the target sub-data is greater than or equal to the preset level
  • the target sub-data is stored in the target heap space corresponding to the target business data.
  • a corresponding security level is set for each sub-business data contained in the target business data, and the corresponding storage method is determined according to the security level and data length corresponding to different sub-business data, which can improve resource utilization while ensuring the security of data storage.
  • the access level corresponding to the target sub-data is obtained, and the access level is used to characterize the frequency of the target sub-data being accessed. If the target sub-data is data that needs to be accessed frequently, the access level corresponding to the target sub-data is higher. The security level corresponding to the target sub-data is obtained. When the target data length of the target sub-data is less than or equal to the spatial data length, and the access level corresponding to the target sub-data is greater than or equal to the preset access level, the target sub-data is stored in the target index space, thereby improving the query speed and improving resource utilization.
  • the target sub-data is stored in the target heap space, thereby improving the security of the target sub-data.
  • the target data length of the target sub-data is less than or equal to the spatial data length
  • the security level corresponding to the target sub-data is less than the preset security level
  • the access level corresponding to the target sub-data is less than the preset access level
  • the target sub-data is stored in the target index space, thereby improving the query speed and improving resource utilization.
  • Corresponding security levels and access levels are set for each sub-business data contained in the target business data, and the corresponding storage method is determined according to the security level, access level and data length corresponding to different sub-business data. In this way, the security needs and access needs corresponding to different sub-business data are comprehensively considered during data storage, effectively improving the flexibility of data storage.
  • Step S208 when the target data length corresponding to the target sub-data is greater than the spatial data length of the target index space, the target sub-data is written into the target heap space corresponding to the target business data, and a target pointer corresponding to the target sub-data is obtained. Write the target pointer into the target index space to obtain the target index sequence.
  • the target heap space refers to the heap storage space allocated for the target business data.
  • the target pointer refers to the first address of the storage space corresponding to the target sub-data in the target heap space. For example, when the target sub-data is the first sub-data stored in the target heap space, the target pointer corresponding to the target sub-data is 0. If the data length of the target sub-data is 4 bytes, the target pointer corresponding to the second sub-data stored in the target heap space is 4.
  • the target data length of the target sub-data and the spatial data length of the target index space are compared.
  • the computer device allocates corresponding storage space for the target sub-data in the heap as the target heap space corresponding to the target sub-data.
  • the target sub-data is written into the target heap space, and the target pointer corresponding to the target heap space is written into the target index space to obtain a target index sequence.
  • the target sub-data is continued to be determined in each sub-business data contained in the target business data, and the step of returning to obtain the initial index sequence corresponding to the target business data is executed until all sub-business data contained in the target business data are written into the corresponding storage space.
  • the index space corresponding to the target sub-data in the initial index sequence is used as the target index space.
  • the target data length corresponding to the target sub-data is less than or equal to the spatial data length of the target index space, the target sub-data is written into the target index space to obtain the target index sequence.
  • the target sub-data When the target data length corresponding to the target sub-data is greater than the spatial data length of the target index space, the target sub-data is written into the target heap space corresponding to the target business data, and the target pointer corresponding to the target sub-data is obtained, and the target pointer is written into the target index space to obtain the target index sequence.
  • the target data length corresponding to the target sub-data is less than or equal to the spatial data length of the target index space
  • the target sub-data is directly written into the target index space without allocating the corresponding heap space for the target sub-data, which can avoid opening up unnecessary resource space and effectively improve resource utilization.
  • the business data storage method further includes:
  • the data lengths corresponding to each sub-business data are counted to obtain the estimated data length corresponding to the target business data; and the spatial data length is determined based on the estimated data length.
  • the estimated data length refers to the length of the storage space required to store each sub-business data included in the target business data.
  • the computer device counts the data lengths corresponding to the sub-business data contained in the target business data, calculates the sum of the data lengths corresponding to the sub-business data, and obtains the estimated data length corresponding to the target business data.
  • the spatial data length corresponding to the index space is calculated based on the estimated data length.
  • the spatial data length corresponding to the index space of the target business data is usually 4 bytes or 8 bytes.
  • the corresponding maximum addressing range is 2 31 -1.
  • the spatial data length is 8 bytes
  • the corresponding maximum addressing range is 2 63 -1.
  • the estimated data length is 2 30 bytes, the spatial data length can be set to 4 bytes.
  • the estimated data length is 2 40 bytes, The spatial data length can be set to 8 bytes.
  • the computer device determines the lengths of each candidate data corresponding to the index space based on the expected data length.
  • the candidate data length refers to the length of each candidate space data corresponding to the index space.
  • the maximum addressing range corresponding to the candidate data length is greater than the expected data length, and the maximum value of the candidate data length is 8 bytes. In order to improve resource utilization, the minimum value of each candidate data length is used as the space data length.
  • the lengths of each candidate data corresponding to the index space are 4 bytes, 5 bytes, 6 bytes, 7 bytes and 8 bytes, respectively, and the space data length is set to 4 bytes; when the expected data length is 250 bytes, the lengths of each candidate data corresponding to the index space are 7 bytes and 8 bytes, respectively, and the space data length is set to 7 bytes.
  • the spatial data length corresponding to the target business data can be set manually.
  • the spatial data length required for the target business data is determined by judging the business type to which the target business data belongs. For example, when the maximum value of the storage space size required for the business type to which the target business data belongs is less than 2 31 -1 bytes, the spatial data length corresponding to the target business data can be set to 4 bytes manually; when the maximum value of the storage space size required for the business type to which the target business data belongs is greater than 2 31 -1 bytes, the spatial data length corresponding to the target business data can be set to 8 bytes manually; and so on.
  • the expected data length corresponding to the target business data is determined by counting the data lengths corresponding to each sub-business data, and the spatial data length corresponding to the index space is determined based on the expected data length, which can effectively save the storage resources of computer equipment and improve resource utilization.
  • determining the spatial data length based on the expected data length includes:
  • Step S302 performing binary conversion on the estimated data length to obtain a conversion result, and obtaining an initial data length based on the conversion result.
  • Step S304 obtaining a reference data length, and determining an extended length range based on the reference data length and the initial data length.
  • Step S306 Count the sub-business data whose statistical data length is within the extended length range in the sub-business data corresponding to the target business data, and obtain the extended sub-data volume.
  • Step S308 Count the sub-business data included in the target business data to obtain the target sub-data volume.
  • Step S310 when the ratio between the expanded sub-data volume and the target sub-data volume is greater than a preset ratio, the initial data length is updated based on the reference data length to obtain the spatial data length.
  • the conversion result refers to the result obtained by converting the expected data length into binary.
  • the initial data length refers to the initial spatial data length corresponding to the index space determined based on the expected data length.
  • the reference data length refers to the data length used to expand the initial data length.
  • the reference data length is greater than or equal to the initial data length.
  • the reference data length can usually be set to 8 bytes.
  • the extended length range refers to the initial data length.
  • the data length range is determined by the initial data length and the reference data length.
  • the initial data length is the lower limit of the extended length range
  • the reference data length is the upper limit of the extended length range
  • the extended length range includes the reference data length.
  • the extended length range is (2,4].
  • the extended sub-data volume refers to the number of sub-business data whose data length is within the extended length range.
  • the target sub-data volume refers to the number of sub-business data contained in the target business data.
  • the expected data length is converted into binary to obtain a conversion result
  • the initial data length corresponding to the index space is determined based on the number of bits of the conversion result. For example, when the expected data length is 255 bytes, the conversion result obtained by converting 255 into binary is 1111 1111, and the number of bits corresponding to the conversion result is 8 bits. Therefore, the initial data length should be greater than or equal to 1 byte, for example, the initial data length can be set to 1 byte or 2 bytes.
  • each sub-business data included in the target business data count each sub-business data whose statistical data length is within the extended length range to obtain the extended sub-data amount. Count each sub-business data included in the target business data to obtain the target sub-data amount. Calculate the ratio between the extended sub-data amount and the target sub-data amount.
  • the ratio is greater than or equal to the preset ratio, update the initial data length with the reference data length to obtain the space data length.
  • the preset ratio can be set to 0.5, that is, when the data length of 50% or more of the sub-business data in the target business data is within the extended length range, the initial data length is updated with the reference data length. For example, when the reference data length is 8 bytes and the initial data length is 4 bytes, the initial data length is updated to 8 bytes.
  • the amount of sub-data to be expanded is determined by counting the sub-service data within the extended length range.
  • the ratio of the amount of sub-data to be expanded to the target amount of sub-data is greater than a preset threshold, it indicates that there is still a large amount of sub-service data with a shorter data length that needs to be stored in the heap space.
  • the initial data length is updated based on the reference data length, so that each sub-service data with a data length within the extended length range can be directly written into the index space, which can further improve resource utilization.
  • the business data storage method further includes:
  • the target mark bit corresponding to the target index space is updated; the storage method includes heap space storage and index space storage, and the target mark bit is used to characterize the storage method corresponding to the target sub-data.
  • the mark bit refers to the storage space in the index sequence used to record the storage methods corresponding to each sub-data.
  • the mark bit can be located before the index space and occupy 1 byte.
  • the mark bit corresponding to the sub-data is 1, it means that the storage method corresponding to the sub-data is index space storage, that is, pointer space storage.
  • the mark bit corresponding to the sub-data is 0, it means that the storage method corresponding to the sub-data is heap space storage, that is, heap storage.
  • the target mark bit refers to the mark bit corresponding to the target sub-data in the target index sequence.
  • Heap space storage refers to allocating corresponding
  • the storage space is used as the heap space corresponding to the sub-data, and the sub-data is stored in the heap space.
  • Index space storage refers to directly storing the sub-data in the corresponding index space.
  • the computer device updates the target flag bit corresponding to the target index space based on the storage mode corresponding to the target sub-data. For example, it can be stipulated that when the storage mode corresponding to the target sub-data is index space storage, the target flag bit corresponding to the target sub-data is set to 1, and when the storage mode corresponding to the target sub-data is heap space storage, the target flag bit corresponding to the target sub-data is set to 0.
  • the target flag bit corresponding to the target index space may be stored outside the target index sequence.
  • a flag bit sequence may be established, and the flag bits corresponding to each index space may be stored in the flag bit sequence.
  • the target mark bit corresponding to the target sub-data is updated, so that when performing data query, the storage method corresponding to the target sub-data can be determined according to the target mark bit, and then the target sub-data can be queried from the corresponding storage space based on the storage method corresponding to the target sub-data, thereby ensuring the reliability of data query.
  • the business data storage method further includes:
  • a sub-data query request is obtained, wherein the sub-data query request carries a data identifier corresponding to the sub-data to be queried; based on the data identifier, a current index sequence corresponding to the business data to which the sub-data to be queried belongs is obtained; based on the data identifier, an index space to be queried corresponding to the sub-data to be queried is determined in the current index sequence; based on a to-be-queried mark bit corresponding to the index space to be queried, a storage method corresponding to the sub-data to be queried is determined; based on the storage method corresponding to the sub-data to be queried, the sub-data to be queried is read from the corresponding storage space, and the sub-data to be queried is returned to the querying party corresponding to the sub-data query request.
  • the sub-data query request refers to the query request corresponding to the sub-data to be queried in the target business data.
  • the sub-data to be queried refers to the sub-business data queried by the sub-data query request.
  • the data identifier refers to the identifier corresponding to the sub-data to be queried, which can indicate the current index sequence corresponding to the sub-data to be queried, and the index space to be queried corresponding to the sub-data to be queried in the current index sequence.
  • the current index sequence refers to the index sequence corresponding to the business data to which the sub-data to be queried belongs.
  • the index space to be queried refers to the index space corresponding to the sub-data to be queried in the current index sequence.
  • the mark bit to be queried refers to the mark bit of the index space to be queried corresponding to the sub-data to be queried.
  • the query party corresponding to the sub-data query request refers to the computer device that issues the sub-data query request, and the query party can be a terminal or a server.
  • the computer device obtains the sub-data query request sent by the query party, and based on the data identifier carried in the sub-data query request, searches for the current index sequence corresponding to the business data to which the sub-data to be queried belongs, and then determines the index space to be queried corresponding to the sub-data to be queried in the current index sequence through the data identifier. According to the to-be-queried mark corresponding to the index space to be queried, the storage method corresponding to the sub-data to be queried is determined.
  • the storage space corresponding to the sub-data to be queried is determined, the sub-data to be queried is read from the corresponding storage space, and the queried sub-data to be queried is returned to the query party corresponding to the sub-data query request.
  • the sub-data query request carries the data identifier corresponding to the sub-data to be queried, and the index space to be queried corresponding to the sub-data to be queried is determined based on the data identifier, and then the storage method corresponding to the sub-data to be queried is determined based on the mark to be queried corresponding to the index space, and then the sub-data to be queried is read from the corresponding storage space based on the storage method corresponding to the sub-data to be queried, thereby ensuring the reliability of data query.
  • reading the sub-data to be queried from the corresponding storage space includes:
  • the storage method corresponding to the sub-data to be queried is heap space storage, based on the pointer stored in the index space to be queried, the storage space to be queried of the sub-data to be queried in the corresponding heap space to be queried is determined, and the sub-data to be queried is read from the storage space to be queried; when the storage method corresponding to the sub-data to be queried is index space storage, the sub-data to be queried is read from the index space to be queried.
  • the heap space to be queried refers to the heap storage space allocated for the target business data to which the sub-data to be queried belongs.
  • the storage space to be queried refers to the storage space in the heap space to be queried that stores the sub-data to be queried.
  • the storage mode corresponding to the sub-data to be queried is heap space storage
  • a pointer corresponding to the sub-data to be queried is obtained from the index space to be queried
  • the storage space to be queried corresponding to the sub-data to be queried is determined in the heap space to be queried corresponding to the sub-data to be queried through the pointer, and the sub-data to be queried is read from the storage space to be queried.
  • the storage mode corresponding to the sub-data to be queried is index space storage
  • the sub-data to be queried is read from the index space to be queried corresponding to the sub-data to be queried.
  • the sub-data to be queried is directly read from the index space to be queried corresponding to the sub-business data to be queried, thereby reducing the time overhead of locating the storage space to be queried corresponding to the sub-data to be queried based on the pointer and improving the efficiency of data query.
  • the target business data is a target table
  • the target sub-data is target cell data
  • the target table refers to a table that needs to store data, and the target table contains a large amount of cell data of indefinite length.
  • the target cell data refers to the data stored in the cells of the target table.
  • the business data storage method of the present application can be applied to data stored in a table.
  • the business data storage method includes the following steps:
  • the computer device obtains an initial index sequence corresponding to the target table, and obtains the spatial data length of the index space in the initial index sequence.
  • the computer device determines the target cell data from each cell data contained in the target table, and uses the index space corresponding to the target cell data in the initial index sequence as the target index space.
  • the target cell data when the data length corresponding to the target cell data is less than or equal to the spatial data length of the index space, the target cell data is written into the target index space, that is, stored using the pointer space, and the mark bit corresponding to the target index space is updated to obtain the target index sequence.
  • the target cell data and the data length corresponding to the target cell data and other information are written into the target heap space corresponding to the target table to obtain the target pointer corresponding to the target cell data, and the target pointer is written into the target index space to obtain the target index sequence.
  • the index space when there is a large amount of cell data in the target table whose data length is less than or equal to the length of the index space, such cell data is directly stored in the corresponding index space, the index space is fully utilized, and a mark bit is used to mark whether the data is directly stored using the index space or stored in the heap.
  • This can greatly improve resource utilization and reduce resource waste.
  • the consumption of searching the storage space based on the pointer can be reduced once, that is, the time overhead of locating the storage space corresponding to the cell data in the heap according to the pointer is reduced, thereby improving data reading performance and making the program more efficient.
  • 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 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.
  • the embodiment of the present application also provides a business data storage device for implementing the business data storage method involved above.
  • the implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in the one or more business data storage device embodiments provided below can refer to the limitations on the business data storage method above, and will not be repeated here.
  • a business data storage device including: an index sequence acquisition module 602, a target sub-data determination module 604 and a target sub-data storage module 606, wherein:
  • the target sub-data determination module is used to determine the target sub-data from the various sub-business data included in the target business data, and use the index space corresponding to the target sub-data in the initial index sequence as the target index space.
  • the target sub-data storage module is used to write the target sub-data into the target index space to obtain the target index sequence when the target data length corresponding to the target sub-data is less than or equal to the spatial data length of the target index space.
  • the target sub-data storage module is also used to store the target sub-data when the target data length corresponding to the target sub-data is greater than the target index space.
  • the target sub-data is written into the target heap space corresponding to the target business data, the target pointer corresponding to the target sub-data is obtained, and the target pointer is written into the target index space to obtain the target index sequence.
  • the above-mentioned business data storage device obtains the initial index sequence corresponding to the target business data, and determines the target sub-data from each sub-business data contained in the target business data, and uses the index space corresponding to the target sub-data in the initial index sequence as the target index space.
  • the target data length corresponding to the target sub-data is less than or equal to the spatial data length of the target index space, the target sub-data is written into the target index space to obtain the target index sequence.
  • the target sub-data When the target data length corresponding to the target sub-data is greater than the spatial data length of the target index space, the target sub-data is written into the target heap space corresponding to the target business data, and the target pointer corresponding to the target sub-data is obtained, and the target pointer is written into the target index space to obtain the target index sequence.
  • the target data length corresponding to the target sub-data is less than or equal to the spatial data length of the target index space
  • the target sub-data is directly written into the target index space without allocating the corresponding heap space for the target sub-data, which can avoid opening up unnecessary resource space and effectively improve resource utilization.
  • the service data storage device further includes:
  • the spatial data length determination module 702 is used to count the data lengths corresponding to each sub-service data to obtain the estimated data length corresponding to the target service data; and determine the spatial data length based on the estimated data length.
  • the target mark bit update module 704 is used to update the target mark bit corresponding to the target index space in the target index sequence based on the storage method corresponding to the target sub-data; the storage method includes heap space storage and index space storage, and the target mark bit is used to characterize the storage method corresponding to the target sub-data.
  • the query request response module 706 is used to obtain a sub-data query request, wherein the sub-data query request carries a data identifier corresponding to the sub-data to be queried; based on the data identifier, obtain the current index sequence corresponding to the business data to which the sub-data to be queried belongs; based on the data identifier, determine the index space to be queried corresponding to the sub-data to be queried in the current index sequence; based on the to-be-queried mark bit corresponding to the index space to be queried, determine the storage method corresponding to the sub-data to be queried; based on the storage method corresponding to the sub-data to be queried, read the sub-data to be queried from the corresponding storage space, and return the sub-data to be queried to the query party corresponding to the sub-data query request.
  • the spatial data length determination module 702 is further configured to:
  • the query request response module 706 is further configured to:
  • the storage method corresponding to the sub-data to be queried is heap space storage, based on the pointer stored in the index space to be queried, the storage space to be queried of the sub-data to be queried in the corresponding heap space to be queried is determined, and the sub-data to be queried is read from the storage space to be queried; when the storage method corresponding to the sub-data to be queried is index space storage, the sub-data to be queried is read from the index space to be queried.
  • Each module in the above-mentioned business data storage device can be implemented in whole or in part by software, hardware or a combination thereof.
  • Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
  • a computer device which may be a server, and its internal structure diagram may be shown in FIG8.
  • the computer device includes a processor, a memory, an input/output interface (Input/Output, referred to as I/O) and a communication interface.
  • the processor, the memory and the input/output interface are connected via a system bus, and the communication interface is connected to the system bus via the input/output interface.
  • 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 such as an initial index sequence and target sub-data.
  • 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 via a network connection.
  • a computer device which may be a terminal, and its internal structure diagram may be shown in FIG9.
  • the computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input device.
  • the processor, the memory, and the input/output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input/output interface.
  • 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 and a computer program.
  • the internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium.
  • 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 in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies.
  • WIFI wireless fidelity
  • NFC near field communication
  • the computer program is executed by the processor, a business data storage method is implemented.
  • the display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device.
  • the display screen can be a liquid crystal display screen or an electronic ink display screen
  • the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
  • FIGS. 8 and 9 are only partial structures related to the present application.
  • the block diagram of the structure does not constitute a limitation on the computer device to which the present application solution is applied.
  • the specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
  • a computer device including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
  • a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the steps in the above method embodiments are implemented.
  • a computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium.
  • a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
  • user information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • any reference to the memory, database or other medium used in the embodiments provided in the present 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.
  • RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • 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 unit, a data processing logic unit based on quantum computing, etc., but are not limited to this.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Un procédé de stockage de données de service consiste à : acquérir une séquence d'index initiale correspondant à des données de service cibles (S202) ; à déterminer des sous-données cibles à partir d'une pluralité d'éléments de sous-données de service comprises dans les données de service cibles, et à prendre, en tant qu'espace d'index cible, un espace d'index correspondant aux sous-données cibles dans la séquence d'index initiale (S204) ; lorsqu'une longueur de données cibles correspondant aux sous-données cibles est inférieure ou égale à une longueur de données spatiales de l'espace d'index cible, écrire les sous-données cibles dans l'espace d'index cible pour obtenir une séquence d'index cible (S206); et lorsque la longueur de données cibles correspondant aux sous-données cibles est supérieure à la longueur de données spatiales de l'espace d'index cible, écrire les sous-données cibles dans un espace de tas cible correspondant aux données de service cibles pour obtenir un pointeur cible correspondant aux sous-données cibles, et écrire le pointeur cible dans l'espace d'index cible pour obtenir une séquence d'index cible (S208).
PCT/CN2023/129235 2023-03-14 2023-11-02 Procédé et appareil de stockage de données de service, dispositif informatique et support de stockage WO2024187779A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310311147.1 2023-03-14
CN202310311147.1A CN116185305A (zh) 2023-03-14 2023-03-14 业务数据存储方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2024187779A1 true WO2024187779A1 (fr) 2024-09-19

Family

ID=86450739

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/129235 WO2024187779A1 (fr) 2023-03-14 2023-11-02 Procédé et appareil de stockage de données de service, dispositif informatique et support de stockage

Country Status (2)

Country Link
CN (1) CN116185305A (fr)
WO (1) WO2024187779A1 (fr)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185305A (zh) * 2023-03-14 2023-05-30 金蝶软件(中国)有限公司 业务数据存储方法、装置、计算机设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004229163A (ja) * 2003-01-27 2004-08-12 Internatl Business Mach Corp <Ibm> 固定長データ検索装置、及び固定長データ検索方法、及びコンピュータプログラム、並びにコンピュータ読み取り可能な記録媒体
CN101441638A (zh) * 2007-11-21 2009-05-27 英业达股份有限公司 映像文件的数据结构
CN103678657A (zh) * 2013-12-24 2014-03-26 北京中科大洋科技发展股份有限公司 一种地形高程数据存储和读取的方法
CN103678160A (zh) * 2012-08-30 2014-03-26 腾讯科技(深圳)有限公司 一种存储数据的方法和装置
CN112286725A (zh) * 2020-10-28 2021-01-29 联想(北京)有限公司 数据处理方法、装置及电子设备
CN116185305A (zh) * 2023-03-14 2023-05-30 金蝶软件(中国)有限公司 业务数据存储方法、装置、计算机设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004229163A (ja) * 2003-01-27 2004-08-12 Internatl Business Mach Corp <Ibm> 固定長データ検索装置、及び固定長データ検索方法、及びコンピュータプログラム、並びにコンピュータ読み取り可能な記録媒体
CN101441638A (zh) * 2007-11-21 2009-05-27 英业达股份有限公司 映像文件的数据结构
CN103678160A (zh) * 2012-08-30 2014-03-26 腾讯科技(深圳)有限公司 一种存储数据的方法和装置
CN103678657A (zh) * 2013-12-24 2014-03-26 北京中科大洋科技发展股份有限公司 一种地形高程数据存储和读取的方法
CN112286725A (zh) * 2020-10-28 2021-01-29 联想(北京)有限公司 数据处理方法、装置及电子设备
CN116185305A (zh) * 2023-03-14 2023-05-30 金蝶软件(中国)有限公司 业务数据存储方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN116185305A (zh) 2023-05-30

Similar Documents

Publication Publication Date Title
US7461233B2 (en) Method for identifying data characteristics for flash memory
US9489409B2 (en) Rollover strategies in a N-bit dictionary compressed column store
CN110196847A (zh) 数据处理方法和装置、存储介质及电子装置
US9823854B2 (en) Priority-based access of compressed memory lines in memory in a processor-based system
EP4174677A1 (fr) Procédé et dispositif de lecture et d&#39;écriture de données
US20190370009A1 (en) Intelligent swap for fatigable storage mediums
CN111177143B (zh) 键值数据存储方法、装置、存储介质与电子设备
CN113569508B (zh) 基于id进行数据索引与访问的数据库模型构建方法及设备
CN114924911B (zh) Windows操作系统有效数据备份方法、装置、设备和存储介质
WO2024187779A1 (fr) Procédé et appareil de stockage de données de service, dispositif informatique et support de stockage
CN112199039B (zh) 虚拟存储管理方法及处理器
WO2024016789A1 (fr) Procédé et appareil d&#39;interrogation de données de journal, dispositif et support
EP4120060A1 (fr) Procédé et appareil de stockage de données, et procédé et appareil de lecture de données
CN117112941A (zh) 字典获取方法、装置、计算机设备、存储介质和程序产品
TWI777268B (zh) 虛擬記憶管理方法及處理器
CN114745436A (zh) 数据采集方法、装置、计算机设备和存储介质
CN117785889B (zh) 一种针对图数据库的索引管理方法及相关设备
CN117290302B (zh) 目录分离方法、装置、计算机设备和存储介质
CN114676675B (zh) 数据处理方法、装置、计算机设备和存储介质
CN116126546B (zh) 一种性能调优的方法、装置、电子设备及介质
CN114840466B (zh) 资源配置空间分配方法、装置、计算机设备和存储介质
US20240320203A1 (en) Method for data processing, database system, computer equipment, and storage medium
CN116627876A (zh) 地址重映射方法、装置、设备及存储介质
CN117435589A (zh) 数据转存方法、装置、计算机设备、存储介质
CN117725266A (zh) 负荷曲线数据处理方法、装置和智能电表

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23927120

Country of ref document: EP

Kind code of ref document: A1