CN-122019468-A - Query method and device based on archive resume
Abstract
The application discloses a query method and device based on archive resume, which comprises the steps of migrating resume data of enterprise tenants in a target recruitment period to an archive database associated with the enterprise tenants, extracting a current archive identifier, storing the current archive identifier into a thread local variable of a current thread, intercepting data access operation through a section interceptor when operation related to the resume data is executed through a service interface, acquiring the current archive identifier from the thread local variable when the data access operation relates to cache query, combining the current archive identifier with an original cache key generated in service logic to obtain a new cache key, accessing the cache by using the new cache key, acquiring the current archive identifier from the thread local variable when the data access operation relates to database query, searching archive database connection information based on the current archive identifier, and executing query on the archive database. The application can ensure service continuity and improve the historical data query efficiency.
Inventors
- REN LIJIAN
- HU GUO
Assignees
- 前锦网络信息技术(上海)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251218
Claims (10)
- 1. An archive resume-based query method, the method comprising: In response to receiving an archiving instruction for a target recruitment period, creating a dedicated archiving database for an enterprise tenant that issues the archiving instruction, and migrating resume data of the enterprise tenant in the target recruitment period from a main service database to an archiving database associated with the enterprise tenant, wherein the dedicated archiving database is only used for storing resume data of the enterprise tenant in the target recruitment period; When a query request of a client for an archived resume is received, extracting an archive identifier from an HTTP request header of the query request to obtain a current archive identifier, wherein the archive identifier is used for identifying an archive database; Storing the current archive identification into a thread local variable of a current thread; intercepting data access operation by a section interceptor when executing operation related to resume data by a service interface; When the data access operation involves cache inquiry, acquiring the current archiving identification from the thread local variable, combining the current archiving identification with an original cache key generated in service logic to acquire a new cache key corresponding to the current archiving identification, and accessing a cache by using the new cache key to acquire corresponding resume data from the cache; When the data access operation involves database query, acquiring the current archive identification from the thread local variable, searching corresponding archive database connection information based on the current archive identification, and executing query on the archive database based on the searched archive database connection information to acquire resume data from the archive database; And returning the acquired resume data to the client.
- 2. The method of claim 1, further comprising, after migrating resume data for an enterprise tenant within the target recruitment period from a main service database to an archive database associated with the enterprise tenant: And migrating index data of resume searches of the enterprise tenants in the target recruitment period from a main service search engine to an archive search engine created for the enterprise tenants.
- 3. The method of claim 1, wherein the archive identification comprises a combination of an enterprise tenant identification and a recruitment period identification, or wherein the archive identification is a unique key mapped to an archive database of a particular enterprise tenant at a particular recruitment period.
- 4. The method of claim 1, wherein saving the current archive identification to a thread local variable of a current thread comprises: when the query request is intercepted by the section interceptor, before executing the business logic of the business interface, the extracted current archiving identification is stored into a thread local variable bound with the current request thread; the method further comprises the steps of: And after the service interface is executed, executing post-processing through the section interceptor, and clearing the current archiving identification stored in the thread local variable.
- 5. The method of claim 1, wherein combining the current archive identification with an original cache key generated in business logic results in a new cache key corresponding to the current archive identification, comprising: and adding the current archive identification to the head or tail of the original cache key in a character string splicing mode to generate a new cache key containing the name space isolation information.
- 6. The method of claim 1 or 5, wherein accessing a cache using the new cache key to obtain resume data from the cache comprises: querying a distributed key value storage database by using the new cache key; If the query hits, directly returning the cache data in the distributed key value storage database as resume data; And if the query is not hit, triggering the database query operation to be executed.
- 7. The method of claim 1, wherein looking up corresponding archive database connection information based on the current archive identification comprises: Inquiring preset configuration information according to the current filing identification, wherein the configuration information is used for recording mapping relations between different filing identifications, network connection addresses of corresponding filing databases and authentication information; and acquiring target connection information matched with the current archiving identification according to the mapping relation, and establishing connection with a corresponding archiving database based on the target connection information.
- 8. The method of claim 1, wherein intercepting, by a cut plane interceptor, data access operations of a business interface when performing operations related to resume data through the business interface, comprises: And uniformly intercepting the calling operation of the cache component and the calling operation of the database access component in the execution process of the service interface through the interceptor facing to the tangent plane programming.
- 9. The method of claim 1, wherein returning the obtained resume data to the client comprises: and returning the obtained resume data through the service interface and the section interceptor so as to display the resume data in a historical talent library list area of an enterprise tenant interface of the client.
- 10. An electronic device comprising a processor and a memory storing computer program instructions, the electronic device implementing the method of any one of claims 1-9 when executing the computer program instructions.
Description
Query method and device based on archive resume Technical Field The application relates to the technical field of Internet, in particular to the technical field of Internet information service, and particularly relates to a query method, device, system, medium and product based on archive resume. Background In the field of campus recruitment, enterprises or organizations (hereinafter referred to as "enterprise tenants") can perform recruitment activities for specific recruiting periods such as autumn recruitment and spring recruitment every year, and thus accumulate a large amount of recruiter resume data. The resume data of the historical recruitment period is archived and stored for a long time for the purposes of data retention, audit checking or future talent library mining, but not deleted immediately after the recruitment period is finished, so that the method has remarkable commercial and compliance values. The effective resume data archiving scheme can ensure that enterprises can quickly trace and examine past recruitment information when needed, and simultaneously avoid continuous burden of massive historical data on the performance of the recruitment system in operation, so that the method is an important technical link for supporting the asset management of enterprise recruitment business data. At present, a common resume data archiving scheme mostly adopts a strategy of timing batch processing and physical isolation. In particular, the system typically archives enterprise tenant data identified as "to be archived" at a fixed point in time each year, such as prior to a new round of campus recruitment initiation. This process typically involves first creating a new business account number and corresponding new database for the enterprise tenant that needs to be enabled for the new recruitment period, reconfiguring its business process and field definitions, secondly migrating the resume data for the previous period of the enterprise tenant from its currently used main business database to an independent, centralized, historical archive database within a preset shutdown maintenance window, and finally stopping or limiting access to the old business account number. The centralized archive may store historical data for a number of different enterprise tenants. Moreover, after resume data is migrated to the centralized archiving warehouse, the resume data is logically stripped from the original business system, when enterprise tenants need to inquire, export or audit the history duration, the history duration cannot be directly and transparently operated through the original business interface, and the complex manual data extraction and recovery flow must be executed by a database manager, the process is complicated, the inquiry efficiency is lower, and the inquiry business requirement cannot be effectively met. Disclosure of Invention In view of the above, the embodiments of the present application provide a query method, device, system, medium and product based on archive resume, which can solve at least one of the above technical problems. According to the method, in response to receiving an archive instruction for a target recruitment period, a special archive database is created for an enterprise tenant sending the archive instruction, resume data of the enterprise tenant in the target recruitment period is migrated from the main service database to an archive database associated with the enterprise tenant, the special archive database is only used for storing resume data of the enterprise tenant in the target recruitment period, archive identifiers are extracted from HTTP request heads of the archive request when a client side inquires about the archive periods to obtain current archive identifiers, the archive identifiers are used for identifying the archive database, the current archive identifiers are stored in thread local variables of a current thread, when operations related to the resume data are executed through a service interface, the current archive identifiers are acquired from the thread local variables when the data access operations relate to cache inquiry, the current archive identifiers are combined with original cache keys generated in service logic, new keys corresponding to the current archive identifiers are obtained, the new archive identifiers are used in the corresponding cache keys, the corresponding archive identifiers are acquired from the corresponding cache keys, and the archive database is searched for the archive database based on the corresponding cache access data access operation, and the archive data is searched for the current thread local variables. In a second aspect, the embodiment of the application provides an archive resume-based query device, which comprises a data migration module, an interception module, a first query module, a second query module, a current archive identification and a storage module, wherein the data migration module is used for res