Data processing method and device and electronic equipment

文档序号:168504 发布日期:2021-10-29 浏览:34次 中文

阅读说明:本技术 数据处理方法、装置及电子设备 (Data processing method and device and electronic equipment ) 是由 黄轩辉 漆俊秀 王铭敏 于 2021-09-28 设计创作,主要内容包括:本发明公开了一种数据处理方法、装置及电子设备,该方法包括响应于同步控制指令,从预设的策略池中确定对数据进行同步的目标策略,然后根据目标策略,在预设的脚本库中选择与目标策略匹配的目标同步脚本,同时发送目标同步脚本至第一服务器中,并控制第一服务器运行目标同步脚本,以使第一服务器以目标时间间隔不断的从第二服务器中拉取新增的数据,采用本发明实施例,能够控制第一服务器持续的从第二服务器中拉取新增的数据,使第一服务器与第二服务器持续保持数据同步的目的,从而解决无法有效减少数据被破坏的程度以及数据丢失的技术问题。(The invention discloses a data processing method, a device and electronic equipment, wherein the method comprises the steps of responding to a synchronization control instruction, determining a target strategy for synchronizing data from a preset strategy pool, then selecting a target synchronization script matched with the target strategy from a preset script library according to the target strategy, simultaneously sending the target synchronization script to a first server, and controlling the first server to run the target synchronization script so that the first server continuously pulls new data from a second server at a target time interval.)

1. A data processing method is applied to a control server, the control server is connected with a first server to control the first server to work, and the first server is in communication connection with a second server; the data processing method comprises the following steps:

responding to a synchronous control instruction, and determining a target strategy for synchronizing data from a preset strategy pool;

selecting a target synchronous script matched with the target strategy from a preset script library according to the target strategy;

and sending the target synchronization script to the first server, and controlling the first server to run the target synchronization script so that the first server continuously pulls the newly added data from the second server at a target time interval.

2. The data processing method of claim 1, further comprising:

when detecting that the first server pulls the newly added data from the second server, recording a timestamp of the newly added data pulled this time;

and generating a corresponding log file according to the time stamp.

3. The data processing method of claim 2, further comprising:

responding to a target time point recovery instruction input by a user, and determining a target timestamp matched with the target time point recovery instruction;

determining a corresponding target log file based on the target timestamp;

and executing data recovery of a target time point according to the target log file and the data stored in the first server.

4. The data processing method of claim 1, wherein the policy pool comprises at least one of a first policy, a second policy, and a third policy; and the data pulling time interval set by the script matched with the second strategy is greater than the data pulling time interval set by the script matched with the first strategy and is less than the data pulling time interval set by the script matched with the third strategy.

5. The data processing method of claim 4, wherein the script library comprises a plurality of scripts, each script is provided with a unique matching running password;

the step of controlling the first server to run the target synchronization script includes:

verifying the running password input by the user to generate a password verification result;

and when the password verification result represents that the running password input by the user is the same as the running password matched with the target synchronous script, controlling the first server to run the target synchronous script.

6. The data processing method of any of claims 1-5, wherein the synchronization script comprises an rsync script.

7. The data processing device is applied to a control server, the control server is connected with a first server to control the first server to work, and the first server is in communication connection with a second server; the data processing apparatus includes:

the strategy determining module is used for responding to the synchronous control instruction and determining a target strategy for synchronizing the data from a preset strategy pool;

the script selection module is used for selecting a target synchronous script matched with the target strategy from a preset script library according to the target strategy;

and the data pulling module is used for sending the target synchronous script to the first server and controlling the first server to run the target synchronous script so that the first server continuously pulls the newly added data from the second server at a target time interval.

8. The data processing apparatus of claim 7, wherein the data processing apparatus further comprises:

the time recording module is used for recording a time stamp of the newly added data pulled from the second server when the first server is detected to pull the newly added data from the second server;

and the log generation module is used for generating a corresponding log file according to the time stamp.

9. The data processing apparatus of claim 8, wherein the data processing apparatus further comprises:

