A vector cooperative management method and device, electronic equipment and storage medium
By employing a vector collaborative management approach and utilizing vector collaborative services and cluster switching technology, the latency problem in vector similarity calculation in e-commerce search and recommendation systems was solved. This enabled efficient resource allocation and flexible management of vector versions, reducing computational latency and avoiding resource waste.
Patent Information
- Application Number
- CN202211517862.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-11-29
AI Technical Summary
In existing e-commerce search and recommendation systems, vector similarity calculation has a long response time and unreasonable resource allocation, resulting in long computation delays and resource waste.
By using a vector collaborative management method, the first user group writes the model vectors into the vector database, and the second user group reads and calls the vector collaborative service to write the vectors into the vector search engine, thereby realizing A/B switching and state collaborative updates of the vector cluster and ensuring that the old and new versions of the vectors coexist.
It reduces computational response time, avoids resource waste, enables vector collaborative management and cross-team collaboration, and supports flexible switching of vector versions.
Smart Images

Figure CN115757967B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, in particular to a vector collaborative management method and device, electronic equipment and storage medium. BACKGROUND
[0002] The core of an e-commerce search recommendation system is to select appropriate goods from a mass of goods library according to the search intention and interest of users and display the goods to the users. Essentially, this process is to calculate the similarity between goods and user intention and interest, find the K goods with the highest similarity and recommend them to the users. In order to efficiently process unstructured goods and user data, various deep learning models are needed to convert the mass of unstructured data into feature vectors and write them into a search engine.
[0003] Compared with the commonly used search engine ElasticSearch, the cosineSimilarity (7.x) of ES is tried to be used to calculate the similarity, but such a way has the following disadvantages:
[0004] 1. The calculation response time is high, and the average delay of top 3K recall of a million goods is about 300ms;
[0005] 2. The maintenance cost of ES index is high, and the vector and other goods data are not separated and put into the same index, which affects the index construction and volume.
[0006] In the process of accelerating the calculation of cosine similarity of ES, although the performance and throughput are greatly improved compared with the previous ones, the delay of 100+ms is still not acceptable for online challenges. At the same time, in the process of business iteration, it is also necessary to ensure the smooth switching of the version, and the new and old versions of the vector need to exist at the same time online. The industry usually uses cluster A / B switching to realize the full data update scheme, and at the same time, A and B clusters will only bear one of the roles of reading and writing. As can be seen, this inevitably causes resource waste. In addition, the vector generation and use process involves multiple project groups, and needs to coordinate the update state notification.
[0007] In summary, how to reduce the calculation response time while reasonably allocating resources to realize vector collaborative management is a problem to be solved at present. SUMMARY
[0008] In order to solve at least one problem mentioned in the background, the present application provides a vector collaborative management method, device, electronic equipment and storage medium, which can reduce the calculation response time and avoid resource waste, and realize vector collaborative management.
[0009] The specific technical solutions provided by the embodiments of the present application are as follows:
[0010] In a first aspect, a vector collaborative management method is provided, comprising:
[0011] A first user group writes model vectors into a vector database, the model vectors including at least one of item vectors and query vectors;
[0012] A second user group reads the vector database, calls a vector collaborative service, and writes item vectors to be written in the vector database into a vector search engine;
[0013] A vector recall platform receives a user request, acquires query vectors in the vector database according to the user request, and calls the vector search engine to recall item vectors corresponding to the query vectors.
[0014] Further, the vector search engine includes Milvus, and the first user group writes model vectors into a vector database, comprising:
[0015] The first user group initializes current vector model information, the vector model information including vector names, vector version numbers, and vector storage modes of the item vectors and / or the query vectors;
[0016] The first user group updates query vectors of the current vector model, calls a vector collaborative service, and sets a first vector state of the query vectors;
[0017] The first user group updates item vectors of the current vector model, calls a vector collaborative service, and sets a second vector state of the item vectors.
[0018] Further, the first vector state includes at least one of prepared and unprepared;
[0019] The second vector state includes at least one of needing to be updated and written and not needing to be updated and written.
[0020] Further, the second user group reads the vector database, calls a vector collaborative service, and writes item vectors to be written in the vector database into a vector search engine, comprising:
[0021] In response to detecting that the first vector state is prepared and the second vector state is needing to be updated and written, the second user group reads the vector database, creates corresponding vector clusters according to vector names and vector version numbers of the current vector model, and writes new and old version vector clusters into the vector search engine Milvus in batches to preheat indexes;
[0022] Calling a vector collaborative service, the third vector state of the item vectors is marked as prepared.
[0023] Further, after the calling vector coordination service marks the third vector state of the item vector as ready, the method further comprises:
[0024] The second user group detects the first vector state of the query vector and the third vector state of the item vector in time, and judges whether the first vector state and the third vector state are both ready;
[0025] If the first vector state and the third vector state are both ready, the second user group switches the current vector model to the new version vector cluster.
[0026] Further, the user request includes a user query keyword and a user portrait, and the vector recall platform receives the user request and acquires the query vector in the vector database according to the user request, and calls the vector search engine to recall the item vector corresponding to the query vector, including:
[0027] The vector recall platform acquires the query vector in the vector database according to the user query keyword and the user portrait;
[0028] The vector recall platform calls the vector search engine to recall the top preset number of item vectors corresponding to the query vector according to the query vector.
[0029] Further, the vector recall platform receives the user request and acquires the query vector in the vector database according to the user request, and calls the vector search engine to recall the item vector corresponding to the query vector, further comprising:
[0030] The vector recall platform calls the vector coordination service to acquire the vector name and the vector version number corresponding to the new version vector cluster;
[0031] The vector recall platform acquires the query vector in the vector database according to the user request, and recalls the top preset number of item vectors corresponding to the query vector according to the query vector, the vector name and the vector version number corresponding to the new version vector cluster.
[0032] In a second aspect, a vector coordination management device is provided, and the device comprises:
[0033] A first writing module is configured to write model vectors into a vector database by a first user group, wherein the model vectors include at least one of an item vector and a query vector.
[0034] a second writing module, configured to read the vector database by a second user group, call a vector collaboration service, and write an item vector to be written in the vector database into a vector search engine;
[0035] a vector recall module, configured to receive a user request by a vector recall platform, obtain a query vector in the vector database according to the user request, and call the vector search engine to recall an item vector corresponding to the query vector.
[0036] In a third aspect, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the vector collaboration management method when executing the computer program.
[0037] In a fourth aspect, a computer readable storage medium is provided, storing computer executable instructions for executing the vector collaboration management method.
[0038] The embodiments of the present application have the following beneficial effects:
[0039] The vector collaboration management method, device, electronic device and storage medium provided by the embodiments of the present application can reduce the calculation response time, avoid resource waste, realize vector collaboration management, realize vector collaboration management by a first user group and a second user group through a vector collaboration service, realize collaborative update state notification through the vector collaboration service, realize a full data update scheme through vector cluster switching, and ensure that a new version and an old version of a vector exist simultaneously online, so as to realize flexible switching of vector version cross-team collaborative vector management based on a vector search engine. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0041] Figure 1 a total flowchart of the vector collaboration management method provided by the embodiments of the present application is shown;
[0042] Figure 2 a specific flowchart of the vector collaboration management method according to an embodiment of the present application is shown;
[0043] Figure 3 a structure schematic diagram of the vector collaboration management device provided by the embodiments of the present application is shown;
[0044] Figure 4An example system that can be used to implement various embodiments described herein is shown. DETAILED DESCRIPTION
[0045] For the purpose of clarity, technical solutions in the embodiments of the present application will be described below in a clear and complete manner with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0046] It should be understood that, in the description of the present application, unless the context clearly requires otherwise, the terms "comprise", "comprise", and the like in the entire specification and claims should be interpreted as inclusive meaning rather than exclusive or exhaustive meaning; that is, as "including but not limited to".
[0047] It should also be understood that the terms "first", "second" and the like are used only for descriptive purposes and should not be construed as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise stated, the meaning of "multiple" is two or more.
[0048] Embodiment one
[0049] The present application provides a vector collaborative management method, referring to Figure 1 , comprising:
[0050] S1, the first user group writes the model vector into the vector database, the model vector includes at least one of item vector and query vector;
[0051] S2, the second user group reads the vector database, calls the vector collaborative service, and writes the item vector to be written in the vector database into the vector search engine;
[0052] S3, the vector recall platform receives user request, and acquires the query vector in the vector database according to the user request, calls the vector search engine to recall the item vector corresponding to the query vector.
[0053] Specifically, the vector database can be a MySQL or Redis database, the first user group can be an algorithm team, and the second user group can be an engineering team. The model vector is mainly a feature vector generated by a neural network model, which can be an item vector or a query vector. For example, the item vector can be used to describe the attributes or characteristics of a commodity, such as the name, picture, and price of the commodity, etc.; the query vector is mainly generated by the user index query keyword, which is used to match or hit the item vector, and is used to retrieve the matching commodity item vector in the vector database. First, the algorithm team is responsible for normalizing the item vector generated by the neural network model and writing it into, for example, a MySQL database, and the engineering team synchronously reads the item vector in the MySQL database and writes it into the Milvus vector search engine platform for the recall platform to obtain the query vector according to the user's retrieval query word, so as to call the Milvus vector search engine to recall the topK item vector. Compared with the single-machine Faiss commonly used in the industry, the Milvus vector search engine has many advantages, such as supporting distribution, multi-language support, and read-write separation, etc. However, in the process of business iteration, in order to ensure smooth switching, the online needs to ensure that the new and old versions of the vector exist at the same time. Milvus does not support alias switching similar to ElasticSearch index. By reading the vector database through the second user group and calling the vector collaboration service, the full data update scheme can be realized by using the A / B switching of the cluster, and the vector generation and use process involves multiple project groups, which can realize the collaborative update state notification through the vector collaboration service, so as to realize the cross-team collaborative vector management based on the vector search engine to flexibly switch the vector version.
[0054] The following will be further described in combination with Figure 2
[0055] In some embodiments, the vector search engine includes Milvus, based on which, S1 includes:
[0056] S11, the first user group initializes the current vector model information, and the vector model information includes the vector name, vector version number, and vector storage mode of the item vector and / or query vector;
[0057] S12, the first user group updates the query vector of the current vector model, calls the vector collaboration service, and sets the first vector state of the query vector;
[0058] S13, the first user group updates the item vector of the current vector model, calls the vector collaboration service, and sets the second vector state of the item vector.
[0059] For example, when updating the vector model version and performing a write process, the algorithm team (first user group) writes the model vectors (query vector, item vector) of the current vector model. The vector model information written for the current vector model includes the vector name, vector version number, and vector storage method. For example, the vector name of the current vector model is m110_128_dssm, the vector version number is v1, and the item vector is stored in Redis. The vector version number can specifically include the model version and the current version. If a new version exists, the version number of the new version will also be displayed / described. The vector model information also includes the dimensions of the vectors. Then, the algorithm team updates the query vector and writes it to the vector database (e.g., a Redis database). At the same time, it calls the vector coordination service to set the first vector state of the query vector to ready (i.e., prepared). Subsequently, the algorithm team updates the item vector, writes the item vector to the MySQL / Redis vector database, calls the vector coordination service, and sets the second vector state of the item vector to needreload, i.e., it needs to be updated and written, so that the engineering team (second user group) can perform subsequent read and write operations based on the first and second vector states of the current vector model.
[0060] In some implementations, the first vector state includes at least one of "ready" and "not ready"; the second vector state includes at least one of "required update write" and "not required update write".
[0061] For example, refer to Figure 2 When the algorithm team (i.e., the first user group) updates the item vector and calls the vector coordination service, it calls the needReload interface to update the vector version number and reload status, which is the second vector status mentioned above. When the algorithm team updates the query vector, it inserts the updated query vector with the version number into the specified database (e.g., Redis database) and calls the vector coordination service to call the queryReady interface to update the queryReady status, which is the first vector status mentioned above.
[0062] In some implementations, based on this, S2 includes:
[0063] S21. In response to detecting that the first vector state is ready and the second vector state is to be updated and written, the second user group reads the vector database, creates the corresponding vector cluster according to the vector name and vector version number of the current vector model, and writes the new and old version vector clusters into the vector search engine Milvus in batches to preheat the index.
[0064] S22. Call the vector collaboration service to mark the third vector status of the item vector as ready.
[0065] Exemplarily, the engineering team (i.e., the second user group) performs an update item vector job, and every first preset time (for example, 30 minutes), the vector collaborative service interface is called to obtain the vector list that needs to be updated and written by calling the getNeedReloadVectors interface, that is, the second vector state described above is the item vector that needs to be updated and written, and if the second vector state is not needed to be updated and written, no update operation is needed. Then the vector table is scanned, the new vector cluster corresponding to the vector name and the vector version number of the current vector model is created, for example, collectionB, the new vector cluster is written into the vector search engine Milvus, and the index is indexed in advance for preheating, then the vector collaborative service is called, the itemReady interface is called to update the third vector state of the item vector, and is marked as ready, ready, for subsequent switching of the vector version identification.
[0066] In some embodiments, after S22, the method further comprises:
[0067] S23, the second user group detects the first vector state of the query vector and the third vector state of the item vector in time, and judges whether the first vector state and the third vector state are both ready;
[0068] S24, if the first vector state and the third vector state are both ready, the second user group switches the current vector model to the new version vector cluster.
[0069] Exemplarily, the engineering team (second user group) checks the first vector state of the query vector and the third vector state of the item vector every second preset time, judges whether the states are both ready, and if so, switches the current vector model to the new version and updates the state to switched. In particular, the vector information cache is also updated in time, and the ready vectors are obtained by calling the getReadyVectors interface to update the local cache. For example, the version of the vector model named m109_128_dssm being used is v0, after the first vector state of the query vector and the third vector state of the item vector are both ready, the engineering team detects the ready and performs version switching to switch to the new version v1.
[0070] In some embodiments, the user request includes a user query keyword and a user portrait, based on which S3 includes:
[0071] S31, the vector recall platform obtains the query vector in the vector database according to the user query keyword and the user portrait;
[0072] S32, the vector recall platform calls the vector search engine to recall the top preset number of item vectors corresponding to the query vector according to the query vector.
[0073] Specifically, the vector recall platform receives the implementation request of the user, performs the read process, and recalls the topK (i.e., the top preset number, which can also be adjusted according to the actual business scenario, for example, top3K) item vectors according to the query vector of the user query word and the user portrait.
[0074] In some embodiments, S3 further comprises:
[0075] S33, the vector recall platform calls the vector collaboration service to obtain the vector name and the vector version number corresponding to the new version vector cluster;
[0076] S34, the vector recall platform obtains the query vector in the vector database according to the user request, and recalls the top preset number of item vectors corresponding to the query vector, the vector name corresponding to the new version vector cluster, and the vector version number.
[0077] Specifically, after the vector model is updated, in the read process, the vector recall platform also calls the vector collaboration service to obtain the vector name and the new version number of the vector model that has been successfully switched. And according to the query word, the query vector in Redis is obtained, and according to the vector name, the new version number and the query vector, the topK (i.e., the top preset number) item vectors are recalled by calling the Milvus through the recall platform.
[0078] In this embodiment, the first user group and the second user group can realize vector collaborative management through the vector collaboration service, the collaborative update state notification can be realized through the vector collaboration service, the full data update scheme can be realized through the vector cluster switching, and the existence of the new and old versions of the vector is ensured online, so that the cross-team collaborative vector management of flexible switching of the vector version based on the vector search engine can be realized.
[0079] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not particularly indicate the order or sequence, nor limit the present application. They are only used to facilitate the description of the method of the present application, and cannot be understood as indicating the sequence of the steps. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the realization of the person skilled in the art. When the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor is it within the scope of protection required by the present application.
[0080] Embodiment two
[0081] Corresponding to the above-mentioned embodiments, the application also provides a vector collaborative management device, referring to Figure 3 , the device comprises a first writing module, a second writing module and a vector recall module.
[0082] Among them, the first writing module is used for the first user group to write the model vector into the vector database, and the model vector includes at least one of item vector and query vector; the second writing module is used for the second user group to read the vector database, call vector collaborative service, and write the item vector to be written in the vector database into the vector search engine; the vector recall module is used for the vector recall platform to receive user request, and according to the user request, the query vector in the vector database is obtained, and the vector search engine is called to recall the item vector corresponding to the query vector.
[0083] Further, the vector search engine includes Milvus, based on which, the first writing module is further used for the first user group to initialize the current vector model information, and the vector model information includes the vector name, vector version number and vector storage mode of the item vector and / or the query vector; and for the first user group to update the query vector of the current vector model, call vector collaborative service, and set the first vector state of the query vector; and for the first user group to update the item vector of the current vector model, call vector collaborative service, and set the second vector state of the item vector.
[0084] Further, the first vector state includes at least one of prepared and unprepared; and the second vector state includes at least one of needing to update and write and not needing to update and write.
[0085] Further, the second writing module is further used for, in response to detecting that the first vector state is prepared and the second vector state is needing to update and write, the second user group to read the vector database, create corresponding vector cluster according to the vector name and vector version number of the current vector model, and write the new and old version vector cluster into the vector search engine Milvus in batches, and preheat the index in advance; and for calling vector collaborative service, marking the third vector state of the item vector as prepared.
[0086] Further, the second writing module is further configured to detect a first vector state of the query vector and a third vector state of the item vector in a timing manner, and determine whether the first vector state and the third vector state are both ready; and if the first vector state and the third vector state are both ready, the second user group switches the current vector model to a new version vector cluster.
[0087] Further, the user request includes a user query keyword and a user portrait, based on which, the vector retrieval module is further configured to acquire a query vector in the vector database according to the user query keyword and the user portrait by a vector retrieval platform; and configured to call the vector search engine to retrieve a top preset number of item vectors corresponding to the query vector according to the query vector by the vector retrieval platform.
[0088] Further, the vector retrieval module is further configured to call a vector collaboration service by the vector retrieval platform to acquire a vector name and a vector version number corresponding to the new version vector cluster; and configured to acquire a query vector in the vector database according to the user request, and call the vector search engine to retrieve a top preset number of item vectors corresponding to the query vector according to the query vector, the vector name and the vector version number corresponding to the new version vector cluster.
[0089] The specific limitations of the vector collaboration management apparatus can refer to the related limitations of the vector collaboration management method embodiments in the above, and thus will not be repeated here. Each module in the above vector collaboration management apparatus can be realized by software, hardware and combinations thereof in whole or in part. The above each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0090] Embodiment three
[0091] Corresponding to the above embodiments, the present application also provides an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor can implement the above vector collaboration management method when executing the program.
[0092] As Figure 4In some embodiments, the system can be used as the electronic device described above for the vector collaboration management method of any of the embodiments shown. In some embodiments, the system can include one or more computer-readable media (e.g., system memory or NVM / storage) having instructions and one or more processors (e.g., processor(s)) coupled with the one or more computer-readable media and configured to execute the instructions to implement modules to perform the actions described in this application.
[0093] For one embodiment, the system control module can include any suitable interface controllers to provide any suitable interface to at least one of the processor(s) and / or any suitable device or component in communication with the system control module.
[0094] The system control module can include a memory controller module to provide an interface to system memory. The memory controller module can be a hardware module, a software module, and / or a firmware module.
[0095] The system memory can be used, for example, to load and store data and / or instructions for the system. For one embodiment, the system memory can include any suitable volatile memory, such as suitable DRAM. In some embodiments, the system memory can include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0096] For one embodiment, the system control module can include one or more input / output (I / O) controller(s) to provide an interface to the NVM / storage and the communication interface(s).
[0097] The NVM / storage can be used, for example, to store data and / or instructions. The NVM / storage can include any suitable non-volatile memory (e.g., flash memory) and / or can include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0098] The NVM / storage can include a storage resource that is physically part of the device on which the system is installed, or it can be accessed by the device without being a part of the device. For example, the NVM / storage can be accessed over a network via the communication interface(s).
[0099] The communication interface(s) can provide an interface to the system to communicate over one or more networks and / or with any other suitable device. The system can wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols.
[0100] For one embodiment, at least one of the processor(s) can be packaged together with logic for one or more controller(s) of the system control module (e.g., a memory controller module). For one embodiment, at least one of the processor(s) can be packaged together with logic for one or more controller(s) of the system control module to form a system in a package (SiP). For one embodiment, at least one of the processor(s) can be fabricated together with logic for one or more controller(s) of the system control module on the same die. For one embodiment, at least one of the processor(s) can be fabricated together with logic for one or more controller(s) of the system control module on the same die to form a system on a chip (SoC).
[0101] In various embodiments, the system can be, but is not limited to, a server, a workstation, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.). In various embodiments, the system can have more or less components, and / or different architectures. For example, in some embodiments, the system includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including touch screen displays), nonvolatile memory ports, multiple antennas, a graphics chip, an application specific integrated circuit (ASIC), and speakers.
[0102] It is noted that the present application can be implemented in software and / or in a combination of software and hardware, e.g., application specific integrated circuit (ASIC), general purpose computer or any other similar hardware devices. In one embodiment, the software program of the present application is implemented by the processor so as to perform the steps or functions described above. Also, the software program of the present application (including related data structures) can be stored in a computer readable recording medium, e.g., RAM memory, magnetic or optical drive or diskette, and the like. Additionally, some of the steps or functions can be implemented in hardware, e.g., as circuitry which is cooperated with the processor in order to perform the various steps or functions.
[0103] In addition, part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present application can be called or provided. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source file, executable file, installation package file and the like, and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0104] Communication media includes media that facilitates the transfer of a computer program from one place to another. A carrier wave can carry both data and instructions proprietary to that sequence, software and data generated in the course of executing a program in a computer, or a digital representation construct for a sequence of instructions encoded on a computer readable medium. Here again, computer readable media can take many forms, as desired based on the particular context of use or mode of delivery chosen for the computer program product. For example, computer readable media includes permanent, non-removable media such as processor readable media that are included in a personal computer for the execution of a computer program. Such processor readable media can be magnetic disks, optical disks, USB drives, and others as appropriate. Further, computer readable media includes portable media for transfer between computers. Exemplary portable media include floppy disks, flash memory cards, digital video tape, cassette tapes or the like, which are offered as suitable media, and which are either in suitable media or as appropriate to the context of the use or mode of delivery chosen for the computer program product. Also, computer readable media includes transmission media which embody computer program data, such as coupled conductors, fibers, and / or waves that carry signals encoding computer programs, such as carrier waves interfacing networks adapted to provide such computer program media. Clearly, computer readable media includes data that can be immediately accessed by the processing system as well as data that is initially stored in remote storage for a subsequent retrieval and / or processing.
[0105] Here, according to one embodiment of the present application includes a device, the device includes a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to run the method and / or technical solutions based on the foregoing according to the plurality of embodiments of the present application.
[0106] Embodiment four
[0107] Corresponding to the above-mentioned embodiments, the present application also provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used to execute the vector cooperative management method.
[0108] In this embodiment, computer readable storage media can include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. For example, computer readable storage media includes, but is not limited to, volatile memory such as random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM); and non-volatile memory such as flash memory, various read-only memories (ROM, PROM, EPROM, EEPROM), magnetic and ferromagnetic / ferroelectric memories (MRAM, FeRAM), and magnetic and optical storage devices (hard disk, tape, CD, DVD); or other now known or future developed memory devices that store computer readable information / data for use by a computer system.
[0109] Although preferred embodiments in the application have been described, those skilled in the art will recognize modifications and variations which fall within the scope of the application. Accordingly, the appended claims are intended to encompass all such modifications and variations as falling within the scope of the application.
[0110] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A method for vector collaboration management, the method comprising: The method comprises the following steps: A first user group writes model vectors into a vector database, the model vectors comprising at least one of item vectors and query vectors; A second user group reads the vector database, calls a vector collaboration service, and writes item vectors to be written in the vector database into a vector search engine, the vector search engine comprising Milvus; A vector recall platform receives a user request, and acquires query vectors in the vector database according to the user request, and calls the vector search engine to recall item vectors corresponding to the query vectors; The first user group writes model vectors into a vector database, comprising the following steps: The first user group initializes current vector model information, the vector model information comprising vector names, vector version numbers and vector storage modes of the item vectors and / or the query vectors; The first user group updates query vectors of the current vector model, calls the vector collaboration service, and sets a first vector state of the query vectors, the first vector state comprising at least one of prepared and unprepared; The first user group updates item vectors of the current vector model, calls the vector collaboration service, and sets a second vector state of the item vectors, the second vector state comprising at least one of needing to update and write and not needing to update and write; The second user group reads the vector database, calls the vector collaboration service, and writes item vectors to be written in the vector database into the vector search engine, comprising the following steps: In response to detecting that the first vector state is prepared and the second vector state is needing to update and write, the second user group reads the vector database, creates corresponding vector clusters according to vector names and vector version numbers of the current vector model, and writes new and old version vector clusters into the vector search engine Milvus in batches, and preheats indexes in advance; The vector collaboration service is called to mark a third vector state of the item vectors as prepared.
2. The vector co-management method of claim 1, wherein, After the vector collaboration service is called to mark the third vector state of the item vectors as prepared, the method further comprises the following steps: The second user group detects the first vector state of the query vectors and the third vector state of the item vectors at a time, and judges whether the first vector state and the third vector state are both prepared; If the first vector state and the third vector state are both prepared, the second user group switches the current vector model to a new version vector cluster.
3. The method of claim 1, wherein, The user request comprises user query keywords and user portraits, the vector recall platform receives a user request, and acquires query vectors in the vector database according to the user request, and calls the vector search engine to recall item vectors corresponding to the query vectors, comprising the following steps: The vector recall platform acquires query vectors in the vector database according to the user query keywords and user portraits; The vector recall platform calls the vector search engine to recall the top preset number of item vectors corresponding to the query vector according to the query vector.
4. The vector co-management method of claim 2, wherein, The vector recall platform receives a user request, and acquires a query vector in the vector database according to the user request, calls the vector search engine to recall item vectors corresponding to the query vector, and further includes: The vector recall platform calls the vector collaboration service to acquire a vector name and a vector version number corresponding to the new version vector cluster; The vector recall platform acquires a query vector in the vector database according to the user request, and recalls the top preset number of item vectors corresponding to the query vector according to the query vector, the vector name and the vector version number corresponding to the new version vector cluster.
5. A vector coordination management apparatus for implementing the vector coordination management method according to any one of claims 1 to 4, characterized by, The apparatus includes: A first writing module is configured to write model vectors into a vector database by a first user group, wherein the model vectors include at least one of item vectors and query vectors; A second writing module is configured to read the vector database by a second user group, call a vector collaboration service, and write item vectors to be written in the vector database into a vector search engine; A vector recall module is configured to receive a user request by a vector recall platform, acquire a query vector in the vector database according to the user request, and call the vector search engine to recall item vectors corresponding to the query vector.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the vector collaboration management method in any one of claims 1 to 4.
7. A computer-readable storage medium storing computer-executable instructions, characterized in that, The computer executable instructions are used to execute the vector collaboration management method in any one of claims 1 to 4.
Citation Information
Patent Citations
Personalized search method and device, computer equipment and storage medium
CN114579843A