CN117076720B - Embedded table access method and device, electronic equipment and storage medium - Google Patents

Embedded table access method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117076720B
CN117076720B CN202311345266.5A CN202311345266A CN117076720B CN 117076720 B CN117076720 B CN 117076720B CN 202311345266 A CN202311345266 A CN 202311345266A CN 117076720 B CN117076720 B CN 117076720B
Authority
CN
China
Prior art keywords
task
tasks
embedded table
query
load units
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
CN202311345266.5A
Other languages
Chinese (zh)
Other versions
CN117076720A (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.)
Beijing Suiyuan Intelligent Technology Co ltd
Original Assignee
Beijing Suiyuan Intelligent Technology Co ltd
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 Beijing Suiyuan Intelligent Technology Co ltd filed Critical Beijing Suiyuan Intelligent Technology Co ltd
Priority to CN202311345266.5A priority Critical patent/CN117076720B/en
Publication of CN117076720A publication Critical patent/CN117076720A/en
Application granted granted Critical
Publication of CN117076720B publication Critical patent/CN117076720B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9014Indexing; Data structures therefor; Storage structures hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • 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

Abstract

The invention discloses an embedded table access method, an embedded table access device, electronic equipment and a storage medium, which comprise the following steps: acquiring a plurality of inquiry tasks corresponding to the embedded table, determining initial load units corresponding to the inquiry tasks, and distributing the inquiry tasks to the corresponding initial load units; the embedded table is a virtual storage space constructed by a plurality of AI acceleration cards according to a preset inter-chip interconnection protocol; each AI acceleration card adopts a unified addressing mode to access data; determining hash values of the corresponding query tasks through the initial load units, and determining target load units corresponding to the query tasks according to the hash values; and distributing each query task to a corresponding target load unit, and executing the corresponding query task through each target load unit to obtain an embedded table access result matched with a plurality of query tasks. The technical scheme of the embodiment of the invention can improve the access performance of the large-scale embedded table in the search and popularization scene.

Description

