WO2015014017A1 - 终端、负载平衡方法和负载平衡装置 - Google Patents

终端、负载平衡方法和负载平衡装置 Download PDF

Info

Publication number
WO2015014017A1
WO2015014017A1 PCT/CN2013/084360 CN2013084360W WO2015014017A1 WO 2015014017 A1 WO2015014017 A1 WO 2015014017A1 CN 2013084360 W CN2013084360 W CN 2013084360W WO 2015014017 A1 WO2015014017 A1 WO 2015014017A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
type
service
processing unit
processing
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.)
Ceased
Application number
PCT/CN2013/084360
Other languages
English (en)
French (fr)
Inventor
戴钢
陈澜波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Publication of WO2015014017A1 publication Critical patent/WO2015014017A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a terminal, a load balancing method, and a load balancing device. Background technique
  • a terminal often only contains a single processor, and since all data is processed in the single processor, it is impossible to separately process different types of data, which easily causes intersection of important and private data with other data. , affect the security of the data.
  • Some terminals contain multiple processors, but on the one hand, the different data services of the terminal are not treated separately, and the data security of the private service cannot be guaranteed. On the other hand, it focuses on how to make multiple processors co-process the same service. However, for the concurrent processing of multiple services, no reasonable scheduling strategy is given. Summary of the invention
  • the invention is based on the above problems, and proposes a new technical solution, which can make different types of data in the terminal physically stored in isolation, improve the security of the terminal, and can reasonably arrange the traffic according to the working state of the processing unit.
  • the terminal resources are reasonably and effectively utilized, and the efficiency of data processing is improved.
  • the present invention provides a terminal, including: a first processor and a second processor, configured to separately process data in the terminal; share a memory, and simultaneously connect to the first processor and The second processor is configured to store, by the first processor and the second processor, the processed second type of service data; the independent memory is only connected to the first processor, and is configured to: The first processor stores the processed first type of service data.
  • the first type of data processed by the first processor is stored by using a separate memory, and the second type of data is stored using the shared memory, so that different types of data are physically stored in isolation, avoiding private and important data. Being acquired by an unsafe application through other processors or memories helps to improve the data security of the terminal.
  • the first processor is further configured to: when processing the second type of service data, disconnect the connection with the independent memory, and maintain a connection with the shared memory, And when processing the first type of service data, disconnecting from the shared memory and maintaining a connection with the independent memory.
  • the first processor is further configured to: when determining that the load of the second processor is greater than or equal to a preset load threshold, The service queue to be processed of the second processor selects a service that needs to be processed preferentially for data processing.
  • the first processor assists the second processor to process the second type of data only when the user is idle and the second processor is busy, thereby avoiding the first processor from the second type of data as much as possible. Processing reduces the likelihood of data intersections between the first type and the second type, and reduces the likelihood that a malicious application will steal the first type of data.
  • the first processor is further configured to: when performing data processing on the second type of service from the second processor, if receiving the first type of service, Stop performing data processing on the second type of service, and performing data processing on the first type of service.
  • the service when the first type of service is received by the first processor, the service is preferentially processed, so that the negative impact of the processing of the second type of data by the first processor is reduced as much as possible. This includes reducing the length of time that the first type of service is put on hold, and reducing the likelihood that the first type of data is illegally acquired. At the same time, by stopping processing the second type of service, different types of business data are still strictly separated in the process of being processed, ensuring data security.
  • the service after the second type of service processing is completed, processes the first type of service that receives the processing request; if the first type of service that receives the processing request has a higher priority than the second type of service that is being processed
  • the priority is to terminate the processing of the second type of service, and preferentially process the first type of service, so as to ensure that the service with high priority is processed in a timely and effective manner.
  • the first processor is further configured to: store data of the first type of service being processed and corresponding breakpoint information to the shared memory, or to be processed Data of the first type of service is stored to the shared memory, and the corresponding breakpoint information is sent to the second processor for processing by the second processor.
  • the data of the second type of service being processed by the first processor and the corresponding breakpoint information are stored to the shared memory, or the data of the second type of service being processed is stored to the shared memory, And sending the corresponding breakpoint information to the second processor, so that the second processor can continue processing the second type of service that is not processed by the first processor according to the data of the second type of service and the breakpoint information, ensuring The continuity of the second type of business processing.
  • the first processor may process the second type of service data and the breakpoint information.
  • the second processor reads the data in the shared memory and the breakpoint information to continue processing the second type of service that the first processor has not processed; if the first processor Receiving the first type of service processing request, the second processor is in an idle state, the first processor may directly send the breakpoint information to the second processor, so that the second processor directly directly according to the received breakpoint information
  • the second type of service that is not processed by the first processor is processed to ensure continuity of business processing.
  • the first processor is configured to process private data in the terminal
  • the second processor is configured to process non-private data in the terminal.
  • the terminal there may be multiple types of data in the terminal, such as the importance of the data, the degree of privacy, the size of the data, the difference in the data format, etc., even based on the actual needs of the user, processed by each processor.
  • the data types are adjusted and changed.
  • the private data may be processed by the first processor according to the degree of privacy of the data, and the non-private data is processed by the second processor.
  • the private data is data corresponding to a protected application
  • the non-private data is data corresponding to an unprotected application
  • the present invention also provides a load balancing method, comprising: processing, by a first processing unit, data of a first type in a terminal, and storing the data of the first type in connection only to the first processing unit Independent storage space; processing, by the second processing unit, the second type of data in the terminal; when the first processing unit is in an idle state, determining that the load of the second processing unit is greater than or equal to Presetting the load threshold, selecting, from the processing queue of the second processing unit, the service to be processed preferentially, performing data processing, and storing to the first processing unit and the second processing unit simultaneously Shared storage space.
  • the first type of data processed by the first processing unit is stored by using a separate storage unit (ie, a separate storage space), and the second type of data is stored using the shared storage unit (ie, the shared storage space), thereby making different types of data Data is physically stored in isolation, avoiding private, important data being acquired by unsafe applications through other processors or storage units, which helps to improve the data security of the terminal.
  • a separate storage unit ie, a separate storage space
  • the shared storage unit ie, the shared storage space
  • the method further includes: when the first processing unit processes the second type of service data, disconnecting from the independent storage space, maintaining the shared storage space The connection, and when processing the first type of business data, disconnects from the shared storage space and maintains a connection with the independent storage space.
  • the method further includes: when the first processing unit performs data processing on the second type of service from the second processing unit, if receiving the first type of service, Stop performing data processing on the second type of service, and performing data processing on the first type of service.
  • the service when the first type of service is received by the first processing unit, the service is preferentially processed, so that the negative impact of the processing of the second type of data by the first processing unit is reduced as much as possible. This includes reducing the length of time that the first type of service is put on hold, and reducing the likelihood that the first type of data is illegally acquired. At the same time, by stopping processing the second type of service, different types of business data are still strictly separated in the process of being processed, ensuring data security.
  • the service after the second type of service processing is completed, processes the first type of service that receives the processing request; if the first type of service that receives the processing request has a higher priority than the second type of service that is being processed
  • the priority is to terminate the processing of the second type of service, and preferentially process the first type of service, so as to ensure that the service with high priority is processed in a timely and effective manner.
  • the method further includes: the first processing unit storing data of the first type of service being processed and corresponding breakpoint information to the shared storage space, or being processed Data of the first type of service is stored to the shared storage space, and the corresponding breakpoint information is sent to the second processing unit for further processing by the second processing unit.
  • the data of the second type of service being processed by the first processing unit and the corresponding breakpoint information are stored to the shared storage unit, or the data of the second type of service being processed is stored to the shared storage. And transmitting the corresponding breakpoint information to the second processing unit, so that the second processing unit can continue to process the second type of service that is not processed by the first processing unit according to the data of the second type of service and the breakpoint information.
  • the continuity of the second type of business processing is ensured. Specifically, when the first processing unit receives the first type of service processing request, if the second processing unit is processing other services, the first processing unit may process the processed second type of service data and the breakpoint information.
  • the first processing unit may directly send the breakpoint information to the second processing unit, so that the second processing unit directly directly processes the second type of service that is not processed by the first processing unit according to the received breakpoint information. Process to ensure continuity of business processing.
  • the first processing unit is configured to process private data in the terminal
  • the second processing unit is configured to process non-private data in the terminal.
  • the terminal there may be multiple types of data in the terminal, such as the importance of the data, the degree of privacy, the size of the data, the difference in the data format, etc., even based on the actual needs of the user, processed by each processor.
  • the data types are adjusted and changed.
  • the private data may be processed by the first processing unit according to the degree of privacy of the data, and the non-private data is processed by the second processing unit.
  • the private data is data corresponding to a protected application
  • the non-private data is data corresponding to an unprotected application
  • the present invention also provides a load balancing apparatus, including: a first processing unit and a second processing unit, configured to respectively process data of a first type and a second type in a terminal; wherein, the first processing unit The method is further configured to: when the first processing unit is in an idle state, if it is determined that the load amount of the second processing unit is greater than or equal to a preset load threshold, then from the to-be-processed service queue of the second processing unit Selecting a service to be processed preferentially for data processing; a separate storage unit, connected only to the first processing unit, for storing data of a first type from the first processing unit; sharing a storage unit, simultaneously connected to The first processing unit and the second processing unit are configured to store data of a second type from the first processing unit and the second processing unit.
  • the first type of data processed by the first processing unit is stored by using a separate storage unit, and the second type of data is stored using the shared storage unit, so that different types of data are physically stored in isolation, avoiding private, important
  • the data is acquired by unsafe applications through other processors or storage units, which helps to improve the data security of the terminal.
  • the shared storage unit by causing the shared storage unit to be simultaneously connected to the first processing unit and the second processing unit, and storing the separately processed second type of service data, facilitating the first processing unit to assist the second processing unit when idle. Performing processing on the second type of service data helps to achieve rational allocation and use of resources within the terminal.
  • the first processing unit is further configured to: when processing the second type of service data, disconnect the connection with the independent storage unit, and maintain the shared storage unit Connecting, and disconnecting from the shared storage unit when the first type of service data is processed, maintaining and maintaining The connection of a separate storage unit.
  • the first processing unit is further configured to: when performing data processing on the second type of service from the second processing unit, if receiving the first type of service, Stop performing data processing on the second type of service, and performing data processing on the first type of service.
  • the service when the first type of service is received by the first processing unit, the service is preferentially processed, so that the negative impact of the processing of the second type of data by the first processing unit is reduced as much as possible. This includes reducing the length of time that the first type of service is put on hold, and reducing the likelihood that the first type of data is illegally acquired. At the same time, by stopping processing the second type of service, different types of business data are still strictly separated in the process of being processed, ensuring data security.
  • the service after the second type of service processing is completed, processes the first type of service that receives the processing request; if the first type of service that receives the processing request has a higher priority than the second type of service that is being processed
  • the priority is to terminate the processing of the second type of service, and preferentially process the first type of service, so as to ensure that the service with high priority is processed in a timely and effective manner.
  • the first processing unit is further configured to: store data of the first type of service being processed and corresponding breakpoint information to the shared storage unit, or be processing The data of the first type of service is stored to the shared storage unit, and the corresponding breakpoint information is sent to the second processing unit for further processing by the second processing unit.
  • the data of the second type of service being processed by the first processing unit and the corresponding breakpoint information are stored to the shared storage unit, or the data of the second type of service being processed is stored to the shared storage. And transmitting the corresponding breakpoint information to the second processing unit, so that the second processing unit can continue to process the second type of service that is not processed by the first processing unit according to the data of the second type of service and the breakpoint information.
  • the continuity of the second type of business processing is ensured. Specifically, when the first processing unit receives the first type of service processing request, if the second processing unit is processing other services, the first processing unit may process the processed second type of service data and the breakpoint information.
  • the second processing unit may directly send the breakpoint information to the second processing unit, so that the first The second processing unit directly processes the second type of service that is not processed by the first processing unit according to the received breakpoint information, thereby ensuring continuity of the service processing.
  • the first processing unit is configured to process private data in the terminal
  • the second processing unit is configured to process non-private data in the terminal.
  • the terminal there may be multiple types of data in the terminal, such as the importance of the data, the degree of privacy, the size of the data, the difference in the data format, etc., even based on the actual needs of the user, processed by each processor.
  • the data types are adjusted and changed.
  • the private data may be processed by the first processing unit according to the degree of privacy of the data, and the non-private data is processed by the second processing unit.
  • the private data is data corresponding to a protected application
  • the non-private data is data corresponding to an unprotected application
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can be embodied in the form of one or more computer program products embodied on a computer-usable storage medium (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
  • a computer-usable storage medium including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • FIG. 1 shows a schematic block diagram of a terminal in accordance with an embodiment of the present invention
  • FIG. 2 shows a schematic flow chart of a load balancing method in accordance with an embodiment of the present invention
  • FIG. 3A shows a schematic flow chart of processing of data by the CPU 1 according to an embodiment of the present invention
  • FIG. 3B shows a schematic flow chart of processing of data by the CPU 2 according to an embodiment of the present invention
  • FIG. 1 shows a schematic block diagram of a terminal in accordance with an embodiment of the present invention.
  • a terminal includes: a first processor (as shown in FIG. 1)
  • CPU1 and a second processor for respectively processing data in the terminal; sharing memory (RAM2, EMMC2, etc. as shown in FIG. 1), simultaneously connected to the a first processor and the second processor, configured to store, by the first processor and the second processor, the processed second type of service data; independent memory (RAM1 as shown in FIG. 1) , EMMC1, etc., is only connected to the first processor, and is used by the first processor to store the processed first type of service data.
  • the first type of data processed by the first processor is stored by using a separate memory, and the second type of data is stored using the shared memory, so that different types of data are physically stored in isolation, avoiding private and important data. Being acquired by an unsafe application through other processors or memories helps to improve the data security of the terminal.
  • the shared memory By causing the shared memory to be simultaneously connected to the first processor and the second processor, and storing the separately processed second type of service data, facilitating the first processor to perform the second processor when idle.
  • the processing of the second type of service data helps to achieve rational allocation and use of resources within the terminal.
  • the CPU 1 is further configured to: when processing the second type of service data, disconnect the connection with the independent memory, maintain the connection with the shared memory, and process In the case of the first type of service data, the connection with the shared memory is broken, and the connection with the independent memory is maintained.
  • the CPU 1 by disconnecting from the independent memory when processing the second type of service data, even if the CPU 1 can process different types of service data, it still cannot lead to the first type and the second type.
  • the type of data crosses, while making full use of the data computing resources in the terminal, as far as possible to avoid data security problems.
  • the CPU 1 is further configured to: when it is determined that the load of the CPU 2 is greater than or equal to a preset load threshold, the service queue from the CPU 2 is to be processed. Select the service that needs to be processed first for data processing.
  • the CPU 1 assists the CPU 2 in processing the second type of data only when it is idle and the CPU 2 is busy, thereby preventing the CPU 1 from processing the second type of data as much as possible, and reducing the first type and the second type.
  • the possibility of data crossover also reduces the likelihood that a malicious application will steal the first type of data.
  • the CPU 1 is further configured to: when performing data processing on the second type of service from the CPU 2, if receiving the first type of service, stopping the The second type of service performs data processing and performs data processing on the first type of service.
  • the service is preferentially processed, so as to reduce the negative impact of the CPU 1 processing the second type of data as much as possible, including reducing the first type of The length of time that the business is put on hold, and the possibility that the first type of data is illegally obtained.
  • different types of service data are still strictly separated in the process of being processed, ensuring data security.
  • the service after the second type of service processing is completed, processes the first type of service that receives the processing request; if the first type of service that receives the processing request has a higher priority than the second type of service that is being processed
  • the priority is to terminate the processing of the second type of service, and preferentially process the first type of service, so as to ensure that the service with high priority is processed in a timely and effective manner.
  • the CPU 1 is further configured to: store data of the first type of service being processed and corresponding breakpoint information to the shared memory, or use the first type being processed The data of the service is stored to the shared memory, and the corresponding breakpoint information is sent to the CPU 2 to be processed by the CPU 2.
  • the data of the second type of service being processed by the CPU 1 and the corresponding breakpoint information are stored to the shared memory, or the data of the second type of service being processed is stored to the shared memory, and corresponding The breakpoint information is sent to the CPU 2, so that the CPU 2 can continue to process the second type of service that the CPU1 has not processed according to the data of the second type of service and the breakpoint information, thereby ensuring the connection of the second type of service processing.
  • the CPU 1 when the CPU 1 receives the first type of service processing request, if the CPU 2 is processing other services, the CPU 1 may store the processed second type of service data and the breakpoint information to the shared memory, so that the CPU 2 is After the current service is processed, the data in the shared memory and the breakpoint information are read to continue processing the second type of service that is not processed by the CPU 1. If the CPU 1 receives the first type of service processing request and the CPU 2 is in the idle state, the CPU 1 may The breakpoint information is directly sent to the CPU 2, so that the CPU 2 directly processes the second type of service that the CPU 1 has not processed according to the received breakpoint information, thereby ensuring the continuity of the business process.
  • the CPU 1 is configured to process private data in the terminal
  • the CPU 2 is configured to process non-private data in the terminal.
  • the terminal there may be multiple types of data in the terminal, such as the importance of the data, the degree of privacy, the size of the data, the difference in the data format, etc., even based on the actual needs of the user, processed by each processor.
  • the data types are adjusted and changed.
  • the private data can be processed by the CPU 1 according to the privacy of the data, and the non-private data is processed by the CPU 2.
  • the private data is data corresponding to a protected application
  • the non-private data is data corresponding to an unprotected application
  • the first processor and the second processor are respectively used to process different types of data within the terminal, and thus involve classifying data within the terminal. For example, according to the importance of the data, the data is divided into core data and non-core data; or according to the privacy of the data, the data is divided into private data and non-private data; or according to the data transmission direction, the data is divided into Send data and received data, and so on.
  • Each classification can be preset by the manufacturer, or it can be determined by the user according to his actual situation.
  • data associated with certain applications can be used as private data or non-private data, such as "address book” and "call record”.
  • Application-related data such as ",” “short message”, “mail”, whether read or written, is counted as private data, or data related to a game application is treated as non-private data;
  • a certain type of data may be used as private data or non-private data, such as interactive data with online banking as private data, and software update package data as non-private data, etc., and may also include other The way to distinguish, not here - enumeration.
  • first processor and the second processor are not used to limit the number of processors in the terminal to two, and it is obvious that more processors can be included in the terminal.
  • first and second represent the relationship between any two processors in the terminal, and are used to distinguish any two processors that are compared.
  • processor 1 and processor 2 when processor 1 and processor 2 are selected for comparison, either processor 1 and processor 2 may be referred to as “first processor” and the other is “ Second processor”; and
  • processor 2 and the processor 3 When the processor 2 and the processor 3 are selected for comparison, either of the processor 2 and the processor 3 may be referred to as a "first processor” and the other as a “second processor", and so on.
  • processors can be used to process the same type of data, and the multiple processors should be treated as one processor group, then the "first processor” and the "second processor". It is also possible to actually represent a processor group for processing the same type of data, each processor group containing one or more processors. At the same time, in order to correspond to more types of data, it is obvious that there may be more processor groups in the terminal, such as "third processor group", "fourth processor group” and the like.
  • FIG. 2 shows a flow chart of a load balancing method in accordance with an embodiment of the present invention.
  • the application scenario is: processing, by the first processing unit (such as CPU1), the first type of data in the terminal by the second processing unit (eg, The CPU 2) processes the second type of data in the terminal.
  • the method includes: Step 202: Determine whether the first processing unit is in an idle state, and whether the load of the second processing unit reaches a preset value; if yes, execute step 204, otherwise, continue to detect the first processing unit and The state of the second processing unit.
  • Step 204 When the first processing unit is in an idle state, and the load of the second processing unit reaches a preset value, the service data that meets the preset condition in the task queue of the normal service is processed by the first processing unit.
  • the first processing unit and the second processing unit respectively process different service data
  • the first processing unit processes core services (such as private services)
  • the second processing unit processes regular services (such as non-private services)
  • the core business and the regular business are processed by different processing units, which ensure the security of the core business data and improve the data processing speed.
  • the preset condition may be met in the task queue of the second processing unit to be processed.
  • the service (such as the priority is greater than a certain value) is processed by the first processing unit, thereby speeding up the processing of the regular service and ensuring that the resources of the terminal are properly utilized.
  • first type of data in a separate storage space connected only to the first processing unit, and the first processing unit and the second processing
  • the second type of data processed by the unit is stored to a shared memory space that is simultaneously connected to the first processing unit and the second processing unit.
  • the method further includes: when processing the second type of service data, disconnecting the connection with the independent storage space, maintaining a connection with the shared storage space, and processing the first When the type of business data is disconnected from the shared storage space, the connection with the independent storage space is maintained.
  • the method further includes: when the first processing unit performs data processing on the second type of service from the second processing unit, if receiving the first type of service, Stop performing data processing on the second type of service, and performing data processing on the first type of service.
  • the service when the first type of service is received by the first processing unit, the service is preferentially processed, so that the negative impact of the processing of the second type of data by the first processing unit is reduced as much as possible. This includes reducing the length of time that the first type of service is put on hold, and reducing the likelihood that the first type of data is illegally acquired. At the same time, by stopping processing the second type of service, different types of business data are still strictly separated in the process of being processed, ensuring data security.
  • the service after the second type of service processing is completed, processes the first type of service that receives the processing request; if the first type of service that receives the processing request has a higher priority than the second type of service that is being processed
  • the priority is to terminate the processing of the second type of service, and preferentially process the first type of service, so as to ensure that the service with high priority is processed in a timely and effective manner.
  • the method further includes: the first processing unit storing data of the first type of service being processed and corresponding breakpoint information to the shared storage space, or being processed Data of the first type of service is stored to the shared storage space, and the corresponding breakpoint information is sent to the second processing unit for further processing by the second processing unit.
  • the data of the second type of service being processed by the first processing unit and the corresponding breakpoint information are stored to the shared storage unit, or the data of the second type of service being processed is stored to the shared storage. And transmitting the corresponding breakpoint information to the second processing unit, so that the second processing unit can continue to process the second type of service that is not processed by the first processing unit according to the data of the second type of service and the breakpoint information.
  • the continuity of the second type of business processing is ensured. Specifically, when the first processing unit receives the first type of service processing request, if the second processing unit is processing other services, the first processing unit may process the processed second type of service data and the breakpoint information.
  • the second processing unit reads the data and the breakpoint information in the shared storage unit to continue processing the second type of service that is not processed by the first processing unit;
  • the first processing unit may directly send the breakpoint information to the second processing unit, so that the second processing unit is configured according to the received breakpoint information.
  • the second type of service that has not been processed by the first processing unit is directly processed to ensure continuity of service processing.
  • the first processing unit is configured to process private data in the terminal
  • the second processing unit is configured to process non-private data in the terminal.
  • there may be multiple types of data in the terminal such as the importance of the data, the degree of privacy, the size of the data, the difference in the data format, etc., even based on the actual needs of the user, processed by each processor.
  • the data types are adjusted and changed.
  • the private data may be processed by the first processing unit according to the degree of privacy of the data, and the non-private data is processed by the second processing unit.
  • the private data is data corresponding to a protected application
  • the non-private data is data corresponding to an unprotected application
  • the first processing unit and the second processing unit are not intended to limit the number of processors in the terminal to two or the other, and it is apparent that the terminal may actually include one or more processors.
  • “first” and “second” represent the relationship between any two function modules having processing functions in the terminal, and are used to distinguish any two processing units that are compared.
  • a terminal that includes one processor can be divided into two or more functional modules, each functional module corresponds to one processing unit, or can be processed according to its own processing core (multi-core processor). Number, set one or more cores as one processing unit; for example, for a terminal with multiple processors, each processor can be set as one processing unit, or any of the processors can be divided into multiple Processing unit. More classifications are no longer - repeat.
  • processors can be used to process the same type of data, and the multiple processors should be treated as one processor group, then the "first processing unit” and the "second processing unit". It is also possible to actually represent a processor group for processing the same type of data, each processor group containing one or more processors. At the same time, in order to correspond to more types of data, it is obvious that there may be more processor groups in the terminal, such as "third processor group", "fourth processor group” and the like.
  • the processing method of the CPU 1 of the embodiment of the present invention includes:
  • Step 302 Determine whether the CPU 1 receives a core service (such as a private service) processing request, and if yes, perform step 304, otherwise, continue to perform the detection.
  • a core service such as a private service
  • Step 304 When receiving the core service processing request, determine whether the CPU 1 is performing processing of normal service data (such as non-private data); if yes, execute step 306; otherwise, execute step 310.
  • normal service data such as non-private data
  • Step 306 The CPU1 saves the normal service data being processed to the shared storage unit, and sends the normal service processing breakpoint information to the CPU2.
  • the regular service data and the breakpoint being processed may also be processed.
  • the information is saved to the shared storage unit, so that after processing other services, the CPU 2 reads the normal business data core breakpoint information that is not processed by the CPU1 stored in the shared storage unit, and continues to process the unfinished regular service.
  • Step 308 the CPU1 clears the independent storage unit and the buffer area data, and disconnects the shared storage unit; when the CPU1 processes the normal service, the conventional service may be stored in the independent storage unit and/or its buffer. Data, so in order to avoid the leakage of core business data and the confusion between core business data and regular business data, the data of the independent storage unit and the buffer area can be cleared, and the connection with the shared storage unit can be disconnected to ensure the security of the core business data. .
  • Step 310 Process core business data in response to the core service request.
  • the processing method of the CPU 2 of the embodiment of the present invention includes:
  • Step 312 it is judged whether the CPU 2 receives the routine task breakpoint information sent by the CPU 1, and if yes, step 314 is performed; otherwise, step 316 is performed.
  • the CPU 2 is in an idle state, it can be determined whether to receive the breakpoint information sent by the CPU 1. If the CPU 2 is processing the service, the breakpoint information sent by the CPU 1 can be saved to the shared storage unit, and it is determined whether the CPU 2 reads the shared storage unit. Breakpoint information.
  • Step 314 after the CPU 2 receives the normal task breakpoint information sent by the CPU 1, reads the unprocessed regular task data saved by the CPU 1 to the shared storage unit, and adds the regular task to the task queue of the CPU 2; of course, the CPU 2 also The breakpoint information stored in the shared storage unit and the data of the unprocessed regular service can be read, and the regular task is added to the task queue of the CPU 2.
  • Step 316 Process regular service data according to service priority.
  • the present invention also proposes a new functional architecture, which will be described in detail below with reference to FIG.
  • the present invention further provides a load balancing apparatus 400, including: a first processing unit 402 and a second processing unit 404, configured to respectively process first type and second type data in the terminal.
  • the first processing unit 402 is further configured to: when the first processing unit 402 is in an idle state, if it is determined that the load amount of the second processing unit 404 is greater than or equal to a preset load threshold, then The service processing queue of the second processing unit 404 selects a service that needs to be processed preferentially for data processing; the independent storage unit 406 is only connected to the first processing unit 402, and is configured to be used by the first processing unit 402.
  • the first type of data is stored; the shared storage unit 408 is simultaneously coupled to the first processing unit 402 and the second processing unit 404 for pairing the first processing unit 402 and the second processing
  • the second type of data of unit 404 is stored.
  • the first type of data processed by the first processing unit 402 is stored by using the independent storage unit 406, and the second type of data is stored using the shared storage unit 408, so that different types of data are physically stored in isolation, avoiding Private, important data is captured by other processors or storage units by insecure applications, which helps to improve the data security of the terminal.
  • the first processing unit 402 is facilitated when idle.
  • the second processing unit 404 performs processing of the second type of service data to facilitate reasonable allocation and use of resources within the terminal.
  • the first processing unit 402 is further configured to: when processing the second type of service data, disconnect the connection with the independent storage unit 406, and maintain the shared storage The connection of unit 408, and when processing the first type of service data, disconnects from the shared storage unit 408, maintaining a connection with the independent storage unit 406.
  • the first processing unit 402 is further configured to: when performing data processing on the second type of service from the second processing unit 404, if receiving the first type The service stops data processing on the second type of service, and performs data processing on the first type of service.
  • the service when the first type of service is received by the first processing unit 402, the service is preferentially processed, so that the negative of the first type of data processed by the first processing unit 402 is reduced as much as possible.
  • the impact includes reducing the length of time that the first type of service is put on hold, and reducing the likelihood that the first type of data is illegally acquired.
  • by stopping processing the second type of service different types of business data are still strictly separated in the process of being processed, ensuring data security.
  • the service after the second type of service processing is completed, processes the first type of service that receives the processing request; if the first type of service that receives the processing request has a higher priority than the second type of service that is being processed
  • the priority is to terminate the processing of the second type of service, and preferentially process the first type of service, so as to ensure that the service with high priority is processed in a timely and effective manner.
  • the first processing unit 402 is further configured to: store data of the first type of service being processed and corresponding breakpoint information to the shared storage unit 408, or Data of the first type of service being processed is stored to the shared storage unit 408, and the corresponding breakpoint information is sent to the second processing unit 404 for processing by the second processing unit 404.
  • the data of the second type of service being processed by the first processing unit 402 and the corresponding breakpoint information are stored to the shared storage unit 408, or the data of the second type of service being processed is stored to
  • the shared storage unit 408 sends the corresponding breakpoint information to the second processing unit 404, so that the second processing unit 404 can continue to process the unprocessed first processing unit 402 according to the data of the second type of service and the breakpoint information.
  • the second type of business ensures continuity of the second type of business processing. Specifically, when the first processing unit 402 receives the first type of service processing request, if the second processing unit 404 is processing other services, the first processing unit 402 may process the processed second type of service data.
  • Point information is stored to a total
  • the storage unit 408 is configured to enable the second processing unit 404 to read the data in the shared storage unit 408 and the breakpoint information to continue processing the second type of service that the first processing unit 402 has not processed after processing the current service;
  • the first processing unit 402 receives the first type of service processing request, and the second processing unit 404 is in the idle state, and the first processing unit 402 can directly send the breakpoint information to the second processing unit 404, so that the second processing unit 404
  • the second type of service that has not been processed by the first processing unit 402 is directly processed according to the received breakpoint information to ensure continuity of service processing.
  • the first processing unit 402 is configured to process private data in the terminal
  • the second processing unit 404 is configured to process non-private data in the terminal.
  • the terminal there may be multiple types of data in the terminal, such as the importance of the data, the degree of privacy, the size of the data, the difference in the data format, etc., even based on the actual needs of the user, processed by each processor.
  • the data types are adjusted and changed.
  • the private data may be processed by the first processing unit 402 based on the degree of privacy of the data, and the non-private data processed by the second processing unit 404.
  • the private data is data corresponding to a protected application
  • the non-private data is data corresponding to an unprotected application
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can be embodied in the form of one or more computer program products embodied on a computer-usable storage medium (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
  • a computer-usable storage medium including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • the present invention provides a terminal, a load balancing method, and a load balancing device, which can make different types of data in a terminal physically stored in isolation, and enhance the terminal.
  • the security, and the traffic volume can be reasonably arranged according to the working state of the processing unit, so that the terminal resources are reasonably and effectively utilized, and the efficiency of data processing is improved.
  • first and second are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
  • the term “plurality” refers to two or more, unless specifically defined otherwise.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Hardware Redundancy (AREA)
  • Storage Device Security (AREA)

Abstract

本发明提供了一种终端,包括:第一处理器和第二处理器,用于分别对所述终端内的数据进行处理;共享存储器,同时连接至所述第一处理器和所述第二处理器,用于所述第一处理器和所述第二处理器对处理后的第二类型的业务数据进行存储;独立存储器,仅连接至所述第一处理器,用于所述第一处理器对处理后的第一类型的业务数据进行存储。本发明还提出了一种负载平衡方法和一种负载平衡装置。通过本发明的技术方案,可以使得终端内不同类型的数据在物理上被隔离存储,提升终端的安全性,并且可以根据处理单元的工作状态合理安排业务量,使得终端资源得到合理有效的利用,提高了数据处理的效率。

Description

终端、 负载平衡方法和负载平衡装置
技术领域
本发明涉及数据处理技术领域, 具体而言, 涉及一种终端、 一种负载平衡方法和 一种负载平衡装置。 背景技术
在相关技术中, 终端往往仅包含单个处理器, 则由于所有数据都在该单个处理器 中进行处理, 使得无法将不同类型的数据分开进行处理, 容易造成重要、 私密的数据 与其他数据的交叉, 影响数据的安全性。
部分终端包含多个处理器, 但一方面也没有将终端的不同数据业务区分处理, 无 法保障私密业务的数据安全性; 另一方面, 其侧重于如何使得多个处理器对相同业务 的共同处理, 但对于多个业务的并发处理, 没有给出合理的安排策略。 发明内容
本发明正是基于上述问题, 提出了一种新的技术方案, 可以使得终端内不同类型 的数据在物理上被隔离存储, 提升终端的安全性, 并且可以根据处理单元的工作状态 合理安排业务量, 使得终端资源得到合理有效的利用, 提高了数据处理的效率。
有鉴于此, 本发明提出了一种终端, 包括: 第一处理器和第二处理器, 用于分别 对所述终端内的数据进行处理; 共享存储器, 同时连接至所述第一处理器和所述第二 处理器, 用于所述第一处理器和所述第二处理器对处理后的第二类型的业务数据进行 存储; 独立存储器, 仅连接至所述第一处理器, 用于所述第一处理器对处理后的第一 类型的业务数据进行存储。
在该技术方案中, 针对终端内不同类型的数据, 釆用不同的处理器对其进行处 理, 使得数据处理过程在物理上被隔离, 有助于提升终端的数据安全性。
通过使用独立存储器对第一处理器处理的第一类型的数据进行存储, 使用共享存 储器对第二类型的数据进行存储, 从而使得不同类型的数据在物理上被隔离存储, 避 免私有、 重要的数据被不安全的应用程序通过其他处理器或存储器进行获取, 有助于 提升终端的数据安全性。
而通过使得共享存储器同时连接至第一处理器和第二处理器, 并且对两者分别处 理后的第二类型的业务数据进行存储, 便于第一处理器在空闲时, 帮助第二处理器执 行对第二类型的业务数据的处理, 有助于实现对终端内的资源的合理分配和使用。 在上述技术方案中, 优选地, 所述第一处理器还用于: 在处理第二类型的业务数 据时, 断开与所述独立存储器之间的连接、 保持与所述共享存储器的连接, 以及在处 理第一类型的业务数据时, 断开与所述共享存储器之间的连接、 保持与所述独立存储 器的连接。
在该技术方案中, 通过在处理第二类型的业务数据时, 断开与独立存储器之间的 连接, 使得即便第一处理器可以对不同类型的业务数据进行处理, 但仍然无法导致第 一类型和第二类型的数据交叉, 在充分利用终端内的数据运算资源的同时, 尽可能地 避免带来数据安全问题。
在上述任一技术方案中, 优选地, 所述第一处理器在处于空闲状态时还用于: 若 判定所述第二处理器的负载量大于或等于预设的负载阈值, 则从所述第二处理器的待 处理业务队列中选择需要优先处理的业务进行数据处理。
在该技术方案中, 第一处理器仅在自身空闲、 第二处理器繁忙时, 才协助第二处 理器处理第二类型的数据, 从而尽可能地避免第一处理器对第二类型的数据进行处 理, 降低了第一类型和第二类型的数据发生交叉的可能性, 也降低了恶意应用窃取第 一类型的数据的可能性。
在上述任一技术方案中, 优选地, 所述第一处理器还用于: 在对来自所述第二处 理器的第二类型的业务进行数据处理时, 若接收到第一类型的业务, 则停止对所述第 二类型的业务进行数据处理, 并对所述第一类型的业务进行数据处理。
在该技术方案中, 通过在第一处理器接收到第一类型的业务时, 优先处理该业 务, 使得尽可能地降低第一处理器对第二类型的数据进行处理所带来的负面影响, 包 括降低第一类型的业务被搁置的时间长度, 以及降低了第一类型的数据被非法获取的 可能性。 同时, 通过停止处理第二类型的业务, 使得不同类型的业务数据在被处理的 过程中, 仍严格分离, 确保数据的安全性。
此外, 还可以通过判断第一处理器正在处理的第二类型的业务与接收到处理请求 的第一类型的业务的优先级, 从而确定是否终止对第二类型的业务的处理。 具体来 说, 若正在处理的第二类型的业务的优先级高于接收到处理请求的第一类型的业务的 优先级, 则在接收到第一类型的业务处理请求时, 继续处理第二类型的业务, 在第二 类型的业务处理完成之后再处理接收到处理请求的第一类型的业务; 若接收到处理请 求的第一类型的业务的优先级高于正在处理的第二类型的业务的优先级, 则终止对第 二类型的业务的处理, 优先处理第一类型的业务, 从而保证具有高优先级的业务得到 及时有效的处理。
在上述任一技术方案中, 优选地, 所述第一处理器还用于: 将正在处理的第一类 型的业务的数据和相应的断点信息存储至所述共享存储器, 或将正在处理的第一类型 的业务的数据存储至所述共享存储器, 并将所述相应的断点信息发送至所述第二处理 器, 以由所述第二处理器继续处理。 在该技术方案中, 通过将第一处理器正在处理的第二类型的业务的数据和相应的 断点信息存储至共享存储器, 或将正在处理的第二类型的业务的数据存储至共享存储 器, 并将相应的断点信息发送至第二处理器, 使得第二处理器能够根据第二类型的业 务的数据和断点信息继续处理第一处理器未处理完的第二类型的业务, 确保了第二类 型的业务处理的连续性。 具体来说, 在第一处理器接收到第一类型的业务处理请求 时, 若第二处理器正在处理其他业务, 则第一处理器可以将处理的第二类型的业务数 据和断点信息都存储至共享存储器, 以使第二处理器在处理完当前业务后, 读取共享 存储器中的数据与断点信息继续处理第一处理器未处理完成的第二类型的业务; 若第 一处理器接收到第一类型的业务处理请求, 第二处理器处于空闲状态, 则第一处理器 可以直接将断点信息发送至第二处理器, 使得第二处理器根据接收到的断点信息直接 对第一处理器未处理完的第二类型的业务进行处理, 确保业务处理的连续性。
在上述任一技术方案中, 优选地, 所述第一处理器用于处理所述终端内的私密数 据, 所述第二处理器用于处理所述终端内的非私密数据。
在该技术方案中, 终端内的数据可能存在多种类型, 比如数据的重要程度、 私密 程度、 数据量的大小、 数据格式的不同等, 甚至基于用户的实际需求, 对每个处理器 所处理的数据类型进行调整和变化。 在一种较为具体的实施例中, 可以根据数据的私 密程度, 将私密数据由第一处理器进行处理, 非私密数据由第二处理器进行处理。
在上述任一技术方案中, 优选地, 所述私密数据为对应于受保护应用的数据, 所 述非私密数据为对应于不受保护应用的数据。
本发明还提出了一种负载平衡方法, 包括: 由第一处理单元对终端内的第一类型 的数据进行处理, 并将所述第一类型的数据存储在仅连接至所述第一处理单元的独立 存储空间; 由第二处理单元对所述终端内的第二类型的数据进行处理; 所述第一处理 单元在处于空闲状态时, 若判定所述第二处理单元的负载量大于或等于预设的负载阈 值, 则从所述第二处理单元的待处理业务队列中选择需要优先处理的业务进行数据处 理, 并存储至同时连接至所述第一处理单元和所述第二处理单元的共享存储空间。
在该技术方案中, 针对终端内不同类型的数据, 釆用不同的处理器对其进行处 理, 使得数据处理过程在物理上被隔离, 有助于提升终端的数据安全性。
通过使用独立存储单元 (即独立存储空间) 对第一处理单元处理的第一类型的数 据进行存储, 使用共享存储单元 (即共享存储空间) 对第二类型的数据进行存储, 从 而使得不同类型的数据在物理上被隔离存储, 避免私有、 重要的数据被不安全的应用 程序通过其他处理器或存储单元进行获取, 有助于提升终端的数据安全性。
而通过使得共享存储单元同时连接至第一处理单元和第二处理单元, 并且对两者 分别处理后的第二类型的业务数据进行存储, 便于第一处理单元在空闲时, 帮助第二 处理单元执行对第二类型的业务数据的处理, 有助于实现对终端内的资源的合理分配 和使用。 在上述任一技术方案中, 优选地, 还包括: 所述第一处理单元在处理第二类型的 业务数据时, 断开与所述独立存储空间之间的连接、 保持与所述共享存储空间的连 接, 以及在处理第一类型的业务数据时, 断开与所述共享存储空间之间的连接、 保持 与所述独立存储空间的连接。
在该技术方案中, 通过在处理第二类型的业务数据时, 断开与独立存储单元之间 的连接, 使得即便第一处理单元可以对不同类型的业务数据进行处理, 但仍然无法导 致第一类型和第二类型的数据交叉, 在充分利用终端内的数据运算资源的同时, 尽可 能地避免带来数据安全问题。
在上述任一技术方案中, 优选地, 还包括: 所述第一处理单元在对来自所述第二 处理单元的第二类型的业务进行数据处理时, 若接收到第一类型的业务, 则停止对所 述第二类型的业务进行数据处理, 并对所述第一类型的业务进行数据处理。
在该技术方案中, 通过在第一处理单元接收到第一类型的业务时, 优先处理该业 务, 使得尽可能地降低第一处理单元对第二类型的数据进行处理所带来的负面影响, 包括降低第一类型的业务被搁置的时间长度, 以及降低了第一类型的数据被非法获取 的可能性。 同时, 通过停止处理第二类型的业务, 使得不同类型的业务数据在被处理 的过程中, 仍严格分离, 确保数据的安全性。
此外, 还可以通过判断第一处理单元正在处理的第二类型的业务与接收到处理请 求的第一类型的业务的优先级, 从而确定是否终止对第二类型的业务的处理。 具体来 说, 若正在处理的第二类型的业务的优先级高于接收到处理请求的第一类型的业务的 优先级, 则在接收到第一类型的业务处理请求时, 继续处理第二类型的业务, 在第二 类型的业务处理完成之后再处理接收到处理请求的第一类型的业务; 若接收到处理请 求的第一类型的业务的优先级高于正在处理的第二类型的业务的优先级, 则终止对第 二类型的业务的处理, 优先处理第一类型的业务, 从而保证具有高优先级的业务得到 及时有效的处理。
在上述任一技术方案中, 优选地, 还包括: 所述第一处理单元将正在处理的第一 类型的业务的数据和相应的断点信息存储至所述共享存储空间, 或将正在处理的第一 类型的业务的数据存储至所述共享存储空间, 并将所述相应的断点信息发送至所述第 二处理单元, 以由所述第二处理单元继续处理。
在该技术方案中, 通过将第一处理单元正在处理的第二类型的业务的数据和相应 的断点信息存储至共享存储单元, 或将正在处理的第二类型的业务的数据存储至共享 存储单元, 并将相应的断点信息发送至第二处理单元, 使得第二处理单元能够根据第 二类型的业务的数据和断点信息继续处理第一处理单元未处理完的第二类型的业务, 确保了第二类型的业务处理的连续性。 具体来说, 在第一处理单元接收到第一类型的 业务处理请求时, 若第二处理单元正在处理其他业务, 则第一处理单元可以将处理的 第二类型的业务数据和断点信息都存储至共享存储单元, 以使第二处理单元在处理完 当前业务后, 读取共享存储单元中的数据与断点信息继续处理第一处理单元未处理完 成的第二类型的业务; 若第一处理单元接收到第一类型的业务处理请求, 第二处理单 元处于空闲状态, 则第一处理单元可以直接将断点信息发送至第二处理单元, 使得第 二处理单元根据接收到的断点信息直接对第一处理单元未处理完的第二类型的业务进 行处理, 确保业务处理的连续性。
在上述任一技术方案中, 优选地, 所述第一处理单元用于处理所述终端内的私密 数据, 所述第二处理单元用于处理所述终端内的非私密数据。
在该技术方案中, 终端内的数据可能存在多种类型, 比如数据的重要程度、 私密 程度、 数据量的大小、 数据格式的不同等, 甚至基于用户的实际需求, 对每个处理器 所处理的数据类型进行调整和变化。 在一种较为具体的实施例中, 可以根据数据的私 密程度, 将私密数据由第一处理单元进行处理, 非私密数据由第二处理单元进行处 理。
在上述任一技术方案中, 优选地, 所述私密数据为对应于受保护应用的数据, 所 述非私密数据为对应于不受保护应用的数据。
本发明还提出了一种负载平衡装置, 包括: 第一处理单元和第二处理单元, 用于 分别对终端内的第一类型和第二类型的数据进行处理; 其中, 所述第一处理单元还用 于: 在所述第一处理单元处于空闲状态时, 若判定所述第二处理单元的负载量大于或 等于预设的负载阈值, 则从所述第二处理单元的待处理业务队列中选择需要优先处理 的业务进行数据处理; 独立存储单元, 仅连接至所述第一处理单元, 用于对来自所述 第一处理单元的第一类型的数据进行存储; 共享存储单元, 同时连接至所述第一处理 单元和所述第二处理单元, 用于对来自所述第一处理单元和所述第二处理单元的第二 类型的数据进行存储。
在该技术方案中, 针对终端内不同类型的数据, 釆用不同的处理器对其进行处 理, 使得数据处理过程在物理上被隔离, 有助于提升终端的数据安全性。
通过使用独立存储单元对第一处理单元处理的第一类型的数据进行存储, 使用共 享存储单元对第二类型的数据进行存储, 从而使得不同类型的数据在物理上被隔离存 储, 避免私有、 重要的数据被不安全的应用程序通过其他处理器或存储单元进行获 取, 有助于提升终端的数据安全性。
而通过使得共享存储单元同时连接至第一处理单元和第二处理单元, 并且对两者 分别处理后的第二类型的业务数据进行存储, 便于第一处理单元在空闲时, 帮助第二 处理单元执行对第二类型的业务数据的处理, 有助于实现对终端内的资源的合理分配 和使用。
在上述技术方案中, 优选地, 所述第一处理单元还用于: 在处理第二类型的业务 数据时, 断开与所述独立存储单元之间的连接、 保持与所述共享存储单元的连接, 以 及在处理第一类型的业务数据时, 断开与所述共享存储单元之间的连接、 保持与所述 独立存储单元的连接。
在该技术方案中, 通过在处理第二类型的业务数据时, 断开与独立存储单元之间 的连接, 使得即便第一处理单元可以对不同类型的业务数据进行处理, 但仍然无法导 致第一类型和第二类型的数据交叉, 在充分利用终端内的数据运算资源的同时, 尽可 能地避免带来数据安全问题。
在上述任一技术方案中, 优选地, 所述第一处理单元还用于: 在对来自所述第二 处理单元的第二类型的业务进行数据处理时, 若接收到第一类型的业务, 则停止对所 述第二类型的业务进行数据处理, 并对所述第一类型的业务进行数据处理。
在该技术方案中, 通过在第一处理单元接收到第一类型的业务时, 优先处理该业 务, 使得尽可能地降低第一处理单元对第二类型的数据进行处理所带来的负面影响, 包括降低第一类型的业务被搁置的时间长度, 以及降低了第一类型的数据被非法获取 的可能性。 同时, 通过停止处理第二类型的业务, 使得不同类型的业务数据在被处理 的过程中, 仍严格分离, 确保数据的安全性。
此外, 还可以通过判断第一处理单元正在处理的第二类型的业务与接收到处理请 求的第一类型的业务的优先级, 从而确定是否终止对第二类型的业务的处理。 具体来 说, 若正在处理的第二类型的业务的优先级高于接收到处理请求的第一类型的业务的 优先级, 则在接收到第一类型的业务处理请求时, 继续处理第二类型的业务, 在第二 类型的业务处理完成之后再处理接收到处理请求的第一类型的业务; 若接收到处理请 求的第一类型的业务的优先级高于正在处理的第二类型的业务的优先级, 则终止对第 二类型的业务的处理, 优先处理第一类型的业务, 从而保证具有高优先级的业务得到 及时有效的处理。
在上述任一技术方案中, 优选地, 所述第一处理单元还用于: 将正在处理的第一 类型的业务的数据和相应的断点信息存储至所述共享存储单元, 或将正在处理的第一 类型的业务的数据存储至所述共享存储单元, 并将所述相应的断点信息发送至所述第 二处理单元, 以由所述第二处理单元继续处理。
在该技术方案中, 通过将第一处理单元正在处理的第二类型的业务的数据和相应 的断点信息存储至共享存储单元, 或将正在处理的第二类型的业务的数据存储至共享 存储单元, 并将相应的断点信息发送至第二处理单元, 使得第二处理单元能够根据第 二类型的业务的数据和断点信息继续处理第一处理单元未处理完的第二类型的业务, 确保了第二类型的业务处理的连续性。 具体来说, 在第一处理单元接收到第一类型的 业务处理请求时, 若第二处理单元正在处理其他业务, 则第一处理单元可以将处理的 第二类型的业务数据和断点信息都存储至共享存储单元, 以使第二处理单元在处理完 当前业务后, 读取共享存储单元中的数据与断点信息继续处理第一处理单元未处理完 成的第二类型的业务; 若第一处理单元接收到第一类型的业务处理请求, 第二处理单 元处于空闲状态, 则第一处理单元可以直接将断点信息发送至第二处理单元, 使得第 二处理单元根据接收到的断点信息直接对第一处理单元未处理完的第二类型的业务进 行处理, 确保业务处理的连续性。
在上述任一技术方案中, 优选地, 所述第一处理单元用于处理所述终端内的私密 数据, 所述第二处理单元用于处理所述终端内的非私密数据。
在该技术方案中, 终端内的数据可能存在多种类型, 比如数据的重要程度、 私密 程度、 数据量的大小、 数据格式的不同等, 甚至基于用户的实际需求, 对每个处理器 所处理的数据类型进行调整和变化。 在一种较为具体的实施例中, 可以根据数据的私 密程度, 将私密数据由第一处理单元进行处理, 非私密数据由第二处理单元进行处 理。
在上述任一技术方案中, 优选地, 所述私密数据为对应于受保护应用的数据, 所 述非私密数据为对应于不受保护应用的数据。
通过以上技术方案, 可以使得终端内不同类型的数据在物理上被隔离存储, 提升 终端的安全性, 并且可以根据处理单元的工作状态合理安排业务量, 使得终端资源得 到合理有效的利用, 提高了数据处理的效率。
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或计算机程 序产品。 因此, 本发明可釆用完全硬件实施例、 完全软件实施例、 或结合软件和硬件 方面的实施例的形式。 而且, 本发明可釆用在一个或多个其中包含有计算机可用程序 代码的计算机可用存储介质 (包括但不限于磁盘存储器、 CD-ROM、 光学存储器等) 上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、 设备 (系统) 、 和计算机程序产品的流 程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图和 /或方框图中的 每一流程和 /或方框、 以及流程图和 /或方框图中的流程和 /或方框的结合。 可提供这些 计算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设 备的处理器以产生一个机器, 使得通过计算机或其他可编程数据处理设备的处理器执 行的指令产生用于实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方框 中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定 方式工作的计算机可读存储器中, 使得存储在该计算机可读存储器中的指令产生包括 指令装置的制造品, 该指令装置实现在流程图一个流程或多个流程和 /或方框图一个方 框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计 算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理, 从而在计算 机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和 /或方 框图一个方框或多个方框中指定的功能的步骤。 附图说明
图 1示出了根据本发明的实施例的终端的示意框图;
图 2示出了根据本发明的实施例的负载平衡方法的示意流程图;
图 3 A示出了根据本发明的实施例的 CPU 1对数据进行处理的示意流程图; 图 3B示出了根据本发明的实施例的 CPU2对数据进行处理的示意流程图; 图 4示出了根据本发明的实施例的负载平衡装置的示意框图。
具体实施方式
为了能够更清楚地理解本发明的上述目的、 特征和优点, 下面结合附图和具体实 施方式对本发明进行进一步的详细描述。 需要说明的是, 在不冲突的情况下, 本申请 的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本发明, 但是, 本发明还可 以釆用其他不同于在此描述的其他方式来实施, 因此, 本发明的保护范围并不受下面 公开的具体实施例的限制。
图 1示出了根据本发明的实施例的终端的示意框图。
如图 1 所示, 根据本发明的实施例的终端, 包括: 第一处理器 (如图 1 所示的
CPU1 ) 和第二处理器 (如图 1所示的 CPU2 ) , 用于分别对所述终端内的数据进行处 理; 共享存储器 (如图 1 所示的 RAM2、 EMMC2等) , 同时连接至所述第一处理器 和所述第二处理器, 用于所述第一处理器和所述第二处理器对处理后的第二类型的业 务数据进行存储; 独立存储器 (如图 1 所示的 RAM1、 EMMC1 等) , 仅连接至所述 第一处理器, 用于所述第一处理器对处理后的第一类型的业务数据进行存储。
在该技术方案中, 针对终端内不同类型的数据, 釆用不同的处理器对其进行处 理, 使得数据处理过程在物理上被隔离, 有助于提升终端的数据安全性。
通过使用独立存储器对第一处理器处理的第一类型的数据进行存储, 使用共享存 储器对第二类型的数据进行存储, 从而使得不同类型的数据在物理上被隔离存储, 避 免私有、 重要的数据被不安全的应用程序通过其他处理器或存储器进行获取, 有助于 提升终端的数据安全性。
而通过使得共享存储器同时连接至第一处理器和第二处理器, 并且对两者分别处 理后的第二类型的业务数据进行存储, 便于第一处理器在空闲时, 帮助第二处理器执 行对第二类型的业务数据的处理, 有助于实现对终端内的资源的合理分配和使用。
以下以第一处理器为 CPU1、 第二处理器为 CPU2等图 1 具体所示的情形, 对本 发明的终端实现的其他功能进行详细描述。
在上述技术方案中, 优选地, 所述 CPU1 还用于: 在处理第二类型的业务数据 时, 断开与所述独立存储器之间的连接、 保持与所述共享存储器的连接, 以及在处理 第一类型的业务数据时, 断开与所述共享存储器之间的连接、 保持与所述独立存储器 的连接。 在该技术方案中, 通过在处理第二类型的业务数据时, 断开与独立存储器之间的 连接, 使得即便 CPU1 可以对不同类型的业务数据进行处理, 但仍然无法导致第一类 型和第二类型的数据交叉, 在充分利用终端内的数据运算资源的同时, 尽可能地避免 带来数据安全问题。
在上述任一技术方案中, 优选地, 所述 CPU1 在处于空闲状态时还用于: 若判定 所述 CPU2的负载量大于或等于预设的负载阈值, 则从所述 CPU2的待处理业务队列 中选择需要优先处理的业务进行数据处理。
在该技术方案中, CPU1仅在自身空闲、 CPU2繁忙时, 才协助 CPU2处理第二类 型的数据, 从而尽可能地避免 CPU1 对第二类型的数据进行处理, 降低了第一类型和 第二类型的数据发生交叉的可能性, 也降低了恶意应用窃取第一类型的数据的可能 性。
在上述任一技术方案中, 优选地, 所述 CPU1还用于: 在对来自所述 CPU2的第 二类型的业务进行数据处理时, 若接收到第一类型的业务, 则停止对所述第二类型的 业务进行数据处理, 并对所述第一类型的业务进行数据处理。
在该技术方案中, 通过在 CPU1 接收到第一类型的业务时, 优先处理该业务, 使 得尽可能地降低 CPU1 对第二类型的数据进行处理所带来的负面影响, 包括降低第一 类型的业务被搁置的时间长度, 以及降低了第一类型的数据被非法获取的可能性。 同 时, 通过停止处理第二类型的业务, 使得不同类型的业务数据在被处理的过程中, 仍 严格分离, 确保数据的安全性。
此外, 还可以通过判断 CPU1 正在处理的第二类型的业务与接收到处理请求的第 一类型的业务的优先级, 从而确定是否终止对第二类型的业务的处理。 具体来说, 若 正在处理的第二类型的业务的优先级高于接收到处理请求的第一类型的业务的优先 级, 则在接收到第一类型的业务处理请求时, 继续处理第二类型的业务, 在第二类型 的业务处理完成之后再处理接收到处理请求的第一类型的业务; 若接收到处理请求的 第一类型的业务的优先级高于正在处理的第二类型的业务的优先级, 则终止对第二类 型的业务的处理, 优先处理第一类型的业务, 从而保证具有高优先级的业务得到及时 有效的处理。
在上述任一技术方案中, 优选地, 所述 CPU1 还用于: 将正在处理的第一类型的 业务的数据和相应的断点信息存储至所述共享存储器, 或将正在处理的第一类型的业 务的数据存储至所述共享存储器, 并将所述相应的断点信息发送至所述 CPU2 , 以由 所述 CPU2继续处理。
在该技术方案中, 通过将 CPU1 正在处理的第二类型的业务的数据和相应的断点 信息存储至共享存储器, 或将正在处理的第二类型的业务的数据存储至共享存储器, 并将相应的断点信息发送至 CPU2 , 使得 CPU2 能够根据第二类型的业务的数据和断 点信息继续处理 CPU1 未处理完的第二类型的业务, 确保了第二类型的业务处理的连 续性。 具体来说, 在 CPU1接收到第一类型的业务处理请求时, 若 CPU2正在处理其 他业务, 则 CPU1 可以将处理的第二类型的业务数据和断点信息都存储至共享存储 器, 以使 CPU2 在处理完当前业务后, 读取共享存储器中的数据与断点信息继续处理 CPU1 未处理完成的第二类型的业务; 若 CPU1 接收到第一类型的业务处理请求, CPU2处于空闲状态, 则 CPU1可以直接将断点信息发送至 CPU2 , 使得 CPU2根据接 收到的断点信息直接对 CPU1 未处理完的第二类型的业务进行处理, 确保业务处理的 连续性。
在上述任一技术方案中, 优选地, 所述 CPU1 用于处理所述终端内的私密数据, 所述 CPU2用于处理所述终端内的非私密数据。
在该技术方案中, 终端内的数据可能存在多种类型, 比如数据的重要程度、 私密 程度、 数据量的大小、 数据格式的不同等, 甚至基于用户的实际需求, 对每个处理器 所处理的数据类型进行调整和变化。 在一种较为具体的实施例中, 可以根据数据的私 密程度, 将私密数据由 CPU1进行处理, 非私密数据由 CPU2进行处理。
在上述任一技术方案中, 优选地, 所述私密数据为对应于受保护应用的数据, 所 述非私密数据为对应于不受保护应用的数据。
需要说明的是:
1、 数据分类
第一处理器和第二处理器分别用于处理终端内的不同类型的数据, 因而涉及到对 终端内的数据进行分类。 比如说, 根据数据的重要性, 将数据分为核心数据和非核心 数据; 或者根据数据的私密性, 将数据分为私密数据和非私密数据; 或者根据数据的 传输方向, 将数据分为待发送数据和接收到的数据等等。
每种分类情况均可以由厂商来预设, 也可以由用户根据自己的实际情况来确定。 以私密数据和非私密数据的分类方式为例, 譬如一种情况下, 可以将与某些应用程序 相关联的数据都作为私密数据或非私密数据, 比如将与 "通讯录" 、 "通话记录" 、 "短信息" 、 "邮件" 等应用程序相关的数据, 不论读取还是写入, 都算作私密数 据, 或将与某个游戏应用相关的数据, 都作为非私密数据; 譬如另一种情况下, 可以 将某个类型的数据作为私密数据或非私密数据, 比如将与网上银行的交互数据都作为 私密数据, 而将软件的更新包数据作为非私密数据等, 还可以包含其他的区分方式, 此处不进行——列举。
2、 处理器的数量
需要说明的是, 第一处理器和第二处理器并不用于限制终端内的处理器数量为两 个, 而终端内实际上显然可以包含更多的处理器。 其中, "第一" 和 "第二" 代表了 终端内的任意两个处理器之间的相互关系, 用于区分任意两个被进行比较的处理器。 比如对于包含有 3个处理器的终端, 当选取处理器 1和处理器 2进行比较时, 可以将 处理器 1和处理器 2中的任一个称为 "第一处理器" , 另一个为 "第二处理器" ; 而 当选取处理器 2和处理器 3进行比较时, 可以将处理器 2和处理器 3中的任一个称为 "第一处理器" , 另一个为 "第二处理器" , 依此类推。
当然, 为了增强终端的处理能力, 可以使用多个处理器来处理同一类数据, 则这 多个处理器应该被视为一个处理器组, 则 "第一处理器" 和 "第二处理器" 实际上还 可以表示用于处理相同类型的数据的处理器组, 每个处理器组内包含有一个或多个处 理器。 同时, 为了对应于更多类型的数据, 终端内显然还可以存在更多的处理器组, 比如 "第三处理器组" 、 "第四处理器组" 等。
图 2示出了根据本发明的实施例的负载平衡方法的流程图。
如图 2 所示, 根据本发明的实施例的负载平衡方法, 应用的场景为: 由第一处理 单元 (如 CPU1 ) 对终端内的第一类型的数据进行处理, 由第二处理单元 (如 CPU2 ) 对所述终端内的第二类型的数据进行处理。 在此基础上, 上述方法包括: 步骤 202 , 判断第一处理单元是否处于空闲状态, 且第二处理单元负载是否达到 预设值; 若是, 则执行步骤 204 , 否则, 继续检测第一处理单元和第二处理单元 的状 态。
步骤 204 , 在第一处理单元处于空闲状态, 且第二处理单元的负载达到预设值 时, 将常规业务的任务队列中满足预设条件的业务数据交由第一处理单元处理。
在本实施例中, 第一处理单元与第二处理单元分别处理不同的业务数据, 第一处 理单元处理核心业务 (比如私密业务) , 第二处理单元处理常规业务 (比如非私密业 务) , 通过将核心业务与常规业务分别由不同的处理单元进行处理, 确保了核心业务 数据的安全性, 同时也提高了数据处理速度。
在第一处理单元处于空闲状态, 且第二处理单元的负载达到预设值时, 为了緩解 第二处理单元的业务处理压力, 可以将第二处理单元待处理业务的任务队列中满足预 设条件 (比如优先级大于一定值) 的业务交由第一处理单元进行处理, 从而加快常规 业务的处理速度, 确保终端的资源得到合理利用。
其中, 为了避免不同类型的数据产生交叉, 则将所述第一类型的数据存储在仅连 接至所述第一处理单元的独立存储空间, 以及将所述第一处理单元和所述第二处理单 元处理的第二类型的数据, 存储至同时连接至所述第一处理单元和所述第二处理单元 的共享存储空间。
优选地, 还包括: 所述第一处理单元在处理第二类型的业务数据时, 断开与所述 独立存储空间之间的连接、 保持与所述共享存储空间的连接, 以及在处理第一类型的 业务数据时, 断开与所述共享存储空间之间的连接、 保持与所述独立存储空间的连 接。
在该技术方案中, 通过在处理第二类型的业务数据时, 断开与独立存储单元之间 的连接, 使得即便第一处理单元可以对不同类型的业务数据进行处理, 但仍然无法导 致第一类型和第二类型的数据交叉, 在充分利用终端内的数据运算资源的同时, 尽可 能地避免带来数据安全问题。
在上述任一技术方案中, 优选地, 还包括: 所述第一处理单元在对来自所述第二 处理单元的第二类型的业务进行数据处理时, 若接收到第一类型的业务, 则停止对所 述第二类型的业务进行数据处理, 并对所述第一类型的业务进行数据处理。
在该技术方案中, 通过在第一处理单元接收到第一类型的业务时, 优先处理该业 务, 使得尽可能地降低第一处理单元对第二类型的数据进行处理所带来的负面影响, 包括降低第一类型的业务被搁置的时间长度, 以及降低了第一类型的数据被非法获取 的可能性。 同时, 通过停止处理第二类型的业务, 使得不同类型的业务数据在被处理 的过程中, 仍严格分离, 确保数据的安全性。
此外, 还可以通过判断第一处理单元正在处理的第二类型的业务与接收到处理请 求的第一类型的业务的优先级, 从而确定是否终止对第二类型的业务的处理。 具体来 说, 若正在处理的第二类型的业务的优先级高于接收到处理请求的第一类型的业务的 优先级, 则在接收到第一类型的业务处理请求时, 继续处理第二类型的业务, 在第二 类型的业务处理完成之后再处理接收到处理请求的第一类型的业务; 若接收到处理请 求的第一类型的业务的优先级高于正在处理的第二类型的业务的优先级, 则终止对第 二类型的业务的处理, 优先处理第一类型的业务, 从而保证具有高优先级的业务得到 及时有效的处理。
在上述任一技术方案中, 优选地, 还包括: 所述第一处理单元将正在处理的第一 类型的业务的数据和相应的断点信息存储至所述共享存储空间, 或将正在处理的第一 类型的业务的数据存储至所述共享存储空间, 并将所述相应的断点信息发送至所述第 二处理单元, 以由所述第二处理单元继续处理。
在该技术方案中, 通过将第一处理单元正在处理的第二类型的业务的数据和相应 的断点信息存储至共享存储单元, 或将正在处理的第二类型的业务的数据存储至共享 存储单元, 并将相应的断点信息发送至第二处理单元, 使得第二处理单元能够根据第 二类型的业务的数据和断点信息继续处理第一处理单元未处理完的第二类型的业务, 确保了第二类型的业务处理的连续性。 具体来说, 在第一处理单元接收到第一类型的 业务处理请求时, 若第二处理单元正在处理其他业务, 则第一处理单元可以将处理的 第二类型的业务数据和断点信息都存储至共享存储单元, 以使第二处理单元在处理完 当前业务后, 读取共享存储单元中的数据与断点信息继续处理第一处理单元未处理完 成的第二类型的业务; 若第一处理单元接收到第一类型的业务处理请求, 第二处理单 元处于空闲状态, 则第一处理单元可以直接将断点信息发送至第二处理单元, 使得第 二处理单元根据接收到的断点信息直接对第一处理单元未处理完的第二类型的业务进 行处理, 确保业务处理的连续性。
在上述任一技术方案中, 优选地, 所述第一处理单元用于处理所述终端内的私密 数据, 所述第二处理单元用于处理所述终端内的非私密数据。 在该技术方案中, 终端内的数据可能存在多种类型, 比如数据的重要程度、 私密 程度、 数据量的大小、 数据格式的不同等, 甚至基于用户的实际需求, 对每个处理器 所处理的数据类型进行调整和变化。 在一种较为具体的实施例中, 可以根据数据的私 密程度, 将私密数据由第一处理单元进行处理, 非私密数据由第二处理单元进行处 理。
在上述任一技术方案中, 优选地, 所述私密数据为对应于受保护应用的数据, 所 述非私密数据为对应于不受保护应用的数据。
需要说明的是:
第一处理单元和第二处理单元并不用于限制终端内的处理器数量为两个或其他, 而终端内实际上显然可以包含一个或更多的处理器。 其中, "第一" 和 "第二" 代表 了终端内的任意两个具有处理功能的功能模块之间的相互关系, 用于区分任意两个被 进行比较的处理单元。 比如对于包含有 1 个处理器的终端, 可以将其分为两个或更多 的功能模块, 每个功能模块对应于一个处理单元, 也可以按照其本身包含的处理核心 (多核处理器) 的个数, 将一个或多个核心设置为一个处理单元; 再比如对于包含多 个处理器的终端, 可以将每个处理器设置为一个处理单元, 也可以将其中的任意处理 器分为多个处理单元。 更多的分类方式不再——赘述。
当然, 为了增强终端的处理能力, 可以使用多个处理器来处理同一类数据, 则这 多个处理器应该被视为一个处理器组, 则 "第一处理单元" 和 "第二处理单元" 实际 上还可以表示用于处理相同类型的数据的处理器组, 每个处理器组内包含有一个或多 个处理器。 同时, 为了对应于更多类型的数据, 终端内显然还可以存在更多的处理器 组, 比如 "第三处理器组" 、 "第四处理器组" 等。
下面结合图 3 A 至图 3B 详细说明根据本发明的实施例的数据处理方法的流程 图。
如图 3 A所示, #居本发明的实施例的 CPU1的处理方法, 包括:
步骤 302 , 判断 CPU1 是否接收到核心业务(比如私密业务) 处理请求, 若是, 则执行步骤 304, 否则, 继续进行检测。
步骤 304 , 在接收到核心业务处理请求时, 判断 CPU1 是否正在执行常规业务数 据 (比如非私密数据) 的处理; 若是, 则执行步骤 306, 否则, 执行步骤 310。
步骤 306 , CPU1 将正在处理的常规业务数据保存至共享存储单元, 并发送常规 业务处理断点信息至 CPU2; 当然, 在 CPU2 正在处理其他业务时, 也可以将正在处 理的常规业务数据和断点信息都保存至共享存储单元, 以使 CPU2 在处理完其他业务 后, 读取保存在共享存储单元中的 CPU1 未处理完的常规业务数据核断点信息, 继续 处理未完成的常规业务。
步骤 308 , CPU1 清除独立存储单元及緩存区数据, 并断开与共享存储单元的连 接; 在 CPU1处理常规业务时, 可能在独立存储单元和 /或其緩冲区内存储有常规业务 的数据, 因此为了避免核心业务数据的泄露以及核心业务数据和常规业务数据的混 淆, 可以清除独立存储单元及緩存区的数据, 并断开与共享存储单元的连接, 确保核 心业务数据的安全性。
步骤 310, 响应核心业务请求, 处理核心业务数据。
如图 3Β所示, #居本发明的实施例的 CPU2的处理方法, 包括:
步骤 312, 判断 CPU2是否接收 CPU1 发送的常规任务断点信息, 若是, 则执行 步骤 314 , 否则, 执行步骤 316。 在 CPU2 处于空闲状态时, 则可以判断是否接收 CPU1 发送的断点信息, 若 CPU2正在处理业务, 则可以将 CPU1 发送的断点信息保 存至共享存储单元中, 判断 CPU2是否读取共享存储单元中的断点信息。
步骤 314, 在 CPU2接收到 CPU1发送的常规任务断点信息之后, 读取 CPU1保 存至共享存储单元中的未处理完的常规任务数据, 并将该常规任务加入 CPU2 的任务 队列; 当然, CPU2 也可以读取保存在共享存储单元中的断点信息和未处理完的常规 业务的数据, 并将该常规任务加入 CPU2的任务队列。
步骤 316, 根据业务优先级, 处理常规业务数据。
为了实现上述操作功能和流程, 本发明还提出了一种新的功能架构, 下面将结合 图 4进行详细说明。
如图 4 所示, 本发明还提出了一种负载平衡装置 400, 包括: 第一处理单元 402 和第二处理单元 404 , 用于分别对终端内的第一类型和第二类型的数据进行处理; 其 中, 所述第一处理单元 402还用于: 在所述第一处理单元 402处于空闲状态时, 若判 定所述第二处理单元 404 的负载量大于或等于预设的负载阈值, 则从所述第二处理单 元 404 的待处理业务队列中选择需要优先处理的业务进行数据处理; 独立存储单元 406, 仅连接至所述第一处理单元 402, 用于对来自所述第一处理单元 402的第一类型 的数据进行存储; 共享存储单元 408 , 同时连接至所述第一处理单元 402 和所述第二 处理单元 404, 用于对来自所述第一处理单元 402和所述第二处理单元 404的第二类 型的数据进行存储。
在该技术方案中, 针对终端内不同类型的数据, 釆用不同的处理器对其进行处 理, 使得数据处理过程在物理上被隔离, 有助于提升终端的数据安全性。
通过使用独立存储单元 406 对第一处理单元 402 处理的第一类型的数据进行存 储, 使用共享存储单元 408对第二类型的数据进行存储, 从而使得不同类型的数据在 物理上被隔离存储, 避免私有、 重要的数据被不安全的应用程序通过其他处理器或存 储单元进行获取, 有助于提升终端的数据安全性。
而通过使得共享存储单元 408 同时连接至第一处理单元 402 和第二处理单元 404, 并且对两者分别处理后的第二类型的业务数据进行存储, 便于第一处理单元 402 在空闲时, 帮助第二处理单元 404执行对第二类型的业务数据的处理, 有助于实现对 终端内的资源的合理分配和使用。 在上述技术方案中, 优选地, 所述第一处理单元 402还用于: 在处理第二类型的 业务数据时, 断开与所述独立存储单元 406 之间的连接、 保持与所述共享存储单元 408 的连接, 以及在处理第一类型的业务数据时, 断开与所述共享存储单元 408 之间 的连接、 保持与所述独立存储单元 406的连接。
在该技术方案中, 通过在处理第二类型的业务数据时, 断开与独立存储单元 406 之间的连接, 使得即便第一处理单元 402 可以对不同类型的业务数据进行处理, 但仍 然无法导致第一类型和第二类型的数据交叉, 在充分利用终端内的数据运算资源的同 时, 尽可能地避免带来数据安全问题。
在上述任一技术方案中, 优选地, 所述第一处理单元 402还用于: 在对来自所述 第二处理单元 404 的第二类型的业务进行数据处理时, 若接收到第一类型的业务, 则 停止对所述第二类型的业务进行数据处理, 并对所述第一类型的业务进行数据处理。
在该技术方案中, 通过在第一处理单元 402接收到第一类型的业务时, 优先处理 该业务, 使得尽可能地降低第一处理单元 402对第二类型的数据进行处理所带来的负 面影响, 包括降低第一类型的业务被搁置的时间长度, 以及降低了第一类型的数据被 非法获取的可能性。 同时, 通过停止处理第二类型的业务, 使得不同类型的业务数据 在被处理的过程中, 仍严格分离, 确保数据的安全性。
此外, 还可以通过判断第一处理单元 402正在处理的第二类型的业务与接收到处 理请求的第一类型的业务的优先级, 从而确定是否终止对第二类型的业务的处理。 具 体来说, 若正在处理的第二类型的业务的优先级高于接收到处理请求的第一类型的业 务的优先级, 则在接收到第一类型的业务处理请求时, 继续处理第二类型的业务, 在 第二类型的业务处理完成之后再处理接收到处理请求的第一类型的业务; 若接收到处 理请求的第一类型的业务的优先级高于正在处理的第二类型的业务的优先级, 则终止 对第二类型的业务的处理, 优先处理第一类型的业务, 从而保证具有高优先级的业务 得到及时有效的处理。
在上述任一技术方案中, 优选地, 所述第一处理单元 402还用于: 将正在处理的 第一类型的业务的数据和相应的断点信息存储至所述共享存储单元 408 , 或将正在处 理的第一类型的业务的数据存储至所述共享存储单元 408 , 并将所述相应的断点信息 发送至所述第二处理单元 404 , 以由所述第二处理单元 404继续处理。
在该技术方案中, 通过将第一处理单元 402正在处理的第二类型的业务的数据和 相应的断点信息存储至共享存储单元 408 , 或将正在处理的第二类型的业务的数据存 储至共享存储单元 408 , 并将相应的断点信息发送至第二处理单元 404 , 使得第二处 理单元 404能够根据第二类型的业务的数据和断点信息继续处理第一处理单元 402未 处理完的第二类型的业务, 确保了第二类型的业务处理的连续性。 具体来说, 在第一 处理单元 402接收到第一类型的业务处理请求时, 若第二处理单元 404正在处理其他 业务, 则第一处理单元 402可以将处理的第二类型的业务数据和断点信息都存储至共 享存储单元 408 , 以使第二处理单元 404 在处理完当前业务后, 读取共享存储单元 408 中的数据与断点信息继续处理第一处理单元 402 未处理完成的第二类型的业务; 若第一处理单元 402接收到第一类型的业务处理请求, 第二处理单元 404处于空闲状 态, 则第一处理单元 402可以直接将断点信息发送至第二处理单元 404 , 使得第二处 理单元 404根据接收到的断点信息直接对第一处理单元 402未处理完的第二类型的业 务进行处理, 确保业务处理的连续性。
在上述任一技术方案中, 优选地, 所述第一处理单元 402 用于处理所述终端内的 私密数据, 所述第二处理单元 404用于处理所述终端内的非私密数据。
在该技术方案中, 终端内的数据可能存在多种类型, 比如数据的重要程度、 私密 程度、 数据量的大小、 数据格式的不同等, 甚至基于用户的实际需求, 对每个处理器 所处理的数据类型进行调整和变化。 在一种较为具体的实施例中, 可以根据数据的私 密程度, 将私密数据由第一处理单元 402 进行处理, 非私密数据由第二处理单元 404 进行处理。
在上述任一技术方案中, 优选地, 所述私密数据为对应于受保护应用的数据, 所 述非私密数据为对应于不受保护应用的数据。
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或计算机程 序产品。 因此, 本发明可釆用完全硬件实施例、 完全软件实施例、 或结合软件和硬件 方面的实施例的形式。 而且, 本发明可釆用在一个或多个其中包含有计算机可用程序 代码的计算机可用存储介质 (包括但不限于磁盘存储器、 CD-ROM、 光学存储器等) 上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、 设备 (系统) 、 和计算机程序产品的流 程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图和 /或方框图中的 每一流程和 /或方框、 以及流程图和 /或方框图中的流程和 /或方框的结合。 可提供这些 计算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设 备的处理器以产生一个机器, 使得通过计算机或其他可编程数据处理设备的处理器执 行的指令产生用于实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方框 中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定 方式工作的计算机可读存储器中, 使得存储在该计算机可读存储器中的指令产生包括 指令装置的制造品, 该指令装置实现在流程图一个流程或多个流程和 /或方框图一个方 框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计 算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理, 从而在计算 机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和 /或方 框图一个方框或多个方框中指定的功能的步骤。 以上结合附图详细说明了本发明的技术方案, 本发明提出了一种终端、 一种负载 平衡方法和一种负载平衡装置, 可以使得终端内不同类型的数据在物理上被隔离存 储, 提升终端的安全性, 并且可以根据处理单元的工作状态合理安排业务量, 使得终 端资源得到合理有效的利用, 提高了数据处理的效率。
在本发明中, 术语"第一"、 "第二 "仅用于描述目的, 而不能理解为指示或暗示相 对重要性。 术语"多个"指两个或两个以上, 除非另有明确的限定。
以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种终端, 其特征在于, 包括:
第一处理器和第二处理器, 用于分别对所述终端内的数据进行处理;
共享存储器, 同时连接至所述第一处理器和所述第二处理器, 用于所述第一处理 器和所述第二处理器对处理后的第二类型的业务数据进行存储;
独立存储器, 仅连接至所述第一处理器, 用于所述第一处理器对处理后的第一类 型的业务数据进行存储。
2. 根据权利要求 1所述的终端, 其特征在于, 所述第一处理器还用于: 在处理第二类型的业务数据时, 断开与所述独立存储器之间的连接、 保持与所述 共享存储器的连接, 以及在处理第一类型的业务数据时, 断开与所述共享存储器之间 的连接、 保持与所述独立存储器的连接。
3. 根据权利要求 1 所述的终端, 其特征在于, 所述第一处理器在处于空闲状态 时还用于:
若判定所述第二处理器的负载量大于或等于预设的负载阈值, 则从所述第二处理 器的待处理业务队列中选择需要优先处理的业务进行数据处理。
4. 根据权利要求 3所述的终端, 其特征在于, 所述第一处理器还用于: 在对来自所述第二处理器的第二类型的业务进行数据处理时, 若接收到第一类型 的业务, 则停止对所述第二类型的业务进行数据处理, 并对所述第一类型的业务进行 数据处理。
5. 根据权利要求 4所述的终端, 其特征在于, 所述第一处理器还用于: 将正在处理的第一类型的业务的数据和相应的断点信息存储至所述共享存储器, 或将正在处理的第一类型的业务的数据存储至所述共享存储器, 并将所述相应的断点 信息发送至所述第二处理器, 以由所述第二处理器继续处理。
6. 根据权利要求 1 至 5 中任一项所述的终端, 其特征在于, 所述第一处理器用 于处理所述终端内的私密数据, 所述第二处理器用于处理所述终端内的非私密数据。
7. 根据权利要求 6 所述的终端, 其特征在于, 所述私密数据为对应于受保护应 用的数据, 所述非私密数据为对应于不受保护应用的数据。
8. 一种负载平衡方法, 其特征在于, 包括:
由第一处理单元对终端内的第一类型的数据进行处理, 并将所述第一类型的数据 存储在仅连接至所述第一处理单元的独立存储空间;
由第二处理单元对所述终端内的第二类型的数据进行处理;
所述第一处理单元在处于空闲状态时, 若判定所述第二处理单元的负载量大于或 等于预设的负载阈值, 则从所述第二处理单元的待处理业务队列中选择需要优先处理 的业务进行数据处理, 并存储至同时连接至所述第一处理单元和所述第二处理单元的 共享存储空间。
9. 根据权利要求 8所述的负载平衡方法, 其特征在于, 还包括:
所述第一处理单元在处理第二类型的业务数据时, 断开与所述独立存储空间之间 的连接、 保持与所述共享存储空间的连接, 以及在处理第一类型的业务数据时, 断开 与所述共享存储空间之间的连接、 保持与所述独立存储空间的连接。
10. 根据权利要求 8所述的负载平衡方法, 其特征在于, 还包括:
所述第一处理单元在对来自所述第二处理单元的第二类型的业务进行数据处理 时, 若接收到第一类型的业务, 则停止对所述第二类型的业务进行数据处理, 并对所 述第一类型的业务进行数据处理。
1 1. 根据权利要求 10所述的负载平衡方法, 其特征在于, 还包括:
所述第一处理单元将正在处理的第一类型的业务的数据和相应的断点信息存储至 所述共享存储空间, 或将正在处理的第一类型的业务的数据存储至所述共享存储空 间, 并将所述相应的断点信息发送至所述第二处理单元, 以由所述第二处理单元继续 处理。
12. 根据权利要求 8 至 1 1 中任一项所述的负载平衡方法, 其特征在于, 所述第 一处理单元用于处理所述终端内的私密数据, 所述第二处理单元用于处理所述终端内 的非私密数据。
13. 根据权利要求 12 所述的负载平衡方法, 其特征在于, 所述私密数据为对应 于受保护应用的数据, 所述非私密数据为对应于不受保护应用的数据。
14. 一种负载平衡装置, 其特征在于, 包括:
第一处理单元和第二处理单元, 用于分别对终端内的第一类型和第二类型的数据 进行处理; 其中, 所述第一处理单元还用于: 在所述第一处理单元处于空闲状态时, 若判定所述第二处理单元的负载量大于或等于预设的负载阈值, 则从所述第二处理单 元的待处理业务队列中选择需要优先处理的业务进行数据处理;
独立存储单元, 仅连接至所述第一处理单元, 用于对来自所述第一处理单元的第 一类型的数据进行存储;
共享存储单元, 同时连接至所述第一处理单元和所述第二处理单元, 用于对来自 所述第一处理单元和所述第二处理单元的第二类型的数据进行存储。
15. 根据权利要求 14 所述的负载平衡装置, 其特征在于, 所述第一处理单元还 用于:
在处理第二类型的业务数据时, 断开与所述独立存储单元之间的连接、 保持与所 述共享存储单元的连接, 以及在处理第一类型的业务数据时, 断开与所述共享存储单 元之间的连接、 保持与所述独立存储单元的连接。
16. 根据权利要求 14 所述的负载平衡装置, 其特征在于, 所述第一处理单元还 用于: 在对来自所述第二处理单元的第二类型的业务进行数据处理时, 若接收到第一类 型的业务, 则停止对所述第二类型的业务进行数据处理, 并对所述第一类型的业务进 行数据处理。
17. 根据权利要求 16 所述的负载平衡装置, 其特征在于, 所述第一处理单元还 用于:
将正在处理的第一类型的业务的数据和相应的断点信息存储至所述共享存储单 元, 或将正在处理的第一类型的业务的数据存储至所述共享存储单元, 并将所述相应 的断点信息发送至所述第二处理单元, 以由所述第二处理单元继续处理。
18. 根据权利要求 14至 17中任一项所述的负载平衡装置, 其特征在于, 所述第 一处理单元用于处理所述终端内的私密数据, 所述第二处理单元用于处理所述终端内 的非私密数据。
19. 根据权利要求 18 所述的负载平衡装置, 其特征在于, 所述私密数据为对应 于受保护应用的数据, 所述非私密数据为对应于不受保护应用的数据。
PCT/CN2013/084360 2013-07-30 2013-09-26 终端、负载平衡方法和负载平衡装置 Ceased WO2015014017A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310326702.4 2013-07-30
CN2013103267024A CN103369524A (zh) 2013-07-30 2013-07-30 终端和数据处理方法

Publications (1)

Publication Number Publication Date
WO2015014017A1 true WO2015014017A1 (zh) 2015-02-05

Family

ID=49369846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/084360 Ceased WO2015014017A1 (zh) 2013-07-30 2013-09-26 终端、负载平衡方法和负载平衡装置

Country Status (2)

Country Link
CN (1) CN103369524A (zh)
WO (1) WO2015014017A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744737B (zh) * 2014-01-13 2017-07-25 联想(北京)有限公司 一种信息处理方法及电子设备
CN105631344B (zh) * 2015-04-30 2018-11-06 南京酷派软件技术有限公司 安全数据的访问控制方法及系统、终端

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673244A (zh) * 2008-09-09 2010-03-17 上海华虹Nec电子有限公司 多核或集群系统的存储器控制方法
CN101839997A (zh) * 2009-03-18 2010-09-22 中国石油天然气集团公司 一种地震数据并行存储系统
WO2012026034A1 (ja) * 2010-08-27 2012-03-01 富士通株式会社 スケジューラ、マルチコアプロセッサシステムおよびスケジューリング方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102004062203B4 (de) * 2004-12-23 2007-03-08 Infineon Technologies Ag Datenverarbeitungseinrichtung, Telekommunikations-Endgerät und Verfahren zur Datenverarbeitung mittels einer Datenverarbeitungseinrichtung
CN101610209B (zh) * 2008-11-28 2011-08-03 北京网康科技有限公司 一种多核并行的网络业务流处理方法及设备
CN101741912A (zh) * 2009-12-30 2010-06-16 中兴通讯股份有限公司 一种处理计算任务的方法、网络设备及分布式网络系统
CN103052059B (zh) * 2011-10-17 2017-03-22 中国移动通信集团公司 一种智能终端以及一种智能终端中的数据处理方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673244A (zh) * 2008-09-09 2010-03-17 上海华虹Nec电子有限公司 多核或集群系统的存储器控制方法
CN101839997A (zh) * 2009-03-18 2010-09-22 中国石油天然气集团公司 一种地震数据并行存储系统
WO2012026034A1 (ja) * 2010-08-27 2012-03-01 富士通株式会社 スケジューラ、マルチコアプロセッサシステムおよびスケジューリング方法

Also Published As

Publication number Publication date
CN103369524A (zh) 2013-10-23

Similar Documents

Publication Publication Date Title
JP6193467B2 (ja) 構成可能なマルチコアネットワークプロセッサ
US8594131B1 (en) Packet processing on a multi-core processor
CN101128807B (zh) 用于扩充中断控制器和合成中断来源的系统和方法
CN101950261B (zh) 数据存储与鉴权并行的处理方法和终端
CN114218133A (zh) 一种数据传输方法及装置
CN113449346B (zh) 微处理器、数据处理方法、电子设备和存储介质
CN103493449A (zh) 分组交换网络中的有效电路
US9588923B2 (en) Flow pinning in a server on a chip
CN103763403B (zh) 报文流量控制方法及相关装置和计算节点
WO2014149519A1 (en) Flow director-based low latency networking
CN113722103A (zh) 加密卡的调用控制方法及通信设备
CN104158764A (zh) 报文处理方法及装置
US7406583B2 (en) Autonomic computing utilizing a sequestered processing resource on a host CPU
WO2016131299A1 (zh) 一种设备内部处理器网口收包方法及装置
CN111371848A (zh) 一种请求处理方法、装置、设备及存储介质
CN113449347A (zh) 微处理器、数据处理方法、电子设备和存储介质
WO2015014017A1 (zh) 终端、负载平衡方法和负载平衡装置
CN113553137A (zh) 一种nfv架构下基于dpdk的接入能力网元高速数据处理方法
CN106301992B (zh) 一种攻击报文检测方法及设备
CN114172695B (zh) 串行防火墙报文转发方法、装置、设备及存储介质
CN115361210A (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
CN102117261A (zh) 一种芯片内部处理器之间的通信方法
CN113449331B (zh) 微处理器、数据处理方法、电子设备和存储介质
CN102841836B (zh) 测试方法以及可编程处理器
WO2017112271A1 (en) Protected data collection in a multi-node network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13890422

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13890422

Country of ref document: EP

Kind code of ref document: A1