CN116383309B - Hotel data synchronization method and device, computer equipment and storage medium - Google Patents

Hotel data synchronization method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN116383309B
CN116383309B CN202310439267.XA CN202310439267A CN116383309B CN 116383309 B CN116383309 B CN 116383309B CN 202310439267 A CN202310439267 A CN 202310439267A CN 116383309 B CN116383309 B CN 116383309B
Authority
CN
China
Prior art keywords
hotel
data synchronization
data
synchronization
dimension
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310439267.XA
Other languages
Chinese (zh)
Other versions
CN116383309A (en
Inventor
吴晓文
谢小欢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tianxia Fangcang Technology Co ltd
Original Assignee
Shenzhen Tianxia Fangcang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tianxia Fangcang Technology Co ltd filed Critical Shenzhen Tianxia Fangcang Technology Co ltd
Priority to CN202310439267.XA priority Critical patent/CN116383309B/en
Publication of CN116383309A publication Critical patent/CN116383309A/en
Application granted granted Critical
Publication of CN116383309B publication Critical patent/CN116383309B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/12Hotels or restaurants
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a hotel data synchronization method, which is applied to the technical field of data processing. The method provided by the application comprises the following steps: acquiring hotel history data of a first dimension from synchronized hotel history data corresponding to a hotel provider; carrying out flow type comprehensive calculation by using the first-dimension hotel history data through a flow type calculation engine to obtain hotel evaluation total score data; generating at least one hotel data synchronization strategy by using the hotel history data and the hotel evaluation total score data in the first dimension according to the hotel data synchronization requirement; generating at least one hotel data synchronization subtask according to hotel synchronization requirements through a distributed task scheduling framework, and distributing a hotel data synchronization strategy to the corresponding hotel data synchronization subtask; and running hotel data synchronization subtasks to obtain hotel data synchronization results of different hotel suppliers. The time consumption of hotel data synchronization is reduced, the real-time performance of hotel data synchronization is improved, and the pressure of hotel data synchronization tasks on a hotel resource supply chain platform system is further reduced.

Description

Hotel data synchronization method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a hotel data synchronization method, a hotel data synchronization device, a computer device, and a storage medium.
Background
The hotel resource supply chain platform of the hotel industry is connected with a plurality of hotel suppliers, hotel business data such as the states, the amounts and the prices of rooms of different hotel suppliers are different, and part of the hotel business data of the hotel suppliers are changed irregularly along with regular events or random events such as seasons, social events and the like. Therefore, the hotel resource supply chain platform ensures the real-time performance and accuracy of the hotel data provided by the hotel resource supply chain platform, and the hotel business data of the hotel suppliers need to be synchronized into the system of the hotel resource supply chain platform.
However, the existing hotel data synchronization mode generally adopts a full-volume synchronization mode or an incremental synchronization mode. The problem of the full-volume synchronization mode and the incremental synchronization mode is that after more hotel suppliers are accessed to the hotel resource supply chain platform, more data volume and more data synchronization requirements enable hotel data synchronization time consumption of the hotel resource supply chain platform to be increased, real-time performance to be reduced, and pressure of the hotel resource supply chain platform to be increased.
Disclosure of Invention
The embodiment of the application provides a hotel data synchronization method, a hotel data synchronization device, computer equipment and a storage medium, which are used for solving the problems of increased hotel data synchronization time consumption, reduced instantaneity and increased system pressure.
In a first aspect, an embodiment of the present application provides a hotel data synchronization method, including:
acquiring hotel history data of a first dimension from synchronized hotel history data corresponding to a hotel provider;
Carrying out flow comprehensive calculation by using the first-dimension hotel history data through a flow calculation engine to obtain hotel evaluation total score data;
generating at least one hotel data synchronization strategy by using the hotel history data of the first dimension and the hotel evaluation total score data according to hotel data synchronization requirements;
Generating at least one hotel data synchronization subtask according to the hotel synchronization requirement through a distributed task scheduling framework, and distributing the hotel data synchronization strategy to the corresponding hotel data synchronization subtask;
And running the hotel data synchronization subtasks to obtain hotel data synchronization results of different hotel suppliers.
Optionally, after the step of obtaining hotel evaluation total score data by performing the streaming comprehensive calculation by using the first-dimension hotel history data through the streaming calculation engine, the method further includes:
transmitting the hotel assessment total score data to a deployed distributed search and analysis engine;
And acquiring second-dimension hotel history data of the hotel supplier in a section interception mode, and sending the second-dimension hotel history data to the distributed search and analysis engine.
Optionally, the step of obtaining the second-dimension hotel history data of the hotel supplier in a section interception manner and sending the second-dimension hotel history data to the distributed search and analysis engine further includes:
acquiring analysis results of the distributed search and analysis engine on the hotel history data of the second dimension;
And generating at least one hotel data synchronization strategy according to the hotel data synchronization requirement and the analysis result.
Optionally, after the step of generating at least one hotel data synchronization policy according to the hotel data synchronization requirement by using the hotel history data and the hotel evaluation total score data, the method further includes:
Transmitting the hotel data synchronization strategy to a deployed distributed memory database;
generating hotel data synchronization frequencies corresponding to different hotel data synchronization strategies according to the hotel data synchronization requirements;
and sending the hotel data synchronization frequency to the distributed memory database, and generating a data synchronization key value pair in the distributed memory database, wherein the key of the data synchronization key value pair is the hotel data synchronization strategy, and the value of the data synchronization key value pair is the hotel data synchronization frequency.
Optionally, after the step of distributing the hotel data synchronization policy to the corresponding hotel data synchronization subtask, the method further includes:
Acquiring the data synchronization key value pair corresponding to the hotel data synchronization strategy from the distributed memory database;
and sending the hotel data synchronization frequency in the data synchronization key value pair to the hotel data synchronization subtask.
Optionally, after the step of running the hotel data synchronization subtask to obtain the hotel data synchronization results of different hotel suppliers, the method further includes:
Monitoring the hardware resource consumption percentage of the node server when the hotel data synchronization subtask is operated, wherein the node server is positioned in a server cluster, and the hotel data synchronization subtask is distributed to the node server by the distributed task scheduling framework;
selecting the node server with the hardware resource consumption percentage larger than or equal to a preset hardware resource consumption percentage threshold as the node server to be adjusted;
Distributing the target hotel data synchronization subtasks on the node server to be adjusted to a new node server by using the distributed task scheduling framework;
and if no new node server exists in the server cluster, splitting the target hotel data synchronization subtask and then distributing the split target hotel data synchronization subtask to the node server in the server cluster.
Optionally, after the step of running the hotel data synchronization subtask to obtain the hotel data synchronization results of different hotel suppliers, the method further includes:
Monitoring the reading frequency of the hotel data synchronization result in a preset time period after being stored;
optimizing the hotel data synchronization strategy according to the reading frequency, and the hotel data synchronization subtasks corresponding to the hotel data synchronization strategy.
In a second aspect, an embodiment of the present application provides a hotel data synchronization device, including:
the historical data acquisition module is used for acquiring first-dimension hotel historical data from synchronized hotel historical data corresponding to the hotel suppliers;
the evaluation total score data module is used for carrying out flow comprehensive calculation by using the first-dimension hotel history data through the flow calculation engine to obtain hotel evaluation total score data;
The synchronization strategy generation module is used for generating at least one hotel data synchronization strategy by using the hotel history data of the first dimension and the hotel evaluation total score data according to hotel data synchronization requirements;
The synchronous subtask module is used for generating at least one hotel data synchronous subtask according to the hotel synchronous demands through a distributed task scheduling framework and distributing the hotel data synchronous strategy to the corresponding hotel data synchronous subtask;
And the data synchronization result module is used for running the hotel data synchronization subtasks to obtain hotel data synchronization results of different hotel suppliers.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the steps of the hotel data synchronization method described above are implemented when the processor executes the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the hotel data synchronization method described above.
According to the hotel data synchronization method, the hotel data synchronization device, the computer equipment and the storage medium, the hotel history data with the first dimension are obtained from the synchronized hotel history data corresponding to the hotel suppliers; carrying out flow type comprehensive calculation by using the first-dimension hotel history data through a flow type calculation engine to obtain hotel evaluation total score data; generating at least one hotel data synchronization strategy by using the hotel history data and the hotel evaluation total score data in the first dimension according to the hotel data synchronization requirement; generating at least one hotel data synchronization subtask according to hotel synchronization requirements through a distributed task scheduling framework, and distributing a hotel data synchronization strategy to the corresponding hotel data synchronization subtask; and running hotel data synchronization subtasks to obtain hotel data synchronization results of different hotel suppliers. The time consumption of hotel data synchronization is reduced, the real-time performance of hotel data synchronization is improved, and the pressure of hotel data synchronization tasks on a hotel resource supply chain platform system is further reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of an application environment of a hotel data synchronization method according to an embodiment of the application;
figure 2 is a flow chart of a hotel data synchronization method in accordance with an embodiment of the application;
fig. 3 is a schematic structural diagram of a hotel data synchronizer according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a computer device in accordance with an embodiment of the application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The hotel data synchronization method provided by the application can be applied to an application environment as shown in fig. 1, the distributed cluster is used for carrying the operation of the hotel data synchronization method, the distributed cluster is connected with a management system of a hotel provider through a network, the distributed cluster acquires hotel data through a data interface opened by the management system of the hotel provider, the distributed cluster comprises computer equipment, wherein the computer equipment can be, but not limited to, various personal computers and notebook computers, the computer equipment can also be a server, the server can be an independent server, and can also be a cloud server for providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDNs), big data, artificial intelligent platforms and the like. It will be appreciated that the number of computer devices in the distributed cluster of fig. 1 is merely illustrative and that any number of extensions may be made according to actual needs.
In one embodiment, as shown in fig. 2, a hotel data synchronization method is provided, which is illustrated by taking a computer device in fig. 1 as an example, and includes the following steps S101 to S105:
S101, acquiring hotel history data of a first dimension from synchronized hotel history data corresponding to a hotel provider.
In some embodiments, the first dimension hotel history data includes, but is not limited to: hotel recommendation level, hotel price, hotel star level, hotel state, and hotel volume. The first dimension hotel history data is obtained through an external data interface opened by a management system of a hotel supplier, the second dimension hotel history data is generated by performing data calculation according to the obtained first dimension hotel history data, the data calculation is performed according to existing measurement standards of the hotel industry, for example, average room price of a hotel is the total sales income of the hotel divided by the actual number of rentals, hotel check-in rate is the ratio of the actual number of guests in the hotel to the total number of guests, and average profit per hotel per night of the hotel is the average profit per hotel per night minus the average cost per hotel per night.
S102, performing flow type comprehensive calculation by using the first-dimension hotel history data through a flow type calculation engine to obtain hotel evaluation total score data.
The streaming computing engine (Stream Processing Engine) is a software system for processing a real-time data stream, and can perform operations such as real-time processing, analysis, filtering, aggregation, calculation and the like on the data stream, and output or display a processing result in various manners.
In some embodiments, the flow-type comprehensive calculation is performed by using JStorm flow-type calculation engines, JStorm is a flow-type calculation engine with high throughput (processing high throughput data volume and realizing real-time processing and real-time calculation of data), high expandability (adding calculation nodes or distributed clusters according to calculation needs to realize linear expansion), high reliability (supporting fault tolerance and rapid fault recovery of data, ensuring accuracy and reliability of data processing and continuity of data processing), multi-language support (supporting multiple programming languages), and is suitable for the scene of flow processing of hotel history data in the application, so that the hotel data synchronization method in the embodiment is efficiently executed.
The JStorm also supports rich data operations, such as Filter (filtering data according to specific conditions, only retaining data meeting the conditions), project (selecting specific fields or attributes from data streams to construct new data volume), aggreate (summation, average value, etc.), groupBy (grouping data in data streams according to specific fields or attributes), join (connecting two or more data streams according to specific fields or attributes), etc., where the loss synthesis calculation is to perform the data operation on the hotel history data in the first dimension.
In some embodiments, after the hotel assessment score data is obtained, the hotel assessment score data is also sent to the deployed distributed search and analysis engine. And then, acquiring second-dimension hotel history data of the hotel supplier in a section interception mode, and sending the second-dimension hotel history data to the distributed search and analysis engine.
Among other things, a distributed search and analysis engine is a software system for processing large-scale data that enables efficient searching, analysis and querying of the data, generally comprising: distributed storage, distributed searching, real-time processing, multidimensional analysis, data visualization and other functions.
In some embodiments, an elastiscearch is used as the particular distributed search and analysis engine described above. The elastic search is a distributed search and analysis engine based on Lucene, supports real-time search and analysis of large-scale data, has the characteristics of high expandability, high reliability and high performance, and can be suitable for various search and data analysis scenes in the hotel data processing field.
The cut plane interception is generally used for realizing the functions of log record, performance monitoring, transaction management and the like, so that the maintainability and the stability of the system are improved. In the application, the specific method or code block can be intercepted and enhanced by using the characteristic that the section interception is used for intercepting the hotel history data of the second dimension in the business process. It should be specifically noted that, although the specific implementation manner of the present phase of the plane interception is based on the plane interception manner such as annotation, XML configuration, aspectJ, dynamic proxy, spring AOP, etc., the plane interception manner in the present application includes not only the specific implementation manner but also other implementation manners using the same implementation principles as the specific implementation manner. Finally, the beneficial effects of acquiring the hotel history data of the second dimension by using the section interception mode are remarkable, the reusability, maintainability, readability and expandability of codes are improved in a development level, business logic is further simplified in a business level, and the reliability of a transverse cutting logic improving system is realized.
In some embodiments, the step of obtaining the second-dimension hotel history data of the hotel supplier by the cut-plane interception method and sending the second-dimension hotel history data to the distributed search and analysis engine further includes: firstly, the analysis result of the distributed search and analysis engine on the hotel history data of the second dimension is obtained. And then, generating at least one hotel data synchronization strategy according to the hotel data synchronization requirement and the analysis result.
The analysis result of the second-dimension hotel history data may be hot hotel data, the second-dimension hotel history data may be trial reservation data, order record data, date of entry in an order, etc. generated by a hotel supplier, the process of calculating the hot hotel data according to the second-dimension hotel history data is not described herein, and more specific implementation process may be determined according to different hot hotel setting criteria, for example, the hot hotel setting criteria provided by a certain hotel resource supply chain platform is that the weight occupied by the fraction of the hotel star class in the second-dimension hotel history data is the largest, and the hot hotel setting criteria provided by another hotel resource supply chain platform is that the hotel star class in the second-dimension hotel history data must be in the first range and the room occupancy rate of the hotel in the set time period must be in the second range.
And S103, generating at least one hotel data synchronization strategy by using the hotel history data of the first dimension and the hotel evaluation total score data according to hotel data synchronization requirements.
In some embodiments, the hotel data synchronization policy is derived from the hotel data synchronization requirement and the analysis result output by the distributed search and analysis engine.
In some embodiments, after the step of generating at least one hotel data synchronization policy according to the hotel data synchronization requirement using the hotel history data and the hotel evaluation total score data, the method further includes: firstly, the hotel data synchronization strategy is sent to a deployed distributed memory database. And then generating hotel data synchronization frequencies corresponding to different hotel data synchronization strategies according to the hotel data synchronization requirements. And finally, sending the hotel data synchronization frequency to the distributed memory database, and generating a data synchronization key value pair in the distributed memory database, wherein the key of the data synchronization key value pair is the hotel data synchronization strategy, and the value of the data synchronization key value pair is the hotel data synchronization frequency.
Among them, a Distributed In-Memory Database (dba) is a Database system that stores data In a Memory and distributes the data over a plurality of nodes (computer devices). Nodes can be located in the same data center or distributed in different geographic positions, so that high availability, fault tolerance and scalability can be supported
In some embodiments, the distributed memory database Codis, codis is a distributed Redis solution, a proxy layer is provided to route Redis requests to multiple Redis nodes, and management tools are provided to manage the Redis nodes. Codis include the following advantages: support high availability and fault tolerance (Codis improves capacity and throughput of the system by distributing data across multiple Redis nodes, and supports data synchronization and failover between multiple Redis nodes, thereby improving availability and fault tolerance of the system), simplicity and ease of use (architecture of Codis is simple relative to other distributed memory databases, ease of use and deployment), ease of expansion (Codis supports storing data fragments on multiple Redis nodes, capacity and throughput of the system can be expanded by adding more Redis nodes), provision of a Web management interface (Codis provides a Web management interface, and cluster management, monitoring and adjustment operations can be conveniently performed), etc.
S104, generating at least one hotel data synchronization subtask according to the hotel synchronization requirement through a distributed task scheduling framework, and distributing the hotel data synchronization strategy to the corresponding hotel data synchronization subtask.
In some embodiments, the above-mentioned distributed task scheduling framework is a lightweight distributed task scheduling framework, where the lightweight distributed task scheduling framework has low latency, high availability, and easy deployment, for example, LTS (LIGHT TASK Schedule) provides a reliable, efficient, and easy-to-use task scheduling solution, and has the characteristics of high availability, scalability, low latency, support of multiple task types, rich monitoring and management tools, and support of functions such as latency scheduling, retry mechanism, task monitoring, and the like.
In some embodiments, after the step of distributing the hotel data synchronization policy to the corresponding hotel data synchronization subtask, the method further includes: firstly, acquiring the data synchronization key value pair corresponding to the hotel data synchronization strategy from the distributed memory database. And then, the hotel data synchronization frequency in the data synchronization key value pair is sent to the hotel data synchronization subtask, so that the node servers in the distributed server cluster can execute the hotel data synchronization subtask according to the hotel data synchronization frequency.
In some embodiments, the hotel data synchronization frequency is variable, because factors affecting the execution efficiency of the hotel data synchronization subtask are variable, such as uncertainty factors including whether a network line is stable for a period of time, whether machines in a distributed server cluster are overused by other tasks for a period of time, which results in a reduction in resources that the data synchronization subtask can use, a significant change in a physical location of a server that a hotel provider provides an external data access interface, which results in an increase in data delay acquired from the hotel provider, a change in hotel data acquisition requirements, an upgrade of a hotel provider system, and a return result provided by a new version of the external data access interface, which requires data format conversion, can be merged with the acquired hotel provider history data. It should be noted that the above uncertainty factors are merely exemplary, and other uncertainty factors that may be encountered in the hotel data synchronization process are not described in detail.
And S105, running the hotel data synchronization subtasks to obtain hotel data synchronization results of different hotel suppliers.
In some embodiments, in view of the uncertainty factor that affects the execution efficiency of the hotel data synchronization subtask, after the step of running the hotel data synchronization subtask to obtain the hotel data synchronization result of the different hotel suppliers, the method further includes: firstly, monitoring the hardware resource consumption percentage of a node server when the hotel data synchronization subtask is operated, wherein the node server is positioned in a server cluster, and the hotel data synchronization subtask is distributed to the node server by the distributed task scheduling framework. And then, selecting the node servers with the hardware resource consumption percentages larger than or equal to a preset hardware resource consumption percentage threshold as the node servers to be adjusted. And simultaneously, distributing the target hotel data synchronization subtasks on the node server to be adjusted to a new node server by using the distributed task scheduling framework. And finally, if no new node server exists in the server cluster, splitting the target hotel data synchronization subtask and then distributing the split target hotel data synchronization subtask to the node server in the server cluster.
The above percentage of hardware resource consumption is only an exemplary judgment dimension for judging the execution condition of the hotel data synchronization subtask, and the completion time of the hotel data synchronization subtask, the time consumed by the hotel data synchronization subtask for acquiring data from an external data interface provided by a hotel provider, and the like may be used as new judgment dimensions, and multiple data dimensions are set to perform comprehensive judgment, and further embodiments for monitoring and judging the execution condition of the hotel data synchronization subtask are not described herein.
Meanwhile, the task splitting of the hotel data synchronization subtask is sent to a newly added server or an existing server, which is just one exemplary implementation way of reducing the cluster pressure of the server, and other ways of reducing the cluster pressure of the server may be adopted, such as reassigning the hotel data synchronization subtask to a different server (designing according to the physical location of the server where the external data interface of the hotel provider is located, that is, the physical location of the node server where the different hotel data synchronization subtask is located is the closest to the physical location of the server where the corresponding external data interface is located, for example, all in a region, all in a province, all in a data center, all in a machine room, and so on, so as to reduce the physical network time consumption).
In some embodiments, after the step of running the hotel data synchronization subtask to obtain the hotel data synchronization results of different hotel suppliers, the method further includes: firstly, monitoring the reading frequency of the hotel data synchronization result in a preset time period after being stored. And then optimizing the hotel data synchronization strategy according to the reading frequency and the hotel data synchronization subtasks corresponding to the hotel data synchronization strategy. For example, in an actual hotel reservation service, a business hotel in a certain area changes to a hot hotel due to a business activity about to be held in the area, relevant data of the business hotel in the area is read frequently, and at this time, the execution frequency of the hotel data synchronization subtask corresponding to the business hotel in the area needs to be increased, and after the business activity is finished, the execution frequency of the hotel data synchronization subtask corresponding to the business hotel in the area needs to be reduced.
The hotel data synchronization method provided by the embodiment obtains hotel history data with a first dimension from synchronized hotel history data corresponding to a hotel provider; carrying out flow type comprehensive calculation by using the first-dimension hotel history data through a flow type calculation engine to obtain hotel evaluation total score data; generating at least one hotel data synchronization strategy by using the hotel history data and the hotel evaluation total score data in the first dimension according to the hotel data synchronization requirement; generating at least one hotel data synchronization subtask according to hotel synchronization requirements through a distributed task scheduling framework, and distributing a hotel data synchronization strategy to the corresponding hotel data synchronization subtask; and running hotel data synchronization subtasks to obtain hotel data synchronization results of different hotel suppliers. The time consumption of hotel data synchronization is reduced, the real-time performance of hotel data synchronization is improved, and the pressure of hotel data synchronization tasks on a hotel resource supply chain platform system is further reduced.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
In an embodiment, a hotel data synchronization device 100 is provided, where the hotel data synchronization device 100 corresponds to the hotel data synchronization method in the above embodiment one by one. As shown in fig. 3, the hotel data synchronizer 100 includes a history data acquisition module 11, an evaluation total score data module 12, a synchronization policy generation module 13, a synchronization subtask module 14, and a data synchronization result module 15. The functional modules are described in detail as follows:
the historical data acquisition module 11 is configured to acquire hotel historical data of a first dimension from synchronized hotel historical data corresponding to a hotel provider;
the evaluation total score data module 12 is configured to perform, by using the streaming calculation engine, streaming comprehensive calculation using the hotel history data of the first dimension, to obtain hotel evaluation total score data;
The synchronization policy generation module 13 is configured to generate at least one hotel data synchronization policy according to a hotel data synchronization requirement by using the hotel history data of the first dimension and the hotel evaluation total score data;
A synchronization subtask module 14, configured to generate at least one hotel data synchronization subtask according to the hotel synchronization requirement through a distributed task scheduling framework, and distribute the hotel data synchronization policy to the corresponding hotel data synchronization subtask;
And the data synchronization result module 15 is used for running the hotel data synchronization subtasks to obtain hotel data synchronization results of different hotel suppliers.
Further, the evaluation total score data module 12 further includes:
the evaluation total score data sending sub-module is used for sending the hotel evaluation total score data to a deployed distributed search and analysis engine;
The section interception data sub-module is used for acquiring second-dimension hotel history data of the hotel suppliers in a section interception mode and sending the second-dimension hotel history data to the distributed search and analysis engine.
Further, the section interception data sub-module further includes:
the historical data analysis subunit is used for acquiring an analysis result of the distributed search and analysis engine on the second-dimension hotel historical data;
And the second synchronization strategy generation subunit is used for generating at least one hotel data synchronization strategy according to the hotel data synchronization requirement and the analysis result.
Further, the synchronization policy generation module 13 further includes:
The synchronization strategy storage sub-module is used for sending the hotel data synchronization strategy to the deployed distributed memory database;
The data synchronization frequency sub-module is used for generating hotel data synchronization frequencies corresponding to different hotel data synchronization strategies according to the hotel data synchronization requirements;
and the data synchronization key value pair sub-module is used for sending the hotel data synchronization frequency to the distributed memory database and generating a data synchronization key value pair in the distributed memory database, wherein the key of the data synchronization key value pair is the hotel data synchronization strategy, and the value of the data synchronization key value pair is the hotel data synchronization frequency.
Further, the synchronization subtask module 14 further includes:
A key value pair obtaining sub-module, configured to obtain, from the distributed memory database, the data synchronization key value pair corresponding to the hotel data synchronization policy;
and the data synchronization frequency sending sub-module is used for sending the hotel data synchronization frequency in the data synchronization key value pair to the hotel data synchronization sub-task.
Further, the data synchronization result module 15 further includes:
The resource consumption percentage sub-module is used for monitoring the hardware resource consumption percentage of the node server when the hotel data synchronization sub-task is operated, wherein the node server is positioned in a server cluster, and the hotel data synchronization sub-task is distributed to the node server by the distributed task scheduling framework;
The node server sub-module to be adjusted is used for selecting the node server with the hardware resource consumption percentage larger than or equal to a preset hardware resource consumption percentage threshold as the node server to be adjusted;
The synchronous subtask re-subtask module is used for distributing the target hotel data synchronous subtask on the node server to be adjusted to a new node server by using the distributed task scheduling framework;
and the synchronous subtask splitting sub-module is used for splitting the target hotel data synchronous subtask and then distributing the split target hotel data synchronous subtask to the node servers in the server cluster if no new node server exists in the server cluster.
Further, the data synchronization result module 15 further includes:
the data synchronization result monitoring sub-module is used for monitoring the reading frequency of the hotel data synchronization result in a preset time period after being stored;
and the data synchronization optimization sub-module is used for optimizing the hotel data synchronization strategy according to the reading frequency and the hotel data synchronization sub-task corresponding to the hotel data synchronization strategy.
The meaning of "first" and "second" in the above modules/units is merely to distinguish different modules/units, and is not used to limit which module/unit has higher priority or other limiting meaning. Furthermore, the terms "comprises," "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules that are expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or modules that may not be expressly listed or inherent to such process, method, article, or apparatus, and the partitioning of such modules by means of any other means that may be implemented by such means.
For specific limitations of the hotel data synchronization device, reference may be made to the limitation of the hotel data synchronization method hereinabove, and the details are not repeated here. The foregoing hotel data synchronization device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store data involved in the hotel data synchronization method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by the processor, implements a hotel data synchronization method.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, when executing the computer program, implementing the steps of the hotel data synchronization method of the above embodiments, such as steps S101 through S105 shown in fig. 2, and other extensions of the method and extensions of related steps. Or the processor, when executing the computer program, performs the functions of the modules/units of the hotel data synchronizer of the above embodiment, such as the functions of the modules 11 to 15 of fig. 3. In order to avoid repetition, a description thereof is omitted.
The Processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is a control center of the computer device, connecting various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer program and/or modules, and the processor may implement various functions of the computer device by running or executing the computer program and/or modules stored in the memory, and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc.
The memory may be integrated in the processor or may be provided separately from the processor.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor, implements the steps of the hotel data synchronization method of the above embodiments, such as steps S101 to S105 shown in fig. 2, and other extensions of the method and extensions of related steps. Or the computer program, when being executed by the processor, implements the functions of the modules/units of the hotel data synchronizer in the above embodiments, such as the functions of the modules 11 to 15 shown in fig. 3. In order to avoid repetition, a description thereof is omitted.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (8)