Embedded table access method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an embedded table access method, an embedded table access device, an electronic device, and a storage medium.
Background
The embedded Table (AI) is a key technology of the artificial intelligence (Artificial Intelligence, AI) model in search and popularization type application, and the scale is large in actual business application, and the storage of the T level or even the 10T/100T level is needed.
The existing embedded table access method is mainly realized through small-sized aggregation or scattered memory, has lower arithmetic strength, and generally has unstructured sparsity in the process of accessing the embedded table. Each query task must extract data from embedded tables above a few tens of TBs, which is distributed across hundreds or thousands of chips, thereby resulting in computational, memory and communication load imbalances on supercomputers for deep recommendation system reasoning.
Therefore, the prior art lacks an effective access mode of the embedded table, and can improve the access performance of the embedded table in a search and popularization scene.
Disclosure of Invention
The invention provides an embedded table access method, an embedded table access device, electronic equipment and a storage medium, which can greatly improve the access performance of a large-scale embedded table in a search and popularization scene.
According to an aspect of the present invention, there is provided an embedded table access method, the method including:
acquiring a plurality of inquiry tasks corresponding to the embedded table, determining initial load units corresponding to the inquiry tasks, and distributing the inquiry tasks to the corresponding initial load units;
the embedded table is a virtual storage space constructed by a plurality of AI (advanced technology interface) acceleration cards according to a preset inter-chip interconnection protocol; each AI acceleration card adopts a unified addressing mode to access data;
determining hash values of the corresponding query tasks through the initial load units, and determining target load units corresponding to the query tasks according to the hash values;
and distributing the query tasks to corresponding target load units, and executing the corresponding query tasks through the target load units to obtain embedded table access results matched with the query tasks.
According to another aspect of the present invention, there is provided an embedded table access apparatus, the apparatus comprising:
the task acquisition module is used for acquiring a plurality of inquiry tasks corresponding to the embedded table, determining initial load units corresponding to the inquiry tasks and distributing the inquiry tasks to the corresponding initial load units;
the embedded table is a virtual storage space constructed by a plurality of AI (advanced technology interface) acceleration cards according to a preset inter-chip interconnection protocol; each AI acceleration card adopts a unified addressing mode to access data;
the target load determining module is used for determining hash values of the corresponding query tasks through the initial load units and determining target load units corresponding to the query tasks according to the hash values;
and the task execution module is used for distributing the query tasks to corresponding target load units, and executing the corresponding query tasks through the target load units to obtain an embedded table access result matched with the query tasks.
According to another aspect of the present invention, there is provided an electronic device, the device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the embedded table access method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the embedded table access method according to any one of the embodiments of the present invention when executed.
According to another aspect of the present invention, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the embedded table access method according to any of the embodiments of the present invention.
According to the technical scheme provided by the embodiment of the invention, the initial load units corresponding to the query tasks are determined by acquiring the plurality of query tasks corresponding to the embedded table, the query tasks are distributed to the corresponding initial load units, the hash values of the corresponding query tasks are determined through the initial load units, the target load units corresponding to the query tasks are determined according to the hash values, the query tasks are distributed to the corresponding target load units, the corresponding query tasks are executed through the target load units, and the access result of the embedded table matched with the query tasks is obtained.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1a is a flow chart of an embedded table access method provided according to an embodiment of the present invention;
FIG. 1b is a topology block diagram of an embedded table provided in accordance with an embodiment of the present invention;
FIG. 2 is a flow chart of another method of embedded table access provided in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of another method of embedded table access provided in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of an embedded table access device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing an embedded table access method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1a is a flowchart of an embodiment of an embedded table accessing method, where the embodiment may be applicable to a case of accessing an embedded table, and the method may be performed by an embedded table accessing device, where the embedded table accessing device may be implemented in a form of hardware and/or software, and the embedded table accessing device may be configured in an electronic device. As shown in fig. 1a, the method comprises:
step 110, acquiring a plurality of query tasks corresponding to the embedded table, determining initial load units corresponding to the query tasks, and distributing the query tasks to the corresponding initial load units.
In this embodiment, the embedded table is a virtual storage space configured by a plurality of AI acceleration cards according to a preset inter-chip interconnection protocol; and each AI accelerator card adopts a unified addressing mode to access data.
Specifically, before the multiple query tasks are acquired, a cross-card unified addressing mode may be adopted between the AI accelerator cards, and the inter-chip memory access is performed by using an inter-chip interconnection protocol (i.e., the preset inter-chip interconnection protocol) originally supported by the AI accelerator cards, so as to construct an embedded table of the unified virtual memory.
In a specific embodiment, a plurality of AI accelerator cards can be expanded into a large memory space embedded table of uniform addressing space in the manner described above, and the topology structure of the embedded table can be shown in fig. 1 b. The embedded table can correspond to a plurality of general computing units (Geneal Compute Unit, GCU), and the GCUs can be interconnected at high speed through an ESL protocol. The global unified addressing (UVA) reaching 256T can be realized in the GCU through the PBMMU, and the multi-machine scale can be realized into the ultra-large embedded table storage through the hierarchical switch interconnection.
In this step, optionally, after obtaining multiple query tasks, the multiple query tasks may be subjected to coarse-grained load division according to the task requirements of each query task and the running states of each GCU in the embedded table, so as to obtain an initial GCU (i.e., an initial load unit) corresponding to each query task.
Taking the topology diagram in fig. 1B as an example, assuming that 5 query tasks (task a, task B, task C, task D, and task E) are acquired, GCU0 may be used as the initial load unit corresponding to task a and task E, GCU1 may be used as the initial load unit corresponding to task B, GCU2 may be used as the initial load unit corresponding to task C, and GCU3 may be used as the initial load unit corresponding to task D.
And 120, determining hash values of the corresponding query tasks through the initial load units, and determining target load units corresponding to the query tasks according to the hash values.
In this embodiment, after each query task is allocated to a corresponding initial load unit, a real load unit (i.e., a target load unit) corresponding to each query task may be determined by using an on-chip rehashed method through each initial load unit. Specifically, the calculation formula is as follows:
and 130, distributing the query tasks to corresponding target load units, and executing the corresponding query tasks through the target load units to obtain an embedded table access result matched with the query tasks.
In this embodiment, after determining the target load unit corresponding to each query task, each query task may be allocated to the corresponding target load unit, and the target load unit executes the query task that is re-allocated.
According to the technical scheme provided by the embodiment of the invention, the initial load units corresponding to the query tasks are determined by acquiring the plurality of query tasks corresponding to the embedded table, the query tasks are distributed to the corresponding initial load units, the hash values of the corresponding query tasks are determined through the initial load units, the target load units corresponding to the query tasks are determined according to the hash values, the query tasks are distributed to the corresponding target load units, the corresponding query tasks are executed through the target load units, and the access result of the embedded table matched with the query tasks is obtained.
Fig. 2 is a flowchart of an embedded table accessing method according to a second embodiment of the present invention, where the foregoing embodiment is further refined. As shown in fig. 2, the method includes:
step 210, acquiring a plurality of query tasks corresponding to an embedded table, the number of tasks corresponding to the plurality of query tasks, and the total number of GCUs corresponding to the embedded table.
Step 220, determining an initial load unit corresponding to each query task according to the task number, the GCU total number and the arrangement order corresponding to each GCU.
In a specific embodiment, assuming that m (m > 0) query tasks are obtained in step 210, and the total number of GCUs corresponding to the embedded table is n (n > 0), the ith GCU may be used as an initial load unit corresponding to each query task in the range from (m/n) i to (m/n) i+1.
And 230, constructing a plurality of task processing threads through each initial load unit, and determining hash values of corresponding query tasks according to sliding windows with preset lengths by adopting the plurality of task processing threads.
In this embodiment, the preset lengths may be 1 and 4, and specific values may be preset according to actual situations, which is not limited in this embodiment.
The method has the advantages that a plurality of task processing threads are built through each initial load unit, so that the query tasks corresponding to each initial load unit can be processed in parallel, and the processing efficiency of each query task and the access efficiency of the embedded table are improved.
Step 240, determining a target load unit corresponding to each query task according to the hash value corresponding to each query task.
In a specific embodiment, after determining the target load units corresponding to the query tasks, the determining result of the target load unit corresponding to each query task may be sent to other load units by using all-to-all transmission modes through each load unit.
Step 250, distributing each inquiry task to a corresponding target load unit.
And 260, constructing a plurality of task execution threads through each target load unit, and executing each query task according to a sliding window with a preset length by adopting the plurality of task execution threads to obtain an embedded table access result matched with the plurality of query tasks.
According to the technical scheme provided by the embodiment of the invention, the initial load units corresponding to the query tasks are determined according to the task number, the GCU total number and the arrangement sequence corresponding to the GCU by acquiring the query tasks corresponding to the embedded table, the task number corresponding to the query tasks and the GCU total number corresponding to the embedded table, the initial load units are used for constructing a plurality of task processing threads, hash values of the corresponding query tasks are determined according to a sliding window with a preset length by adopting the task processing threads, the target load units corresponding to the query tasks are determined according to the hash values corresponding to the query tasks, the query tasks are distributed to the corresponding target load units, a plurality of task execution threads are constructed by adopting the target load units, the query tasks are executed according to the sliding window with a preset length, and the access result of the embedded table matched with the query tasks is obtained.
Fig. 3 is a flowchart of another method for accessing an embedded table according to a third embodiment of the present invention, where the foregoing embodiment is further refined. As shown in fig. 3, the method includes:
step 310, acquiring a plurality of query tasks corresponding to the embedded table, determining initial load units corresponding to the query tasks, and distributing the query tasks to the corresponding initial load units.
Step 320, determining hash values of the corresponding query tasks through the initial load units, and determining target load units corresponding to the query tasks according to the hash values.
Step 330, distributing each inquiry task to a corresponding target load unit, obtaining an inquiry task corresponding to each target load unit, and counting the occurrence times corresponding to each inquiry task.
Step 340, determining boundary data corresponding to each target load unit according to the occurrence times corresponding to each query task, and transmitting the boundary data to an atomic calculation unit corresponding to an embedded table.
And 350, processing the boundary data through the atomic calculation unit.
In this embodiment, after each query task is allocated to a corresponding real load unit, the query task corresponding to each real load unit may be obtained, and the occurrence number of each query task in all the query tasks may be counted. If the number of occurrences of a query task is greater than a preset threshold, the query task may be used as boundary data, and the boundary data may be transmitted to an atomic computing unit (i.e., a cross-card hardware processor), and then the atomic computing unit processes the boundary data.
The method has the advantages that when a plurality of target load units process unbalanced tasks, a certain computing unit becomes a bottleneck, other units are empty and the like, the boundary data is processed in parallel through the atomic computing unit, the effect of hiding unbalanced overhead can be achieved, time consumption for executing query tasks is saved, and access efficiency of an embedded table is improved.
And 360, constructing a plurality of task execution threads through each target load unit, and executing each query task according to a sliding window with a preset length by adopting the plurality of task execution threads to obtain an embedded table access result matched with the plurality of query tasks.
And 370, sending the target task execution result to the initial load unit corresponding to the target task through each target load unit.
In this embodiment, the target task may be understood as a query task that is distributed by the load unit in an on-chip rehash manner. By sending the target task execution results to the corresponding initial load units, each GCU can be restored to the query task assigned when the coarse-grained partitioning was initially performed.
And 380, merging task execution results corresponding to the load units to obtain an embedded table access result matched with the plurality of inquiry tasks, and returning the embedded table access result to a CPU corresponding to the embedded table.
According to the technical scheme provided by the embodiment of the invention, the initial load units corresponding to the query tasks are determined by acquiring the multiple query tasks corresponding to the embedded table, the query tasks are distributed to the corresponding initial load units, the hash values of the query tasks are determined by the initial load units, the target load units corresponding to the query tasks are determined according to the hash values, the query tasks are distributed to the corresponding target load units, the query tasks corresponding to the target load units are acquired, the occurrence times of the query tasks are counted, the boundary data corresponding to the target load units are determined according to the occurrence times of the query tasks, the boundary data are transmitted to the atomic computation units corresponding to the embedded table, the boundary data are processed by the atomic computation units, a plurality of task execution threads are constructed by the target load units, the task execution threads are executed according to the sliding window with the preset length, the embedded table access results matched with the query tasks are obtained, the target task execution results are sent to the initial load units corresponding to the target task execution results, the task execution results corresponding to the target load units are combined to obtain the embedded table access results, the embedded table access results are transmitted to the corresponding to the atomic computation units, and the embedded table access context is promoted, and the embedded table access context is greatly achieved.
Fig. 4 is a schematic structural diagram of an embedded table access device according to a fourth embodiment of the present invention, where the device includes: a task acquisition module 410, a target load determination module 420, and a task execution module 430.
The task obtaining module 410 is configured to obtain a plurality of query tasks corresponding to the embedded table, determine initial load units corresponding to the query tasks, and allocate the query tasks to the corresponding initial load units;
the embedded table is a virtual storage space constructed by a plurality of AI acceleration cards according to a preset inter-chip interconnection protocol; each AI acceleration card adopts a unified addressing mode to access data;
the target load determining module 420 is configured to determine, by using each initial load unit, a hash value of a corresponding query task, and determine, according to the hash value, a target load unit corresponding to each query task;
the task execution module 430 is configured to distribute each query task to a corresponding target load unit, and execute the corresponding query task through each target load unit to obtain an access result of the embedded table matched with the multiple query tasks.
According to the technical scheme provided by the embodiment of the invention, the initial load units corresponding to the query tasks are determined by acquiring the plurality of query tasks corresponding to the embedded table, the query tasks are distributed to the corresponding initial load units, the hash values of the corresponding query tasks are determined through the initial load units, the target load units corresponding to the query tasks are determined according to the hash values, the query tasks are distributed to the corresponding target load units, the corresponding query tasks are executed through the target load units, and the access result of the embedded table matched with the query tasks is obtained.
Based on the above embodiment, the task acquisition module 410 includes:
the task number acquisition unit is used for acquiring the task numbers corresponding to the plurality of inquiry tasks and the total number of the general computing units GCU corresponding to the embedded table;
and the initial load determining unit is used for determining initial load units corresponding to the query tasks according to the task number, the total number of GCUs and the arrangement order corresponding to the GCUs.
The target load determination module 420 includes:
the hash value determining unit is used for constructing a plurality of task processing threads through each initial load unit, adopting the plurality of task processing threads and determining hash values of corresponding query tasks according to a sliding window with a preset length;
and the hash value processing unit is used for determining a target load unit corresponding to each inquiry task according to the hash value corresponding to each inquiry task.
The task execution module 430 includes:
an execution thread construction unit, configured to construct a plurality of task execution threads through each of the target load units, and execute each of the query tasks according to a sliding window of a preset length by using the plurality of task execution threads;
the frequency counting unit is used for acquiring the query tasks corresponding to the target load units and counting the occurrence frequency corresponding to the query tasks;
the boundary data determining unit is used for determining boundary data corresponding to each target load unit according to the occurrence times corresponding to each query task and transmitting the boundary data to an atomic calculation unit corresponding to an embedded table;
and the boundary data processing unit is used for processing the boundary data through the atomic calculation unit.
The apparatus further comprises:
the execution result sending module is used for sending the execution result of the target task to the initial load unit corresponding to the target task through each target load unit;
and the execution result merging module is used for merging task execution results corresponding to the load units to obtain an embedded table access result matched with the plurality of inquiry tasks, and returning the embedded table access result to a central processing unit CPU corresponding to the embedded table.
The device can execute the method provided by all the embodiments of the invention, and has the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in the embodiments of the present invention can be found in the methods provided in all the foregoing embodiments of the present invention.
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
The processor 11 may be an AI accelerator card, and is configured to concurrently process a plurality of threads. An atomic computation unit may be included in the processor 11.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the embedded table access method.
In some embodiments, the embedded table access method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the embedded table access method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the embedded table access method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (8)

1. An embedded table access method, the method comprising:
acquiring a plurality of inquiry tasks corresponding to the embedded table, determining initial load units corresponding to the inquiry tasks, and distributing the inquiry tasks to the corresponding initial load units;
the embedded table is a virtual storage space constructed by a plurality of AI (advanced technology interface) acceleration cards according to a preset inter-chip interconnection protocol; each AI acceleration card adopts a unified addressing mode to access data;
constructing a plurality of task processing threads through each initial load unit, and determining hash values of corresponding query tasks according to sliding windows with preset lengths by adopting the plurality of task processing threads; determining a target load unit corresponding to each inquiry task according to the hash value corresponding to each inquiry task;
and distributing the query tasks to corresponding target load units, and executing the corresponding query tasks through the target load units to obtain embedded table access results matched with the query tasks.
2. The method of claim 1, wherein determining an initial load unit for each of the query tasks comprises:
acquiring the task number corresponding to the plurality of inquiry tasks and the total number of the general computing units GCU corresponding to the embedded table;
and determining initial load units corresponding to the query tasks according to the task number, the GCU total number and the arrangement order corresponding to the GCUs.
3. The method of claim 1, wherein performing a corresponding query task by each of the target load units comprises:
and constructing a plurality of task execution threads through each target load unit, and executing each inquiry task by adopting the plurality of task execution threads according to a sliding window with a preset length.
4. The method of claim 3, further comprising, prior to constructing a plurality of task execution threads by each of the target load units and employing the plurality of task execution threads to execute each of the query tasks in accordance with a sliding window of a predetermined length:
acquiring inquiry tasks corresponding to the target load units, and counting the occurrence times corresponding to the inquiry tasks;
determining boundary data corresponding to each target load unit according to the occurrence times corresponding to each query task, and transmitting the boundary data to an atomic calculation unit corresponding to an embedded table;
and processing the boundary data through the atomic calculation unit.
5. The method of claim 1, further comprising, after performing a corresponding query task by each of the target load units:
transmitting the target task execution result to an initial load unit corresponding to the target task through each target load unit;
and merging task execution results corresponding to the load units to obtain an embedded table access result matched with a plurality of inquiry tasks, and returning the embedded table access result to a Central Processing Unit (CPU) corresponding to the embedded table.
6. An embedded table access device, the device comprising:
the task acquisition module is used for acquiring a plurality of inquiry tasks corresponding to the embedded table, determining initial load units corresponding to the inquiry tasks and distributing the inquiry tasks to the corresponding initial load units;
the embedded table is a virtual storage space constructed by a plurality of AI (advanced technology interface) acceleration cards according to a preset inter-chip interconnection protocol; each AI acceleration card adopts a unified addressing mode to access data;
the target load determining module is used for constructing a plurality of task processing threads through each initial load unit, and determining hash values of corresponding query tasks according to sliding windows with preset lengths by adopting the plurality of task processing threads; determining a target load unit corresponding to each inquiry task according to the hash value corresponding to each inquiry task;
and the task execution module is used for distributing the query tasks to corresponding target load units, and executing the corresponding query tasks through the target load units to obtain an embedded table access result matched with the query tasks.
7. An electronic device, the device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the embedded table access method of any one of claims 1-5.
8. A computer readable storage medium storing computer instructions for causing a processor to implement the embedded table access method of any one of claims 1-5 when executed.
CN202311345266.5A 2023-10-18 2023-10-18 Embedded table access method and device, electronic equipment and storage medium Active CN117076720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311345266.5A CN117076720B (en) 2023-10-18 2023-10-18 Embedded table access method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311345266.5A CN117076720B (en) 2023-10-18 2023-10-18 Embedded table access method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117076720A CN117076720A (en) 2023-11-17
CN117076720B true CN117076720B (en) 2024-02-02

