CN112579207B - Data loading method, device and equipment - Google Patents

Data loading method, device and equipment Download PDF

Info

Publication number
CN112579207B
CN112579207B CN202011556583.8A CN202011556583A CN112579207B CN 112579207 B CN112579207 B CN 112579207B CN 202011556583 A CN202011556583 A CN 202011556583A CN 112579207 B CN112579207 B CN 112579207B
Authority
CN
China
Prior art keywords
data
target
acquiring
loading
loading request
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202011556583.8A
Other languages
Chinese (zh)
Other versions
CN112579207A (en
Inventor
陈凌锋
崔宁
王轶丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
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 Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN202011556583.8A priority Critical patent/CN112579207B/en
Publication of CN112579207A publication Critical patent/CN112579207A/en
Application granted granted Critical
Publication of CN112579207B publication Critical patent/CN112579207B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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

Landscapes

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

Abstract

The application is applicable to the technical field of computers, and provides a data loading method, which comprises the following steps: if the data loading request is detected, acquiring a data segment name and reverse sequence information corresponding to the data loading request; and acquiring second data corresponding to the data loading request from the first data according to the data segment name, and analyzing the second data according to the reverse sequence information to obtain target data corresponding to the data loading request. According to the method, the corresponding second data is loaded according to the data loading request, and after loading, target data required by the data loading request can be obtained only through deserialization. Therefore, the reading time of the data can be reduced, the occupation of the memory space is reduced, and the file can be better managed.

Description

Data loading method, device and equipment
Technical Field
The present application belongs to the field of computer technology, and in particular, relates to a method, an apparatus, and a device for loading data.
Background
When data is read, a file is typically stored in a memory, and the required data is read from the memory. However, when the data size of the file is relatively large, if partial data is to be read from the file, the reading time is long, and a large memory space is occupied.
Disclosure of Invention
The embodiment of the application provides a method, a device and equipment for loading data, which can solve the problems that when the data size of a file is larger, partial data of the file is read, the reading time is longer, and a larger memory space is occupied.
In a first aspect, an embodiment of the present application provides a method for loading data, including:
if the data loading request is detected, acquiring a data segment name and reverse sequence information corresponding to the data loading request;
acquiring second data corresponding to the data loading request from first data according to the data segment name, wherein the first data comprises one or more data segments, and the second data consists of one or more data segments;
and analyzing the second data according to the reverse sequence information to obtain target data corresponding to the data loading request.
Further, the obtaining, according to the data segment name, second data corresponding to the file loading request from the first data includes:
acquiring a header file of the first data; the header file comprises address information of all data segments included in the first data;
acquiring a target address corresponding to the data segment name from the header file;
and acquiring second data corresponding to the file loading request from the target address.
Further, the parsing the second data according to the inverse sequence information to obtain target data corresponding to the file loading request includes:
acquiring a data structure of the target data according to the reverse sequence information, and determining a target field type and a target byte length according to the data structure;
and analyzing the second data according to the target field type and the target byte length to obtain a target object corresponding to the file loading request.
Further, before the second data corresponding to the data loading request is obtained from the first data according to the data segment name, the method further includes:
dividing the first data into a plurality of data segments according to a preset dividing rule, and storing the first data in the form of the data segments; each data segment comprises a plurality of preset objects;
and acquiring the data segment name of the data segment, and storing the data segment name and the address of the data segment in an associated mode.
Further, the dividing the first data into a plurality of data segments according to a preset dividing rule includes:
dividing the first data into a plurality of data segments according to a preset usage segmentation rule; all data in the data segment is of the same use.
Further, the method further comprises the following steps:
when a data writing request is detected, acquiring a target data segment and a writing address corresponding to the data writing request;
and writing the target data segment into the writing address, and storing the data segment name of the target data segment and the writing address in association with the header file of the first data.
In a second aspect, an embodiment of the present application provides a data loading apparatus, including:
the first processing unit is used for acquiring the data segment name and the reverse sequence information corresponding to the data loading request if the data loading request is detected;
the second processing unit is used for acquiring second data corresponding to the data loading request from first data according to the data segment name, wherein the first data comprises one or more data segments, and the second data consists of one or more data segments;
and the third processing unit is used for analyzing the second data according to the reverse sequence information to obtain target data corresponding to the data loading request.
Further, the second processing unit is specifically configured to:
acquiring a header file of the first data; the header file comprises address information of all data segments included in the first data;
acquiring a target address corresponding to the data segment name from the header file;
and acquiring second data corresponding to the file loading request from the target address.
Further, the third processing unit is specifically configured to:
acquiring a data structure of the target data according to the reverse sequence information, and determining a target field type and a target byte length according to the data structure;
and analyzing the second data according to the target field type and the target byte length to obtain a target object corresponding to the file loading request.
Further, the data loading device further comprises:
a fourth processing unit, configured to divide the first data into a plurality of data segments according to a preset division rule, and store the first data in the form of data segments; each data segment comprises a plurality of preset objects;
and the fifth processing unit is used for acquiring the data segment name of the data segment and storing the data segment name and the address of the data segment in an associated mode.
Further, the fourth processing unit is specifically configured to:
dividing the first data into a plurality of data segments according to a preset usage segmentation rule; all data in the data segment is of the same use.
Further, the data loading device further comprises:
a sixth processing unit, configured to obtain, when a data write request is detected, a target data segment and a write address corresponding to the data write request;
and a seventh processing unit, configured to write the target data segment into the write address, and store a data segment name of the target data segment and the write address in association with a header file of the first data.
In a third aspect, an embodiment of the present application provides a data loading device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method for loading data according to the first aspect when the processor executes the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements a method of data loading as described in the first aspect above.
In the embodiment of the application, if the data loading request is detected, the data segment name and the reverse sequence information corresponding to the data loading request are acquired; and acquiring second data corresponding to the data loading request from the first data according to the data segment name, and analyzing the second data according to the reverse sequence information to obtain target data corresponding to the data loading request. According to the method, the corresponding second data is loaded according to the data loading request, and after loading, target data required by the data loading request can be obtained only through deserialization. Therefore, the reading time of the data can be reduced, the occupation of the memory space is reduced, and the file can be better managed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for data loading provided by a first embodiment of the present application;
FIG. 2 is a schematic diagram of an apparatus for loading data according to a second embodiment of the present application;
fig. 3 is a schematic diagram of an apparatus for loading data according to a third embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for loading data according to a first embodiment of the present application. The execution body of a method for loading data in this embodiment is a device having a function of loading data, for example, a server, a processor, a personal computer, and the like. The method of data loading as shown in fig. 1 may include:
s101: and if the data loading request is detected, acquiring the data segment name and the reverse sequence information corresponding to the data loading request.
The first data is stored in the device, and the user or other devices can request to load part of the first data through a data loading request. The device may trigger the device to generate a data loading request through the operation of the user on the device, and the device may also receive the data loading request transmitted by other devices through the network, which is not limited herein.
The first data may be stored by the device in one or more data segments. Therefore, the data loading request may include a data identifier corresponding to the data to be loaded, i.e. a data segment name. Wherein the data segment name of the data segment is a unique identification of the data segment, for example, the device may obtain the data segment names section0, section1, section2, and so on.
And if the equipment detects the data loading request, acquiring the data segment name and the reverse sequence information corresponding to the data loading request. When the first data is stored, each data segment is stored in a serialization manner, so that when the last data is acquired, the data in the data segment needs to be subjected to inverse serialization analysis processing. Therefore, it can be understood that the anti-sequence information is used for analyzing the data in the data segment in an anti-sequence manner, the anti-sequence information is determined according to the sequence information, and different data segments correspond to different anti-sequence information because the sequence information is different when the different data segments are stored.
Specifically, when the first data is stored, the first data is divided into a plurality of data segments according to a preset division rule, and the first data is stored in the form of the data segments; each data segment comprises a plurality of preset objects. The device obtains the data segment name of the data segment and stores the data segment name in association with the address of the data segment.
The preset dividing rule of the first data may be various, for example, dividing according to a frequency of use, dividing according to a data type, or dividing according to a purpose, a function, etc.
The device may divide the first data into a plurality of data segments according to a preset usage segmentation rule; all data in the data segment is of the same use. For example, the device may divide the first data into a plurality of data segments according to a preset usage dividing rule, where the data in the data segment section0 is used for supermarket commodity statistics, and preset objects that may be included in the data segments are commodity names, commodity sales amounts, commodity inventory, and commodity prices.
S102: and acquiring second data corresponding to the data loading request from the first data according to the data segment name, wherein the first data comprises one or more data segments, and the second data consists of one or more data segments.
The device acquires second data corresponding to the data loading request from the first data according to the data segment name, wherein the first data comprises one or more data segments, and the second data consists of one or more data segments. For example, the device may set an acquisition function of the second data, write the name of the data segment into the acquisition function, and execute the function to acquire the second data corresponding to the data loading request.
In S101, it is mentioned that the first data is divided into data segments during storage, and the data segment names of the data segments are stored in association with the addresses of the data segments, so the device may determine the addresses of the data segments corresponding to the data segment names according to the data segment names, and then acquire the data stored by the addresses of the data segments, that is, the second data corresponding to the data loading request.
The second data is the original data which is stored in a serialization way, so that the second data corresponding to the data loading request is the original data corresponding to the data loading request, and the information to be acquired can not be acquired according to the original data. If the device is to acquire the target data corresponding to the data loading request, the device also needs to perform inverse sequence analysis on the original data.
In one embodiment, the first data may be stored with a header file, where the header file includes address information of all data segments included in the first data. The address information of the data segment included in the header file is relative path information, that is, relative address with respect to the first data. Here, in order to ensure that the first data can be moved and used across devices, the address information of the data segment is not designed as absolute path information.
When second data corresponding to the data loading request is obtained from the first data according to the data segment name, the device can obtain the header file of the first data; and acquiring a target address corresponding to the data segment name from the head file, and acquiring second data corresponding to the file loading request from the target address.
In this embodiment, when the first data needs to be partially updated, that is, when the data needs to be written, the data to be written may be directly divided into data segments, and after the serialization processing is performed, the entire data segments may be directly written into the first data.
When the device detects a data writing request, a target data segment and a writing address corresponding to the data writing request are obtained. The target data segment is the already divided data segment, and the target object also needs to be divided in the target data segment. The device writes the target data segment into the corresponding writing address, and stores the data segment name and the writing address of the target data segment in the header file of the first data in an associated mode, so that the use of inquiry in the subsequent loading process is facilitated.
S103: and analyzing the second data according to the reverse sequence information to obtain target data corresponding to the data loading request.
And the equipment analyzes the second data according to the reverse sequence information to obtain target data corresponding to the data loading request. In particular, the anti-serialization information may be a delegated Delegate of anti-serialization information. According to the delegated delay of the deserialization information, the device only needs to acquire the second data in the section again, and can reversely analyze the second data into the final required target data according to the result of the pre-storage.
Specifically, the device obtains a data structure of target data according to the reverse sequence information, and determines a target field type and a target byte length according to the data structure; and analyzing the second data according to the target field type and the target byte length to obtain a target object corresponding to the file loading request. For example, an object a, which has a field type of shaping int, occupies 4 Bytes long, and theoretically, a device can parse any 4-byte array into this int. The result of the parsing depends on whether this data is stored in this form at the time of storage.
For example, the second data is an array of 13 bytes, the object 1 is shaped int as the target field type, and the target byte length is 4; the target field type of the object 2 is shaping int, and the target byte length is 4; the target field type of object 3 is float, the target byte length is 4; the target field type of object 4 is bool and the target byte length is 1. The target object corresponding to the file loading request can be obtained through analysis according to the target field type and the target byte length, and the target object comprises an object 1, an object 2, an object 3 and an object 4.
In the embodiment of the application, if the data loading request is detected, the data segment name and the reverse sequence information corresponding to the data loading request are acquired; and acquiring second data corresponding to the data loading request from the first data according to the data segment name, and analyzing the second data according to the reverse sequence information to obtain target data corresponding to the data loading request. According to the method, the corresponding second data is loaded according to the data loading request, and after loading, target data required by the data loading request can be obtained only through deserialization. Therefore, the reading time of the data can be reduced, the occupation of the memory space is reduced, and the file can be better managed.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Referring to fig. 2, fig. 2 is a schematic diagram of an apparatus for loading data according to a second embodiment of the present application. The units included are for performing the steps in the corresponding embodiment of fig. 1. Refer specifically to the description of the corresponding embodiment in fig. 1. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 2, the data loading apparatus 2 includes:
the first processing unit 210 is configured to obtain a data segment name and anti-sequence information corresponding to a data loading request if the data loading request is detected;
a second processing unit 220, configured to obtain second data corresponding to the data loading request from first data according to the data segment name, where the first data includes one or more data segments, and the second data is composed of one or more data segments;
and a third processing unit 230, configured to parse the second data according to the inverse sequence information, so as to obtain target data corresponding to the data loading request.
Further, the second processing unit 220 is specifically configured to:
acquiring a header file of the first data; the header file comprises address information of all data segments included in the first data;
acquiring a target address corresponding to the data segment name from the header file;
and acquiring second data corresponding to the file loading request from the target address.
Further, the third processing unit 230 is specifically configured to:
acquiring a data structure of the target data according to the reverse sequence information, and determining a target field type and a target byte length according to the data structure;
and analyzing the second data according to the target field type and the target byte length to obtain a target object corresponding to the file loading request.
Further, the data loading device 2 further includes:
a fourth processing unit, configured to divide the first data into a plurality of data segments according to a preset division rule, and store the first data in the form of data segments; each data segment comprises a plurality of preset objects;
and the fifth processing unit is used for acquiring the data segment name of the data segment and storing the data segment name and the address of the data segment in an associated mode.
Further, the fourth processing unit is specifically configured to:
dividing the first data into a plurality of data segments according to a preset usage segmentation rule; all data in the data segment is of the same use.
Further, the data loading device 2 further includes:
a sixth processing unit, configured to obtain, when a data write request is detected, a target data segment and a write address corresponding to the data write request;
and a seventh processing unit, configured to write the target data segment into the write address, and store a data segment name of the target data segment and the write address in association with a header file of the first data.
Fig. 3 is a schematic diagram of an apparatus for loading data according to a third embodiment of the present application. As shown in fig. 3, the data loading apparatus 3 of this embodiment includes: a processor 30, a memory 31 and a computer program 32, such as a program for data loading, stored in said memory 31 and executable on said processor 30. The processor 30, when executing the computer program 32, implements the steps of the method embodiments of data loading described above, such as steps 101 to 103 shown in fig. 1. Alternatively, the processor 30, when executing the computer program 32, performs the functions of the modules/units of the apparatus embodiments described above, such as the functions of the modules 210-230 shown in fig. 2.
Illustratively, the computer program 32 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the processor 30 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used to describe the execution of the computer program 32 in the data loading device 3. For example, the computer program 32 may be divided into a first processing unit, a second processing unit, and a third processing unit, each unit specifically functioning as follows:
the first processing unit is used for acquiring the data segment name and the reverse sequence information corresponding to the data loading request if the data loading request is detected;
the second processing unit is used for acquiring second data corresponding to the data loading request from first data according to the data segment name, wherein the first data comprises one or more data segments, and the second data consists of one or more data segments;
and the third processing unit is used for analyzing the second data according to the reverse sequence information to obtain target data corresponding to the data loading request.
The data loading device may include, but is not limited to, a processor 30, a memory 31. It will be appreciated by those skilled in the art that fig. 3 is merely an example of a data loading device 3 and does not constitute a limitation of the data loading device 3, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the data loading device may also include an input-output device, a network access device, a bus, etc.
The processor 30 may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 31 may be an internal storage unit of the data loading device 3, for example a hard disk or a memory of the data loading device 3. The memory 31 may also be an external storage device of the data loading device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the data loading device 3. Further, the data loading device 3 may also include both an internal storage unit and an external storage device of the data loading device 3. The memory 31 is used for storing the computer program and other programs and data required by the data loading device. The memory 31 may also be used for temporarily storing data that has been output or is to be output.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a network device, which comprises: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, which when executed by the processor performs the steps of any of the various method embodiments described above.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that enable the implementation of the method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (RAM, random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (7)

1. A method of data loading, comprising:
if the data loading request is detected, acquiring a data segment name and reverse sequence information corresponding to the data loading request;
obtaining second data corresponding to the data loading request from the first data according to the data segment name, wherein the second data comprises: acquiring a header file of the first data; the header file comprises address information of all data segments included in the first data; acquiring a target address corresponding to the data segment name from the header file; acquiring second data corresponding to the data loading request from the target address; wherein the first data comprises one or more data segments and the second data consists of one or more of the data segments;
analyzing the second data according to the reverse sequence information to obtain target data corresponding to the data loading request, wherein the target data comprises: acquiring a data structure of the target data according to the reverse sequence information, and determining a target field type and a target byte length according to the data structure; and analyzing the second data according to the target field type and the target byte length to obtain a target object corresponding to the data loading request.
2. The method for loading data according to claim 1, further comprising, before said obtaining second data corresponding to said data loading request from the first data according to said data segment name:
dividing the first data into a plurality of data segments according to a preset dividing rule, and storing the first data in the form of the data segments; each data segment comprises a plurality of preset objects;
and acquiring the data segment name of the data segment, and storing the data segment name and the address of the data segment in an associated mode.
3. The method for loading data according to claim 2, wherein dividing the first data into a plurality of data segments according to a preset division rule comprises:
dividing the first data into a plurality of data segments according to a preset usage segmentation rule; all data in the data segment is of the same use.
4. The method of data loading of claim 1, further comprising:
when a data writing request is detected, acquiring a target data segment and a writing address corresponding to the data writing request;
and writing the target data segment into the writing address, and storing the data segment name of the target data segment and the writing address in association with the header file of the first data.
5. An apparatus for loading data, comprising:
the first processing unit is used for acquiring the data segment name and the reverse sequence information corresponding to the data loading request if the data loading request is detected;
the second processing unit is used for acquiring second data corresponding to the data loading request from first data according to the data segment name, wherein the first data comprises one or more data segments, and the second data consists of one or more data segments; the second processing unit is specifically configured to: acquiring a header file of the first data; the header file comprises address information of all data segments included in the first data; acquiring a target address corresponding to the data segment name from the header file; acquiring second data corresponding to the data loading request from the target address;
the third processing unit is used for analyzing the second data according to the reverse sequence information to obtain target data corresponding to the data loading request; the third processing unit is specifically configured to: acquiring a data structure of the target data according to the reverse sequence information, and determining a target field type and a target byte length according to the data structure; and analyzing the second data according to the target field type and the target byte length to obtain a target object corresponding to the data loading request.
6. A data loading device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 4 when executing the computer program.
7. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 4.
CN202011556583.8A 2020-12-24 2020-12-24 Data loading method, device and equipment Active CN112579207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011556583.8A CN112579207B (en) 2020-12-24 2020-12-24 Data loading method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011556583.8A CN112579207B (en) 2020-12-24 2020-12-24 Data loading method, device and equipment

Publications (2)

Publication Number Publication Date
CN112579207A CN112579207A (en) 2021-03-30
CN112579207B true CN112579207B (en) 2023-12-15

Family

ID=75140633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011556583.8A Active CN112579207B (en) 2020-12-24 2020-12-24 Data loading method, device and equipment

Country Status (1)

Country Link
CN (1) CN112579207B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043657A (en) * 2011-02-01 2011-05-04 苏州同元软控信息技术有限公司 File serialization method of model library of physical modeling language Modelica
CN111124551A (en) * 2019-11-22 2020-05-08 矩阵元技术(深圳)有限公司 Data serialization and deserialization method and device and computer equipment
CN111666102A (en) * 2020-05-20 2020-09-15 新华三半导体技术有限公司 File format conversion method, chip verification method, related device and network chip

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043657A (en) * 2011-02-01 2011-05-04 苏州同元软控信息技术有限公司 File serialization method of model library of physical modeling language Modelica
CN111124551A (en) * 2019-11-22 2020-05-08 矩阵元技术(深圳)有限公司 Data serialization and deserialization method and device and computer equipment
CN111666102A (en) * 2020-05-20 2020-09-15 新华三半导体技术有限公司 File format conversion method, chip verification method, related device and network chip

Also Published As

Publication number Publication date
CN112579207A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
US8725961B2 (en) Systems, methods, and devices for configuring a device
CN111090663B (en) Transaction concurrency control method, device, terminal equipment and medium
CN107657051B (en) Picture label generation method, terminal device and storage medium
CN110442308B (en) Data block storage method, device, equipment and storage medium
CN112506569B (en) Byte code executing method, byte code executing device and terminal equipment
CN109656487B (en) Data processing method, device, equipment and storage medium
CN113129150A (en) Transaction data processing method and device, terminal device and readable storage medium
US8782375B2 (en) Hash-based managing of storage identifiers
CN108632624B (en) Image data processing method and device, terminal equipment and readable storage medium
KR20190105066A (en) Load and store controls that control the operation of the protected storage facility
CN111460098B (en) Text matching method and device and terminal equipment
CN111104178A (en) Dynamic library loading method, terminal device and storage medium
CN112579207B (en) Data loading method, device and equipment
CN115617255A (en) Management method and management device for cache files
CN111143240B (en) Image storage method, system and terminal equipment
CN113177045A (en) Data extraction method and device, computable storage equipment and data request equipment
CN113272785B (en) Method for mounting file system, terminal equipment and storage medium
CN114374392A (en) Data compression storage method and device, terminal equipment and readable storage medium
CN110209349B (en) Data processing method and terminal equipment
CN111708715B (en) Memory allocation method, memory allocation device and terminal equipment
CN114648656A (en) Image recognition method and device, terminal equipment and readable storage medium
CN113468105A (en) Data structure of data snapshot, related data processing method, device and system
CN118057347A (en) Method and device for acquiring read-write parameters, electronic equipment and storage medium
CN111679909B (en) Data processing method and device and terminal equipment
CN111580756A (en) Data operation method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant