CN112000462A - Data processing method and device based on shared peripheral resources - Google Patents

Data processing method and device based on shared peripheral resources Download PDF

Info

Publication number
CN112000462A
CN112000462A CN202010672146.6A CN202010672146A CN112000462A CN 112000462 A CN112000462 A CN 112000462A CN 202010672146 A CN202010672146 A CN 202010672146A CN 112000462 A CN112000462 A CN 112000462A
Authority
CN
China
Prior art keywords
peripheral
data
result information
processing
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010672146.6A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202010672146.6A priority Critical patent/CN112000462A/en
Publication of CN112000462A publication Critical patent/CN112000462A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Advance Control (AREA)

Abstract

The invention discloses a data processing method and a data processing device based on shared peripheral resources, relates to the technical field of computers, and mainly aims to improve the data processing efficiency of a user host. The method comprises the following steps: according to a preset configuration proportion, configuring part of data to be processed to the peripheral for calculation processing, and receiving first result information fed back by the peripheral, wherein the peripheral is used for receiving and calculating the part of data to be processed to obtain and feed back the first result information; calculating the remaining data to be processed by using local processor resources to obtain second result information; and correspondingly processing the first result information and the second result information to obtain third result information. The invention is suitable for data processing based on the shared peripheral resources.

Description

Data processing method and device based on shared peripheral resources
Technical Field
The invention relates to the technical field of computers, in particular to a data processing method and device based on shared peripheral resources.
Background
With the rapid development of computer technology, portable computer devices such as ultra-thin computers are increasingly favored by office and business people. In order to achieve small size and light weight, portable computer devices are usually configured at low end, which often results in insufficient resources of internal devices such as memory and processor during use. For example, a low-end configuration of a 128G hard disk, a 4G memory and a 1GHz processor is usually selected for cost reasons, and during use, if images or video files are stored, the memory space is insufficient, and when office software is run, a card machine may be caused by insufficient processor resources. Thereby causing a reduction in the data processing efficiency of the computer. In addition, the hardware configuration of the current mobile devices such as smart phones, smart watches, tablet computers and the like is rapidly updated, and a large amount of memory and processor resources are not effectively utilized when the resources of the user computer are insufficient, so that a large amount of memory and processor resources are wasted.
Disclosure of Invention
In view of the above, the present invention provides a data processing method and apparatus based on shared peripheral resources, and mainly aims to improve the data processing efficiency of a user host, for example, when the internal device resources of the host are insufficient, sufficient memory or processor resources are obtained through a peripheral connected to the host, so as to ensure smooth operation of software.
According to an aspect of the present invention, there is provided a data processing method based on shared peripheral resources, including:
according to a preset configuration proportion, configuring part of data to be processed to a peripheral for calculation processing, and receiving first result information fed back by the peripheral, wherein the peripheral is used for performing calculation processing on the received part of data to be processed and feeding back the obtained first result information;
calculating the data to be processed which is not configured for the peripheral equipment to be calculated by using local processor resources to obtain second result information;
and correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on the shared peripheral resources.
Further, the configuring, according to a preset configuration ratio, a part of data to be processed to a peripheral device for calculation processing, and receiving first result information fed back by the peripheral device, includes:
extracting corresponding data from the data to be processed according to a preset configuration proportion;
configuring the extracted data to the peripheral equipment for calculation processing;
and receiving a calculation processing result fed back by the peripheral, and determining the calculation processing result as first result information.
Optionally, the method further comprises:
when software to be operated is detected, reading memory resource information, wherein the memory resource information comprises local memory resource information and peripheral memory resource information;
if the memory resource information is larger than the memory resource threshold value of software operation, the software is operated;
and if the memory resource information is smaller than the memory resource threshold value of the software operation, feeding back reminding information.
Optionally, before configuring, according to a preset configuration ratio, a part of data to be processed to a peripheral device for performing calculation processing and receiving first result information fed back by the peripheral device, the method further includes:
identifying peripheral resource information, wherein the peripheral resource information comprises memory resource information and processor resource information of the peripheral;
and distributing a common file identifier for the peripheral equipment so that the host can share the peripheral equipment resources.
According to two aspects of the present invention, there is provided a data processing apparatus based on shared peripheral resources, comprising:
the peripheral equipment comprises a configuration unit, a processing unit and a processing unit, wherein the configuration unit is used for configuring part of data to be processed to peripheral equipment for calculation processing according to a preset configuration proportion and receiving first result information fed back by the peripheral equipment, and the peripheral equipment is used for calculating the received part of data to be processed and feeding back the obtained first result information;
the first processing unit is used for performing calculation processing on to-be-processed data which is not configured for peripheral equipment to perform calculation processing by using local processor resources to obtain second result information;
and the second processing unit is used for correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on shared peripheral resources.
Further, the configuration unit includes:
the extraction module is used for extracting corresponding data from the data to be processed according to a preset configuration proportion;
the configuration module is used for configuring the extracted data to the peripheral equipment for calculation processing;
and the receiving module is used for receiving the calculation processing result fed back by the peripheral and determining the calculation processing result as first result information.
Optionally, the apparatus further comprises:
the device comprises a reading unit and a processing unit, wherein the reading unit is used for reading memory resource information when software to be operated is detected, and the memory resource information comprises local memory resource information and peripheral memory resource information;
the running unit is used for running the software if the memory resource information is greater than a memory resource threshold value for running the software;
and the reminding unit is used for feeding back reminding information if the memory resource information is smaller than the memory resource threshold value of software operation.
Optionally, the apparatus further comprises:
the system comprises an identification unit, a processing unit and a processing unit, wherein the identification unit is used for identifying peripheral resource information, and the peripheral resource information comprises the memory resource information and the processor resource information of the peripheral;
and the allocation unit is used for allocating the common file identification to the peripheral equipment so that the host can share the peripheral equipment resources.
According to a third aspect of the present invention, there is provided a storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform the steps of: according to a preset configuration proportion, configuring part of data to be processed to a peripheral for calculation processing, and receiving first result information fed back by the peripheral, wherein the peripheral is used for performing calculation processing on the received part of data to be processed and feeding back the obtained first result information; calculating the data to be processed which is not configured for the peripheral equipment to be calculated by using local processor resources to obtain second result information; and correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on the shared peripheral resources.
According to a fourth aspect of the present invention, there is provided a computer device comprising a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus, and the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to perform the following steps: according to a preset configuration proportion, configuring part of data to be processed to a peripheral for calculation processing, and receiving first result information fed back by the peripheral, wherein the peripheral is used for performing calculation processing on the received part of data to be processed and feeding back the obtained first result information; calculating the data to be processed which is not configured for the peripheral equipment to be calculated by using local processor resources to obtain second result information; and correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on the shared peripheral resources.
Compared with the prior art that in the using process, if images or video files are stored, the memory space is insufficient, and card jamming can be caused due to insufficient computing resources of a processor when office software runs, the data processing method and the data processing device based on the shared peripheral resources have the advantages that part of data to be processed is configured to the peripheral for computing processing according to the preset configuration proportion, and first result information fed back by the peripheral is received, wherein the peripheral is used for computing the received part of data to be processed and feeding back the obtained first result information; calculating the data to be processed which is not configured for the peripheral equipment to be calculated by using local processor resources to obtain second result information; and correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on the shared peripheral resources. Therefore, the data processing efficiency of the user host can be improved, for example, when the internal equipment resources of the host are insufficient, sufficient memory or processor resources are obtained through the peripheral connected with the host, so that the smooth operation of software is ensured.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flowchart illustrating a data processing method based on shared peripheral resources according to an embodiment of the present invention;
FIG. 2 is a block diagram of an entity of a data processing apparatus based on a shared peripheral resource according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a data processing apparatus based on shared peripheral resources according to an embodiment of the present invention;
fig. 4 shows a physical structure diagram of a computer device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As described in the background, in order to achieve a small size and a light weight, the portable computer device is usually configured at a low end, so that the resources of internal devices such as a memory and a processor are often insufficient during the use process. For example, a low-end configuration of a 128G hard disk, a 4G memory and a 1GHz processor is usually selected for cost reasons, and during use, if images or video files are stored, the memory space is insufficient, and when office software is run, a card machine may be caused by insufficient processor resources. Thereby causing a reduction in the data processing efficiency of the computer. In addition, the hardware configuration of the current mobile devices such as smart phones, smart watches, tablet computers and the like is rapidly updated, and a large amount of memory and processor resources are not effectively utilized when the resources of the user computer are insufficient, so that a large amount of memory and processor resources are wasted.
In order to solve the above problem, an embodiment of the present invention provides a data processing method based on a shared peripheral resource, and as shown in fig. 1, the method includes:
101. according to a preset configuration proportion, part of data to be processed is configured to the peripheral equipment for calculation processing, and first result information fed back by the peripheral equipment is received.
The peripheral can be used for receiving and performing calculation processing on the part of data to be processed to obtain and feed back first result information. The first result information may specifically be a processing result obtained by processing the configured data by the peripheral. The preset configuration proportion may be a preset percentage of the data to be processed, and is used for dividing the data to be processed into a plurality of parts, so that the data to be processed of the plurality of parts are respectively configured to the local processor and the peripheral processor resource for data calculation processing.
It should be noted that the peripheral specifically may include peripherals with memory or processor resources, such as a smart phone, a tablet computer, and a smart watch. In an actual application scenario, due to the fact that resources of a memory or a processor of a user host are limited, software cannot run easily, or the computing processing speed is low, and the like, the data processing efficiency is greatly reduced. With the development of current mobile devices such as smart phones, smart watches, tablet computers and the like, the memory and processor resources of the mobile devices are increasing continuously, and a user host cannot be used with the smart phones, the smart watches or the tablet computers when data processing is performed, so that the memory or processor resources of the smart phones, the smart watches or the tablet computers are wasted. In the embodiment of the invention, the peripheral is connected to the user host, and the sharing of the user host and the peripheral memory resources or processor resources of the smart phone, the smart watch, the tablet personal computer and the like is realized through the preset software environment, so that the user host can run software more smoothly, and the data processing efficiency is improved.
In a practical application scenario, the method and the device can be used for providing additional memory resources or processor resources for the user host through the connection between the peripheral and the user host when the memory or processor resources of the user host are insufficient. In addition, as for the technical problem to be solved by the embodiment of the present invention, that is, the internal memory or processor resource of the host computer is insufficient in the working process or the business trip process of the working or business trip group, according to the technical scheme of the embodiment of the present invention, the user can easily solve the technical problem only by accessing the portable peripheral devices such as the smart phone, the smart watch, or the tablet computer to the host computer of the user, so as to realize the purpose of sharing the external memory or processor resource at any time and any place, thereby improving the data processing efficiency of the host computer of the user, and operating the software more smoothly.
102. And utilizing local processor resources to perform calculation processing on the data to be processed which is not configured for the peripheral equipment to perform calculation processing, and obtaining second result information.
The local processor resource may specifically include a computing resource of the current user host processor. The second result information may be obtained by performing calculation processing on to-be-processed data that is not configured to the peripheral device for calculation processing by using local processor resources. Specifically, the part of the to-be-processed data that is not configured to the peripheral for performing the calculation processing may be acquired, the processor resource of the user host is used to perform the calculation processing on the data, and the obtained calculation processing result is determined as the second result information. For example, the to-be-processed data is 100 pieces of 1 to be subjected to the calculation processing of accumulation, and according to a preset configuration proportion, 30% of the to-be-processed data is configured to the peripheral to be subjected to the calculation processing, that is, 30 pieces of 1 to be subjected to the calculation processing are configured to the corresponding peripheral, at this time, the host may invoke local processor resources to accumulate the remaining to-be-processed data, that is, 70 pieces of 1, to be subjected to the corresponding calculation processing, and an obtained calculation result is determined as the second result information. The local processor resources and the peripheral processor resources are used for computing the data to be processed together, so that the data processing efficiency of the user host can be improved, and the user experience is improved.
103. And correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on the shared peripheral resources.
The third result information may be obtained by processing the first result information and the second result information. For example, the data to be processed is 100 pieces of 1 to be accumulated, and according to a preset configuration proportion, 30% of the data to be processed is configured to the peripheral to be subjected to calculation processing, that is, 30 pieces of 1 to be accumulated calculation processing are configured to the corresponding peripheral to obtain first result information of 30; performing accumulation calculation processing on the remaining 70 pieces of 1 by using local processor resources to obtain second result information of 70; then, the first result information and the second result information need to be added to obtain a final calculation result, i.e. the third result information is 100.
It should be noted that, in an actual application scenario, the data is not limited to the accumulation processing, and therefore, after receiving first result information fed back by an external device, corresponding processing, such as subtraction, multiplication, or division, may be performed on the first result information and the second result information according to actual requirements, and a specific processing procedure is the same as the above-mentioned process of accumulation calculation processing, and is not described herein again. The embodiment of the invention simultaneously performs the calculation processing by using the local processor resource and the peripheral processor resource, and performs the corresponding processing on the local calculation processing result and the calculation processing result fed back by the peripheral, thereby realizing the processing of the data by the peripheral shared processor resource and improving the efficiency of data processing.
Further, in order to better describe the process of the data processing method based on the shared peripheral resource, as a refinement and an extension to the above embodiment, the embodiment of the present invention provides several alternative embodiments, but is not limited to this, and specifically shown as follows:
in an optional embodiment of the present invention, in order to fully utilize the processor resources of the peripheral device to perform the calculation processing on the data to be processed, the step 101 may specifically include: extracting corresponding data from the data to be processed according to a preset configuration proportion; configuring the extracted data to the peripheral equipment for calculation processing; and receiving a calculation processing result fed back by the peripheral, and determining the calculation processing result as first result information.
The preset configuration proportion can be set according to actual calculation processing requirements, and in an actual application scene, the preset configuration proportion can be set according to the sizes of the memory and the processor resources accessed to the peripheral, for example, the accessed memory is 4G, the processor is a 2GHz smart phone, and as the available memory resources and the processor resources are more, the configuration proportion can be set to 50%, namely, half of the data to be processed is configured to the smart phone for processing; if the accessed memory is 2G, the processor is an 800MHz smart watch, and because the available memory resources are relatively few, if too many data processing tasks are configured, the normal operation of the functions of the smart watch may be affected, so that the call cannot be connected or the WeChat cannot be used, and the like, the configuration proportion may be set to 30%, that is, 1/3 of the data to be processed is configured to the smart watch for processing, so that the normal use of the peripheral cannot be affected while the peripheral processor resources are utilized. It should be noted that the configuration ratio is only described for easy understanding, and it can be set according to different requirements of the user, for example, if the requirement of the user for utilizing the peripheral processor resource is greater than the requirement of the user for using the peripheral function, the configuration ratio can be set to the maximum.
In another alternative embodiment of the present invention, in order to solve the problem that the software cannot run due to insufficient memory resources of the user host, the method may further include: when software to be operated is detected, reading memory resource information; if the memory resource information is larger than the memory resource threshold value of software operation, the software is operated; and if the memory resource information is smaller than the memory resource threshold value of the software operation, feeding back reminding information.
The software to be run may be a software program installed locally on the user host and required to run on the user host. When the software runs, a certain basic memory space is usually needed to store the cache generated during the software running, for example, before a certain software runs, it is necessary to ensure that the current local remaining memory space is greater than 1G to ensure that the text file generated during the software running process can be stored in the memory space, thereby preventing the software from being jammed or forcibly quitting due to insufficient memory in the midway.
For the embodiment of the present invention, the memory resource information includes local memory resource information and peripheral memory resource information. After the peripheral is accessed, when the host reads the local memory resource information before the software runs, the local memory resource information and the peripheral memory resource information can be read simultaneously, so that the capacity expansion of the local memory resource is realized, and the software can run smoothly. For example, the host computer needs to run a piece of office software, which requires at least 800M of local memory resources, so that the text message template information downloaded during the running of the software can be stored in real time, but only 500M of local memory resources are left in the host computer. At this time, through sharing of 1G memory resources of the external smart phone, the local memory resources read by the host before the software is run are 1.5G, and then the software can run in the environment.
It should be noted that the memory resource required by the software usually far exceeds the actually required memory resource, and as in the above example, although the office software requires at least 800M of local memory resource, only about 50M of local memory resource may be required in the actual operation process. The memory resource threshold required by software operation can be reached under the common condition of the memory resource shared by the peripheral equipment. However, in an actual application scenario, if the local memory resource of the host is very little, for example, the host has only 30M local memory resources, the software can be operated in this environment through the sharing of the 1G local memory resource externally connected to the smart phone, but the cache generated during the operation cannot be stored locally in the host.
In addition, when the local memory resource and the peripheral memory resource are smaller than the memory resource threshold value required by the software operation, a reminding message can be sent to the user, and the reminding message can be specifically 'insufficient memory, software cannot be operated', and the like, so that the user is prompted to replace equipment or increase the memory space, and the like.
In another optional embodiment of the present invention, in order to access and identify a corresponding peripheral, and implement management and control on the peripheral, before the step 101, the method may further include: identifying peripheral resource information, wherein the peripheral resource information comprises memory resource information and processor resource information of the peripheral; and distributing a common file identifier for the peripheral equipment so that the host can share the peripheral equipment resources.
In an actual application scenario, as shown in fig. 2, one or more peripherals may be provided, for example, a smart phone, a smart watch, or a tablet computer may be connected to a host computer at the same time. The peripheral can be accessed to the host through preset hardware equipment, the preset hardware equipment can be specifically a simulator, the simulator can be connected with the peripheral through usb, to-be-processed data are sent to the peripheral to be calculated and processed, and a feedback processing result is transmitted to the host.
In addition, a software system may be preset in the host to manage an accessed peripheral, where the software system may include a virtual machine, and specifically, after the peripheral is accessed to the hardware device, the hardware device may identify resource information of the peripheral, and allocate a common file identifier to the peripheral through the preset software system, where the common file identifier is a common file ID, and may add the peripheral to management control of the software system, so that the host may read memory resources of the peripheral through the software system, and perform data calculation processing and the like by using processor resources of the peripheral.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides a data processing apparatus based on a shared peripheral resource, and as shown in fig. 2, the apparatus includes: a configuration unit 21, a first processing unit 22 and a second processing unit 23.
The configuration unit 21 may be configured to configure, according to a preset configuration ratio, a part of data to be processed to an external device for calculation processing, and receive first result information fed back by the external device, where the external device is configured to perform calculation processing on the received part of data to be processed, and feed back the obtained first result information;
the first processing unit 22 may be configured to perform, by using local processor resources, calculation processing on to-be-processed data that is not configured to perform calculation processing on an external device, so as to obtain second result information;
the second processing unit 23 may be configured to perform corresponding processing on the first result information and the second result information to obtain third result information, so as to complete data processing based on a shared peripheral resource.
The configuration unit 21 includes:
the extracting module 211 may be configured to extract corresponding data from the data to be processed according to a preset configuration ratio;
a configuration module 212, configured to configure the extracted data to the peripheral device for computation;
the receiving module 213 may be configured to receive a calculation processing result fed back by the peripheral and determine the calculation processing result as the first result information.
Further, in order to make the computer have larger memory resources to facilitate the running of the software, the apparatus further comprises:
the reading unit 24 may be configured to read memory resource information when detecting software to be run, where the memory resource information includes local memory resource information and peripheral memory resource information;
an operation unit 25, configured to operate the software if the memory resource information is greater than a memory resource threshold for software operation;
the reminding unit 26 may be configured to feed back the reminding information if the memory resource information is smaller than a memory resource threshold for software operation.
Further, in order to add the peripheral to the virtual machine so that the computer can identify and utilize the resources of the peripheral, the apparatus further comprises:
an identifying unit 27, configured to identify peripheral resource information, where the peripheral resource information includes memory resource information and processor resource information of the peripheral;
an allocation unit 28 may be configured to allocate a common file identification to the peripheral to enable the host to share the peripheral resources.
It should be noted that, for other corresponding descriptions of the functional modules involved in the data processing apparatus based on shared peripheral resources provided in the embodiment of the present invention, reference may be made to the corresponding description of the method shown in fig. 1, which is not described herein again.
Based on the method shown in fig. 1, correspondingly, an embodiment of the present invention further provides a storage medium, where at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to perform the following steps: according to a preset configuration proportion, configuring part of data to be processed to a peripheral for calculation processing, and receiving first result information fed back by the peripheral, wherein the peripheral is used for performing calculation processing on the received part of data to be processed and feeding back the obtained first result information; calculating the data to be processed which is not configured for the peripheral equipment to be calculated by using local processor resources to obtain second result information; and correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on the shared peripheral resources.
Based on the above embodiments of the method shown in fig. 1 and the apparatus shown in fig. 3, the embodiment of the present invention further provides a computer device, as shown in fig. 4, including a processor (processor)31, a communication Interface (communication Interface)32, a memory (memory)33, and a communication bus 34. Wherein: the processor 31, the communication interface 32, and the memory 33 communicate with each other via a communication bus 34. A communication interface 34 for communicating with network elements of other devices, such as clients or other servers. The processor 31 is configured to execute a program, and may specifically execute relevant steps in the above data processing method embodiment based on the shared peripheral resource. In particular, the program may include program code comprising computer operating instructions. The processor 31 may be a central processing unit CPU or a Specific Integrated circuit asic (application Specific Integrated circuit) or one or more Integrated circuits configured to implement an embodiment of the present invention.
The terminal comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs. And a memory 33 for storing a program. The memory 33 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The program may specifically be adapted to cause the processor 31 to perform the following operations: according to a preset configuration proportion, configuring part of data to be processed to a peripheral for calculation processing, and receiving first result information fed back by the peripheral, wherein the peripheral is used for performing calculation processing on the received part of data to be processed and feeding back the obtained first result information; calculating the data to be processed which is not configured for the peripheral equipment to be calculated by using local processor resources to obtain second result information; and correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on the shared peripheral resources.
According to the technical scheme, part of data to be processed can be configured to the peripheral for calculation processing according to the preset configuration proportion, and the first result information fed back by the peripheral is received, wherein the peripheral is used for calculating the received part of data to be processed and feeding back the obtained first result information; calculating the data to be processed which is not configured for the peripheral equipment to be calculated by using local processor resources to obtain second result information; and correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on the shared peripheral resources. The data processing efficiency of the user host can be improved, for example, when the internal equipment resources of the host are insufficient under extreme conditions, sufficient memory or processor resources are obtained through the peripheral connected with the host, so that the smooth operation of software is ensured.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A data processing method based on shared peripheral resources is characterized by comprising the following steps:
according to a preset configuration proportion, configuring part of data to be processed to a peripheral for calculation processing, and receiving first result information fed back by the peripheral, wherein the peripheral is used for performing calculation processing on the received part of data to be processed and feeding back the obtained first result information;
calculating the data to be processed which is not configured for the peripheral equipment to be calculated by using local processor resources to obtain second result information;
and correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on the shared peripheral resources.
2. The method according to claim 1, wherein the configuring, according to a preset configuration ratio, part of the data to be processed to the peripheral device for computational processing, and receiving first result information fed back by the peripheral device, comprises:
extracting corresponding data from the data to be processed according to a preset configuration proportion;
configuring the extracted data to the peripheral equipment for calculation processing;
and receiving a calculation processing result fed back by the peripheral, and determining the calculation processing result as first result information.
3. The method of claim 1, further comprising:
when software to be operated is detected, reading memory resource information, wherein the memory resource information comprises local memory resource information and peripheral memory resource information;
if the memory resource information is larger than the memory resource threshold value of software operation, the software is operated;
and if the memory resource information is smaller than the memory resource threshold value of the software operation, feeding back reminding information.
4. The method according to claim 1, wherein before configuring a part of the data to be processed to the peripheral device for computational processing according to a preset configuration ratio and receiving first result information fed back by the peripheral device, the method further comprises:
identifying peripheral resource information, wherein the peripheral resource information comprises memory resource information and processor resource information of the peripheral;
and distributing a common file identifier for the peripheral equipment so that the host can share the peripheral equipment resources.
5. A data processing apparatus based on shared peripheral resources, comprising:
the peripheral equipment comprises a configuration unit, a processing unit and a processing unit, wherein the configuration unit is used for configuring part of data to be processed to peripheral equipment for calculation processing according to a preset configuration proportion and receiving first result information fed back by the peripheral equipment, and the peripheral equipment is used for calculating the received part of data to be processed and feeding back the obtained first result information;
the first processing unit is used for performing calculation processing on to-be-processed data which is not configured for peripheral equipment to perform calculation processing by using local processor resources to obtain second result information;
and the second processing unit is used for correspondingly processing the first result information and the second result information to obtain third result information so as to finish data processing based on shared peripheral resources.
6. The apparatus of claim 5, wherein the configuration unit comprises:
the extraction module is used for extracting corresponding data from the data to be processed according to a preset configuration proportion;
the configuration module is used for configuring the extracted data to the peripheral equipment for calculation processing;
and the receiving module is used for receiving the calculation processing result fed back by the peripheral and determining the calculation processing result as first result information.
7. The method of claim 5, wherein the apparatus further comprises:
the device comprises a reading unit and a processing unit, wherein the reading unit is used for reading memory resource information when software to be operated is detected, and the memory resource information comprises local memory resource information and peripheral memory resource information;
the running unit is used for running the software if the memory resource information is greater than a memory resource threshold value for running the software;
and the reminding unit is used for feeding back reminding information if the memory resource information is smaller than the memory resource threshold value of software operation.
8. The method of claim 5, wherein the apparatus further comprises:
the system comprises an identification unit, a processing unit and a processing unit, wherein the identification unit is used for identifying peripheral resource information, and the peripheral resource information comprises the memory resource information and the processor resource information of the peripheral;
and the allocation unit is used for allocating the common file identification to the peripheral equipment so that the host can share the peripheral equipment resources.
9. A storage medium having a computer program stored thereon, the storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the data processing method based on shared peripheral resources according to any one of claims 1 to 4.
10. A computer device comprising a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus, and the memory is used for storing at least one executable instruction which causes the processor to execute the operation corresponding to the data processing method based on the shared peripheral resource in any one of claims 1-4.
CN202010672146.6A 2020-07-14 2020-07-14 Data processing method and device based on shared peripheral resources Pending CN112000462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010672146.6A CN112000462A (en) 2020-07-14 2020-07-14 Data processing method and device based on shared peripheral resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010672146.6A CN112000462A (en) 2020-07-14 2020-07-14 Data processing method and device based on shared peripheral resources

Publications (1)

Publication Number Publication Date
CN112000462A true CN112000462A (en) 2020-11-27

Family

ID=73467601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010672146.6A Pending CN112000462A (en) 2020-07-14 2020-07-14 Data processing method and device based on shared peripheral resources

Country Status (1)

Country Link
CN (1) CN112000462A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107771A (en) * 2022-12-13 2023-05-12 成都海光集成电路设计有限公司 Cache state recording method, data access method, related device and equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1639684A (en) * 2001-06-25 2005-07-13 国际商业机器公司 Method and apparatus to encourage client into a distributed peer to peer sharing technology
CN1664798A (en) * 2004-03-02 2005-09-07 联想(北京)有限公司 External equipment resource sharing method
CN1869959A (en) * 2006-06-28 2006-11-29 广州市立本电器有限公司 System for multi-user sharing internal and external storage of computer
CN102736595A (en) * 2012-06-06 2012-10-17 中国电力科学研究院 Unified platform of intelligent power distribution terminal based on 32 bit microprocessor and real time operating system (RTOS)
CN104364760A (en) * 2012-05-06 2015-02-18 桑迪士克科技股份有限公司 Parallel computation with multiple storage devices
CN105677484A (en) * 2016-01-08 2016-06-15 国家计算机网络与信息安全管理中心 Multi-core CPU real-time data processing method with automatic load balance function
CN109032778A (en) * 2018-07-07 2018-12-18 苏州蓝色弹珠智能科技有限公司 The method and system of cotasking processing
CN110851271A (en) * 2019-10-28 2020-02-28 北京梧桐车联科技有限责任公司 Resource sharing method and device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1639684A (en) * 2001-06-25 2005-07-13 国际商业机器公司 Method and apparatus to encourage client into a distributed peer to peer sharing technology
CN1664798A (en) * 2004-03-02 2005-09-07 联想(北京)有限公司 External equipment resource sharing method
CN1869959A (en) * 2006-06-28 2006-11-29 广州市立本电器有限公司 System for multi-user sharing internal and external storage of computer
CN104364760A (en) * 2012-05-06 2015-02-18 桑迪士克科技股份有限公司 Parallel computation with multiple storage devices
CN102736595A (en) * 2012-06-06 2012-10-17 中国电力科学研究院 Unified platform of intelligent power distribution terminal based on 32 bit microprocessor and real time operating system (RTOS)
CN105677484A (en) * 2016-01-08 2016-06-15 国家计算机网络与信息安全管理中心 Multi-core CPU real-time data processing method with automatic load balance function
CN109032778A (en) * 2018-07-07 2018-12-18 苏州蓝色弹珠智能科技有限公司 The method and system of cotasking processing
CN110851271A (en) * 2019-10-28 2020-02-28 北京梧桐车联科技有限责任公司 Resource sharing method and device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
钱幸存;高同国;: "基于单片机的多计算机外设共享控制器的设计与实现", 电子技术, no. 05 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107771A (en) * 2022-12-13 2023-05-12 成都海光集成电路设计有限公司 Cache state recording method, data access method, related device and equipment

Similar Documents

Publication Publication Date Title
CN110096336B (en) Data monitoring method, device, equipment and medium
CN112150023A (en) Task allocation method, device and storage medium
US10657678B2 (en) Method, apparatus and device for creating a texture atlas to render images
CN110727607A (en) Memory recovery method and device and electronic equipment
CN113014608A (en) Flow distribution control method and device, electronic equipment and storage medium
CN109558210B (en) Method and system for virtual machine to apply GPU (graphics processing Unit) equipment of host
CN110597585A (en) Application program page display method and device, computer equipment and storage medium
CN112000462A (en) Data processing method and device based on shared peripheral resources
CN116069493A (en) Data processing method, device, equipment and readable storage medium
CN112003930A (en) Task allocation method, device, equipment and storage medium
CN111190910A (en) Quota resource processing method and device, electronic equipment and readable storage medium
CN110688223A (en) Data processing method and related product
CN115587049A (en) Memory recovery method and device, electronic equipment and storage medium
CN115686746A (en) Access method, task processing method, computing device, and computer storage medium
CN112769688B (en) Method and device for protocol stack adaptation, electronic equipment and storage medium
CN115098272A (en) GPU resource scheduling method, scheduler, electronic device and storage medium
CN108509478B (en) Splitting and calling method of rule engine file, electronic device and storage medium
CN113485835A (en) Method, system, equipment and medium for realizing memory sharing under multiple scenes
CN112685371A (en) File storage space distribution method and device based on big data and storage medium
CN111290850A (en) Data storage method, device and equipment
CN117742957B (en) Memory allocation method, memory allocation device, electronic equipment and storage medium
CN117785486B (en) Environment resource allocation method, device, equipment and medium
CN118860640A (en) Memory management method, equipment and product
EP4191413A1 (en) Message management method, device, and serverless system
CN114428594B (en) Image display method, device, electronic equipment and storage medium

Legal Events

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