Family

ID=88704767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311345266.5A Active CN117076720B (en) 2023-10-18 2023-10-18 Embedded table access method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117076720B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825884A (en) * 2019-11-05 2020-02-21 腾讯科技(深圳)有限公司 Embedded representation processing method and device based on artificial intelligence and electronic equipment
CN114428797A (en) * 2021-12-24 2022-05-03 清华大学 Method, device and equipment for caching embedded parameters and storage medium
CN114503130A (en) * 2019-09-27 2022-05-13 维萨国际服务协会 Mapping user vectors between embeddings of machine learning models
CN114936087A (en) * 2021-09-29 2022-08-23 华为技术有限公司 Method, device and system for prefetching embedded vector and related equipment
WO2023080805A1 (en) * 2021-11-03 2023-05-11 Huawei Technologies Co., Ltd. Distributed embedding table with synchronous local buffers
CN116583844A (en) * 2021-01-13 2023-08-11 谷歌有限责任公司 Efficient embedded table storage and lookup
CN116820786A (en) * 2023-08-31 2023-09-29 本原数据(北京)信息技术有限公司 Data access method and device of database, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220172065A1 (en) * 2020-11-30 2022-06-02 Mercari, Inc. Automatic ontology generation by embedding representations
CN116932534A (en) * 2022-04-07 2023-10-24 创鑫智慧股份有限公司 Method for generating embedded table and index concentration method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114503130A (en) * 2019-09-27 2022-05-13 维萨国际服务协会 Mapping user vectors between embeddings of machine learning models
CN110825884A (en) * 2019-11-05 2020-02-21 腾讯科技(深圳)有限公司 Embedded representation processing method and device based on artificial intelligence and electronic equipment
CN116583844A (en) * 2021-01-13 2023-08-11 谷歌有限责任公司 Efficient embedded table storage and lookup
CN114936087A (en) * 2021-09-29 2022-08-23 华为技术有限公司 Method, device and system for prefetching embedded vector and related equipment
WO2023080805A1 (en) * 2021-11-03 2023-05-11 Huawei Technologies Co., Ltd. Distributed embedding table with synchronous local buffers
CN114428797A (en) * 2021-12-24 2022-05-03 清华大学 Method, device and equipment for caching embedded parameters and storage medium
CN116820786A (en) * 2023-08-31 2023-09-29 本原数据(北京)信息技术有限公司 Data access method and device of database, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Embedding Compression with Hashing for Efficient Representation Learning in Large-Scale Graph;Chin-Chia Michael Yeh 等;《arXiv:2208.05648v1 [cs.LG]》;第1-11页 *
语义嵌入重构的跨模态哈希检索;Jisuanji 等;《Application Research of Computers》;第39卷(第6期);第1645-1672页 *