the time determining module is used for responding to a target time point recovery instruction of a user and determining a target timestamp matched with the target time point recovery instruction;

a log determining module for determining a corresponding target log file based on the target timestamp;

and the data recovery module is used for executing data recovery of a target time point according to the target log file and the data stored in the first server.

10. An electronic device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the memory being coupled to the processor and the processor implementing the steps of the data processing method according to any of claims 1 to 6 when executing the computer program.

Technical Field

The present invention relates to the field of data processing technologies, and in particular, to a data processing method and apparatus, and an electronic device.

Background

With the development of network technology, the informatization degree of the current society is higher and higher, the demand of people on data is also increased explosively, the security of data is very important for individual users and enterprises, once important data is damaged or lost, the important data can cause great influence on the individuals or the enterprises, the work progress is delayed, and property loss and even property damage are faced. The reasons why the data is damaged or lost mainly include: natural disasters, user misoperation, equipment failure, hacker attack, and the like.

Therefore, as the times advance, the storage and protection of data will be faced with more serious challenges, and how to reduce the damage degree and loss of data becomes one of the technical problems that needs to be solved at present.

Disclosure of Invention

The embodiment of the invention aims to provide a data processing method, a data processing device and electronic equipment, which can solve the technical problems that the degree of data damage and data loss cannot be effectively reduced.

In a first aspect, to achieve the above object, an embodiment of the present invention provides a data processing method applied to a control server, where the control server is connected to a first server to control the first server to operate, and the first server is in communication connection with a second server; the data processing method comprises the following steps:

responding to a synchronous control instruction, and determining a target strategy for synchronizing data from a preset strategy pool;

selecting a target synchronous script matched with the target strategy from a preset script library according to the target strategy;

and sending the target synchronization script to the first server, and controlling the first server to run the target synchronization script so that the first server continuously pulls the newly added data from the second server at a target time interval.

Further, the data processing method further includes:

when detecting that the first server pulls the newly added data from the second server, recording a timestamp of the newly added data pulled this time;

and generating a corresponding log file according to the time stamp.

Further, the data processing method further includes:

responding to a target time point recovery instruction input by a user, and determining a target timestamp matched with the target time point recovery instruction;

determining a corresponding target log file based on the target timestamp;

and executing data recovery of a target time point according to the target log file and the data stored in the first server.

Further, the policy pool includes at least one of a first policy, a second policy, and a third policy; and the data pulling time interval set by the script matched with the second strategy is greater than the data pulling time interval set by the script matched with the first strategy and is less than the data pulling time interval set by the script matched with the third strategy.

Furthermore, the script library comprises a plurality of scripts, and each script is provided with a unique matched running password;

the step of controlling the first server to run the target synchronization script includes:

verifying the running password input by the user to generate a password verification result;

and when the password verification result represents that the running password input by the user is the same as the running password matched with the target synchronous script, controlling the first server to run the target synchronous script.

Further, the synchronization script includes an rsync script.

In a second aspect, to solve the same technical problem, an embodiment of the present invention provides a data processing apparatus, where the control server is connected to a first server to control the first server to operate, and the first server is communicatively connected to a second server; the data processing apparatus includes:

the strategy determining module is used for responding to the synchronous control instruction and determining a target strategy for synchronizing the data from a preset strategy pool;

the script selection module is used for selecting a target synchronous script matched with the target strategy from a preset script library according to the target strategy;

and the data pulling module is used for sending the target synchronous script to the first server and controlling the first server to run the target synchronous script so that the first server continuously pulls the newly added data from the second server at a target time interval.

Further, the data processing apparatus further includes:

the time recording module is used for recording a time stamp of the newly added data pulled from the second server when the first server is detected to pull the newly added data from the second server;

and the log generation module is used for generating a corresponding log file according to the time stamp.

Further, the data processing apparatus further includes:

the time determining module is used for responding to a target time point recovery instruction of a user and determining a target timestamp matched with the target time point recovery instruction;

a log determining module for determining a corresponding target log file based on the target timestamp;

and the data recovery module is used for executing data recovery of a target time point according to the target log file and the data stored in the first server.

In a third aspect, to solve the same technical problem, an embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the memory is coupled to the processor, and the processor implements the steps in the data processing method described in any one of the above when executing the computer program.

The embodiment of the invention provides a data processing method, a device and electronic equipment, wherein the method determines a corresponding target strategy from a preset strategy pool according to a synchronous control instruction, and determines a corresponding target synchronous script in a preset script library according to the target strategy, so that the script can be continuously operated on a first server to realize data synchronization of the first server and a second server, the aim of continuously storing data in the second server is fulfilled, and the technical problems that the degree of data damage and data loss cannot be effectively reduced are solved.

Drawings

Fig. 1 is a schematic view of an application scenario of a data processing method according to an embodiment of the present invention;

FIG. 2 is a flow chart of a data processing method according to an embodiment of the present invention;

FIG. 3 is a schematic flow chart of a data processing method according to an embodiment of the present invention;

FIG. 4 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention;

FIG. 5 is a schematic diagram of another structure of a data processing apparatus according to an embodiment of the present invention;

FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;

fig. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.

The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.

In this embodiment, please refer to fig. 1, fig. 1 is an application scenario schematic diagram of a data processing method according to an embodiment of the present invention, as shown in fig. 1, the data processing method is mainly applied to a control server 11, the control server 11 is connected to a first server 12 to control the first server 12 to work, wherein the first server 12 is further connected to a second server 13 in a communication manner, specifically, referring to fig. 2, fig. 2 is a flow schematic diagram of the data processing method according to the embodiment of the present invention, as shown in fig. 2, the data processing method according to the embodiment of the present invention includes steps 101 to 103;

step 101, in response to a synchronization control instruction, determining a target policy for synchronizing data from a preset policy pool.

In this embodiment, the synchronization control instruction includes a synchronization control instruction generated according to a control operation of a user, a text instruction input by the user, and a voice instruction, where the synchronization control instruction can control the control server provided in this embodiment to select and determine a corresponding target policy in a preset policy pool, for example, the synchronization control instruction may be an instruction generated by a user selecting a target policy operation, or may also be a text instruction or a voice instruction input by the user and meaning "select a target policy" is related, so that the control server can select and determine a corresponding target policy from the policy pool according to the synchronization control instruction.

It should be noted that the preset policy pool is used to store policies for synchronizing data, and the policies in the policy pool may be pre-set by a user or may be policies that are acquired from internet resources and are capable of synchronizing data. Specifically, the policy in the policy pool provided in this embodiment is mainly used to provide synchronization control data for synchronizing data, for example, the target policy may be a policy for synchronizing data at a target time point or at a target time interval, may also be a policy for synchronizing data within a certain time period, and may also be a policy for synchronizing data of a target data size, where the specific synchronization policy needs to be set according to an actual application scenario, which is not limited herein.

And 102, selecting a target synchronous script matched with the target strategy from a preset script library according to the target strategy.

In this embodiment, the preset script library is used to store scripts matched with each policy in the policy pool, and the scripts in the script library are mainly used to pull data in the second server, so as to implement data consistency between the second server and the first server.

Specifically, the script in the preset script library may be written and placed in advance for the user according to different policies, or may be obtained and constructed from internet resources according to different policies.

And 103, sending the target synchronous script to the first server, and controlling the first server to run the target synchronous script so that the first server continuously pulls the newly added data from the second server at a target time interval.

In this embodiment, the preset policy pool includes at least one of a first policy, a second policy, and a third policy, where a data pull time interval set by a script matched with the second policy is greater than a data pull time interval set by a script matched with the first policy, and is less than a data pull time interval set by a script matched with the third policy. For example, the first policy is a policy with 1 minute as a data pulling time interval, the second policy is a policy with 1 hour as a data pulling time interval, and the third policy is a policy with 1 day as a data pulling time interval, so that the script matched with the first policy is run once per minute, the script matched with the second policy is run once per hour, and the script matched with the third policy is run once per day, so as to implement data pulling operations at different time points, thereby achieving the purpose of data synchronization.

