CN116383309A - 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
CN116383309A
CN116383309A CN202310439267.XA CN202310439267A CN116383309A CN 116383309 A CN116383309 A CN 116383309A CN 202310439267 A CN202310439267 A CN 202310439267A CN 116383309 A CN116383309 A CN 116383309A
Authority
CN
China
Prior art keywords
hotel
data synchronization
data
synchronization
subtask
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.)
Granted
Application number
CN202310439267.XA
Other languages
Chinese (zh)
Other versions
CN116383309B (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

Images

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 disclosure 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 method generally adopts a full-volume synchronization method or an incremental synchronization method. 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, so as to solve 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 executable 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 that, 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 present application;
figure 2 is a flow chart of a hotel data synchronization method in one embodiment of the present application;
fig. 3 is a schematic structural diagram of a hotel data synchronizing device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a computer device in an embodiment of the present 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, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The hotel data synchronization method provided by the application can be applied to an application environment such as fig. 1, a 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, 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 also can 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 and 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 real-time data streams, and can perform operations such as real-time processing, analysis, filtering, aggregation, calculation and the like on the data streams, and output or display processing results in various manners.
In some embodiments, a JStorm streaming computing engine is used for streaming comprehensive computation, where JStorm is a streaming computing engine with high throughput (processing high throughput data volume and implementing real-time processing and real-time computation of data), high scalability (adding computing nodes or distributed clusters according to computation needs to implement linear expansion), high reliability (supporting fault tolerance and fast fault recovery of data, ensuring accuracy and reliability of data processing, and continuity of data processing), and multi-language support (supporting multiple programming languages), and is suitable for a scenario of streaming hotel history data in the present application, so that the hotel data synchronization method in the present embodiment is executed efficiently.
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 related to the application.
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 section interception is based on the section interception manner such as annotation, XML configuration, aspectJ, dynamic proxy, spring AOP, etc., the section 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 is Codis, which 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. Advantages of Codis include: support high availability and fault tolerance (Codis improves capacity and throughput of a system by dispersing data on a plurality of Redis nodes, and supports data synchronization and fault transfer among the plurality of Redis nodes, thereby improving availability and fault tolerance of the system), simplicity and easiness in use (architecture of Codis is simple compared with that of other distributed memory databases, easy to use and deploy), easiness in expansion (Codis supports storing data fragments on the plurality of Redis nodes, capacity and throughput of the system can be expanded by adding more Redis nodes), web management interface is provided (Codis provides a Web management interface, and cluster management, monitoring, adjustment and other operations can be conveniently performed), and the like.
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 a low-latency, high-availability and easy-to-deploy task scheduling framework, for example LTS (Light Task Schedule) provides a reliable, efficient and easy-to-use task scheduling solution, and has the characteristics of high availability, expandability, 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 of each process, and should not limit the implementation process of the embodiment of the present application in any way.
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 such elements is only a logical partitioning and may be implemented in a practical application.
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. Alternatively, the processor, when executing the computer program, implements the functions of the modules/units of the hotel data synchronizer in the above embodiment, such as the functions of the modules 11 to 15 shown in 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 circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (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. Alternatively, the computer program, when executed by the processor, implements 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 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 the various 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 DRAM (SLDRAM), memory bus 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 are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should 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 (10)

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;
and running the hotel data synchronization subtasks to obtain hotel data synchronization results of different hotel suppliers.
2. The hotel data synchronization method according to claim 1, wherein after the step of obtaining hotel assessment total score data, the step of performing, by the streaming calculation engine, streaming comprehensive calculation using the first-dimension hotel history data, further comprises:
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.
3. The hotel data synchronization method according to claim 2, wherein the step of obtaining the second-dimension hotel history data of the hotel supplier by means of cut-plane interception, and sending the second-dimension hotel history data to the distributed search and analysis engine further comprises:
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.
4. 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.
5. The hotel data synchronization method of claim 4, 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.
6. The hotel data synchronization method of claim 5, 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.
7. 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.
8. 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 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.
9. 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 7 when the computer program is executed.
10. 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 7.
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 true CN116383309A (en) 2023-07-04
CN116383309B 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 (5)

* 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
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

Patent Citations (5)

* 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
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
LI LING: "Calculation and Analysis of Temperature Field and Its Influencing Parameters of Isolated Gas Insulated Bus", HIGH VOLTAGE APPARATUS, vol. 48, no. 7, 6 June 2013 (2013-06-06), pages 88 - 98 *
时合生;曾威;: "基于Hadoop框架的酒店用户数据分析系统的设计与实现", 现代经济信息, no. 23, 5 December 2019 (2019-12-05) *

Also Published As

Publication number Publication date
CN116383309B (en) 2024-06-07

Similar Documents

Publication Publication Date Title
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.
CN112069265B (en) Synchronization method of configuration data, business data system, computer system and medium
US11042503B1 (en) Continuous data protection and restoration
CN111090699A (en) Service data synchronization method and device, storage medium and electronic device
CN111143382B (en) Data processing method, system and computer readable storage medium
US11860741B2 (en) Continuous data protection
CN102880503A (en) Data analysis system and data analysis method
CN113515545B (en) Data query method, device, system, electronic equipment and storage medium
CN102937964B (en) Intelligent data service method based on distributed system
CA3109311C (en) Aggregated service status reporter
CN111966943A (en) Streaming data distribution method and system
CN104636395A (en) Count processing method and device
US11579940B2 (en) Techniques and architectures for managing global installations and configurations
CN114416868B (en) Data synchronization method, device, equipment and storage medium
CN105989065B (en) Flash data processing method and system
CN116383309B (en) Hotel data synchronization method and device, computer equipment and storage medium
US8566279B1 (en) Enhanced data collection techniques
CN111049898A (en) Method and system for realizing cross-domain architecture of computing cluster resources
CN111597157A (en) Method for improving log processing system architecture
WO2022121387A1 (en) Data storage method and apparatus, server, and medium
US10706073B1 (en) Partitioned batch processing for a usage analysis system
Simić et al. CRDTs as replication strategy in large-scale edge distributed system: An overview
US10348596B1 (en) Data integrity monitoring for a usage analysis system

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