1.A hotel data synchronization method, comprising:
acquiring hotel history data of a first dimension from synchronized hotel history data corresponding to a hotel provider;
Carrying out flow comprehensive calculation by using the first-dimension hotel history data through a flow calculation engine to obtain hotel evaluation total score data;
generating at least one hotel data synchronization strategy by using the hotel history data of the first dimension and the hotel evaluation total score data according to hotel data synchronization requirements;
Generating at least one hotel data synchronization subtask according to the hotel synchronization requirement through a distributed task scheduling framework, and distributing the hotel data synchronization strategy to the corresponding hotel data synchronization subtask;
operating the hotel data synchronization subtask to obtain hotel data synchronization results of different hotel suppliers;
The step of obtaining hotel evaluation total score data by using the flow type calculation engine to perform flow type comprehensive calculation by using the first-dimension hotel history data further comprises the following steps: transmitting the hotel assessment total score data to a deployed distributed search and analysis engine; acquiring second-dimension hotel history data of the hotel supplier in a section interception mode, and sending the second-dimension hotel history data to the distributed search and analysis engine;
the method comprises the steps of acquiring second-dimension hotel history data of a hotel provider in a section interception mode, and sending the second-dimension hotel history data to a distributed search and analysis engine, and further comprises the following steps: acquiring analysis results of the distributed search and analysis engine on the hotel history data of the second dimension; and generating at least one hotel data synchronization strategy according to the hotel data synchronization requirement and the analysis result.
2. The hotel data synchronization method of claim 1, further comprising, after the generating at least one hotel data synchronization policy step using the first dimension hotel history data and the hotel evaluation total score data according to hotel data synchronization requirements:
Transmitting the hotel data synchronization strategy to a deployed distributed memory database;
generating hotel data synchronization frequencies corresponding to different hotel data synchronization strategies according to the hotel data synchronization requirements;
and sending the hotel data synchronization frequency to the distributed memory database, and generating a data synchronization key value pair in the distributed memory database, wherein the key of the data synchronization key value pair is the hotel data synchronization strategy, and the value of the data synchronization key value pair is the hotel data synchronization frequency.
3. The hotel data synchronization method of claim 2, wherein after the step of distributing the hotel data synchronization policy to the corresponding hotel data synchronization subtask, further comprising:
Acquiring the data synchronization key value pair corresponding to the hotel data synchronization strategy from the distributed memory database;
and sending the hotel data synchronization frequency in the data synchronization key value pair to the hotel data synchronization subtask.
4. The hotel data synchronization method of claim 3, further comprising, after the step of running the hotel data synchronization subtask to obtain hotel data synchronization results for different hotel suppliers:
Monitoring the hardware resource consumption percentage of the node server when the hotel data synchronization subtask is operated, wherein the node server is positioned in a server cluster, and the hotel data synchronization subtask is distributed to the node server by the distributed task scheduling framework;
selecting the node server with the hardware resource consumption percentage larger than or equal to a preset hardware resource consumption percentage threshold as the node server to be adjusted;
Distributing the target hotel data synchronization subtasks on the node server to be adjusted to a new node server by using the distributed task scheduling framework;
and if no new node server exists in the server cluster, splitting the target hotel data synchronization subtask and then distributing the split target hotel data synchronization subtask to the node server in the server cluster.
5. The hotel data synchronization method of claim 1, further comprising, after the step of running the hotel data synchronization subtask to obtain hotel data synchronization results for different hotel suppliers:
Monitoring the reading frequency of the hotel data synchronization result in a preset time period after being stored;
optimizing the hotel data synchronization strategy according to the reading frequency, and the hotel data synchronization subtasks corresponding to the hotel data synchronization strategy.
6. A hotel data synchronization device, comprising:
the historical data acquisition module is used for acquiring first-dimension hotel historical data from synchronized hotel historical data corresponding to the hotel suppliers;
The evaluation total score data module is used for carrying out flow comprehensive calculation by using the first-dimension hotel history data through the flow calculation engine to obtain hotel evaluation total score data; the evaluation total score data module further includes: the evaluation total score data sending sub-module is used for sending the hotel evaluation total score data to a deployed distributed search and analysis engine; the section interception data sub-module is used for acquiring second-dimension hotel history data of the hotel suppliers in a section interception mode and sending the second-dimension hotel history data to the distributed search and analysis engine; the section interception data sub-module further comprises: the historical data analysis subunit is used for acquiring an analysis result of the distributed search and analysis engine on the second-dimension hotel historical data; the second synchronization strategy generation subunit is used for generating at least one hotel data synchronization strategy according to the hotel data synchronization requirement and the analysis result;
The synchronization strategy generation module is used for generating at least one hotel data synchronization strategy by using the hotel history data of the first dimension and the hotel evaluation total score data according to hotel data synchronization requirements;
The synchronous subtask module is used for generating at least one hotel data synchronous subtask according to the hotel synchronous demands through a distributed task scheduling framework and distributing the hotel data synchronous strategy to the corresponding hotel data synchronous subtask;
And the data synchronization result module is used for running the hotel data synchronization subtasks to obtain hotel data synchronization results of different hotel suppliers.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the hotel data synchronization method of any of claims 1 to 5 when the computer program is executed.
8. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the hotel data synchronization method of any of claims 1 to 5.
CN202310439267.XA 2023-04-20 2023-04-20 Hotel data synchronization method and device, computer equipment and storage medium Active CN116383309B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310439267.XA CN116383309B (en) 2023-04-20 2023-04-20 Hotel data synchronization method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310439267.XA CN116383309B (en) 2023-04-20 2023-04-20 Hotel data synchronization method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116383309A CN116383309A (en) 2023-07-04
CN116383309B true CN116383309B (en) 2024-06-07