It should be noted that the preset policy pool is not limited to the first policy, the second policy, and the third policy mentioned above, but also includes other policies, and the other policies may use any time interval as the pull time, so as to implement data synchronization operation at any time, provide a safe and effective protection means for data with different importance degrees, meet the requirements of different users on data storage, and improve user experience.

As an optional embodiment, each script in the script library provided in the embodiment of the present invention is provided with a unique running password, where the step of controlling the first server to run the target synchronization script specifically includes: verifying the running password input by the user to generate a password verification result; and when the password verification result represents that the running password input by the user is the same as the running password matched with the target synchronous script, controlling the first server to run the target synchronous script.

In this embodiment, the password verification result includes a verification failure result and a verification success result, and the verification success result indicates that the running password input by the user is the same as the running password matched with the target synchronization script, and at this time, the first server can be controlled to start running the target synchronization script.

Referring to fig. 3, fig. 3 is another schematic flow chart of the data processing method according to the embodiment of the present invention, and as shown in fig. 3, the data processing method according to the embodiment of the present invention includes steps 201 to 209;

step 201, in response to a synchronization control instruction, determining a target policy for synchronizing data from a preset policy pool.

In this embodiment, if the importance level of the data that needs to be stored by the user is set to be high, a target policy with 1 minute as a data pull time interval is selected and determined from a preset policy pool according to the synchronization control instruction with the high importance level.

Step 202, according to the target strategy, selecting a target synchronous script matched with the target strategy from a preset script library.

And selecting corresponding data used for pulling the data in the second server every 1 minute from a preset script library according to a target strategy taking 1 minute as a data pulling time interval so as to realize the data consistency of the second server and the first server.

In this embodiment, the target script may be a script for incremental data synchronization, i.e., only data changed in the second server is copied to the first server. Specifically, the synchronization script comprises an rsync script, wherein the rsync script is used for verifying the difference between the second server and the first server based on an rsync algorithm to achieve data synchronization.

Optionally, in this embodiment, the file CDP function (continuous data protection) may also be implemented by using rsync + inotify, specifically, data is detected by an inotify mechanism, and when a change (deletion, modification, or the like) of the data is detected, an rsync script is triggered to perform a data synchronization operation, so as to implement the file CDP function.

The target script is not limited to the rsync script mentioned above, and may also be another script for incremental data synchronization, which is not illustrated here.

Step 203, sending the target synchronous script to the first server, verifying the running password input by the user, and generating a password verification result.

Referring to fig. 1, after selecting and determining the target synchronization script 121, the control server 11 according to this embodiment sends the target synchronization script 121 to the first server, so as to control the first server 12 to run the target synchronization script 121.

Specifically, the expect script needs to be selected when the target synchronous script 121 is selected, so that the expect script can be used for automatically performing operation of a human-computer interaction part, any manual operation is not needed, and human resources are effectively saved.

And 204, when the password verification result shows that the running password input by the user is the same as the running password matched with the target synchronous script, controlling the first server to run the target synchronous script so that the first server continuously pulls the newly added data from the second server at the target time interval.

Step 205, when detecting that the first server pulls the newly added data from the second server, recording the time stamp of the newly added data pulled this time.

Because the first server cannot pull the newly added data every time the data pulling operation is executed, by detecting the data in the first server in real time, the timestamp for executing data synchronization this time is recorded only when it is detected that the first server pulls the newly added data from the second server, for example, when it is detected that the first server successfully pulls the newly added first data, the timestamp for this time is recorded as the first timestamp, and specifically, the first timestamp may be a timestamp containing characters of 1 month 1 day 2021 year.

And step 206, generating a corresponding log file according to the time stamp.

When it is detected that the first time stamp is generated, a first log file corresponding to the first time stamp is generated, so that the corresponding first log file can be identified from the plurality of log files based on the first time stamp.

The corresponding log files are generated when the time stamps are generated at every time, and data synchronization operation performed at every time can be recorded, so that corresponding data can be obtained according to the log files corresponding to the specific time stamps when data recovery is performed subsequently, data recovery at any time point is achieved, and user experience is improved to a great extent.