Also Published As

Publication number Publication date
CN117076720A (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN109729106B (en) Method, system and computer program product for processing computing tasks
CN113778644A (en) Task processing method, device, equipment and storage medium
CN117076720B (en) Embedded table access method and device, electronic equipment and storage medium
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN116820500A (en) Cluster mirror image deployment method, device, equipment and storage medium
CN115438007A (en) File merging method and device, electronic equipment and medium
CN116055386B (en) Port weight updating method, device, chip and storage medium
JP7269275B2 (en) CONTENT RECOMMENDATION METHOD, APPARATUS AND DEVICE
CN116579914B (en) Execution method and device of graphic processor engine, electronic equipment and storage medium
CN114610575B (en) Method, apparatus, device and medium for calculating updated peak value of branch
CN113568936B (en) Real-time stream data storage method, device and terminal equipment
CN117194018A (en) Processing method and device of system temperature control algorithm in multi-core and multi-chip environment
CN117632431A (en) Scheduling method, device, equipment and storage medium for cloud computing task
CN116361008A (en) Task balanced distribution method, device, equipment and medium based on electric power Internet of things
CN116610453A (en) Task allocation method and device, electronic equipment and storage medium
CN115587091A (en) Data storage method, device, equipment and storage medium
CN117573267A (en) Application program data display method, system, electronic equipment and storage medium
CN117650967A (en) Multi-cluster index processing method, system, electronic equipment and storage medium
CN117608879A (en) Message queue processing method and device, electronic equipment and storage medium
CN115801718A (en) Message processing method and device, electronic equipment and message processing system
CN117350811A (en) Order processing method, order processing device, electronic equipment and storage medium
CN113220233A (en) Data reading method, device and system
CN113934581A (en) Method and device for acquiring disk fault information of storage system, electronic equipment and medium
CN117933353A (en) Reinforced learning model training method and device, electronic equipment and storage medium
CN115061664A (en) Object conversion method and device, electronic equipment and 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