Family

ID=86967497

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310439267.XA Active CN116383309B (en) 2023-04-20 2023-04-20 Hotel data synchronization method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116383309B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885884A (en) * 2017-12-01 2018-04-06 深圳市天下房仓科技有限公司 A kind of hotel's method of data synchronization, system and storage medium
CN111324667A (en) * 2020-02-17 2020-06-23 北京达佳互联信息技术有限公司 Data synchronization method and device, electronic equipment and storage medium
CN113407833A (en) * 2021-06-17 2021-09-17 北京众荟信息技术股份有限公司 Method and device for recommending competitive hotel, electronic equipment and readable storage medium
CN114969113A (en) * 2022-04-22 2022-08-30 远光软件股份有限公司 Information searching method, device, storage medium and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140310072A1 (en) * 2013-04-16 2014-10-16 Gth Solutions Sp Zoo Optimization utilizing machine learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885884A (en) * 2017-12-01 2018-04-06 深圳市天下房仓科技有限公司 A kind of hotel's method of data synchronization, system and storage medium
CN111324667A (en) * 2020-02-17 2020-06-23 北京达佳互联信息技术有限公司 Data synchronization method and device, electronic equipment and storage medium
CN113407833A (en) * 2021-06-17 2021-09-17 北京众荟信息技术股份有限公司 Method and device for recommending competitive hotel, electronic equipment and readable storage medium
CN114969113A (en) * 2022-04-22 2022-08-30 远光软件股份有限公司 Information searching method, device, storage medium and server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Calculation and Analysis of Temperature Field and Its Influencing Parameters of Isolated Gas Insulated Bus;Li Ling;High Voltage Apparatus;20130606;第48卷(第7期);88-98 *
基于Hadoop框架的酒店用户数据分析系统的设计与实现;时合生;曾威;;现代经济信息;20191205(第23期);全文 *