Step 207, in response to the target time point recovery instruction input by the user, determining a target timestamp matching the target time point recovery instruction.

In this embodiment, the target time point recovery instruction input by the user can be further acquired, so that the corresponding target time stamp can be determined according to the target time point recovery instruction input by the user, for example, when the target time point recovery instruction input by the user is "data recovered from 2021 year, 1 month and 1 day", the target time stamp can be determined to be a time stamp including characters from 2021 year, 1 month and 1 day, that is, the first time stamp.

Based on the target timestamp, a corresponding target log file is determined 208.

Since the target timestamp is the first timestamp (including a timestamp with characters at 1/2021), the corresponding target log file can be specified as the first log file.

Step 209, according to the target log file and the data stored in the first server, performs data recovery at the target time point.

In this embodiment, according to the first log file obtained in the above steps and the data currently stored in the first server, a recovery operation is performed on the data in the first server, so that the obtained recovery data is the same as the data stored in the first server at 1 month and 1 day 2021, thereby achieving recovery of the data.

According to the data recovery method and the data recovery device, data recovery can be performed according to the stored log files and the data stored in the first server, and data recovery at any time point can be achieved, so that data access at any time point is achieved, and the technical problem that influence is caused after the data are damaged or lost is effectively solved.

In summary, the data processing method provided in the embodiment of the present invention includes determining a target policy for synchronizing data from a preset policy pool in response to a synchronization control instruction, then selecting a target synchronization script matching the target policy from a preset script library according to the target policy, sending the target synchronization script to a first server, and controlling the first server to run the target synchronization script, so that the first server continuously pulls new data from a second server at a target time interval.

According to the method described in the foregoing embodiment, the embodiment will be further described from the perspective of a data processing apparatus, which may be specifically implemented as an independent entity, or may be implemented by being integrated in an electronic device, such as a terminal, where the terminal may include a mobile phone, a tablet computer, and the like.

In this embodiment, the data processing apparatus provided in this embodiment is applied to a control server, the control server is connected to a first server to control the first server to work, and the first server is connected to a second server in a communication manner, specifically, referring to fig. 4, fig. 4 is a schematic structural diagram of the data processing apparatus provided in the embodiment of the present invention, as shown in fig. 4, a data processing apparatus 400 provided in the embodiment of the present invention includes:

the policy determining module 401 is configured to determine, in response to the synchronization control instruction, a target policy for synchronizing data from a preset policy pool.

In this embodiment, the preset policy pool includes at least one of a first policy, a second policy, and a third policy, where a data pull time interval set by a script matched with the second policy is greater than a data pull time interval set by a script matched with the first policy, and is less than a data pull time interval set by a script matched with the third policy. For example, the first policy is a policy with 1 minute as a data pulling time interval, the second policy is a policy with 1 hour as a data pulling time interval, and the third policy is a policy with 1 day as a data pulling time interval, so that the script matched with the first policy is run once per minute, the script matched with the second policy is run once per hour, and the script matched with the third policy is run once per day, so as to implement data pulling operations at different time points, thereby achieving the purpose of data synchronization.

And the script selection module 402 is configured to select a target synchronous script matched with the target policy from a preset script library according to the target policy.

In this embodiment, the script library includes a plurality of scripts, and each script is provided with a unique running password.

Specifically, the synchronization script comprises an rsync script, wherein the rsync script is used for verifying the difference between the second server and the first server based on an rsync algorithm to achieve data synchronization.

The data pulling module 403 is configured to send the target synchronization script to the first server, and control the first server to run the target synchronization script, so that the first server continuously pulls the newly added data from the second server at the target time interval.

In this embodiment, the data pulling module 403 is further specifically configured to: verifying the running password input by the user to generate a password verification result; and when the password verification result represents that the running password input by the user is the same as the running password matched with the target synchronous script, controlling the first server to run the target synchronous script.

Referring to fig. 5, fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, and as shown in fig. 5, the data processing apparatus 400 according to an embodiment of the present invention further includes:

and the time recording module 404 is configured to record a time stamp of the newly added data pulled from the second server when detecting that the first server pulls the newly added data from the second server.

And a log generating module 405, configured to generate a corresponding log file according to the timestamp.

A time determination module 406, configured to determine a target timestamp matching the target point-in-time recovery instruction in response to the target point-in-time recovery instruction of the user.

A log determining module 407, configured to determine a corresponding target log file based on the target timestamp.

And a data recovery module 408, configured to perform data recovery at the target time point according to the target log file and the data stored in the first server.

In a specific implementation, each of the modules and/or units may be implemented as an independent entity, or may be implemented as one or several entities by any combination, where the specific implementation of each of the modules and/or units may refer to the foregoing method embodiment, and specific achievable beneficial effects also refer to the beneficial effects in the foregoing method embodiment, which are not described herein again.

In addition, referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device may be a mobile terminal such as a smart phone and a tablet computer. As shown in fig. 6, the electronic device 600 includes a processor 601, a memory 602. The processor 601 is electrically connected to the memory 602.

The processor 601 is a control center of the electronic device 600, connects various parts of the whole electronic device using various interfaces and lines, and performs various functions of the electronic device 600 and processes data by running or loading an application stored in the memory 602 and calling data stored in the memory 602, thereby performing overall monitoring of the electronic device 600.

In this embodiment, the processor 601 in the electronic device 600 loads instructions corresponding to processes of one or more application programs into the memory 602 according to the following steps, and the processor 601 runs the application programs stored in the memory 602, thereby implementing various functions:

responding to a synchronous control instruction, and determining a target strategy for synchronizing data from a preset strategy pool;

selecting a target synchronous script matched with the target strategy from a preset script library according to the target strategy;

and sending the target synchronization script to the first server, and controlling the first server to run the target synchronization script so that the first server continuously pulls the newly added data from the second server at a target time interval.

The electronic device 600 may implement the steps in any embodiment of the data processing method provided in the embodiment of the present invention, and therefore, beneficial effects that can be achieved by any data processing method provided in the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.

Referring to fig. 7, fig. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 7, fig. 7 is a specific structural block diagram of the electronic device according to the embodiment of the present invention, where the electronic device may be used to implement the data processing method provided in the foregoing embodiment. The electronic device 700 may be a mobile terminal such as a smart phone or a notebook computer.

The RF circuit 710 is used for receiving and transmitting electromagnetic waves, and performing interconversion between the electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices. The RF circuitry 710 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption/decryption chips, Subscriber Identity Module (SIM) cards, memory, and so forth. The RF circuit 710 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (e.g., IEEE802.11 a, IEEE802.11 b, IEEE802.11g and/or IEEE802.11 n), Voice over Internet Protocol (VoIP), world wide Internet Protocol (Microwave Access for micro), and other short message protocols for instant messaging, as well as any other suitable communication protocols, and may even include those that have not yet been developed.

The memory 720 may be used to store software programs and modules, such as program instructions/modules corresponding to the data processing method in the above-mentioned embodiment, and the processor 780 executes various functional applications and data processing by running the software programs and modules stored in the memory 720, so as to implement the following functions:

responding to a synchronous control instruction, and determining a target strategy for synchronizing data from a preset strategy pool;

selecting a target synchronous script matched with the target strategy from a preset script library according to the target strategy;

and sending the target synchronization script to the first server, and controlling the first server to run the target synchronization script so that the first server continuously pulls the newly added data from the second server at a target time interval.

The memory 720 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 720 may further include memory located remotely from processor 780, which may be connected to electronic device 700 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The input unit 730 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 730 may include a touch-sensitive surface 731 as well as other input devices 732. Touch-sensitive surface 731, also referred to as a touch display screen or touch pad, can collect touch operations by a user on or near touch-sensitive surface 731 (e.g., operations by a user on or near touch-sensitive surface 731 using a finger, stylus, or any other suitable object or attachment) and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 731 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 780, and can receive and execute commands from the processor 780. In addition, the touch-sensitive surface 731 can be implemented in a variety of types, including resistive, capacitive, infrared, and surface acoustic wave. The input unit 730 may also include other input devices 732 in addition to the touch-sensitive surface 731. In particular, other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

