CN111258810A - Method, system, terminal equipment and storage medium for realizing data source switching - Google Patents
Method, system, terminal equipment and storage medium for realizing data source switching Download PDFInfo
- Publication number
- CN111258810A CN111258810A CN202010020808.1A CN202010020808A CN111258810A CN 111258810 A CN111258810 A CN 111258810A CN 202010020808 A CN202010020808 A CN 202010020808A CN 111258810 A CN111258810 A CN 111258810A
- Authority
- CN
- China
- Prior art keywords
- data source
- host
- application program
- switching
- main data
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明提供了一种切换数据源的实现方法、系统、终端设备和存储介质,其方法包括:检测主机是否宕机;在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务;在主机未宕机时应用程序根据主数据源提供短信聚合服务。本发明提供持续可用的短信能力,以便能够在不重启情况下替换数据源,从而为用户提供可靠、稳定的短信聚合服务。
The present invention provides a method, system, terminal device and storage medium for switching data sources. The method includes: detecting whether a host is down; upgrading a cold backup data source to a temporary primary data source and broadcasting notification when the host is down The application program enables the application program to provide SMS aggregation services based on the temporary main data source; when the host is not down, the application program provides SMS aggregation services based on the main data source. The present invention provides continuously available short message capability, so that data sources can be replaced without restarting, thereby providing users with a reliable and stable short message aggregation service.
Description
技术领域technical field
本发明涉及数据处理技术领域,尤指一种切换数据源的实现方法、系统、终端设备和存储介质。The present invention relates to the technical field of data processing, in particular to an implementation method, system, terminal device and storage medium for switching data sources.
背景技术Background technique
一般企业都有发送短信的能力,依赖第三方短信服务或者集成第三方的短信能力到短信聚合服务。短信聚合服务对很多用户所需要的业务服务来说是很重要的基础服务。General enterprises have the ability to send short messages, relying on third-party short message services or integrating third-party short message capabilities into short message aggregation services. The SMS aggregation service is an important basic service for the business services required by many users.
为了提高短信聚合服务的可用性和稳定行,短信聚合服务会部署在双机房下。一般双机房架构下,会有一个机房冷备数据库,在切换机房的时候,会把冷备数据库升级为主数据库,应用程序需要修改数据源配置,修改配置后重启才能生效。这样,会导致短信聚合服务需要重启后才能加载新数据源,从而导致短信聚合服务不稳定的时间增长,影响用户的使用体验。In order to improve the availability and stability of the SMS aggregation service, the SMS aggregation service will be deployed in dual computer rooms. Generally, under the dual-computer room architecture, there will be a cold standby database in the computer room. When the computer room is switched, the cold standby database will be upgraded to the main database. The application needs to modify the data source configuration, and restart the configuration to take effect. In this way, the SMS aggregation service needs to be restarted before loading the new data source, which leads to an increase in the unstable time of the SMS aggregation service and affects the user experience.
因此,如何提供持续可用的短信能力,以便能够在不重启情况下替换数据源,从而为用户提供可靠、稳定的短信聚合服务是亟需解决的问题。Therefore, how to provide a continuously available short message capability so that the data source can be replaced without restarting, so as to provide users with a reliable and stable short message aggregation service is an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本发明的目的是提供一种切换数据源的实现方法、系统、终端设备和存储介质,实现提供持续可用的短信能力,以便能够在不重启情况下替换数据源,从而为用户提供可靠、稳定的短信聚合服务。The purpose of the present invention is to provide an implementation method, system, terminal device and storage medium for switching data sources, so as to realize the ability to provide continuously available short messages, so as to be able to replace data sources without restarting, thereby providing users with reliable and stable SMS aggregation service.
本发明提供的技术方案如下:The technical scheme provided by the present invention is as follows:
本发明提供一种切换数据源的实现方法,包括步骤:The present invention provides an implementation method for switching data sources, comprising the steps of:
检测主机是否宕机;Check whether the host is down;
在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得所述应用程序根据所述临时主数据源提供短信聚合服务;When the host is down, the cold standby data source is upgraded to a temporary primary data source and broadcast to notify the application, so that the application provides the short message aggregation service according to the temporary primary data source;
在主机未宕机时所述应用程序根据所述主数据源提供短信聚合服务。When the host is not down, the application provides a short message aggregation service according to the main data source.
进一步的,所述检测主机是否宕机之前包括步骤:Further, before the detection of whether the host is down, the steps include:
每隔预设时间段获取数据源配置信息;Obtain data source configuration information every preset time period;
所述在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得所述应用程序根据所述临时主数据源提供短信聚合服务包括步骤:The step of upgrading the cold standby data source to a temporary primary data source when the host is down and informing the application program by broadcasting, so that the application program provides the short message aggregation service according to the temporary primary data source includes the steps:
在所述主机宕机时,将所述冷备数据源升级为临时主数据源;When the host is down, upgrade the cold backup data source to a temporary primary data source;
初始化主数据源,且根据新获取的数据源配置信息创建第一数据源对象;Initialize the main data source, and create a first data source object according to the newly acquired data source configuration information;
根据所述新获取的数据源配置信息中的冷备数据源配置信息进行数据源配置;Perform data source configuration according to the cold standby data source configuration information in the newly acquired data source configuration information;
配置完成后广播发送数据源切换信息,以便所述应用程序通过所述第一数据源对象切换访问所述临时主数据源,使得所述应用程序根据所述临时主数据源提供短信聚合服务。After the configuration is completed, the data source switching information is broadcast and sent, so that the application program switches to access the temporary main data source through the first data source object, so that the application program provides the short message aggregation service according to the temporary main data source.
进一步的,所述检测主机是否宕机之前包括步骤:Further, before the detection of whether the host is down, the steps include:
每隔预设时间段获取数据源配置信息;Obtain data source configuration information every preset time period;
所述在主机未宕机时所述应用程序根据所述主数据源提供短信聚合服务包括步骤:The provision of the short message aggregation service by the application according to the main data source when the host is not down includes the steps:
在所述主机未宕机时初始化主数据源,且根据新获取的数据源配置信息创建第二数据源对象;Initialize the primary data source when the host is not down, and create a second data source object according to the newly acquired data source configuration information;
创建完成后广播发送对象创建信息,以便所述应用程序通过所述第二数据源对象访问所述主数据源,使得所述应用程序根据所述主数据源提供短信聚合服务。After the creation is completed, the object creation information is broadcast and sent, so that the application program accesses the main data source through the second data source object, so that the application program provides a short message aggregation service according to the main data source.
进一步的,所述检测主机是否宕机包括步骤:Further, the detecting whether the host is down includes the steps:
在预设时长内未收到来自所述主机的心跳消息时,确定所述主机宕机。When the heartbeat message from the host is not received within a preset time period, it is determined that the host is down.
本发明还提供一种切换数据源的实现系统,包括:The present invention also provides an implementation system for switching data sources, including:
检测模块,用于检测主机是否宕机;Detection module, used to detect whether the host is down;
处理模块,用于在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得所述应用程序根据所述临时主数据源提供短信聚合服务;a processing module, configured to upgrade the cold standby data source to a temporary primary data source when the host is down, and broadcast to notify the application program, so that the application program provides the short message aggregation service according to the temporary primary data source;
所述处理模块,还用于在主机未宕机时所述应用程序根据所述主数据源提供短信聚合服务。The processing module is further configured to provide the short message aggregation service by the application according to the main data source when the host is not down.
进一步的,还包括:Further, it also includes:
获取模块,用于每隔预设时间段获取数据源配置信息;The acquisition module is used to acquire the data source configuration information every preset time period;
所述处理模块包括:The processing module includes:
第一处理单元,用于在所述主机宕机时,将所述冷备数据源升级为临时主数据源;a first processing unit, configured to upgrade the cold backup data source to a temporary primary data source when the host is down;
第一创建单元,用于初始化主数据源,且根据新获取的数据源配置信息创建第一数据源对象;a first creation unit, used to initialize the main data source, and create a first data source object according to the newly acquired data source configuration information;
配置单元,用于根据所述新获取的数据源配置信息中的冷备数据源配置信息进行数据源配置;a configuration unit, configured to perform data source configuration according to the cold standby data source configuration information in the newly acquired data source configuration information;
执行单元,用于配置完成后广播发送数据源切换信息,以便所述应用程序通过所述第一数据源对象切换访问所述临时主数据源,使得所述应用程序根据所述临时主数据源提供短信聚合服务。The execution unit is configured to broadcast and send data source switching information after the configuration is completed, so that the application program switches to access the temporary main data source through the first data source object, so that the application program provides the temporary main data source according to the SMS aggregation service.
进一步的,所述处理模块包括:Further, the processing module includes:
第二创建单元,用于在所述主机未宕机时初始化主数据源,且根据新获取的数据源配置信息创建第二数据源对象;a second creation unit, configured to initialize the main data source when the host is not down, and create a second data source object according to the newly acquired data source configuration information;
第二执行单元,用于创建完成后广播发送对象创建信息,以便所述应用程序通过所述第二数据源对象访问所述主数据源,使得所述应用程序根据所述主数据源提供短信聚合服务。The second execution unit is configured to broadcast and send object creation information after the creation is completed, so that the application program can access the main data source through the second data source object, so that the application program can provide SMS aggregation according to the main data source Serve.
进一步的,所述检测模块,还用于在预设时长内未收到来自所述主机的心跳消息时,确定所述主机宕机。Further, the detection module is further configured to determine that the host is down when a heartbeat message from the host is not received within a preset time period.
本发明还提供一种终端设备,包括处理器、存储器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器,用于执行所述存储器上所存放的计算机程序,实现如所述的切换数据源的实现方法所执行的操作。The present invention also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and running on the processor, where the processor is used to execute a computer program stored in the memory The program implements the operations performed by the described implementation method for switching data sources.
本发明还提供一种存储介质,其特征在于,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如所述的切换数据源的实现方法所执行的操作。The present invention also provides a storage medium, characterized in that the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to implement the operations performed by the method for switching data sources.
通过本发明提供的一种切换数据源的实现方法、系统、终端设备和存储介质,能够提供持续可用的短信能力,以便能够在不重启情况下替换数据源,从而为用户提供可靠、稳定的短信聚合服务。The method, system, terminal device and storage medium for switching data sources provided by the present invention can provide continuously available short message capabilities, so that data sources can be replaced without restarting, thereby providing users with reliable and stable short messages Aggregation service.
附图说明Description of drawings
下面将以明确易懂的方式,结合附图说明优选实施方式,对一种切换数据源的实现方法、系统、终端设备和存储介质的上述特性、技术特征、优点及其实现方式予以进一步说明。The preferred embodiments will be described below in a clear and easy-to-understand manner with reference to the accompanying drawings, and further description will be given of the above-mentioned characteristics, technical features, advantages and implementation methods of a method, system, terminal device and storage medium for switching data sources.
图1是本发明一种切换数据源的实现方法的一个实施例的流程图;1 is a flow chart of an embodiment of a method for implementing switching data sources of the present invention;
图2是本发明一种切换数据源的实现方法的另一个实施例的流程图;2 is a flowchart of another embodiment of a method for implementing data source switching according to the present invention;
图3是本发明一种切换数据源的实现方法的另一个实施例的流程图;FIG. 3 is a flowchart of another embodiment of a method for implementing switching data sources of the present invention;
图4是本发明一种切换数据源的实现方法的另一个实施例的流程图;FIG. 4 is a flowchart of another embodiment of a method for realizing switching data sources of the present invention;
图5是本发明一种切换数据源的实现方法的另一个实施例的流程图;FIG. 5 is a flowchart of another embodiment of a method for implementing switching data sources of the present invention;
图6是本发明一种切换数据源的实现方法的另一个实施例的流程图;6 is a flow chart of another embodiment of a method for implementing switching data sources of the present invention;
图7是本发明一种切换数据源的实现系统的一个实施例的结构示意图;7 is a schematic structural diagram of an embodiment of an implementation system for switching data sources according to the present invention;
图8是本发明apollo配置中心配置流程示意图;Fig. 8 is the configuration flow schematic diagram of apollo configuration center of the present invention;
图9是本发明apollo配置中心配置流程示意图;Fig. 9 is apollo configuration center configuration flow schematic diagram of the present invention;
图10是本发明一种计算机设备的一个实施例的结构示意图。FIG. 10 is a schematic structural diagram of an embodiment of a computer device of the present invention.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其他实施例中也可以实现本申请。在其他情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所述描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其他特征、整体、步骤、操作、元素、组件和/或集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described feature, integer, step, operation, element and/or component, but does not exclude one or more other The presence or addition of features, integers, steps, operations, elements, components and/or collections.
为使图面简洁,各图中只示意性地表示出了与本发明相关的部分,它们并不代表其作为产品的实际结构。另外,以使图面简洁便于理解,在有些图中具有相同结构或功能的部件,仅示意性地绘示了其中的一个,或仅标出了其中的一个。在本文中,“一个”不仅表示“仅此一个”,也可以表示“多于一个”的情形。In order to keep the drawings concise, the drawings only schematically show the parts related to the present invention, and they do not represent its actual structure as a product. In addition, in order to make the drawings concise and easy to understand, in some drawings, only one of the components having the same structure or function is schematically shown, or only one of them is marked. As used herein, "one" not only means "only one", but also "more than one".
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be further understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items .
具体实现中,本申请实施例中描述的终端设备包括但不限于诸如具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的移动电话、膝上型计算机或平板计算机之类的其他便携式设备。In specific implementation, the terminal devices described in the embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptop computers or tablet computers with touch-sensitive surfaces (eg, touch screen displays and/or touch pads). .
终端设备支持各种应用程序,例如以下中的一个或多个:绘图应用程序、演示应用程序、网络创建应用程序、文字处理应用程序、盘刻录应用程序、电子表格应用程序、游戏应用程序、电话应用程序、视频会议应用程序、电子邮件应用程序、即时消息收发应用程序、锻炼支持应用程序、照片管理应用程序、数码相机应用程序、数字摄像机应用程序、Web浏览应用程序、数字音乐播放器应用程序和/或数字视频播放器应用程序。The terminal device supports various applications such as one or more of the following: drawing applications, presentation applications, web creation applications, word processing applications, disc burning applications, spreadsheet applications, gaming applications, telephony Apps, Video Conferencing Apps, Email Apps, Instant Messaging Apps, Workout Support Apps, Photo Management Apps, Digital Camera Apps, Digital Video Camera Apps, Web Browsing Apps, Digital Music Player Apps and/or digital video player applications.
另外,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the present application, the terms "first", "second" and the like are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对照附图说明本发明的具体实施方式。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图,并获得其他的实施方式。In order to more clearly describe the embodiments of the present invention or the technical solutions in the prior art, the specific embodiments of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative efforts, and obtain other implementations.
本发明的一个实施例,如图1所示,一种切换数据源的实现方法,包括:An embodiment of the present invention, as shown in FIG. 1 , is an implementation method for switching data sources, including:
S100检测主机是否宕机;S100 detects whether the host is down;
具体的,短信聚合服务是为用户提供的一种短信通信服务的基本能力,通常指的是短信发送服务。短信聚合服务包括群发短信、短信验证码、短信通知、推广短信、营销短信、会员通知短信等通信服务。其中,短信通知支持多种场景的通知短信发送。推广短信支持各类业务场景的短信通知发送,例如支持商超短信群发、房地产短信群发、教育短信群发、电商短信群发、信用卡短信群发、招聘短信群发等行业短信群发等通信服务。Specifically, the short message aggregation service is a basic capability of a short message communication service provided for users, and usually refers to a short message sending service. SMS aggregation services include group SMS, SMS verification code, SMS notification, promotional SMS, marketing SMS, member notification SMS and other communication services. Among them, the SMS notification supports notification SMS sending in various scenarios. The promotion SMS supports the sending of SMS notifications in various business scenarios, such as supporting the mass messaging of business and supermarkets, mass messaging of real estate, mass messaging of education, mass messaging of e-commerce, mass messaging of credit cards, mass messaging of recruitment and other communication services such as mass messaging of industry messages.
S200在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务;When the host is down, the S200 upgrades the cold backup data source to a temporary primary data source and broadcasts it to the application, so that the application provides SMS aggregation services based on the temporary primary data source;
S300在主机未宕机时应用程序根据主数据源提供短信聚合服务。The S300 provides SMS aggregation services based on the main data source when the host is not down.
具体的,本实施例中,在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,使得在数据源切换时短信聚合服务无需重启,自动加载新数据源,减少服务不稳定的时间,减少修改配置的时间,对运维友好。Specifically, in this embodiment, when the host is down, the cold backup data source is upgraded to a temporary primary data source and broadcasted to notify the application, so that the application provides the short message aggregation service according to the temporary primary data source, so that when the data source is switched, the short message The aggregation service does not need to be restarted, and the new data source is automatically loaded, which reduces the time of service instability, reduces the time to modify the configuration, and is friendly to operation and maintenance.
此外,在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,提升数据源切换效率,避免主机实际宕机时无法及时切换数据源的情况,进而保证了短信聚合服务的稳定性,提升用户的使用体验。In addition, when the host is down, the cold backup data source is upgraded to a temporary primary data source and broadcast to the application, so that the application can provide SMS aggregation services based on the temporary primary data source, improve the efficiency of data source switching, and avoid the failure of the host when the actual downtime occurs. The situation of switching data sources in time ensures the stability of the SMS aggregation service and improves the user experience.
本发明的一个实施例,如图2所示,一种切换数据源的实现方法,包括:An embodiment of the present invention, as shown in FIG. 2 , is a method for implementing data source switching, including:
S010每隔预设时间段获取数据源配置信息;S010 obtains data source configuration information every preset time period;
S100检测主机是否宕机;S100 detects whether the host is down;
S210在主机宕机时,将冷备数据源升级为临时主数据源;S210 upgrades the cold backup data source to the temporary primary data source when the host is down;
S220初始化主数据源,且根据新获取的数据源配置信息创建第一数据源对象;S220 initializes the main data source, and creates a first data source object according to the newly acquired data source configuration information;
S230根据新获取的数据源配置信息中的冷备数据源配置信息进行数据源配置;S230 performs data source configuration according to the cold standby data source configuration information in the newly acquired data source configuration information;
S240配置完成后广播发送数据源切换信息,以便应用程序通过第一数据源对象切换访问临时主数据源,使得应用程序根据临时主数据源提供短信聚合服务;S240, after the configuration is completed, the data source switching information is broadcast and sent, so that the application program switches to access the temporary main data source through the first data source object, so that the application program provides the short message aggregation service according to the temporary main data source;
S300在主机未宕机时应用程序根据主数据源提供短信聚合服务。The S300 provides SMS aggregation services based on the main data source when the host is not down.
具体的,本实施例中与上述实施例相同的部分在此不再一一赘述。本实施例中,每隔预设时间段获取数据源配置信息,所获取的数据源配置信息包括druidProperties(主数据源配置),namespace(备数据源配置所在的apollo空间名),name(属性源名称),prefix(属性前缀),key(切换数据源开关的属性key)。Specifically, the parts in this embodiment that are the same as the above-mentioned embodiments will not be repeated here. In this embodiment, the data source configuration information is obtained every preset time period, and the obtained data source configuration information includes druidProperties (main data source configuration), namespace (apollo space name where the standby data source configuration is located), name (property source configuration) name), prefix (attribute prefix), key (attribute key for switching the data source switch).
如图8和图9所示,当主机宕机时修改apollo配置中心namespace对应的数据源配置,即把namespace(备数据源配置所在的apollo空间名)写入阿波罗配置中心、As shown in Figure 8 and Figure 9, when the host is down, modify the data source configuration corresponding to the namespace of the Apollo configuration center, that is, write the namespace (the name of the apollo space where the standby data source configuration is located) into the Apollo configuration center,
New一个Builder即新建一个第一数据源对象,具体为根据以上数据源配置信息和Builder的相应方法初始化builder,调用build()方法创建第一数据源对象,从而使得应用程序即可像普通数据源一样使用这个新创的第一数据源对象,此处的第一数据源对象为升级为临时主数据源的冷备数据源。New a Builder means creating a first data source object. Specifically, initializing the builder according to the above data source configuration information and the corresponding method of the Builder, and calling the build() method to create the first data source object, so that the application can be like a common data source. The newly created first data source object is also used, where the first data source object is a cold standby data source upgraded to a temporary primary data source.
修改key=true,这步即切换主数据源为冷备数据源,ApolloHotReplaceSwitchListener监听到key的变化,调用ApolloDruidSourceHandler的handle方法进行数据源切换操作。广播告知应用程序配置切换为冷备数据库,New一个Builder,根据以上信息和Builder的相应方法初始化builder,调用build()方法创建第一数据源对象,应用程序即可像普通数据源一样使用这个冷备数据源。Modify key=true, this step is to switch the main data source to the cold standby data source, ApolloHotReplaceSwitchListener listens to the change of the key, and calls the handle method of ApolloDruidSourceHandler to switch the data source. The broadcast informs the application configuration to switch to the cold standby database, create a new builder, initialize the builder according to the above information and the corresponding method of the builder, and call the build() method to create the first data source object. backup data source.
在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,使得在数据源切换时短信聚合服务无需重启,自动加载新数据源,减少服务不稳定的时间,减少修改配置的时间,对运维友好。When the host is down, upgrade the cold standby data source to a temporary primary data source and broadcast it to the application, so that the application can provide SMS aggregation services according to the temporary primary data source, so that the SMS aggregation service does not need to be restarted when the data source is switched, and the new SMS aggregation service is automatically loaded. Data source, reduce the time of service instability, reduce the time to modify the configuration, and be friendly to operation and maintenance.
此外,在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,提升数据源切换效率,避免主机实际宕机时无法及时切换数据源的情况,进而保证了短信聚合服务的稳定性,提升用户的使用体验。In addition, when the host is down, the cold backup data source is upgraded to a temporary primary data source and broadcast to the application, so that the application can provide SMS aggregation services based on the temporary primary data source, improve the efficiency of data source switching, and avoid the failure of the host when the actual downtime occurs. The situation of switching data sources in time ensures the stability of the SMS aggregation service and improves the user experience.
本发明的一个实施例,如图3所示,一种切换数据源的实现方法,包括:An embodiment of the present invention, as shown in FIG. 3 , is a method for implementing data source switching, including:
S010每隔预设时间段获取数据源配置信息;S010 obtains data source configuration information every preset time period;
S100检测主机是否宕机;S100 detects whether the host is down;
S200在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务;When the host is down, the S200 upgrades the cold backup data source to a temporary primary data source and broadcasts it to the application, so that the application provides SMS aggregation services based on the temporary primary data source;
S310在主机未宕机时初始化主数据源,且根据新获取的数据源配置信息创建第二数据源对象;S310 initializes the main data source when the host is not down, and creates a second data source object according to the newly acquired data source configuration information;
S320创建完成后广播发送对象创建信息,以便应用程序通过第二数据源对象访问主数据源,使得应用程序根据主数据源提供短信聚合服务。After S320 is created, the object creation information is broadcast and sent, so that the application program accesses the main data source through the second data source object, so that the application program provides the short message aggregation service according to the main data source.
具体的,本实施例中与上述实施例相同的部分在此不再一一赘述。本实施例中,每隔预设时间段获取数据源配置信息,所获取的数据源配置信息包括druidProperties(主数据源配置),namespace(备数据源配置所在的apollo空间名),name(属性源名称),prefix(属性前缀),key(切换数据源开关的属性key)。Specifically, the parts in this embodiment that are the same as the above-mentioned embodiments will not be repeated here. In this embodiment, the data source configuration information is obtained every preset time period, and the obtained data source configuration information includes druidProperties (main data source configuration), namespace (apollo space name where the standby data source configuration is located), name (property source configuration) name), prefix (attribute prefix), key (attribute key for switching the data source switch).
如图8和图9所示,New一个Builder即新建一个数据源对象,具体为根据以上数据源配置信息和Builder的相应方法初始化builder,调用build()方法创建第二数据源对象,从而使得应用程序即可像普通数据源一样使用这个新创的第二数据源对象,此处的第二数据源对象为升级为主数据源。As shown in Figure 8 and Figure 9, New a Builder is to create a new data source object. Specifically, the builder is initialized according to the above data source configuration information and the corresponding method of the Builder, and the build() method is called to create a second data source object, so as to make the application The program can use the newly created second data source object like a common data source, where the second data source object is upgraded to the primary data source.
修改key=false,这步即回滚主数据源,ApolloHotReplaceSwitchListener监听到key的变化,调用ApolloDruidSourceHandler的rollback方法根据druidProperties回滚主数据源。Modify key=false, this step is to roll back the main data source, ApolloHotReplaceSwitchListener listens to the change of the key, and calls the rollback method of ApolloDruidSourceHandler to roll back the main data source according to druidProperties.
具体的,本实施例中,在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,使得在数据源切换时短信聚合服务无需重启,自动加载新数据源,减少服务不稳定的时间,减少修改配置的时间,对运维友好。Specifically, in this embodiment, when the host is down, the cold backup data source is upgraded to a temporary primary data source and broadcasted to notify the application, so that the application provides the short message aggregation service according to the temporary primary data source, so that when the data source is switched, the short message The aggregation service does not need to be restarted, and the new data source is automatically loaded, which reduces the time of service instability, reduces the time to modify the configuration, and is friendly to operation and maintenance.
此外,在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,提升数据源切换效率,避免主机实际宕机时无法及时切换数据源的情况,进而保证了短信聚合服务的稳定性,提升用户的使用体验。In addition, when the host is down, the cold backup data source is upgraded to a temporary primary data source and broadcast to the application, so that the application can provide SMS aggregation services based on the temporary primary data source, improve the efficiency of data source switching, and avoid the failure of the host when the actual downtime occurs. The situation of switching data sources in time ensures the stability of the SMS aggregation service and improves the user experience.
本发明的一个实施例,如图4所示,一种切换数据源的实现方法,包括:An embodiment of the present invention, as shown in FIG. 4 , is a method for implementing data source switching, including:
S010每隔预设时间段获取数据源配置信息;S010 obtains data source configuration information every preset time period;
S110在预设时长内未收到来自主机的心跳消息时,确定主机宕机;When S110 does not receive a heartbeat message from the host within a preset time period, it is determined that the host is down;
S210在主机宕机时,将冷备数据源升级为临时主数据源;S210 upgrades the cold backup data source to the temporary primary data source when the host is down;
S220初始化主数据源,且根据新获取的数据源配置信息创建第一数据源对象;S220 initializes the main data source, and creates a first data source object according to the newly acquired data source configuration information;
S230根据新获取的数据源配置信息中的冷备数据源配置信息进行数据源配置;S230 performs data source configuration according to the cold standby data source configuration information in the newly acquired data source configuration information;
S240配置完成后广播发送数据源切换信息,以便应用程序通过第一数据源对象切换访问临时主数据源,使得应用程序根据临时主数据源提供短信聚合服务;S240, after the configuration is completed, the data source switching information is broadcast and sent, so that the application program switches to access the temporary main data source through the first data source object, so that the application program provides the short message aggregation service according to the temporary main data source;
S300在主机未宕机时应用程序根据主数据源提供短信聚合服务。The S300 provides SMS aggregation services based on the main data source when the host is not down.
具体的,本实施例中与上述实施例相同的部分在此不再一一赘述。在本发明实施例的实施场景中,可以由服务器对主机进行心跳检测。服务器可以是具有心跳检测机制,且能够接收心跳消息的节点,主机可以是具有心跳检测机制,且能够发送心跳消息的节点。Specifically, the parts in this embodiment that are the same as the above-mentioned embodiments will not be repeated here. In the implementation scenario of the embodiment of the present invention, the server may perform heartbeat detection on the host. The server may be a node with a heartbeat detection mechanism and capable of receiving heartbeat messages, and the host may be a node with a heartbeat detection mechanism and capable of sending heartbeat messages.
在本发明实施例的实施场景中,可以由主机每隔一定的时间间隔就向服务器发送心跳消息。从服务器收到来自主机的一条心跳消息为开始时刻,如果服务器在心跳超时时长之内收到来自主机的下一条心跳消息,则判定主机处于正常工作状态,如果服务器未在心跳超时时长之内收到来自主机的下一条心跳消息,则判定主机宕机,其中主机宕机可以被认为是主机已经停止工作,也可以被认为是主机工作效率明显低于正常工作效率,因为这种情况与主机停止工作的情况可以认为是同一情况作相同处理。In the implementation scenario of the embodiment of the present invention, the host may send a heartbeat message to the server at regular intervals. The time when the server receives a heartbeat message from the host is the start time. If the server receives the next heartbeat message from the host within the heartbeat timeout period, it is determined that the host is in a normal working state. If the server does not receive a heartbeat message within the heartbeat timeout period To the next heartbeat message from the host, it is determined that the host is down. The host down can be considered as the host has stopped working, or it can be considered as the host's working efficiency is significantly lower than the normal working efficiency, because this situation is related to the host stopping. The work situation can be regarded as the same situation and treated the same.
在本发明实施例的实施场景中,也可以由服务器向主机发送请求消息,主机在没有宕机时会在接收请求消息后向服务器发送心跳消息。从服务器发送请求消息为开始时刻,如果服务器在心跳超时时长之内收到来自主机的心跳消息,则判定主机处于正常工作状态,如果服务器未在心跳超时时长之内收到来自主机的心跳消息,则判定主机宕机。In the implementation scenario of the embodiment of the present invention, the server may also send a request message to the host, and the host will send a heartbeat message to the server after receiving the request message when there is no downtime. The time when the request message is sent from the server is the start time. If the server receives a heartbeat message from the host within the heartbeat timeout period, it is determined that the host is in a normal working state. If the server does not receive a heartbeat message from the host within the heartbeat timeout period, It is determined that the host is down.
通过本实施例,通过心跳机制的方式进行主机宕机检测,避免人工主观判断主机是否宕机,由于后台自动智能判断检测主机是否宕机,一旦检测出主机宕机时,就能切换数据源,提升数据源切换的准确性和效率,避免主机实际宕机时无法及时切换数据源的情况,进而保证了短信聚合服务的稳定性,提升用户的使用体验。Through this embodiment, the host downtime detection is carried out by means of the heartbeat mechanism, so as to avoid artificial subjective judgment of whether the host is down. Since the background automatically and intelligently determines whether the detection host is down, once it is detected that the host is down, the data source can be switched. Improve the accuracy and efficiency of data source switching, avoid the situation that the host cannot switch data sources in time when the host actually goes down, thereby ensuring the stability of the SMS aggregation service and improving the user experience.
本发明的一个实施例,如图5所示,一种切换数据源的实现方法,包括:An embodiment of the present invention, as shown in FIG. 5 , is a method for implementing data source switching, including:
S010每隔预设时间段获取数据源配置信息;S010 obtains data source configuration information every preset time period;
S110在预设时长内未收到来自主机的心跳消息时,确定主机宕机;When S110 does not receive a heartbeat message from the host within a preset time period, it is determined that the host is down;
S200在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务;When the host is down, the S200 upgrades the cold backup data source to a temporary primary data source and broadcasts it to the application, so that the application provides SMS aggregation services based on the temporary primary data source;
S310在主机未宕机时初始化主数据源,且根据新获取的数据源配置信息创建第二数据源对象;S310 initializes the main data source when the host is not down, and creates a second data source object according to the newly acquired data source configuration information;
S320创建完成后广播发送对象创建信息,以便应用程序通过第二数据源对象访问主数据源,使得应用程序根据主数据源提供短信聚合服务。After S320 is created, the object creation information is broadcast and sent, so that the application program accesses the main data source through the second data source object, so that the application program provides the short message aggregation service according to the main data source.
具体的,本实施例中与上述实施例相同的部分在此不再一一赘述。Specifically, the parts in this embodiment that are the same as the above-mentioned embodiments will not be repeated here.
本发明的一个实施例,如图6所示,一种切换数据源的实现方法,包括:An embodiment of the present invention, as shown in FIG. 6 , is a method for implementing data source switching, including:
S010每隔预设时间段获取数据源配置信息;S010 obtains data source configuration information every preset time period;
S110在预设时长内未收到来自主机的心跳消息时,确定主机宕机;When S110 does not receive a heartbeat message from the host within a preset time period, it is determined that the host is down;
S210在主机宕机时,将冷备数据源升级为临时主数据源;S210 upgrades the cold backup data source to the temporary primary data source when the host is down;
S220初始化主数据源,且根据新获取的数据源配置信息创建第一数据源对象;S220 initializes the main data source, and creates a first data source object according to the newly acquired data source configuration information;
S230根据新获取的数据源配置信息中的冷备数据源配置信息进行数据源配置;S230 performs data source configuration according to the cold standby data source configuration information in the newly acquired data source configuration information;
S240配置完成后广播发送数据源切换信息,以便应用程序通过第一数据源对象切换访问临时主数据源,使得应用程序根据临时主数据源提供短信聚合服务;S240, after the configuration is completed, the data source switching information is broadcast and sent, so that the application program switches to access the temporary main data source through the first data source object, so that the application program provides the short message aggregation service according to the temporary main data source;
S310在主机未宕机时初始化主数据源,且根据新获取的数据源配置信息创建第二数据源对象;S310 initializes the main data source when the host is not down, and creates a second data source object according to the newly acquired data source configuration information;
S320创建完成后广播发送对象创建信息,以便应用程序通过第二数据源对象访问主数据源,使得应用程序根据主数据源提供短信聚合服务。After S320 is created, the object creation information is broadcast and sent, so that the application program accesses the main data source through the second data source object, so that the application program provides the short message aggregation service according to the main data source.
具体的,本实施例中与上述实施例相同的部分在此不再一一赘述。Specifically, the parts in this embodiment that are the same as the above-mentioned embodiments will not be repeated here.
示例性的,如图8和图9所示,Apollo(阿波罗)配置中心,Apollo配置中心是开源配置管理中心是开源配置管理中心,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性。Exemplarily, as shown in Figure 8 and Figure 9, the Apollo configuration center, the Apollo configuration center is an open source configuration management center, an open source configuration management center, which can centrally manage the configuration and configuration modification of different environments and clusters After that, it can be pushed to the application side in real time, and has the characteristics of standardized permissions and process governance.
Apollo配置中心提供了一个统一界面集中式管理不同环境(environment)、不同集群(cluster)、不同命名空间(namespace)的配置。Apollo Configuration Center provides a unified interface to centrally manage the configuration of different environments, clusters, and namespaces.
同一份代码部署在不同的集群,可以有不同的配置,比如zookeeper的地址等。The same code is deployed in different clusters and can have different configurations, such as the address of zookeeper.
通过命名空间(namespace)可以很方便地支持多个不同应用共享同一份配置,同时还允许应用对共享的配置进行覆盖。The namespace can easily support multiple different applications to share the same configuration, and also allow applications to override the shared configuration.
用户在Apollo配置中心修改完配置并发布后,客户端能实时(1秒)接收到最新的配置,并通知到应用程序。After the user modifies the configuration in the Apollo configuration center and publishes it, the client can receive the latest configuration in real time (1 second) and notify the application.
所有的配置发布都有版本概念,从而可以方便地支持配置的回滚。All configuration releases have a version concept, which can easily support configuration rollback.
一旦主机宕机后,运维人员在Apollo配置中心对数据源进行切换配置并发布,Apollo配置中心通知主机有配置更新,主机从Apollo配置中心拉取最新的配置即进行数据源信息的更新配置,然后Apollo配置中心更新本地配置并通知到应用程序,通过数据源热替换的方法,实现了短信聚合服务无需重启,自动加载新数据源的效果。本实施例由于基于Apollo配置中心监听配置数据源切换的属性信息(即切换数据源开关的属性key),能主动推送到集群规模的应用程序,延迟较低,从而应用程序能在运行时获取到新的数据源配置,创建新的数据源替换旧数据源,使得应用程序无需重启就能使得主机读取切换为临时主数据源的冷备数据源的数据信息,进而根据冷备数据源的数据信息提供短信聚合服务。提升数据源切换的准确性和效率,避免主机实际宕机时无法及时切换数据源的情况,进而保证了短信聚合服务的稳定性,提升用户的使用体验。Once the host is down, the operation and maintenance personnel will switch the configuration and publish the data source in the Apollo configuration center. The Apollo configuration center will notify the host that there is a configuration update, and the host will pull the latest configuration from the Apollo configuration center to update the data source information. Then the Apollo configuration center updates the local configuration and notifies the application. Through the method of data source hot replacement, the SMS aggregation service does not need to be restarted, and the new data source is automatically loaded. In this embodiment, because the Apollo configuration center monitors the attribute information of the configuration data source switch (that is, the attribute key for switching the data source switch), it can be actively pushed to the application program of the cluster scale, and the delay is low, so that the application program can obtain the information at runtime. New data source configuration, creating a new data source to replace the old data source, so that the host can read the data information of the cold standby data source switched to the temporary primary data source without restarting the application, and then according to the data of the cold standby data source Information provides SMS aggregation services. Improve the accuracy and efficiency of data source switching, avoid the situation that the host cannot switch data sources in time when the host actually goes down, thereby ensuring the stability of the SMS aggregation service and improving the user experience.
上述实施例只例举了Apollo配置中心,可以根据需要用Zookeeper配置中心或者redis配置中心、nacos配置中心替换Apollo配置中心。The above embodiment only exemplifies the Apollo configuration center. The Apollo configuration center can be replaced by the Zookeeper configuration center, the redis configuration center, or the nacos configuration center as needed.
本发明的一个实施例,如图7所示,一种切换数据源的实现系统,包括:An embodiment of the present invention, as shown in FIG. 7 , is a system for realizing switching of data sources, including:
检测模块10,用于检测主机是否宕机;The detection module 10 is used to detect whether the host is down;
处理模块20,用于在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务;The processing module 20 is used to upgrade the cold standby data source to a temporary primary data source when the host is down and broadcast to notify the application program, so that the application program provides the short message aggregation service according to the temporary primary data source;
处理模块20,还用于在主机未宕机时应用程序根据主数据源提供短信聚合服务。The processing module 20 is further configured to provide the short message aggregation service according to the main data source by the application when the host is not down.
具体的,短信聚合服务是为用户提供的一种短信通信服务的基本能力,通常指的是短信发送服务。短信聚合服务包括群发短信、短信验证码、短信通知、推广短信、营销短信、会员通知短信等通信服务。其中,短信通知支持多种场景的通知短信发送。推广短信支持各类业务场景的短信通知发送,例如支持商超短信群发、房地产短信群发、教育短信群发、电商短信群发、信用卡短信群发、招聘短信群发等行业短信群发等通信服务。Specifically, the short message aggregation service is a basic capability of a short message communication service provided for users, and usually refers to a short message sending service. SMS aggregation services include group SMS, SMS verification code, SMS notification, promotional SMS, marketing SMS, member notification SMS and other communication services. Among them, the SMS notification supports notification SMS sending in various scenarios. The promotion SMS supports the sending of SMS notifications in various business scenarios, such as supporting the mass messaging of business and supermarkets, mass messaging of real estate, mass messaging of education, mass messaging of e-commerce, mass messaging of credit cards, mass messaging of recruitment and other communication services such as mass messaging of industry messages.
具体的,本实施例中,在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,使得在数据源切换时短信聚合服务无需重启,自动加载新数据源,减少服务不稳定的时间,减少修改配置的时间,对运维友好。Specifically, in this embodiment, when the host is down, the cold backup data source is upgraded to a temporary primary data source and broadcasted to notify the application, so that the application provides the short message aggregation service according to the temporary primary data source, so that when the data source is switched, the short message The aggregation service does not need to be restarted, and the new data source is automatically loaded, which reduces the time of service instability, reduces the time to modify the configuration, and is friendly to operation and maintenance.
此外,在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,提升数据源切换效率,避免主机实际宕机时无法及时切换数据源的情况,进而保证了短信聚合服务的稳定性,提升用户的使用体验。In addition, when the host is down, the cold backup data source is upgraded to a temporary primary data source and broadcast to the application, so that the application can provide SMS aggregation services based on the temporary primary data source, improve the efficiency of data source switching, and avoid the failure of the host when the actual downtime occurs. The situation of switching data sources in time ensures the stability of the SMS aggregation service and improves the user experience.
基于前述实施例,还包括:获取模块,用于每隔预设时间段获取数据源配置信息;Based on the foregoing embodiment, it further includes: an acquisition module, configured to acquire data source configuration information every preset time period;
处理模块20包括:The processing module 20 includes:
第一处理单元,用于在主机宕机时,将冷备数据源升级为临时主数据源;The first processing unit is used to upgrade the cold backup data source to the temporary primary data source when the host is down;
第一创建单元,用于初始化主数据源,且根据新获取的数据源配置信息创建第一数据源对象;a first creation unit, used to initialize the main data source, and create a first data source object according to the newly acquired data source configuration information;
配置单元,用于根据新获取的数据源配置信息中的冷备数据源配置信息进行数据源配置;a configuration unit, configured to configure the data source according to the cold standby data source configuration information in the newly acquired data source configuration information;
执行单元,用于配置完成后广播发送数据源切换信息,以便应用程序通过第一数据源对象切换访问临时主数据源,使得应用程序根据临时主数据源提供短信聚合服务;The execution unit is used to broadcast and send the data source switching information after the configuration is completed, so that the application program can access the temporary main data source through the first data source object switch, so that the application program can provide the short message aggregation service according to the temporary main data source;
具体的,本实施例中与上述实施例相同的部分在此不再一一赘述。本实施例中,每隔预设时间段获取数据源配置信息,所获取的数据源配置信息包括druidProperties(主数据源配置),namespace(备数据源配置所在的apollo空间名),name(属性源名称),prefix(属性前缀),key(切换数据源开关的属性key)。Specifically, the parts in this embodiment that are the same as the above-mentioned embodiments will not be repeated here. In this embodiment, the data source configuration information is obtained every preset time period, and the obtained data source configuration information includes druidProperties (main data source configuration), namespace (apollo space name where the standby data source configuration is located), name (property source configuration) name), prefix (attribute prefix), key (attribute key for switching the data source switch).
如图8和图9所示,当主机宕机时修改apollo配置中心namespace对应的数据源配置,即把namespace(备数据源配置所在的apollo空间名)写入阿波罗配置中心、As shown in Figure 8 and Figure 9, when the host is down, modify the data source configuration corresponding to the namespace of the Apollo configuration center, that is, write the namespace (the name of the apollo space where the standby data source configuration is located) into the Apollo configuration center,
New一个Builder即新建一个第一数据源对象,具体为根据以上数据源配置信息和Builder的相应方法初始化builder,调用build()方法创建第一数据源对象,从而使得应用程序即可像普通数据源一样使用这个新创的第一数据源对象,此处的第一数据源对象为升级为临时主数据源的冷备数据源。New a Builder means creating a first data source object. Specifically, initializing the builder according to the above data source configuration information and the corresponding method of the Builder, and calling the build() method to create the first data source object, so that the application can be like a common data source. The newly created first data source object is also used, where the first data source object is a cold standby data source upgraded to a temporary primary data source.
修改key=true,这步即切换主数据源为冷备数据源,ApolloHotReplaceSwitchListener监听到key的变化,调用ApolloDruidSourceHandler的handle方法进行数据源切换操作。广播告知应用程序配置切换为冷备数据库,New一个Builder,根据以上信息和Builder的相应方法初始化builder,调用build()方法创建第一数据源对象,应用程序即可像普通数据源一样使用这个冷备数据源。Modify key=true, this step is to switch the main data source to the cold standby data source, ApolloHotReplaceSwitchListener listens to the change of the key, and calls the handle method of ApolloDruidSourceHandler to switch the data source. The broadcast informs the application configuration to switch to the cold standby database, create a new builder, initialize the builder according to the above information and the corresponding method of the builder, and call the build() method to create the first data source object. backup data source.
在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,使得在数据源切换时短信聚合服务无需重启,自动加载新数据源,减少服务不稳定的时间,减少修改配置的时间,对运维友好。When the host is down, upgrade the cold standby data source to a temporary primary data source and broadcast it to the application, so that the application can provide SMS aggregation services according to the temporary primary data source, so that the SMS aggregation service does not need to be restarted when the data source is switched, and the new SMS aggregation service is automatically loaded. Data source, reduce the time of service instability, reduce the time to modify the configuration, and be friendly to operation and maintenance.
此外,在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,提升数据源切换效率,避免主机实际宕机时无法及时切换数据源的情况,进而保证了短信聚合服务的稳定性,提升用户的使用体验。In addition, when the host is down, the cold backup data source is upgraded to a temporary primary data source and broadcast to the application, so that the application can provide SMS aggregation services based on the temporary primary data source, improve the efficiency of data source switching, and avoid the failure of the host when the actual downtime occurs. The situation of switching data sources in time ensures the stability of the SMS aggregation service and improves the user experience.
处理模块20包括:The processing module 20 includes:
第二创建单元,用于在主机未宕机时初始化主数据源,且根据新获取的数据源配置信息创建第二数据源对象;The second creation unit is used to initialize the main data source when the host is not down, and create a second data source object according to the newly acquired data source configuration information;
第二执行单元,用于创建完成后广播发送对象创建信息,以便应用程序通过第二数据源对象访问主数据源,使得应用程序根据主数据源提供短信聚合服务。The second execution unit is configured to broadcast and send the object creation information after the creation is completed, so that the application program can access the main data source through the second data source object, so that the application program can provide the short message aggregation service according to the main data source.
具体的,本实施例中与上述实施例相同的部分在此不再一一赘述。本实施例中,每隔预设时间段获取数据源配置信息,所获取的数据源配置信息包括druidProperties(主数据源配置),namespace(备数据源配置所在的apollo空间名),name(属性源名称),prefix(属性前缀),key(切换数据源开关的属性key)。Specifically, the parts in this embodiment that are the same as the above-mentioned embodiments will not be repeated here. In this embodiment, the data source configuration information is obtained every preset time period, and the obtained data source configuration information includes druidProperties (main data source configuration), namespace (apollo space name where the standby data source configuration is located), name (property source configuration) name), prefix (attribute prefix), key (attribute key for switching the data source switch).
如图8和图9所示,当主机宕机时修改apollo配置中心namespace对应的数据源配置,即把namespace(备数据源配置所在的apollo空间名)写入阿波罗配置中心、As shown in Figure 8 and Figure 9, when the host is down, modify the data source configuration corresponding to the namespace of the Apollo configuration center, that is, write the namespace (the name of the apollo space where the standby data source configuration is located) into the Apollo configuration center,
New一个Builder即新建一个第一数据源对象,具体为根据以上数据源配置信息和Builder的相应方法初始化builder,调用build()方法创建第一数据源对象,从而使得应用程序即可像普通数据源一样使用这个新创的第一数据源对象,此处的第一数据源对象为升级为临时主数据源的冷备数据源。New a Builder means creating a first data source object. Specifically, initializing the builder according to the above data source configuration information and the corresponding method of the Builder, and calling the build() method to create the first data source object, so that the application can be like a common data source. The newly created first data source object is also used, where the first data source object is a cold standby data source upgraded to a temporary primary data source.
修改key=true,这步即切换主数据源为冷备数据源,ApolloHotReplaceSwitchListener监听到key的变化,调用ApolloDruidSourceHandler的handle方法进行数据源切换操作。广播告知应用程序配置切换为冷备数据库,New一个Builder,根据以上信息和Builder的相应方法初始化builder,调用build()方法创建第一数据源对象,应用程序即可像普通数据源一样使用这个冷备数据源。Modify key=true, this step is to switch the main data source to the cold standby data source, ApolloHotReplaceSwitchListener listens to the change of the key, and calls the handle method of ApolloDruidSourceHandler to switch the data source. The broadcast informs the application configuration to switch to the cold standby database, create a new builder, initialize the builder according to the above information and the corresponding method of the builder, and call the build() method to create the first data source object. backup data source.
在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,使得在数据源切换时短信聚合服务无需重启,自动加载新数据源,减少服务不稳定的时间,减少修改配置的时间,对运维友好。When the host is down, upgrade the cold standby data source to a temporary primary data source and broadcast it to the application, so that the application can provide SMS aggregation services according to the temporary primary data source, so that the SMS aggregation service does not need to be restarted when the data source is switched, and the new SMS aggregation service is automatically loaded. Data source, reduce the time of service instability, reduce the time to modify the configuration, and be friendly to operation and maintenance.
此外,在主机宕机时将冷备数据源升级为临时主数据源并广播告知应用程序,使得应用程序根据临时主数据源提供短信聚合服务,提升数据源切换效率,避免主机实际宕机时无法及时切换数据源的情况,进而保证了短信聚合服务的稳定性,提升用户的使用体验。In addition, when the host is down, the cold backup data source is upgraded to a temporary primary data source and broadcast to the application, so that the application can provide SMS aggregation services based on the temporary primary data source, improve the efficiency of data source switching, and avoid the failure of the host when the actual downtime occurs. The situation of switching data sources in time ensures the stability of the SMS aggregation service and improves the user experience.
基于前述实施例,检测模块10,还用于在预设时长内未收到来自主机的心跳消息时,确定主机宕机。Based on the foregoing embodiment, the detection module 10 is further configured to determine that the host is down when the heartbeat message from the host is not received within a preset time period.
具体的,本实施例中与上述实施例相同的部分在此不再一一赘述。在本发明实施例的实施场景中,可以由服务器对主机进行心跳检测。服务器可以是具有心跳检测机制,且能够接收心跳消息的节点,主机可以是具有心跳检测机制,且能够发送心跳消息的节点。Specifically, the parts in this embodiment that are the same as the above-mentioned embodiments will not be repeated here. In the implementation scenario of the embodiment of the present invention, the server may perform heartbeat detection on the host. The server may be a node with a heartbeat detection mechanism and capable of receiving heartbeat messages, and the host may be a node with a heartbeat detection mechanism and capable of sending heartbeat messages.
在本发明实施例的实施场景中,可以由主机每隔一定的时间间隔就向服务器发送心跳消息。从服务器收到来自主机的一条心跳消息为开始时刻,如果服务器在心跳超时时长之内收到来自主机的下一条心跳消息,则判定主机处于正常工作状态,如果服务器未在心跳超时时长之内收到来自主机的下一条心跳消息,则判定主机宕机,其中主机宕机可以被认为是主机已经停止工作,也可以被认为是主机工作效率明显低于正常工作效率,因为这种情况与主机停止工作的情况可以认为是同一情况作相同处理。In the implementation scenario of the embodiment of the present invention, the host may send a heartbeat message to the server at regular intervals. The time when the server receives a heartbeat message from the host is the start time. If the server receives the next heartbeat message from the host within the heartbeat timeout period, it is determined that the host is in a normal working state. If the server does not receive a heartbeat message within the heartbeat timeout period To the next heartbeat message from the host, it is determined that the host is down. The host down can be considered as the host has stopped working, or it can be considered as the host's working efficiency is significantly lower than the normal working efficiency, because this situation is related to the host stopping. The work situation can be regarded as the same situation and treated the same.
在本发明实施例的实施场景中,也可以由服务器向主机发送请求消息,主机在没有宕机时会在接收请求消息后向服务器发送心跳消息。从服务器发送请求消息为开始时刻,如果服务器在心跳超时时长之内收到来自主机的心跳消息,则判定主机处于正常工作状态,如果服务器未在心跳超时时长之内收到来自主机的心跳消息,则判定主机宕机。In the implementation scenario of the embodiment of the present invention, the server may also send a request message to the host, and the host will send a heartbeat message to the server after receiving the request message when there is no downtime. The time when the request message is sent from the server is the start time. If the server receives a heartbeat message from the host within the heartbeat timeout period, it is determined that the host is in a normal working state. If the server does not receive a heartbeat message from the host within the heartbeat timeout period, It is determined that the host is down.
通过本实施例,通过心跳机制的方式进行主机宕机检测,避免人工主观判断主机是否宕机,由于后台自动智能判断检测主机是否宕机,一旦检测出主机宕机时,就能切换数据源,提升数据源切换的准确性和效率,避免主机实际宕机时无法及时切换数据源的情况,进而保证了短信聚合服务的稳定性,提升用户的使用体验。Through this embodiment, the host downtime detection is carried out by means of the heartbeat mechanism, so as to avoid artificial subjective judgment of whether the host is down. Since the background automatically and intelligently determines whether the detection host is down, once it is detected that the host is down, the data source can be switched. Improve the accuracy and efficiency of data source switching, avoid the situation that the host cannot switch data sources in time when the host actually goes down, thereby ensuring the stability of the SMS aggregation service and improving the user experience.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的程序模块完成,即将所述装置的内部结构划分成不同的程序单元或模块,以完成以上描述的全部或者部分功能。实施例中的各程序模块可以集成在一个处理单元中,也可是各个单元单独物理存在,也可以两个或两个以上单元集成在一个处理单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件程序单元的形式实现。另外,各程序模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above-mentioned program modules is used as an example for illustration. The internal structure of the device is divided into different program units or modules to complete all or part of the functions described above. Each program module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one processing unit, and the above-mentioned integrated units may be implemented in the form of hardware. , can also be implemented in the form of software program units. In addition, the specific names of each program module are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.
本发明的一个实施例,如图10所示,一种终端设备100,包括处理器110、存储器120,其中,存储器120,用于存放计算机程序121;处理器110,用于执行存储器120上所存放的计算机程序121,实现上述图1-图6任一所对应方法实施例中的切换数据源的实现方法。An embodiment of the present invention, as shown in FIG. 10 , a
所述终端设备100可以为桌上型计算机、笔记本、掌上电脑、平板型计算机、手机、人机交互屏等设备。所述终端设备100可包括,但不仅限于处理器110、存储器120。本领域技术人员可以理解,图10仅仅是终端设备100的示例,并不构成对终端设备100的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如:终端设备100还可以包括输入/输出接口、显示设备、网络接入设备、通信总线、通信接口等。通信接口和通信总线,还可以包括输入/输出接口,其中,处理器110、存储器120、输入/输出接口和通信接口通过通信总线完成相互间的通信。该存储器120存储有计算机程序121,该处理器110用于执行存储器120上所存放的计算机程序121,实现上述图1-图6任一所对应方法实施例中的切换数据源的实现方法。The
所述处理器110可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 110 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
所述存储器120可以是所述终端设备100的内部存储单元,例如:终端设备的硬盘或内存。所述存储器也可以是所述终端设备的外部存储设备,例如:所述终端设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器120还可以既包括所述终端设备100的内部存储单元也包括外部存储设备。所述存储器120用于存储所述计算机程序121以及所述终端设备100所需要的其他程序和数据。所述存储器还可以用于暂时地存储已经输出或者将要输出的数据。The memory 120 may be an internal storage unit of the
通信总线是连接所描述的元素的电路并且在这些元素之间实现传输。例如,处理器110通过通信总线从其它元素接收到命令,解密接收到的命令,根据解密的命令执行计算或数据处理。存储器120可以包括程序模块,例如内核(kernel),中间件(middleware),应用程序编程接口(Application Programming Interface,API)和应用。该程序模块可以是有软件、固件或硬件、或其中的至少两种组成。输入/输出接口转发用户通过输入/输出接口(例如感应器、键盘、触摸屏)输入的命令或数据。通信接口将该终端设备100与其它网络设备、用户设备、网络进行连接。例如,通信接口可以通过有线或无线连接到网络以连接到外部其它的网络设备或用户设备。无线通信可以包括以下至少一种:无线保真(WiFi),蓝牙(BT),近距离无线通信技术(NFC),全球卫星定位系统(GPS)和蜂窝通信等等。有线通信可以包括以下至少一种:通用串行总线(USB),高清晰度多媒体接口(HDMI),异步传输标准接口(RS-232)等等。网络可以是电信网络和通信网络。通信网络可以为计算机网络、因特网、物联网、电话网络。终端设备100可以通过通信接口连接网络,终端设备100和其它网络设备通信所用的协议可以被应用、应用程序编程接口(API)、中间件、内核和通信接口至少一个支持。A communication bus is a circuit that connects the described elements and enables transmission between these elements. For example, the processor 110 receives commands from other elements through a communication bus, decrypts the received commands, and performs computation or data processing according to the decrypted commands. The memory 120 may include program modules such as kernel, middleware, Application Programming Interface (API), and applications. The program module may be composed of software, firmware or hardware, or at least two of them. The input/output interface forwards commands or data entered by the user through the input/output interface (eg, sensor, keyboard, touch screen). The communication interface connects the
本发明的一个实施例,一种存储介质,存储介质中存储有至少一条指令,指令由处理器加载并执行以实现上述图1-图6任一切换数据源的实现方法对应实施例所执行的操作。例如,存储介质可以是只读内存(ROM)、随机存取存储器(RAM)、只读光盘(CD-ROM)、磁带、软盘和光数据存储设备等。An embodiment of the present invention is a storage medium, where at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the above-mentioned implementation method for switching data sources in any one of FIGS. 1-6 . operate. For example, the storage medium may be read only memory (ROM), random access memory (RAM), compact disk read only (CD-ROM), magnetic tapes, floppy disks, optical data storage devices, and the like.
它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。They can be implemented with program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps in them Made into a single integrated circuit module to achieve. As such, the present invention is not limited to any particular combination of hardware and software.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详细描述或记载的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其他的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性、机械或其他的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple divisions may be used. Units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可能集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序121发送指令给相关的硬件完成,所述的计算机程序121可存储于一存储介质中,该计算机程序121在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序121可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述存储介质可以包括:能够携带所述计算机程序121的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述存储介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如:在某些司法管辖区,根据立法和专利实践,计算机可读的存储介质不包括电载波信号和电信信号。If the integrated modules/units are implemented in the form of software functional units and sold or used as independent products, they may be stored in a storage medium. Based on this understanding, the present invention realizes all or part of the processes in the methods of the above embodiments, and can also be completed by sending instructions to the relevant hardware through the computer program 121. The computer program 121 can be stored in a storage medium, and the computer program 121 can be stored in a storage medium. When executed by the processor, 121 may implement the steps of the foregoing method embodiments. The computer program 121 may be in the form of source code, object code, executable file or some intermediate form, and so on. The storage medium may include: any entity or device capable of carrying the computer program 121, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), a random memory Access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example: in some jurisdictions, according to legislation and patent practice, computer-readable storage The medium excludes electrical carrier signals and telecommunication signals.
应当说明的是,上述实施例均可根据需要自由组合。以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。It should be noted that the above embodiments can be freely combined as required. The above are only the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made. It should be regarded as the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010020808.1A CN111258810A (en) | 2020-01-09 | 2020-01-09 | Method, system, terminal equipment and storage medium for realizing data source switching |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010020808.1A CN111258810A (en) | 2020-01-09 | 2020-01-09 | Method, system, terminal equipment and storage medium for realizing data source switching |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN111258810A true CN111258810A (en) | 2020-06-09 |
Family
ID=70948586
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010020808.1A Pending CN111258810A (en) | 2020-01-09 | 2020-01-09 | Method, system, terminal equipment and storage medium for realizing data source switching |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111258810A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111988398A (en) * | 2020-08-19 | 2020-11-24 | 政采云有限公司 | Data acquisition method, API gateway and medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2005111788A2 (en) * | 2004-05-07 | 2005-11-24 | Asempra Technologies, Inc. | Moving real-time data events across devices in a network |
| CN108667930A (en) * | 2018-05-09 | 2018-10-16 | 聚龙股份有限公司 | A kind of configuration of dynamic data source and automation switching method |
| CN109471896A (en) * | 2018-11-01 | 2019-03-15 | 数贸科技(北京)有限公司 | Data source information dynamic altering method and device |
| CN110321337A (en) * | 2019-06-24 | 2019-10-11 | 南威互联网科技集团有限公司 | A kind of method and computer readable storage medium for realizing Database Dynamic switching |
-
2020
- 2020-01-09 CN CN202010020808.1A patent/CN111258810A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2005111788A2 (en) * | 2004-05-07 | 2005-11-24 | Asempra Technologies, Inc. | Moving real-time data events across devices in a network |
| CN108667930A (en) * | 2018-05-09 | 2018-10-16 | 聚龙股份有限公司 | A kind of configuration of dynamic data source and automation switching method |
| CN109471896A (en) * | 2018-11-01 | 2019-03-15 | 数贸科技(北京)有限公司 | Data source information dynamic altering method and device |
| CN110321337A (en) * | 2019-06-24 | 2019-10-11 | 南威互联网科技集团有限公司 | A kind of method and computer readable storage medium for realizing Database Dynamic switching |
Non-Patent Citations (2)
| Title |
|---|
| XU LIANG: "A design method of dual cold sparing system of attitude and orbit control computer" * |
| 周丽媛: "综合监控系统的冗余功能设计" * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111988398A (en) * | 2020-08-19 | 2020-11-24 | 政采云有限公司 | Data acquisition method, API gateway and medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20180129511A1 (en) | Application store and intelligence system for networked telephony and digital media services devices | |
| US20130332538A1 (en) | Data synchronization using mail and push notification services | |
| US20190302867A1 (en) | Method and apparatus for reducing continuous-wakeup delay of bluetooth loudspeaker, and bluetooth loudspeaker | |
| CN108038112B (en) | File processing method, mobile terminal and computer readable storage medium | |
| CN101252575A (en) | Systems and methods for managing boot images in a retail store environment | |
| CN111309216B (en) | List page display method and device, computer equipment and storage medium | |
| WO2023066246A1 (en) | Method and system for installing application on cloudphone, and client cloudphone | |
| CN107423064B (en) | Message processing method, device, terminal device and storage medium | |
| US10530732B2 (en) | Method for using a content subscription list and electronic device supporting the same | |
| CN107765773B (en) | Method, device, terminal and storage medium for displaying information | |
| CN113778565A (en) | Method and device for processing interface data | |
| CN114610366A (en) | A differential package upgrade method, system, intelligent electronic device and storage medium | |
| CN114222003A (en) | Service calling method, system, device, equipment and storage medium | |
| CN108509541A (en) | A kind of message read method, message reading device and mobile terminal | |
| CN108521460A (en) | Information pushing method and device, mobile terminal and computer readable storage medium | |
| CN111258810A (en) | Method, system, terminal equipment and storage medium for realizing data source switching | |
| CN109799997B (en) | Management method for presetting third party application, intelligent terminal and storage medium | |
| WO2022121978A1 (en) | Livestreaming room top message determining method and apparatus, device, and storage medium | |
| CN108182122A (en) | Using update notifying method, apparatus, storage medium and server | |
| CN106793173B (en) | information processing method and mobile terminal | |
| CN110333969A (en) | Application startup exception handling method and device, medium and device after system upgrade | |
| CN116233155A (en) | Hybrid cloud data synchronization method and device, electronic equipment and storage medium | |
| CN113950043B (en) | Communication method, device, storage medium and terminal | |
| CN115004139B (en) | System and method for changing a representation of an application based on application state | |
| CN116954934A (en) | Message processing method, device, equipment, system and readable storage medium |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200609 |
|
| RJ01 | Rejection of invention patent application after publication |