Data synchronization method and device, electronic equipment and storage medium
Through the version management of feature database and job feature generation model, the duplicate processing problem during job information update is solved, data synchronization efficiency and processing speed are improved, and timely update of recruitment information and data flexibility are ensured.
Patent Information
- Application Number
- CN202410912392.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-09
AI Technical Summary
When recruitment information is updated, multiple data sources cause repeated processing of job information, which reduces data processing speed and update efficiency, and affects recruitment progress.
Through the version management of feature database and job feature generation model, the target model is determined, repeated calls are reduced, and job information is efficiently parsed and stored, and data synchronization efficiency is improved.
It improves data processing efficiency, reduces the waste of computing resources, ensures timely updates of job information, meets the data needs of different consumers, and improves business flexibility and scalability.
Smart Images

Figure CN118885535A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data synchronization method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of the Internet, the application scenarios of solving work and life problems through online services are becoming more and more extensive. For example, recruitment service providers can provide recruiters with a portal for publishing recruitment information, and by analyzing and promoting the job information included in the recruitment information, they can improve the matching degree between applicants and recruitment needs.
[0003] However, as the scale of enterprises involved in recruitment and the complexity of enterprise branches increase, as well as the recruitment information collection services provided by recruitment websites become more and more sophisticated, the database storing job information receives job information updates from multiple data sources. Faced with a large amount of job information update data, there may be multiple data with the same processing logic. As a result, job information will be processed repeatedly, which will not only cause computational waste, but also reduce the data processing speed, resulting in the inability to update job information to downstream data segments in a timely manner, affecting the recruitment progress of the recruiter. Summary of the invention
[0004] In view of this, embodiments of the present application provide a data synchronization method, device, electronic device and storage medium to improve the synchronization efficiency of recruitment information.
[0005] The present application provides a data synchronization method, including:
[0006] Acquire position information, the position information including a first position identifier and first position description information corresponding to the first position identifier, the first position description information including first field data corresponding to a preset field;
[0007] Determine a first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, wherein the historical position information includes the historical position identifier and the historical position description information corresponding to the historical position identifier;
[0008] Calling the first target model, and parsing the first field data in the first position description information through the first target model to obtain target position characteristic information corresponding to the first position description information;
[0009] Corresponding to the first position identifier, the first position description information and the target position feature information are stored in a feature database, so as to provide consumption data to a data consumer through the feature database.
[0010] Optionally, according to the method of the embodiment of the present application, the number of the first target model is at least one, and the target position feature information includes at least one position feature;
[0011] Calling the first target model and parsing the first field data in the first job description information through the first target model to obtain target job feature information corresponding to the first job description information includes:
[0012] determining the preset fields required for each first target model;
[0013] Corresponding to each first target model, first field data corresponding to the required preset field is input into the first target model, and position characteristics are output through the first target model;
[0014] The job characteristics output by each first target model are obtained to obtain target job characteristic information corresponding to the first job description information.
[0015] Optionally, according to the method of the embodiment of the present application, determining the first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, includes:
[0016] Iterate through each historical job ID in the feature database;
[0017] In the case where the feature database does not record the first position identifier, determining a model version of each position feature generation model in the model library;
[0018] The job feature generation model of each latest version is determined as the first target model.
[0019] Optionally, according to the method of the embodiment of the present application, the number of position feature generation models corresponding to each historical position identification is at least one;
[0020] Determining the first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, further comprising:
[0021] In the case where the first position identifier is recorded in the feature database, determining the latest version and the first model version of each first position feature generation model according to the version update data, wherein the first position feature generation model of the first model version is used to parse the historical position description information corresponding to the first position identifier;
[0022] When the first model version is different from the latest version, the first job feature generation model is determined as the first target model.
[0023] Optionally, according to the method of the embodiment of the present application, the historical position description information corresponding to the first position identifier includes second field data corresponding to a preset field;
[0024] Determining the first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, further comprising:
[0025] In the case where the first position identifier is recorded in the feature database and the first model version of the first position feature generation model is the latest version, determining first field data and second field data of each preset field required for the first position feature generation model;
[0026] When the first field data and the second field data of the preset field required by the first position feature generation model are inconsistent, the first position feature generation model is determined as the first target model.
[0027] Optionally, according to the method of the embodiment of the present application, the method further includes:
[0028] Obtaining first field data of a preset field required for a first position feature generation model from the first position description information, and performing a hash calculation on the first field data to obtain a first hash value;
[0029] Obtaining second field data of a preset field required for the first position feature generation model from the historical position information, and performing hash calculation on the second field data to obtain a second hash value;
[0030] When the first hash value is inconsistent with the second hash value, it is determined that the first field data and the second field data of the preset field required for the first position feature generation model are inconsistent.
[0031] Optionally, according to the method of the embodiment of the present application, before storing the first position description information and the target position feature information in the feature database corresponding to the first position identifier, the method further includes:
[0032] When the first field data and the second field data of the preset field required for the first position feature generation model are consistent, the position feature information corresponding to the historical position description information of the first position identifier is determined as the target position feature information corresponding to the first position description information.
[0033] Optionally, according to the method of the embodiment of the present application, the method further includes:
[0034] receiving a model version update notification, the update notification including a model update time of the second target model in the model library;
[0035] Acquire the latest job description information corresponding to each second job identifier in the feature database, wherein the latest job description information corresponding to the second job identifier is stored in the feature database earlier than the model update time of the second target model;
[0036] Calling the latest version of the second target model in the model library, and parsing the latest job description information corresponding to each second job identifier through the latest version of the second target model to obtain the second job feature information corresponding to each second job identifier;
[0037] Corresponding to each second position identifier, the second position feature information and the model update time of each second target model are stored in the feature database.
[0038] Optionally, according to the method of the embodiment of the present application, the method further includes:
[0039] In response to the feature database storing the first position description information corresponding to the first position identifier and the target position feature information, generating a position synchronization record, the position synchronization record including the data synchronization type of the first position identifier;
[0040] The position synchronization record is stored in a preset message queue so that the data consumer can determine whether to read the position synchronization record according to the data synchronization type;
[0041] The position synchronization record also includes the first position description information and the target position characteristic information corresponding to the first position identifier.
[0042] The present application provides a data synchronization device, including:
[0043] An acquisition module, used to acquire position information, the position information including a first position identifier and first position description information corresponding to the first position identifier, the first position description information including first field data corresponding to a preset field;
[0044] A processing module, configured to determine a first target model according to a difference between the position information and the historical position information recorded in the feature database, and version update data of a position feature generation model used by the historical position information, wherein the historical position information includes a historical position identifier and historical position description information corresponding to the historical position identifier;
[0045] The processing module is further used to call the first target model and parse the first field data in the first job description information through the first target model to obtain the target job feature information corresponding to the first job description information;
[0046] The processing module is also used to store the first position description information and the target position feature information into a feature database corresponding to the first position identifier, so as to provide consumption data to the data consumer through the feature database.
[0047] An embodiment of the present application provides an electronic device, which includes a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the steps of the above method are implemented.
[0048] An embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of the method described above are implemented.
[0049] An embodiment of the present application provides a computer program product, wherein the computer program product includes computer program instructions, and when the computer program instructions are executed by a processor, the steps of the method described above are implemented.
[0050] According to the embodiment of the present application, a feature database is provided, and the position information corresponding to different position identifiers is stored with the position identifier as the primary key. When the newly added position information is received, the difference between the position information and the historical position information recorded in the feature database can be determined based on the first position identifier included in the position information, and the version update data of the position feature generation model used in the historical position information can be combined to determine the first target model used to update the feature database, so as to reduce repeated model calls, save computing resources, and improve processing efficiency. In addition, the position feature data and position description information corresponding to each position identifier are stored in the feature database in a standardized manner with the position identifier as the primary key before being sent to downstream consumers. Therefore, by providing consumption data to downstream data consumers through the feature database, the data usage needs of different consumers can be easily met, and the flexibility and scalability of business services can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following briefly introduces the drawings in the embodiments of the present application.
[0052] Figure 1 It is a schematic diagram of the system architecture of an embodiment of the present application.
[0053] Figure 2 It is a flowchart of a data synchronization method according to an embodiment of the present application.
[0054] Figure 3 It is a schematic diagram of the data synchronization processing process of an embodiment of the present application.
[0055] Figure 4 It is a flowchart of another data synchronization method provided in an embodiment of the present application.
[0056] Figure 5 It is a structural block diagram of a data synchronization device according to an embodiment of the present application.
[0057] Figure 6 It is a schematic diagram of an electronic device used to implement the data synchronization method of an embodiment of the present application. DETAILED DESCRIPTION
[0058] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that the purpose of providing these embodiments is to make the principles and spirit of the present application clearer and more thorough, so that those skilled in the art can better understand and implement the principles and spirit of the present application. The exemplary embodiments provided herein are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments herein, all other embodiments obtained by ordinary technicians of the art without creative work are within the scope of protection of this application.
[0059] Embodiments of the present application relate to terminal devices and / or servers. Those skilled in the art will appreciate that the embodiments of the present application may be implemented as a system, apparatus, device, method, computer-readable storage medium, or computer program product. Therefore, the present disclosure may be specifically implemented in at least one of the following forms: complete hardware, complete software, or a combination of hardware and software. According to the embodiments of the present application, the present application claims protection for a data synchronization method, apparatus, electronic device, computer-readable storage medium, and computer program product. Figure 1 A schematic diagram of a system architecture of an embodiment of the present application is shown. Figure 1 As shown, the system includes a terminal device 102 and a server 104. The terminal device 102 may include at least one of the following: a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, various wearable devices, an augmented reality AR device, a virtual reality VR device, and the like. A client may be installed on the terminal device 102. For example, the client may be a client that specifically performs a specific function (such as an application app), or a client that is embedded with a variety of application applets (with different functions), or a client that logs in through a browser. The user may operate on the terminal device 102. For example, the user may open the client installed on the terminal device 102 and input instructions through the client operation, or the user may open the browser installed on the terminal device 102 and input instructions through the browser operation. After the terminal device 102 receives the instruction input by the user, the request information containing the instruction is sent to the server 104.
[0060] For example, a recruiter can access a recruitment service interface such as a website, application, or mini-program for an employer such as an enterprise through the terminal device 102, and use the terminal device 102 to input recruitment information, modify recruitment information, and update the enterprise's operating status and other position-related information in the recruitment service interface.
[0061] After receiving the request information, the server 104 performs corresponding processing, and then returns the processing result information to the terminal device 102. The user instruction is completed through a series of data processing and information interaction. Optionally, in an embodiment of the present application, the data synchronization method can be executed by the server 104, and the server 104 can receive the position-related information entered by the recruiter in the recruitment service interface of the terminal device 102, and extract the position identification and the position description information corresponding to the position identification, and then quickly synchronize the position identification and the position description information corresponding to the position identification to the feature database, so as to provide consumption data to downstream data consumers through the feature database, which can conveniently meet the data usage needs of different consumers and improve the flexibility and scalability of business services.
[0062] In this document, terms such as first, second, third, etc. are only used to distinguish one entity (or operation) from another entity (or operation), but not to require or imply any order or relationship between these entities (or operations).
[0063] The data synchronization method provided in the embodiment of the present application is introduced below in conjunction with specific application scenarios. Figure 2 A flow chart of a data synchronization method according to an embodiment of the present application is shown. The method includes the following steps 201 to 204 .
[0064] Step 201, obtaining position information, the position information including a first position identifier and first position description information corresponding to the first position identifier, the first position description information including first field data corresponding to a preset field;
[0065] Step 202, determining a first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, wherein the historical position information includes the historical position identifier and the historical position description information corresponding to the historical position identifier;
[0066] Step 203, calling the first target model, and parsing the first field data in the first job description information through the first target model to obtain target job feature information corresponding to the first job description information;
[0067] Step 204, corresponding to the first position identifier, the first position description information and the target position feature information are stored in a feature database, so as to provide consumption data to the data consumer through the feature database.
[0068] The above steps are described in detail below in conjunction with specific embodiments, as shown below.
[0069] In relation to the above step 201, the server may obtain the newly added position information by reading a relevant database, parsing a log file, and the like.
[0070] In some embodiments, as the recruitment information collection service provided by the recruitment website becomes more and more sophisticated, the relevant information of the recruiter can be divided into multiple segmented service modules, and the relevant information of the recruiter can be maintained in different modules. Therefore, the position information obtained by the server may come from different service modules. Figure 3 is a schematic diagram of the data synchronization process of the embodiment of the present application, combined with Figure 3 As shown, service modules include: member basic information module, member value-added service information module, company basic information module, company portrait information module, position basic information module, position value-added service information module, position portrait information module, etc.
[0071] For example, each member account may correspond to one or more companies, and each company may include one or more positions, and thus each member account may correspond to one or more positions. When a member account corresponds to multiple companies, the multiple companies may belong to one parent company or to different companies, which is not specifically limited here.
[0072] Exemplarily, each service module can obtain updated data in real time from a database or log file related thereto, and each service module puts the updated data into a message queue in combination with the event time of the updated data. In some optional embodiments, each service module can use the Flank CDC tool to capture updated data and synchronize the updated data to the message queue. Optionally, the message queue can be a Kafka message queue, which is not specifically limited here. Based on this, the server can read the data in the message queue and obtain the newly added position information.
[0073] In order to facilitate the subsequent synchronization process and improve the application convenience of the stored data, the position information can be expanded with the position identifier as the primary key to obtain the position description information, that is, to parse the position information and obtain the field data corresponding to the preset fields. Exemplarily, the preset fields include: position title, salary, education, work experience, work location, etc. The specific preset fields are not listed here one by one. In order to facilitate the introduction of the data synchronization method provided in the embodiment of the present application, the position identifier that needs to be synchronized is described as the first position identifier, and the position description information corresponding to the first position identifier is described as the first position description information.
[0074] As a specific example, with the first position identifier as the primary key, the position description information corresponding to the first position identifier may include: position information: ID: 10001, position name: big data development engineer, salary: 10000, education: Master, work experience: 5 years, major: computer.
[0075] After obtaining the position information, next, involving step 202, the first position description information can be compared with the historical position description information recorded in the feature database based on the first position identifier included in the position information, so as to determine the difference between the first position information and the historical position information recorded in the feature database, and determine the first target model used to update the feature database in combination with the version update data of the position feature generation model used in the historical position information.
[0076] It is understandable that the feature database can be used to store the received historical position information, wherein the historical position information can include a historical position identifier and historical position description information corresponding to the historical position identifier, wherein the event occurrence time corresponding to the historical position information is earlier than the event occurrence time of the first position description information.
[0077] Exemplarily, the case where there is a difference between the position information and the historical position information recorded in the feature database includes but is not limited to: the feature database does not record the position information at all, the feature database records the first position identifier and field data of some or all preset fields in the first position description information, etc. Wherein, the feature database does not record the position information at all, for example, no historical position identifier consistent with the first position identifier can be found in the feature database, etc.
[0078] Optionally, the difference between the position information and the historical position information recorded in the feature database can be found by comparing whether the position identification is consistent and whether the preset fields in the position description information are consistent.
[0079] In some embodiments, the job feature generation model used by the historical job information can be pre-configured in the server or in a third-party service platform. Each job feature model corresponds to a version update data, through which the number of model updates and the latest version of the model can be known. Optionally, the model update data may include but is not limited to the version identifier of the model after each model update, or the update time of each model update.
[0080] The first target model can be determined by combining the difference between the position information and the historical position information recorded in the feature database, as well as the version update data of the position feature generation model used by the historical position information. For example, based on the version update data of the position feature generation model used by the historical position information, it can be determined whether the position feature generation model used by the historical position information has a version update, and in the event of a version update, the latest version of the position feature model is directly determined as the first target model. Based on this, the position feature information generated by the first target model can be sent directly to downstream consumers, and the server and downstream consumers do not need to repeatedly verify whether the position feature information is generated based on the latest version of the feature generation model, effectively saving computing resources.
[0081] In relation to the above step 203, the called first target model may be pre-configured in the server, and may be in a model library accessible to the server. The number of the first target models may be one or more.
[0082] Optionally, when there are multiple first target models, by configuring the position feature generation model in the model library, the position feature models in the feature library can be conveniently called in parallel in an asynchronous manner. Especially when there are a large number of position information to be processed, or a large number of first target models to be called for each position information, calling the models in parallel in an asynchronous manner can effectively save the time of data communication, improve data processing efficiency, and increase the speed of providing synchronous data to downstream consumers.
[0083] In the embodiment of the present application, the number of the first target model is at least one, corresponding to one first job description information, and the target job feature information includes at least one job feature;
[0084] Exemplarily, in the above step 203, the first target model is called, and the first field data in the first position description information is parsed through the first target model to obtain the target position characteristic information corresponding to the first position description information. Specifically, the following steps may be included: determining the preset fields required for each first target model; corresponding to each first target model, inputting the first field data corresponding to the required preset fields into the first target model, and outputting the position characteristics through the first target model; obtaining the position characteristics output by each first target model to obtain the target position characteristic information corresponding to the first position description information.
[0085] As a specific example, the preset fields required by the first target model, such as salary, education, and major, can obtain the field data of the required fields from the first job description information as input information of the first target model. The input information is, for example, 10000, Master, and Computer.
[0086] It can be understood that, when there are multiple first target models, different first target models have different calculation logics. In addition, the preset fields required by different first target models may be different or the same.
[0087] By acquiring the position features output by each first target model, the target position feature information corresponding to the first position description information is obtained, whereby the target position feature information includes at least one position feature.
[0088] According to the embodiment of the present application, by calling the position feature generation model, position feature data can be quickly generated, which is conducive to improving the speed of providing synchronized data to downstream consumers.
[0089] After obtaining the target position characteristic information corresponding to the first position description information, the above step 204 is involved, corresponding to the first position identifier, the first position description information and the target position characteristic information are stored in the characteristic database.
[0090] Since the storage links of each position identification in the feature database, as well as the position description information and position feature information corresponding to each position identification, are clear, the storage efficiency of data and the query efficiency of data can be improved. When accessing the relevant information corresponding to each position identification in the feature database, the feature database can provide the latest stored information corresponding to each position identification by default, and the old related messages will not be queried. Among them, the relevant information includes but is not limited to position description information and position feature information. Optionally, the feature database can choose to use a database based on HBase, based on which, the convenience of providing consumption data to downstream consumers can be further improved.
[0091] Taking the historical position description information corresponding to the first position identifier and the position feature information generated based on the historical position description information recorded in the feature database as an example, after the target position feature information of the first position description information is generated, and the first position description information and the target position feature information corresponding to the first position identifier are stored in the feature database, each time the consumer accesses the feature database and reads the relevant information of the first position identifier, the first position description information and the target position feature information are provided to the consumer characteristics by default.
[0092] According to an embodiment of the present application, by providing a feature database, when newly added position information is received, the difference between the position information and the historical position information recorded in the feature database can be determined based on the first position identifier included in the position information, and the version update data of the position feature generation model used in the historical position information can be combined to determine the first target model used to update the feature database, so as to reduce repeated model calls, save computing resources, and improve processing efficiency.
[0093] Based on this, due to the fast data synchronization speed, any changes in the details of the recruitment-related information can be captured by the server in a timely manner, and the changed information can be used to adjust the position characteristic information of the position identification, so that job seekers can promptly understand the latest developments in the position information, and it is also beneficial for recruiters to match candidates who meet their needs in a timely manner.
[0094] In addition, the job feature data and job description information corresponding to each job ID are stored in a standardized feature database with the job ID as the primary key before being sent to downstream consumers. Therefore, providing consumption data to downstream data consumers through the feature database can easily meet the data usage needs of different consumers and improve the flexibility and scalability of business services.
[0095] In some optional embodiments, in order to further improve the speed of data synchronization and provide effective data to downstream consumers in a timely and accurate manner, the first target model can also be determined in the following way to cope with large amounts of new data and frequent version updates of the position feature generation model.
[0096] In one example, involving the above-mentioned step 203, the first target model is determined based on the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information. Specifically, it can be: traversing each historical position identification in the feature database; when the first position identification is not recorded in the feature database, determining the model version of each position feature generation model in the model library; and determining each latest version of the position feature generation model as the first target model.
[0097] By traversing each historical position identification in the feature database, it can be determined whether the feature database has stored the first position identification. It can be understood that if the feature database does not record the first position identification, it means that the first position identification is a newly added position, and all logical operations need to be performed on the position corresponding to the first position identification in order to obtain comprehensive position feature information.
[0098] The position feature generation models used in historical position information are all configured in the model library. Accordingly, combined with the version update data of the position feature generation models used in historical position information, the model version of each position feature generation model in the model library can be determined, and each latest version of the position feature generation can be determined as the first target model.
[0099] Based on the embodiments of the present application, by using the latest version of the position feature model as a model for parsing the first position description information, the position feature data calculated based on the latest operation logic can be obtained subsequently, which can facilitate consumers to directly use the position feature information. In particular, downstream consumers do not need to repeatedly verify whether the position feature information is generated based on the latest version of the feature generation model, thereby effectively saving computing resources.
[0100] In some embodiments, the number of job feature generation models corresponding to each historical job identifier is at least one. Referring again to the above step 203, determining the first target model according to the difference between the job information and the historical job information recorded in the feature database, and the version update data of the job feature generation model used by the historical job information, may further include:
[0101] When the first position identification is recorded in the feature database, the latest version and the first model version of each first position feature generation model are determined according to the version update data, wherein the first position feature generation model of the first model version is used to parse the historical position description information corresponding to the first position identification; when the first model version is different from the latest version, the first position feature generation model is determined as the first target model.
[0102] Specifically, the first position identifier is recorded in the feature database, that is, the feature database includes historical position identifiers that are the same as the first position identifier. Therefore, it can be determined that the position corresponding to the first position identifier may have changed.
[0103] In order to ensure that the feature data stored in the feature database is generated using the latest version of the model, when it is determined that the first position identifier is recorded in the feature database, the position feature generation model used by the historical position description information corresponding to the first position identifier can be determined, that is, the first position feature generation model. The number of first position generation models can be one or more.
[0104] In combination with the model update data, the model version of the first position feature generation model used to parse the historical position description information corresponding to the first position identification, that is, the first model version, can be determined.
[0105] Optionally, when the feature database stores the job description information and the job feature information corresponding to the job identification, it can also store the version update time of the model that generates the job feature information. That is, a preset field can be added corresponding to the job identification to store the version update time of the model or the model version, wherein the version update time is, for example, yy:00 on x month xx day, 20xx. In this way, it can be convenient to determine whether the first model version is the latest version.
[0106] Compare the first model version with the latest version of the first position characteristic generation model. If the first model version and the latest version of the first position characteristic generation model are different, it means that the first position characteristic generation model has undergone a version update. The first position characteristic model can be used as the first target model, and there is no need to compare the difference between the historical description information corresponding to the first position identifier and the first position identifier description information, thereby simplifying the data synchronization process.
[0107] Based on the embodiment of the present application, when the feature database stores the first position identification, it is determined whether the model used by the historical position description information corresponding to the first position identification is the latest version, and the latest version of the position feature generation model is used as the first target model to be called. Next, the position feature data calculated based on the latest operation logic can be directly obtained, which can facilitate consumers to directly use the position feature information, especially downstream consumers do not need to repeatedly verify whether the position feature information is generated based on the latest version of the feature generation model, which effectively saves computing resources.
[0108] In some embodiments, the historical position description information corresponding to the first position identifier includes second field data corresponding to a preset field; again involving step 203, determining the first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, further comprising:
[0109] When the first position identification is recorded in the feature database and the first model version of the first position feature generation model is the latest version, the first field data and the second field data of the preset fields required for each first position feature generation model are determined; when the first field data and the second field data of the preset fields required for the first position feature generation model are inconsistent, the first position feature generation model is determined as the first target model.
[0110] Exemplarily, model 1 is a job feature generation model used by the historical job description information corresponding to the first job identifier, and the first model version of model 1 is the latest version. If the preset field segments required by model 1 are salary, education, and major, the field data corresponding to the salary, education, and major can be obtained from the first job description information, that is, the first field data, and the field data corresponding to the salary, education, and major can be obtained from the historical job description information corresponding to the first job identifier, that is, the second field data. By comparing whether there is a difference between the first field data and the second field data, it is determined whether model 1 is determined to be the first target model.
[0111] According to an embodiment of the present application, when the first field data and the second field data of the preset field required for the first position feature generation model are inconsistent, the first position feature generation model is determined as the first target model. This can effectively reduce the occurrence of calling the model to process duplicate data, thereby reducing the number of model calls and saving computing resources.
[0112] Optionally, when comparing whether there is a difference between the first field data and the second field data, a data comparison may be performed using a preset comparison algorithm.
[0113] In another optional embodiment, first field data of a preset field required for a first position feature generation model can be obtained from the first position information, and a hash calculation can be performed on the first field data to obtain a first hash value; second field data of a preset field required for a first position feature generation model can be obtained from the historical position information, and a hash calculation can be performed on the second field data to obtain a second hash value; when the first hash value and the second hash value are inconsistent, it is determined that the first field data and the second field data of the preset field required for the first position feature generation model are inconsistent.
[0114] Continuing with model 1 as an example, the field data corresponding to salary, education, and major are obtained from the first job description information, and hash calculation is performed to obtain the first hash value, such as b2f5ff47436671b6e533d8dc3614845d. The field data corresponding to salary, education, and major are obtained from the historical job description information, and hash calculation is performed to obtain the second hash value, such as c938cbdc10b9e1d0b8b760f9e7342c36. Finally, by comparing whether the first hash value is the same as the second hash value, it is possible to quickly determine whether there is a difference between the first field data and the second field data.
[0115] Optionally, the algorithm used for hash calculation includes but is not limited to the MD5 algorithm. The specific algorithm can be set according to actual application requirements and performance, and is not specifically limited here.
[0116] According to the embodiment of the present application, by comparing the hash values of two field data, it is possible to quickly and accurately determine whether there is a difference between the two field data, which is conducive to improving data synchronization efficiency.
[0117] In some embodiments, before storing the first job description information and the target job feature information in the feature database corresponding to the first job identifier, the method further includes:
[0118] When the first field data and the second field data of the preset field required for the first position feature generation model are consistent, the position feature information corresponding to the historical position description information of the first position identifier is determined as the target position feature information corresponding to the first position description information.
[0119] Specifically, if the first position feature generation model has not changed, and the first field data and the second field data of the preset field required by the first position feature generation model are consistent, the historical position description information corresponding to the first position identification stored in the feature database can be directly determined as the target position feature information corresponding to the first position description information. Since there is no need to call the model, computing resources are effectively saved and computing efficiency is improved.
[0120] Exemplarily, the member account associated with the position identification has subscribed to the position push service and renewed the position push service within the validity period of the subscription. Therefore, although a change event of position-related information is generated, in this event, the position description information corresponding to the position identification has not changed. Therefore, based on the embodiment of the present application, it is possible to fully mine the specific change information in each position-related information change event, identify situations where there is no need to call the model, thereby effectively saving computing resources and improving data synchronization efficiency.
[0121] According to the embodiment of the present application, since the storage links of each position identifier in the feature database, and the position description information and position feature information corresponding to each position identifier are clear, the data query efficiency can be effectively improved, which is conducive to improving the data synchronization speed.
[0122] In some embodiments of the present application, the data usage requirements of downstream consumers are combined, and the service quality of the recruitment business is improved. The position feature generation model often needs to be updated to provide more reliable feature data to downstream consumers. Based on this, the embodiment of the present application can also include the following steps 401 to 404.
[0123] Step 401, receiving a model version update notification, where the update notification includes a model update time of a second target model in the model library;
[0124] Step 402, obtaining the latest job description information corresponding to each second job identifier in the feature database, wherein the time when the latest job description information corresponding to the second job identifier is stored in the feature database is earlier than the model update time of the second target model;
[0125] Step Combination Figure 4 As shown, the latest version of the second target model in the model library is called, and the latest job description information corresponding to each second job identifier is parsed through the latest version of the second target model to obtain the second job feature information corresponding to each second job identifier;
[0126] Step 404: corresponding to each second position identifier, store the second position feature information and the model update time of each second target model into the feature database.
[0127] Specifically, each position identification, as well as the position description information and position characteristic information corresponding to the position identification are recorded in the feature database, wherein the position description information corresponds to a time of storage in the feature database when it is stored in the feature database. Optionally, the time of storage of the position description information in the feature database can be stored corresponding to the position identification, and facilitates data query.
[0128] Since the latest version of the model is used to process the job description information during each data synchronization process, each time an update notification is received, the time when the latest job description information corresponding to the job identifier is stored in the feature database is queried, and only the job description information corresponding to the second job identifier can be obtained. The job description information corresponding to the second job identifier is processed using the second target model and performance to obtain the job feature information of the job description information corresponding to the second job identifier, that is, the second job feature information.
[0129] According to the embodiments of the present application, after each model version update occurs, historical position feature information can be easily found without the need to process the position description information corresponding to all position identifiers in the feature database, thereby effectively reducing the amount of data processing and realizing the data processing logic for quickly synchronizing various position description information to generate position feature data, so as to provide downstream consumers with more reliable feature data and meet consumers' data usage needs.
[0130] It is understandable that according to the embodiment of the present application, if the latest job description information corresponding to the job identifier in the feature database is stored in the feature database later than the update time of the second target model, the job description information directly uses the latest version of the second target model, so there is no need to repeatedly call the second target model and repeatedly calculate the job description information that is stored later than the update time. In particular, when there are two or more downstream consumers who need to perform unified logical processing on a preset field, the newly added job description information can be processed before it is stored in the job feature library to avoid repeated calculations and save resources.
[0131] In some embodiments of the present application, after new data is stored in the feature database, the following processing method may be included to synchronize data to downstream consumers.
[0132] Exemplarily, in response to the feature database storing the first position description information and the target position feature information corresponding to the first position identifier, a position synchronization record is generated, the position synchronization record including the data synchronization type of the first position identifier; the position synchronization record is stored in a preset message queue so that the data consumer determines whether to read the position synchronization record based on the data synchronization type; wherein the position synchronization record also includes the first position description information and the target position feature information corresponding to the first position identifier.
[0133] The position information may include the type of data synchronization, and the data synchronization type may be stored in the feature database in synchronization with the position identification. The data synchronization types include but are not limited to the transfer of reprinted positions, job file transfer, position tag Heat transfer, industry tag synchronization, Oracle library (super exposure business), member dimension real-time data, incremental fusion data class, position value-added service data class, sample calculation storage, position filter, etc. The specific data synchronization types can be set according to actual application requirements and are not listed here one by one.
[0134] Optionally, when the feature database performs data synchronization in response to a model version update, the data synchronization type of the position feature data generated thereby can be set according to synchronization requirements. By setting the data synchronization type, downstream consumers can automatically identify whether the newly added data in the feature database is the data they need.
[0135] In the embodiment of the present application, after new data is stored in the feature database, any newly added data will be captured and processed to ensure the timeliness and accuracy of data synchronization. Optionally, an Hbase coprocessor can be used to monitor and capture new data stored in the feature database, such as job description information, job feature information, etc.
[0136] Optionally, the job description information stored in the feature database may also include conversion fields. For example, job information often includes large sections of text information. To facilitate data processing by the processor, the text information may be segmented, and then keywords may be extracted from the segmented words, or tags may be added based on the segmented words, wherein both keywords and tags may be used as conversion fields. Corresponding to the job identification, the job description information preset fields, conversion fields, and job feature information are stored in the job feature database to ensure efficient storage and retrieval of data.
[0137] In some embodiments, optionally, the preset message queue is a data synchronization channel between the feature database and downstream consumers. Optionally, the Kafka message queue can be used as the data synchronization channel, which is not specifically limited here.
[0138] According to the embodiment of the present application, through the preset message queue, downstream consumers can easily understand the updated data in the feature database library. After the downstream consumers identify the data they need through the data synchronization type, they can read the data in a timely manner to achieve rapid synchronization of messages.
[0139] Corresponding to the method embodiment of the present application, the present application also provides a data synchronization device, such as Figure 5 As shown, the data synchronization device 500 includes:
[0140] An acquisition module 501 is used to acquire position information, where the position information includes a first position identifier and first position description information corresponding to the first position identifier, where the first position description information includes first field data corresponding to a preset field;
[0141] A processing module 502 is used to determine a first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, wherein the historical position information includes the historical position identifier and the historical position description information corresponding to the historical position identifier;
[0142] The processing module 502 is further used to call the first target model and parse the first field data in the first job description information through the first target model to obtain the target job feature information corresponding to the first job description information;
[0143] The processing module 502 is further used to store the first position description information and the target position feature information into a feature database corresponding to the first position identifier, so as to provide consumption data to the data consumer through the feature database.
[0144] In some embodiments, the number of the first target model is at least one, and the target position feature information includes at least one position feature;
[0145] The processing module 502 is further used to determine the preset fields required by each first target model;
[0146] The processing module 502 is further used to input the first field data corresponding to the preset field required by each first target model into the first target model, and output the position characteristics through the first target model;
[0147] The acquisition module 501 is further used to acquire the job characteristics output by each first target model, and obtain the target job characteristic information corresponding to the first job description information.
[0148] In some embodiments, the processing module 502 is further used to traverse each historical position identification in the feature database;
[0149] The processing module 502 is further used to determine the model version of each position feature generation model in the model library when the feature database does not record the first position identifier;
[0150] The processing module 502 is further used to determine each latest version of the job feature generation model as the first target model.
[0151] In some embodiments, the number of position feature generation models corresponding to each historical position identification is at least one;
[0152] The processing module 502 is further used to determine the latest version and the first model version of each first position feature generation model according to the version update data when the first position identifier is recorded in the feature database, wherein the first position feature generation model of the first model version is used to parse the historical position description information corresponding to the first position identifier;
[0153] The processing module 502 is further configured to determine the first position feature generation model as the first target model when the first model version is different from the latest version.
[0154] In some embodiments, the historical position description information corresponding to the first position identifier includes second field data corresponding to a preset field;
[0155] The processing module 502 is further used to determine the first field data and the second field data of the preset fields required for each first position feature generation model when the first position identifier is recorded in the feature database and the first model version of the first position feature generation model is the latest version;
[0156] The processing module 502 is further configured to determine the first position feature generation model as the first target model when the first field data and the second field data of the preset field required by the first position feature generation model are inconsistent.
[0157] In some embodiments, the processing module 502 is further used to obtain first field data of a preset field required for the first position feature generation model in the first position description information, and perform hash calculation on the first field data to obtain a first hash value;
[0158] The processing module 502 is further used to obtain the second field data of the preset field required for the first position feature generation model in the historical position information, and perform hash calculation on the second field data to obtain a second hash value;
[0159] The processing module 502 is further used to determine that the first field data and the second field data of the preset field required for the first position feature generation model are inconsistent when the first hash value and the second hash value are inconsistent.
[0160] In some embodiments, the processing module 502 is also used to determine the position feature information corresponding to the historical position description information of the first position identification as the target position feature information corresponding to the first position description information when the first field data and the second field data of the preset field required for the first position feature generation model are consistent.
[0161] In some embodiments, the processing module 502 is further used to receive a model version update notification, where the update notification includes a model update time of the second target model in the model library;
[0162] The acquisition module 501 is further used to acquire the latest job description information corresponding to each second job identifier in the feature database, wherein the latest job description information corresponding to the second job identifier is stored in the feature database earlier than the model update time of the second target model;
[0163] The processing module 502 is further used to call the latest version of the second target model in the model library, and parse the latest job description information corresponding to each second job identifier through the latest version of the second target model to obtain the second job feature information corresponding to each second job identifier;
[0164] Corresponding to each second position identifier, the second position feature information and the model update time of each second target model are stored in the feature database.
[0165] In some embodiments, the processing module 502 is further used to generate a position synchronization record in response to the feature database storing the first position description information corresponding to the first position identifier and the target position feature information, wherein the position synchronization record includes the data synchronization type of the first position identifier;
[0166] The processing module 502 is further used to store the position synchronization record into a preset message queue so that the data consumer can determine whether to read the position synchronization record according to the data synchronization type;
[0167] The position synchronization record also includes the first position description information and the target position characteristic information corresponding to the first position identifier.
[0168] It can be understood that the data synchronization device of the embodiment of the present application can correspond to the execution entity of the data synchronization method provided by the embodiment of the present application. The specific details of the operation and / or function of each module / unit of the data synchronization device can be found in the description of the corresponding parts of the data synchronization method provided by the above-mentioned embodiment of the present application. For the sake of brevity, they will not be repeated here.
[0169] The electronic device in the embodiment of the present application may be a user terminal device, a server, other computing devices, or a cloud server. Figure 6A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application is shown. The electronic device may include a processor 601 and a memory 602 storing computer program instructions. When the processor 601 executes the computer program instructions, the process or function of any of the above-mentioned embodiments of the method is implemented.
[0170] Specifically, the processor 601 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application. The memory 602 may include a large-capacity memory for data or instructions. For example, the memory 602 may be at least one of the following: a hard disk drive (HDD), a read-only memory (ROM), a random access memory (RAM), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, a universal serial bus (USB) drive or other physical / tangible memory storage device. For another example, the memory 602 may include a removable or non-removable (or fixed) medium. For another example, the memory 602 may be inside or outside the integrated gateway disaster recovery device. The memory 602 may be a non-volatile solid-state memory. In other words, the memory 602 usually includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with computer-executable instructions, and when the software is executed (such as executed by one or more processors), the operation described in the method of the embodiment of the present application can be performed. The processor 601 implements the process or function of any method in the above embodiments by reading and executing the computer program instructions stored in the memory 602.
[0171] In one example, Figure 6The electronic device shown may also include a communication interface 603 and a bus 610. Among them, the processor 601, the memory 602, and the communication interface 603 are connected through the bus 610 and complete the communication between each other. The communication interface 603 is mainly used to realize the communication between each module, device, unit and / or device in the embodiment of the present application. The bus 610 includes hardware, software or both, and can couple the components of the online data traffic billing device to each other. For example, the bus may include at least one of the following: an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-end bus (FSB), a hypertransport (HT) interconnect, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a micro channel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable buses. The bus 610 may include one or more buses. Although the embodiments of the present application describe or illustrate a specific bus, the embodiments of the present application may consider any suitable bus or interconnection method.
[0172] In combination with the method in the above embodiments, an embodiment of the present application also provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the process or function of any method in the above embodiments is implemented.
[0173] In addition, an embodiment of the present application further provides a computer program product, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the process or function of any one of the methods in the above embodiments is implemented.
[0174] The above exemplary descriptions of the flowcharts and / or block diagrams of the methods, devices, systems, and computer program products of the embodiments of the present application are described, and the relevant various aspects are described. It should be understood that each box or combination thereof in the flowchart and / or block diagram can be implemented by computer program instructions, or by dedicated hardware that performs a specified function or action, or by a combination of dedicated hardware and computer instructions. For example, these computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to form a machine that enables these instructions executed by such a processor to enable the implementation of the functions / actions specified in each box or combination thereof in the flowchart and / or block diagram. Such a processor can be a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit.
[0175] The functional blocks shown in the structured block diagram of the embodiment of the present application can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc.; when implemented in software, it is a program or code segment used to perform the required task. The program or code segment can be stored in a memory, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0176] It should be noted that the present application is not limited to the specific configurations and processes described above or shown in the figures. The above is only a specific implementation mode of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the described system, device, module or unit can refer to the corresponding process in the method embodiment without further description. It should be understood that the scope of protection of the present application is not limited to this. Any technician familiar with the technical field can think of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and these modifications or substitutions should be included in the scope of protection of the present application.
Claims
1. A data synchronization method, characterized in that: include: Acquire position information, the position information including a first position identifier and first position description information corresponding to the first position identifier, the first position description information including first field data corresponding to a preset field; Determine a first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, wherein the historical position information includes a historical position identifier and historical position description information corresponding to the historical position identifier; Calling the first target model, and parsing the first field data in the first job description information through the first target model to obtain target job feature information corresponding to the first job description information; Corresponding to the first position identifier, the first position description information and the target position feature information are stored in the feature database, so as to provide consumption data to the data consumer through the feature database.
2. The method according to claim 1, characterized in that: The number of the first target model is at least one, and the target position feature information includes at least one position feature; The calling of the first target model and parsing the first field data in the first job description information by using the first target model to obtain target job feature information corresponding to the first job description information includes: Determining the preset fields required for each of the first target models; Corresponding to each of the first target models, first field data corresponding to the required preset fields are input into the first target model, and position characteristics are output through the first target model; The position characteristics output by each of the first target models are obtained to obtain target position characteristic information corresponding to the first position description information.
3. The method according to claim 1, characterized in that The determining of the first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, comprises: Traversing each historical position identification in the feature database; In the case that the feature database does not record the first position identifier, determining a model version of each position feature generation model in the model library; The job feature generation model of each latest version is determined as the first target model.
4. The method according to claim 1, characterized in that: The number of job feature generation models corresponding to each of the historical job identifiers is at least one; The determining of the first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, further includes: In the case where the first position identification is recorded in the feature database, determining the latest version and the first model version of each first position feature generation model according to the version update data, wherein the first position feature generation model of the first model version is used to parse the historical position description information corresponding to the first position identification; In the case where the first model version is different from the latest version, the first job feature generation model is determined as the first target model.
5. The method according to claim 4, characterized in that The historical position description information corresponding to the first position identifier includes second field data corresponding to the preset field; The determining of the first target model according to the difference between the position information and the historical position information recorded in the feature database, and the version update data of the position feature generation model used by the historical position information, further includes: In the case where the first position identifier is recorded in the feature database and the first model version of the first position feature generation model is the latest version, determining first field data and second field data of each preset field required by the first position feature generation model; When the first field data and the second field data of the preset field required by the first position feature generation model are inconsistent, the first position feature generation model is determined as the first target model.
6. The method according to claim 5, characterized in that The method further comprises: Obtaining first field data of a preset field required for the first position feature generation model from the first position description information, and performing a hash calculation on the first field data to obtain a first hash value; Acquire second field data of a preset field required for the first position feature generation model from the historical position information, and perform hash calculation on the second field data to obtain a second hash value; When the first hash value is inconsistent with the second hash value, it is determined that the first field data and the second field data of the preset field required for the first position feature generation model are inconsistent.
7. The method according to claim 5, characterized in that Before storing the first job description information and the target job feature information in the feature database corresponding to the first job identifier, the method further includes: When the first field data and the second field data of the preset field required for the first position feature generation model are consistent, the position feature information corresponding to the historical position description information of the first position identification is determined as the target position feature information corresponding to the first position description information.
8. The method according to claim 1, characterized in that The method further comprises: receiving a model version update notification, wherein the update notification includes a model update time of the second target model in the model library; Acquire the latest job description information corresponding to each second job identifier in the feature database, wherein the latest job description information corresponding to the second job identifier is stored in the feature database earlier than the model update time of the second target model; Calling the latest version of the second target model in the model library, and parsing the latest job description information corresponding to each second job identifier through the latest version of the second target model to obtain the second job feature information corresponding to each second job identifier; Corresponding to each of the second position identifiers, the second position feature information and the model update time of each of the second target models are stored in the feature database.
9. The method according to claim 1, characterized in that: The method further comprises: In response to the feature database storing the first job description information and the target job feature information corresponding to the first job identifier, generating a job synchronization record, the job synchronization record including a data synchronization type of the first job identifier; storing the position synchronization record in a preset message queue, so that the data consumer determines whether to read the position synchronization record according to the data synchronization type; The position synchronization record further includes the first position description information and the target position characteristic information corresponding to the first position identifier.
10. A data synchronization device, characterized in that: include: An acquisition module, configured to acquire position information, wherein the position information includes a first position identifier and first position description information corresponding to the first position identifier, wherein the first position description information includes first field data corresponding to a preset field; A processing module, configured to determine a first target model according to a difference between the position information and historical position information recorded in a feature database, and version update data of a position feature generation model used by the historical position information, wherein the historical position information includes a historical position identifier and historical position description information corresponding to the historical position identifier; The processing module is further used to call the first target model and parse the first field data in the first job description information through the first target model to obtain target job feature information corresponding to the first job description information; The processing module is further used to store the first position description information and the target position feature information into the feature database corresponding to the first position identifier, so as to provide consumption data to the data consumer through the feature database.
11. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; when the electronic device executes the computer program instructions, the method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.
13. A computer program product, characterized in that It comprises computer program instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Index file updating method and server
CN108763578A
Data fusion method, related equipment and readable storage medium
CN113886659A
Cultivated land data integration method and device, and storage medium
CN114443790A
Method and device for evaluating data warehouse, computer equipment and storage medium
CN117194365A
Automated cloud data and technology solution delivery using machine learning and artificial intelligence modeling
US11416754B1