The display unit 740 may be used to display information input by or provided to the user and various graphical user interfaces of the electronic device 700, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 740 may include a Display panel 741, and optionally, the Display panel 741 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, touch-sensitive surface 731 can overlay display panel 741, such that when touch-sensitive surface 731 detects a touch event thereon or nearby, processor 780 can determine the type of touch event, and processor 780 can then provide a corresponding visual output on display panel 741 based on the type of touch event. Although in the figure the touch-sensitive surface 731 and the display panel 741 are shown as two separate components to implement input and output functions, in some embodiments the touch-sensitive surface 731 and the display panel 741 may be integrated to implement input and output functions.

The electronic device 700 may also include at least one sensor 750, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 741 according to the brightness of ambient light, and a proximity sensor that may generate an interrupt when the folder is closed or closed. As one of the motion sensors, the gravity acceleration sensor may detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile phone is stationary, and may be used for applications of recognizing gestures of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and tapping), and other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor that are further configured to the electronic device 700, and are not described herein again.

The audio circuit 760, speaker 761, and microphone 762 may provide an audio interface between a user and the electronic device 700. The audio circuit 760 can transmit the electrical signal converted from the received audio data to the speaker 761, and the electrical signal is converted into a sound signal by the speaker 761 and output; on the other hand, the microphone 762 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 760, processes the audio data by the audio data output processor 780, and transmits the processed audio data to, for example, another terminal via the RF circuit 710, or outputs the audio data to the memory 720 for further processing. The audio circuitry 760 may also include an earbud jack to provide communication of a peripheral headset with the electronic device 700.

The electronic device 700, via the transport module 770 (e.g., a Wi-Fi module), may assist the user in receiving requests, sending information, etc., which provides the user with wireless broadband internet access. Although the transmission module 770 is illustrated in the drawings, it is understood that it does not belong to the essential constitution of the electronic device 700 and may be omitted entirely within the scope not changing the essence of the invention as needed.

The processor 780 is a control center of the electronic device 700, connects various parts of the entire cellular phone using various interfaces and lines, and performs various functions of the electronic device 700 and processes data by operating or executing software programs and/or modules stored in the memory 720 and calling data stored in the memory 720, thereby integrally monitoring the electronic device. Optionally, processor 780 may include one or more processing cores; in some embodiments, processor 780 may integrate an application processor that handles primarily the operating system, user interface, applications, etc. and a modem processor that handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 780.

The electronic device 700 also includes a power supply 790 (e.g., a battery) that provides power to various components, and in some embodiments may be logically coupled to the processor 780 via a power management system that may perform functions such as managing charging, discharging, and power consumption. The power supply 790 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.

Although not shown, the electronic device 700 further includes a camera (e.g., a front camera, a rear camera), a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the display unit of the electronic device is a touch screen display, the mobile terminal further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:

responding to a synchronous control instruction, and determining a target strategy for synchronizing data from a preset strategy pool;

selecting a target synchronous script matched with the target strategy from a preset script library according to the target strategy;

and sending the target synchronization script to the first server, and controlling the first server to run the target synchronization script so that the first server continuously pulls the newly added data from the second server at a target time interval.

In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.

It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor. To this end, the embodiment of the present invention provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps of any embodiment of the data processing method provided by the embodiment of the present invention.

Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.

Since the instructions stored in the storage medium can execute the steps in any embodiment of the data processing method provided in the embodiment of the present invention, the beneficial effects that can be achieved by any data processing method provided in the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.

The foregoing detailed description is directed to a data processing method, a data processing apparatus, and an electronic device provided in the embodiments of the present application, and specific examples are applied in the detailed description to explain the principles and implementations of the present application, and the descriptions of the foregoing embodiments are only used to help understand the method and the core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application. Moreover, it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the invention, and such modifications and adaptations are intended to be within the scope of the invention.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种事务处理方法、装置、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!