Also Published As

Publication number Publication date
CN116383309A (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN109739929B (en) Data synchronization method, device and system
US11755452B2 (en) Log data collection method based on log data generated by container in application container environment, log data collection device, storage medium, and log data collection system
CN112910945B (en) Request link tracking method and service request processing method
Fernandez et al. Liquid: Unifying Nearline and Offline Big Data Integration.
US9336288B2 (en) Workflow controller compatibility
US11042503B1 (en) Continuous data protection and restoration
CN112069265B (en) Synchronization method of configuration data, business data system, computer system and medium
US11860741B2 (en) Continuous data protection
US20200233877A1 (en) Transformation configuration in instance data replication with bi-directional replication support
CN111090699A (en) Service data synchronization method and device, storage medium and electronic device
CN108600300B (en) Log data processing method and device
CN111143382B (en) Data processing method, system and computer readable storage medium
MX2014002956A (en) Marketplace for timely event data distribution.
US11528194B2 (en) Enterprise control plane for data streaming service
CN113515545B (en) Data query method, device, system, electronic equipment and storage medium
CA3109311C (en) Aggregated service status reporter
CN110162524A (en) Management method, device, computer equipment and the storage medium of configuration data
CN114416868B (en) Data synchronization method, device, equipment and storage medium
US11579940B2 (en) Techniques and architectures for managing global installations and configurations
CN105989065B (en) Flash data processing method and system
CN117389830A (en) Cluster log acquisition method and device, computer equipment and storage medium
CN116383309B (en) Hotel data synchronization method and device, computer equipment and storage medium
US8566279B1 (en) Enhanced data collection techniques
WO2022121387A1 (en) Data storage method and apparatus, server, and medium
CN102185863A (en) Intelligent data interactive publishing system and method between server and client

Legal Events

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