CN111008073A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN111008073A
CN111008073A CN201911156461.7A CN201911156461A CN111008073A CN 111008073 A CN111008073 A CN 111008073A CN 201911156461 A CN201911156461 A CN 201911156461A CN 111008073 A CN111008073 A CN 111008073A
Authority
CN
China
Prior art keywords
terminal
subtask
base station
task
processing result
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
CN201911156461.7A
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201911156461.7A priority Critical patent/CN111008073A/en
Publication of CN111008073A publication Critical patent/CN111008073A/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
    • 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/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a data processing method and a data processing device. In the embodiment of the invention, the second terminal and the first terminal share the memory, so that the second terminal can jointly process the tasks to be processed by the memory of the first terminal, and even if the data volume of the tasks to be processed is large, the second terminal can obtain the processing result of the tasks to be processed under the condition of not increasing the memory of the second terminal, thereby having low cost; in addition, in the embodiment of the invention, the first terminal independent of the second terminal assists in processing the task to be processed in the second terminal, so that the resource utilization rate of each terminal can be improved.

Description

Data processing method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data processing method and apparatus.
Background
With the development of communication technology, the data volume of tasks required to be processed by a terminal is increasingly huge, for example, in the field of financial technology (finetech), because transactions can be in a concurrent execution state in each period of time, an account checking task constructed based on the transactions in the period of time may include thousands of account checking subtasks corresponding to thousands of transactions, and thus, the processing of the account checking task generally requires that the terminal provides hundreds of G or more memories.
At present, when processing a task with a large data volume, a method generally adopted is to set a plurality of parallel threads in a terminal, and process the task together based on the plurality of parallel threads; however, the total amount of memory used by the multiple parallel threads is still limited by the memory amount of the terminal, which is limited, and if the memory amount of the terminal is not enough to handle a large data volume task, the terminal needs to be expanded, so that the cost of the terminal is high; moreover, even if the terminal has enough memory to process a large data volume task, this method needs to set multiple parallel threads in the terminal in advance (for example, a Central Processing Unit (CPU) of the terminal is set to be multi-core), and these parallel threads are in an idle state when the terminal processes a task with a small data volume, so that the resource utilization rate of the terminal is low in this method.
In summary, a data processing method is needed to solve the technical problems of low resource utilization and high cost of the terminal caused by the prior art that a plurality of parallel processes in the terminal process a large amount of data.
Disclosure of Invention
Embodiments of the present invention provide a data processing method and apparatus, so as to solve the technical problems of low resource utilization rate and high cost of a terminal in the prior art caused by processing a large data volume task through multiple parallel processes in the terminal.
In a first aspect, a data processing method provided in an embodiment of the present invention includes:
a first terminal acquires a first subtask, wherein the first subtask is a subtask of a task to be processed in a second terminal; if the first terminal determines that the available memory amount of the first terminal is enough to process the first subtask, receiving the first subtask, and processing the first subtask to obtain a processing result of the first subtask; and the processing result of the first subtask is used for the second terminal to obtain the processing result of the task to be processed.
In the embodiment of the invention, the second terminal can share the memory with the first terminal, so that the memory of the second terminal and the memory of the first terminal are used for processing the task to be processed together, and thus, even if the data volume of the task to be processed is large, the second terminal can obtain the processing result of the task to be processed under the condition of not increasing the memory of the second terminal through the memory sharing with the first terminal, so that the cost of the second terminal is low; in addition, the first terminal independent of the second terminal assists in processing the task to be processed, so that the resource utilization rate of each terminal can be improved.
In a possible implementation manner, the first subtask is sent to the first terminal by the second terminal; in this way, after the first terminal obtains the processing result of the first subtask, the processing result of the first subtask is also sent to the first terminal.
In the implementation mode, the first terminal and the second terminal are connected, so that the second terminal can directly send the first subtask to the first terminal without forwarding the first subtask through other equipment, and the efficiency of task processing can be improved.
In a possible implementation manner, the second terminal is connected to the first terminal through a bluetooth connection or a local area network.
In the implementation mode, if the second terminal is connected with the first terminal through the bluetooth, the second terminal can establish the bluetooth connection relationship with the first terminal when a task with large data volume needs to be processed, and does not need to establish the bluetooth connection relationship with the first terminal when the task with large data volume does not need to be processed, so that the data processing process is more flexible; if the second terminal is connected with the first terminal through the local area network, a plurality of second terminals and the first terminal can simultaneously establish a memory sharing network, so that the second terminal can share and process tasks with large data volume with the memories of the plurality of first terminals, and the task processing efficiency is improved.
In a possible implementation manner, the first subtask is broadcasted to the first terminal by a base station, and the first terminal and the second terminal establish a registration relationship with the base station in advance; in this way, after obtaining the processing result of the first subtask, the first terminal further sends the processing result of the first subtask to the base station, so that the base station sends the processing result of the first subtask to the second terminal.
In the implementation manner, by setting the base station, the first terminals and the second terminals, the second terminals can jointly process the tasks to be processed in the second terminals by combining the memories of the first terminals in the area where the base station is located, so that the second terminals can more fully utilize the memories of the terminals around the second terminals, and the resource utilization rate of each terminal can be improved while processing the tasks with large data volume.
In a second aspect, an embodiment of the present invention provides a data processing method, where the method includes:
the method comprises the steps that a second terminal obtains a task to be processed, and if the task to be processed is determined to be processed in a memory sharing mode, the task to be processed is divided into at least one first subtask and a second subtask; the memory amount required by the second subtask is less than or equal to the memory available amount of the second terminal; further, the second terminal processes the second subtask to obtain a processing result of the second subtask, sends the at least one first subtask to the base station or the at least one first terminal, receives the processing result of the at least one first subtask sent by the base station or the at least one first terminal, and further obtains the processing result of the task to be processed according to the processing result of the at least one first subtask and the processing result of the second subtask.
In the embodiment of the invention, the second terminal can process the tasks to be processed in the second terminal through the base station or directly combining each first terminal, so that when the data volume of the tasks to be processed is large, the second terminal can obtain the processing result of the tasks to be processed without capacity expansion, and the cost is low; and the processing efficiency of processing the tasks to be processed can be improved by respectively processing the subtasks of the tasks to be processed by the plurality of terminals.
In a third aspect, an embodiment of the present invention provides a data processing method, where the method includes:
a base station receives at least one first subtask sent by a second terminal, wherein the at least one first subtask is at least one subtask of a task to be processed in the second terminal; the base station broadcasts the at least one first subtask to each first terminal which has a registration relationship with the base station; the registration relation between the base station and each first terminal is established after the base station determines that the first terminal and the base station successfully handshake when the first terminal enters the area where the base station is located; further, the base station receives the processing result of the at least one first sub-task sent by each first terminal, and sends the processing result of the at least one first sub-task to the second terminal, where the processing result of the at least one first sub-task is used by the second terminal to obtain the processing result of the to-be-processed task.
In the embodiment of the invention, the base station establishes the network of the second terminal and each first terminal, so that the base station can broadcast each first subtask of the task to be processed in the second terminal to each second terminal, and thus, the second terminal can jointly process the task to be processed by each first terminal near the second terminal through the base station, thereby realizing memory sharing among a plurality of terminals, improving the resource utilization rate of the terminal, and also improving the capability of the terminal for processing the task with large data volume.
In a possible implementation manner, after the base station broadcasts the at least one first subtask to each first terminal having a registration relationship with the base station, the base station also sets, for any first subtask, a state of the first subtask to a locked state if the base station detects that a target first terminal successfully receives the first subtask; the locked state is used for avoiding that other first terminals except the target first terminal receive the first subtask.
In the implementation manner, by updating the locking state of the first subtask when a certain first terminal receives the first subtask, it can be ensured that the first subtask is not acquired by other first terminals, so that a plurality of first terminals can be prevented from processing the same first subtask at the same time, the effectiveness of data processing is improved, and the performance loss of useless operations to the first terminals is reduced.
In a possible implementation manner, after the base station sets the state of the first subtask to a locked state, if it is detected that the target first terminal is no longer located in the area where the base station is located, the registration relationship of the first target terminal is released, and the first subtask is re-broadcast to each first terminal having a registration relationship with the base station.
In the implementation manner, the base station can update the registration relationship according to the position of each first terminal, so that after a certain first terminal is far away from the area where the base station is located, the first subtask processed by the first terminal is automatically retransmitted to other first terminals, the first subtask can be accurately processed, and the situation that the processing result of the first subtask cannot be obtained due to the position movement of the first terminal is avoided; that is to say, the implementation manner can ensure that the base station obtains the processing result of each first subtask, thereby improving the processing result of the to-be-processed task.
In a fourth aspect, an embodiment of the present invention provides a data processing apparatus, where the apparatus includes:
the acquisition module is used for acquiring a first subtask, wherein the first subtask is a subtask of a task to be processed in the second terminal;
the receiving and sending module is used for receiving the first subtask if the memory available amount of the first terminal is determined to be enough to process the first subtask;
the processing module is used for processing the first subtask to obtain a processing result of the first subtask; and the processing result of the first subtask is used for the second terminal to obtain the processing result of the task to be processed.
In a possible implementation manner, the first subtask is sent to the first terminal by the second terminal; correspondingly, after the processing module obtains the processing result of the first subtask, the transceiver module further sends the processing result of the first subtask to the first terminal.
In a possible implementation manner, the second terminal is connected to the first terminal through a bluetooth connection or a local area network.
In a possible implementation manner, the first subtask is broadcasted to the first terminal by a base station; the first terminal and the second terminal establish a registration relationship with the base station in advance; correspondingly, after the processing module obtains the processing result of the first subtask, the transceiver module further sends the processing result of the first subtask to the base station; and the base station is used for sending the processing result of the first subtask to the second terminal.
In a fifth aspect, an embodiment of the present invention provides a data processing apparatus, where the apparatus includes:
the acquisition module is used for acquiring the tasks to be processed;
the slicing module is used for splitting the task to be processed into at least one first subtask and a second subtask if the task to be processed is determined to be processed in a memory sharing mode; the memory amount required by the second subtask is less than or equal to the memory available amount of the second terminal;
the processing module is used for processing the second subtask to obtain a processing result of the second subtask;
a transceiver module, configured to send the at least one first subtask to a base station or at least one first terminal, and receive a processing result of the at least one first subtask sent by the base station or the at least one first terminal;
the processing module is further configured to obtain a processing result of the task to be processed according to the processing result of the at least one first subtask and the processing result of the second subtask.
In a sixth aspect, an embodiment of the present invention provides a data processing apparatus, where the apparatus includes:
the system comprises a receiving and sending module, a processing module and a processing module, wherein the receiving and sending module is used for receiving at least one first subtask sent by a second terminal, and the at least one first subtask is at least one subtask of a task to be processed in the second terminal;
a broadcasting module, configured to broadcast the at least one first subtask to each first terminal having a registration relationship with the base station; the registration relation between the base station and each first terminal is established after the base station determines that the first terminal and the base station successfully handshake when the first terminal enters the area where the base station is located;
the transceiver module is further configured to receive a processing result of the at least one first sub-task sent by each first terminal, and send the processing result of the at least one first sub-task to the second terminal, where the processing result of the at least one first sub-task is used by the second terminal to obtain the processing result of the to-be-processed task.
In one possible implementation, the apparatus further includes a processing module; after the broadcasting module broadcasts the at least one first subtask to each first terminal having a registration relationship with the base station, the processing module sets the state of the first subtask to be a locked state for any first subtask if it is detected that a target first terminal successfully receives the first subtask; the locked state is used for avoiding that other first terminals except the target first terminal receive the first subtask.
In a possible implementation manner, after the processing module sets the state of the first subtask to be a locked state, if it is detected that the target first terminal is no longer located in the area where the base station is located, the registration relationship of the first target terminal is released; correspondingly, the broadcasting module rebroadcasts the first subtask to each first terminal which has a registration relationship with the base station.
In a seventh aspect, an embodiment of the present invention provides a computing device, including at least one processor and at least one memory, where the memory stores a computer program, and when the program is executed by the processor, the processor is caused to execute the data processing method according to any of the first to third aspects.
In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program executable by a computing device, and when the program runs on the computing device, the computer program causes the computing device to execute the data processing method according to any of the first to third aspects.
These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiments described hereinafter.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1a is a schematic diagram of a system architecture suitable for use in the embodiments of the present invention;
FIG. 1b is a schematic diagram of another applicable system architecture according to an embodiment of the present invention;
fig. 2 is a schematic view of an interaction flow corresponding to a data processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another applicable system architecture according to an embodiment of the present invention;
fig. 4 is a schematic interaction flow diagram corresponding to another data processing method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 6 is a block diagram of another data processing apparatus according to an embodiment of the present invention;
FIG. 7 is a block diagram of another data processing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another computing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1a is a schematic diagram of a possible system architecture according to an embodiment of the present invention, as shown in fig. 1a, the system may include a first terminal 110 and a second terminal 120, and the first terminal 110 may be connected to the second terminal 120 through bluetooth.
In a specific implementation, when a large amount of data to be processed task needs to be processed, if it is determined that the to-be-processed task is executed in a memory sharing manner, the second terminal 120 may generate a bluetooth connection request according to a bluetooth connection password set by a user or a default bluetooth connection password, and then send the bluetooth connection request to each terminal located near the second terminal 120; thus, if the distance between the first terminal 110 and the second terminal 120 meets the distance requirement of bluetooth signal transmission (for example, is less than or equal to the farthest distance of bluetooth signal transmission), the first terminal 110 may receive the bluetooth connection request, and if the first terminal 110 has negotiated the bluetooth connection password of the bluetooth connection request with the second terminal 120 in advance, the first terminal 110 may respond to the bluetooth connection request according to the bluetooth connection password negotiated in advance, so as to establish a bluetooth connection with the second terminal 120.
It should be noted that, if the first terminal 110 and the second terminal 120 have already established the bluetooth connection, the first terminal 110 may directly respond to the bluetooth connection request without the first terminal 110 having to re-input the bluetooth connection password.
In the embodiment of the invention, the second terminal is connected with the first terminal through the Bluetooth, the second terminal can establish the Bluetooth connection relation with the first terminal when a task with large data volume needs to be processed, and does not need to establish the Bluetooth connection relation with the first terminal when the task with large data volume does not need to be processed, so that the data processing process is more flexible; and the second terminal and the first terminal which have established the Bluetooth connection can establish the Bluetooth connection without depending on the Bluetooth connection password, so the method can simplify the operation steps of the user and is convenient for the user to execute memory sharing by using the terminals of the surrounding users.
Fig. 1b is a schematic diagram of another possible system architecture provided by the embodiment of the present invention, as shown in fig. 1b, the system may include a second terminal 120, an interconnection device 130, and at least one first terminal, such as the first terminal 111, the first terminal 112, and the first terminal 113; the second terminal 120 and the interconnection device 130, and the interconnection device 130 and the at least one first terminal may be communicatively connected, for example, the communicative connection may be implemented in a wired manner, or the communicative connection may also be implemented in a wireless manner, which is not limited in particular.
In this embodiment of the present invention, the interconnection device 130 may be any device, such as a router and a switch, which can connect the second terminal 120 and at least one first terminal and can implement data transmission between the second terminal 120 and the first terminal, and is not limited specifically.
In the embodiment of the present invention, at least one of the first terminal, the interconnection device 130 and the second terminal 120 may form a local area network.
In a specific implementation, the second terminal 120 may be in communication connection with at least one first terminal through the interconnection device 130 when a large amount of data to be processed needs to be processed, or may also be in communication connection with at least one first terminal through the interconnection device 130 all the time. For example, at least one of the first terminal and the second terminal may be each working computer in the same office, and each working computer is always in a communication connection state in daily life, so when a certain working computer has a memory sharing requirement, a memory sharing request may be directly sent to other working computers through the interconnection device 130, so as to jointly process tasks with large data volume by each working computer in the same office.
In the embodiment of the invention, the plurality of second terminals are connected with the first terminal through the local area network, so that the plurality of second terminals and the first terminal can construct the memory sharing network, and thus, the second terminals can share and process tasks with large data volume with the memories of the plurality of first terminals, and the task processing efficiency is improved.
Based on the system architectures illustrated in fig. 1a and fig. 1b, fig. 2 is an interaction flow diagram corresponding to a data processing method provided by the embodiment of the present invention, as shown in fig. 2, the method includes:
step 201, the second terminal obtains a task to be processed.
In step 202, the second terminal determines whether to process the task to be processed based on the memory sharing manner, if not, step 203 is executed, and if so, step 204 is executed.
In a possible determining manner, after the second terminal obtains the task to be processed, it may first count the data size of the task to be processed, then determine the memory size required for processing the task to be processed according to the data size of the task to be processed, if the memory size required for processing the task to be processed is greater than the set memory size, determine to process the task to be processed using the memory sharing manner, and if the memory size required for processing the task to be processed is less than or equal to the set memory size, determine not to process the task to be processed using the memory sharing manner.
The set memory amount may be a fixed value, for example, 500MB, or may also be a variable, for example, a set percentage value of the available memory amount in the second terminal, where the set percentage may be set by a person skilled in the art according to experience, or may be set according to a service requirement, and is not limited.
For example, when the available memory amount of the second terminal is 25600MB and the memory amount required for processing the to-be-processed task is 24600MB, if the set percentage is 80%, since the memory amount 24600MB required for processing the to-be-processed task is greater than 80% of the set memory amount 25600MB, the second terminal may determine to process the to-be-processed task in a memory sharing manner; or, if the set percentage is 100%, since the amount of memory 24600MB required for processing the to-be-processed task is less than 100% of the set amount of memory 25600MB, the second terminal may determine not to use the memory sharing method to process the to-be-processed task.
And 203, the second terminal processes the task to be processed to obtain a processing result of the task to be processed.
And 204, the second terminal divides the task to be processed into at least one first subtask and a second subtask.
In the embodiment of the present invention, after the second terminal obtains the to-be-processed task, the second terminal may first determine whether to process the to-be-processed task in a shared memory manner, and segment the to-be-processed task to obtain at least one first sub-task and one second sub-task, and then start to process the second sub-task. However, if this method is adopted, since the second terminal starts to process the to-be-processed task after the to-be-processed task is segmented, and the to-be-processed task is not processed in the determining and segmenting process, much time is wasted, and the processing efficiency of the second terminal is low.
Based on this, in a possible implementation manner, the second terminal may be provided with a first thread and a second thread, the first thread is used for processing the to-be-processed task, and the second thread is used for concurrently executing a process of determining whether to process the to-be-processed task in a shared memory manner while the first thread processes the to-be-processed task; correspondingly, if the second thread determines that the to-be-processed task is processed in the shared memory mode, the processing progress of the first thread for processing the to-be-processed task can be obtained, and then the mode for segmenting the to-be-processed task is determined according to the processing progress.
For example, if the to-be-processed task includes 1 st to 1000 th account checking tasks for respectively checking 1000 pieces of transaction data, when the second thread determines that the to-be-processed task is processed in the shared memory manner, it is found that the first thread has already processed the 1 st to 99 th account checking tasks and is processing the 100 th account checking task, the second thread may first divide the 1 st to 1000 th account checking tasks into a processed task set (including the checked account task and the on-going account checking task) and an unprocessed task set (including the on-going account checking task), where the processed task set includes the 1 st to 100 th account checking tasks and the unprocessed task set includes the 101 st to 1000 th account checking tasks.
Further, the second thread may divide the 101 st to 1000 th accounting tasks of the unprocessed task set according to the number of the first terminals participating in memory sharing, for example, if the second terminal is connected to the first terminal through bluetooth (as shown in fig. 1 a), the second terminal may divide the 101 st to 1000 th accounting tasks into two equal parts, or may divide the 101 st to 1000 th accounting tasks according to processing capabilities (such as hardware configuration conditions and available memory amounts) of the first terminal and the second terminal, so that the two divided tasks meet processing requirements of the first terminal and the second terminal, and so on. Correspondingly, if the second terminal is connected to the first terminal through the local area network (as shown in fig. 1 b), the second thread may select a part of the accounting tasks from the 101 th to 1000 th accounting tasks of the unprocessed task set according to the available memory amount of the second terminal, and a sum of the memory amount required for processing the accounting tasks and the memory amount required for the accounting tasks being processed by the second terminal needs to be smaller than the available memory amount of the second terminal, so that the accounting tasks may be allocated to the second terminal for processing by itself; assuming that the accounting tasks allocated to the second terminal for processing by itself include 101 st to 200 th accounting tasks, for the remaining 201 st to 1000 th accounting tasks, the second thread may equally divide the 800 accounting tasks according to the number of the first terminals accessing the lan, or may also divide the 800 accounting tasks according to the processing capabilities of the respective first terminals accessing the lan, and so on.
It should be noted that, the foregoing is only an exemplary and simple description, and does not constitute a limitation to the scheme, and in a specific implementation, the second thread may randomly partition the unprocessed accounting tasks, or the number of the accounting task sets obtained by partitioning the second thread may be greater than the number of the first terminals participating in the memory sharing, or may be less than or equal to the number of the first terminals participating in the memory sharing, and is not limited.
Thus, after the second thread segments the unprocessed account checking task, the second thread may take the account checking task processed by the second terminal, the account checking task being processed by the second terminal, and the unprocessed account checking task allocated to the second terminal as second subtasks, and take each of the other unprocessed account checking tasks obtained by the segmentation as a first subtask, thereby obtaining at least one first subtask and one second subtask.
In the embodiment of the invention, in the process of executing the operation by the second thread, the first thread can be always kept in the state of processing the task to be processed; correspondingly, after obtaining at least one first subtask and a second subtask, the second thread may also move the audit trail processed by the second terminal in the segmentation process from the at least one first subtask to the second subtask.
And step 205, the second terminal processes the second subtask to obtain a processing result of the second subtask.
In a specific implementation, each account checking task in the second subtasks may be set with a corresponding processing state, and the processing state of the account checking task may be a processed state, a processing state, or an unprocessed state, so that, after the second thread obtains the second subtask according to the segmentation result, the second subtask may be sent to the first thread, so that the first thread continues to process the unprocessed account checking task according to the processing state of each account checking task in the second subtask.
Step 206, the second terminal sends the at least one first subtask to the at least one first terminal.
It should be noted that the number of step 205 and step 206 is only one example of the execution flow, and does not form a limitation on the execution sequence of step 205 and step 206.
For example, if the second terminal processes the to-be-processed task in a serial manner, after the second terminal is split to obtain at least one first sub-task and a second sub-task, the second terminal may first send the at least one first sub-task to the at least one first terminal and then process the second sub-task to obtain a processing result of the second sub-task, or may first start processing the second sub-task to obtain a processing result of the second sub-task and then send the at least one first sub-task to the at least one first terminal.
Correspondingly, if the second terminal processes the to-be-processed task in a parallel manner, after the second thread in the second terminal is split into at least one first subtask and a second subtask, the at least one first subtask may be first sent to the at least one first terminal, and then the second subtask may be sent to the first process, or the second subtask may be first sent to the first process, and then the at least one first subtask is sent to the at least one first terminal, without limitation.
In a specific implementation, when the second terminal sends the first subtasks, if the second terminal determines that the corresponding relationship between each first subtask and each first terminal is set during the splitting, each first subtask may be sent according to the corresponding relationship, and if it is determined that the corresponding relationship between each first subtask and each first terminal is not set during the splitting, a plurality of first terminals may be randomly selected from the first terminals, and each first subtask may be sent to the first terminals, where each first terminal may be sent with one first subtask or may be sent with a plurality of first subtasks, without limitation.
In the embodiment of the invention, the second terminal can directly send the first subtask to the first terminal without forwarding the first subtask through the interconnection equipment, so that the task processing efficiency can be improved, and the safety of the first subtask can be ensured.
Step 207, after receiving the first sub-task, the first terminal determines whether the available memory of the first terminal is sufficient to process the first sub-task, if not, step 208 is executed, and if so, step 209 is executed.
And step 208, the first terminal refuses to receive the first subtask, generates a response message refusing to receive, and sends the response message refusing to receive to the second terminal.
In an example, if the second terminal receives a response message sent by the first terminal to reject reception, the second terminal may send the first subtask to the other first terminals, or may poll the first terminal first, and if the first terminal still rejects reception of the first subtask after a set number of times of polling, the second terminal may send the first subtask to the other first terminals.
Step 209, the first terminal processes the first subtask to obtain a processing result of the first subtask.
And step 210, the first terminal sends the processing result of the first subtask to the second terminal.
And step 211, the second terminal obtains a processing result of the task to be processed according to the processing result of each first subtask and the processing result of the second subtask.
In the embodiment of the invention, the second terminal can share the memory with the first terminal, so that the memory of the second terminal and the memory of the first terminal are used for processing the task to be processed together, and thus, even if the data volume of the task to be processed is large, the second terminal can obtain the processing result of the task to be processed under the condition of not increasing the memory of the second terminal through the memory sharing with the first terminal, so that the cost of the second terminal is low; in addition, the first terminal independent of the second terminal assists in processing the task to be processed, so that the resource utilization rate of each terminal can be improved.
Fig. 3 is a schematic diagram of another possible system architecture provided by the embodiment of the present invention, as shown in fig. 3, the system may include a second terminal 120, a base station 140, and at least one first terminal, such as the first terminal 114, the first terminal 115, and the first terminal 116; the base station 140 may be connected to the second terminal 120 and the at least one first terminal, for example, through a wired connection, or through a wireless connection, which is not limited in this embodiment.
In the embodiment of the present invention, the base station 140 may be any mobile communication base station in the 3G communication technology, the 4G communication technology, or the 5G communication technology; accordingly, the terminal may be any device with data processing capability, such as a mobile phone, a notebook computer, a desktop computer, an IPad, an unmanned vehicle, and the like, without limitation.
Based on the system architecture illustrated in fig. 3, fig. 4 is an interaction flow diagram corresponding to a data processing method provided in an embodiment of the present invention, where the method includes:
step 401, the second terminal obtains a task to be processed.
Step 402, the second terminal determines whether to process the task to be processed based on the memory sharing mode, if not, step 403 is executed, and if yes, step 404 is executed.
And step 403, the second terminal processes the task to be processed to obtain a processing result of the task to be processed.
In step 404, the second terminal divides the task to be processed into at least one first subtask and a second subtask.
And 405, the second terminal processes the second subtask to obtain a processing result of the second subtask.
Step 406, the second terminal sends at least one first subtask to the base station.
It should be noted that the above is only an exemplary and simple description, and the listed interaction manner of the second terminal and the base station is only for convenience of description and does not constitute a limitation to the scheme, and in a specific implementation, the interaction manner of the second terminal and the base station may be set by a person skilled in the art according to experience, and is not specifically limited.
For example, in an example, the second terminal may directly segment the to-be-processed task to obtain at least one first subtask and a second subtask, and then send the at least one first subtask to the base station; in another example, the second terminal may also segment the task to be processed to obtain a first task and a second subtask, and then send the first task to the base station, and accordingly, after receiving the first task, the base station may segment the first task to obtain at least one first subtask; in another example, the second terminal may further segment the task to be processed to obtain a plurality of first subtasks, a plurality of second subtasks, and then send the plurality of first subtasks and the plurality of second subtasks to the base station.
Step 407, the base station broadcasts at least one first subtask to each first terminal having a registration relationship with the base station.
The registration relationship between the base station and each first terminal is established after the base station determines that the first terminal and the base station successfully handshake when the first terminal enters the area where the base station is located.
In one example, each terminal (first terminal or second terminal) may perform a handshake operation with the base station when entering an area where the base station is located, and if the handshake between the terminal and the base station is successful, the terminal may successfully establish a connection with the base station; accordingly, if the base station detects that a certain terminal successfully establishes a connection with the base station, a registration relationship between the terminal and the base station may be created, for example, an identifier of the terminal is added to the registration table.
In the above example, by establishing the registration relationship between the base station and each terminal in the area where the base station is located, all terminals in the area where the base station is located can participate in memory sharing, so that the terminals can fully utilize the memories of the surrounding terminals when processing the task to be processed, and the task processing efficiency is improved.
In another example, each terminal (first terminal or second terminal) may perform a handshake operation with the base station when entering an area where the base station is located, and if the handshake between the terminal and the base station is successful, the terminal may successfully establish a connection with the base station; further, if a certain terminal determines to participate in the shared memory, the terminal may send a registration request to the base station, and correspondingly, if the base station receives the registration request sent by the certain terminal, the base station may establish a registration relationship between the terminal and the base station.
In the above example, the registration relationship is established for the terminal that needs to participate in the shared memory, so that the terminal can determine whether to participate in the shared memory according to the needs of the terminal, and thus, the base station can more flexibly combine the terminals to execute the shared memory, thereby better meeting the needs of the user, and better user experience.
In the embodiment of the invention, after the base station establishes the registration relationship between the base station and any terminal, the connection relationship between the base station and the terminal can be detected in real time, and if the terminal is determined to move out of the area where the base station is located, the registration relationship between the base station and the terminal can be released; by updating the registration relationship between the base station and each terminal in real time, each terminal participating in the shared memory recorded by the base station can be more accurate.
In a specific implementation, the base station may broadcast each first sub-task to each first terminal in various ways, for example, the base station may broadcast only one first sub-task at a time, and broadcast the next sub-task after determining that the first sub-task is received by a certain terminal, or the base station may broadcast a plurality of or all first sub-tasks at a time, and determine whether each first sub-task is received according to a response message sent by the first terminal that receives each first sub-task, and may re-broadcast the sub-task if the response message of the certain sub-task is not received after a set time period.
In step 408, the first terminal obtains any first subtask, determines whether the amount of available memory of the first terminal is sufficient to process the first subtask, if not, performs step 409, and if so, performs step 140.
In step 409, the first terminal refuses to receive the first subtask.
In step 410, the first terminal sends a response message for receiving the first subtask to the base station.
In step 411, the base station sets the state of the first subtask to a locked state.
In one example, the base station may further store the scheduling status of each first subtask, where the scheduling status of each first subtask includes an unlocked status or a locked status, the unlocked status is used for identifying that the first subtask has not been received by the first terminal, and the locked status is used for identifying that the first subtask has been received by the first terminal.
In a specific implementation, for any first subtask, if the base station receives a response message sent by a certain first terminal to receive the first subtask, the base station may first obtain a scheduling state of the first subtask stored by the base station, and if the scheduling state of the first subtask is a locked state, it indicates that the first subtask has been processed by other first terminals, so the base station may send a response message indicating that scheduling has failed to the first terminal, and after the first terminal receives the response message indicating that scheduling has failed, it determines that the first subtask has been processed by other first terminals, so the first terminal does not process the first subtask; accordingly, if the scheduling status of the first subtask is an unlocked status, it indicates that the first subtask has not been processed by other first terminals, so the base station may modify the scheduling status of the first subtask to be a locked status, and may send a response message that the scheduling is successful to the first terminal.
In the above example, by updating the lock state of the first subtask when a certain first terminal receives the first subtask, it can be ensured that the first subtask is not acquired by other first terminals, so that a plurality of first terminals can be prevented from processing the same first subtask at the same time, the effectiveness of data processing is improved, and the performance loss of the first terminal due to useless operations is reduced.
In step 412, the first terminal processes the first subtask to obtain a processing result of the first subtask.
In the embodiment of the present invention, if the first terminal receives the response message of successful scheduling sent by the base station, it is determined that the first sub-task has not been processed by other first terminals, and therefore, the first terminal may start processing the first sub-task.
In a possible implementation manner, after sending a response message of successful scheduling to the first terminal, the base station may also monitor a connection state with the first terminal in real time, and if it is detected that the first terminal is disconnected from the base station, it indicates that the first terminal is no longer in an area where the base station is located, so that the base station may release the registration relationship of the first terminal; accordingly, if the base station does not receive the processing result of the first subtask sent by the first terminal, it indicates that the first subtask has not been processed and completed, so the base station may broadcast the first subtask to each first terminal having a registration relationship with the base station again, and if the base station receives the processing result of the first subtask sent by the first terminal, it indicates that the first subtask has been processed and completed, so the base station may not resend the first subtask any more.
In the implementation manner, the base station can update the registration relationship according to the position of each first terminal, so that after a certain first terminal is far away from the area where the base station is located, the first subtask processed by the first terminal is automatically retransmitted to other first terminals, the first subtask can be accurately processed, and the situation that the processing result of the first subtask cannot be obtained due to the position movement of the first terminal is avoided; that is to say, the implementation manner can ensure that the base station obtains the processing result of each first subtask, thereby improving the processing result of the to-be-processed task.
In step 413, the first terminal sends the processing result of the first sub-task to the base station.
In step 414, the base station sends the processing result of each first subtask to the second terminal.
And 415, the second terminal obtains a processing result of the task to be processed according to the processing result of each first subtask and the processing result of the second subtask.
In the embodiment of the invention, the base station, the first terminal and the second terminal are arranged, so that the second terminal can jointly process the tasks to be processed in the second terminal by combining the memories of the first terminals in the area where the base station is located, and thus, the second terminal can more fully utilize the memories of the terminals around the second terminal, thereby realizing memory sharing among a plurality of terminals, improving the resource utilization rate of the terminals and also improving the capacity of the terminals for processing the tasks with large data volume.
In the above embodiment of the present invention, a first terminal obtains a first subtask, and if it is determined that the available memory of the first terminal is sufficient to process the first subtask, receives the first subtask, and processes the first subtask to obtain a processing result of the first subtask; the first subtask is a subtask of a task to be processed in the second terminal, and a processing result of the first subtask is used for the second terminal to obtain a processing result of the task to be processed. In the embodiment of the invention, the second terminal can share the memory with the first terminal, so that the memory of the second terminal and the memory of the first terminal are used for processing the task to be processed together, and thus, even if the data volume of the task to be processed is large, the second terminal can obtain the processing result of the task to be processed under the condition of not increasing the memory of the second terminal through the memory sharing with the first terminal, so that the cost of the second terminal is low; in addition, the first terminal independent of the second terminal assists in processing the task to be processed, so that the resource utilization rate of each terminal can be improved.
In view of the above method flow, an embodiment of the present invention further provides a data processing apparatus, and specific contents of the apparatus may be implemented with reference to the above method.
Fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, including:
an obtaining module 501, configured to obtain a first subtask, where the first subtask is a subtask of a task to be processed in a second terminal;
a transceiver module 502, configured to receive the first sub-task if it is determined that the available memory of the first terminal is sufficient to process the first sub-task;
a processing module 503, configured to process the first sub-task to obtain a processing result of the first sub-task; and the processing result of the first subtask is used for the second terminal to obtain the processing result of the task to be processed.
Optionally, the first subtask is sent to the first terminal by the second terminal;
after the processing module 503 obtains the processing result of the first subtask, the transceiver module 502 is further configured to:
and sending the processing result of the first subtask to the first terminal.
Optionally, the second terminal is connected to the first terminal through a bluetooth connection or a local area network.
Optionally, the first subtask is broadcasted to the first terminal by a base station; the first terminal and the second terminal establish a registration relationship with the base station in advance;
after the processing module 503 obtains the processing result of the first subtask, the transceiver module 502 is further configured to:
sending the processing result of the first subtask to the base station; and the base station is used for sending the processing result of the first subtask to the second terminal.
Fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, including:
an obtaining module 601, configured to obtain a task to be processed;
a slicing module 602, configured to, if it is determined that the to-be-processed task is processed in a memory sharing manner, slice the to-be-processed task into at least one first subtask and one second subtask; the memory amount required by the second subtask is less than or equal to the memory available amount of the second terminal;
a processing module 603, configured to process the second subtask to obtain a processing result of the second subtask;
a transceiver module 604, configured to send the at least one first subtask to a base station or at least one first terminal, and receive a processing result of the at least one first subtask sent by the base station or the at least one first terminal;
the processing module 603 is further configured to obtain a processing result of the task to be processed according to the processing result of the at least one first subtask and the processing result of the second subtask.
Fig. 7 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, including:
a transceiver module 701, configured to receive at least one first subtask sent by a second terminal, where the at least one first subtask is at least one subtask of a task to be processed in the second terminal;
a broadcasting module 702, configured to broadcast the at least one first subtask to each first terminal having a registration relationship with the base station; the registration relation between the base station and each first terminal is established after the base station determines that the first terminal and the base station successfully handshake when the first terminal enters the area where the base station is located;
the transceiver module 701 is further configured to receive a processing result of the at least one first sub-task sent by each first terminal, and send the processing result of the at least one first sub-task to the second terminal, where the processing result of the at least one first sub-task is used by the second terminal to obtain the processing result of the to-be-processed task.
Optionally, the apparatus further comprises a processing module 703;
after the broadcasting module 702 broadcasts the at least one first subtask to each first terminal having a registration relationship with the base station, the processing module 703 is configured to:
for any first subtask, if the first subtask is detected to exist and a target first terminal successfully receives the first subtask, setting the state of the first subtask to be a locking state; the locked state is used for avoiding that other first terminals except the target first terminal receive the first subtask.
Optionally, after the processing module 703 sets the state of the first subtask to be the locked state, the processing module is further configured to:
if the target first terminal is detected to be no longer in the area where the base station is located, releasing the registration relation of the first target terminal;
the broadcasting module 702 is further configured to rebroadcast the first sub-task to each first terminal having a registration relationship with the base station.
From the above, it can be seen that: in the above embodiment of the present invention, a first terminal obtains a first subtask, and if it is determined that the available memory of the first terminal is sufficient to process the first subtask, receives the first subtask, and processes the first subtask to obtain a processing result of the first subtask; the first subtask is a subtask of a task to be processed in the second terminal, and a processing result of the first subtask is used for the second terminal to obtain a processing result of the task to be processed. In the embodiment of the invention, the second terminal can share the memory with the first terminal, so that the memory of the second terminal and the memory of the first terminal are used for processing the task to be processed together, and thus, even if the data volume of the task to be processed is large, the second terminal can obtain the processing result of the task to be processed under the condition of not increasing the memory of the second terminal through the memory sharing with the first terminal, so that the cost of the second terminal is low; in addition, the first terminal independent of the second terminal assists in processing the task to be processed, so that the resource utilization rate of each terminal can be improved.
Based on the same inventive concept, the embodiment of the present invention further provides a computing device, and based on the same technical concept, the embodiment of the present invention provides a computing device, as shown in fig. 8, including at least one processor 801 and a memory 802 connected to the at least one processor, a specific connection medium between the processor 801 and the memory 802 is not limited in the embodiment of the present invention, and the processor 801 and the memory 802 are connected through a bus in fig. 8 as an example. The bus may be divided into an address bus, a data bus, a control bus, etc.
In the embodiment of the present invention, the memory 802 stores instructions executable by the at least one processor 801, and the at least one processor 801 may execute the steps included in the foregoing data processing method by executing the instructions stored in the memory 802.
The processor 801 is a control center of the computing device, and may connect various parts of the computing device by using various interfaces and lines, and implement data processing by executing or executing instructions stored in the memory 802 and calling up data stored in the memory 802. Optionally, the processor 801 may include one or more processing units, and the processor 801 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes an issued instruction. It will be appreciated that the modem processor described above may not be integrated into the processor 801. In some embodiments, the processor 801 and the memory 802 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 801 may be a general-purpose processor, such as a Central Processing Unit (CPU), a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, configured to implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the data processing embodiments may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
Memory 802, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 802 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charged Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 802 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 802 of embodiments of the present invention may also be circuitry or any other device capable of performing a storage function to store program instructions and/or data.
Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium storing a computer program executable by a computing device, where the computer program is configured to cause the computing device to execute the data processing method described in any of fig. 2 or fig. 4 when the computer program runs on the computing device.
It should be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (18)

1. A method of data processing, the method comprising:
a first terminal acquires a first subtask, wherein the first subtask is a subtask of a task to be processed in a second terminal;
the first terminal receives the first subtask if the first terminal determines that the available memory amount of the first terminal is enough to process the first subtask;
the first terminal processes the first subtask to obtain a processing result of the first subtask; and the processing result of the first subtask is used for the second terminal to obtain the processing result of the task to be processed.
2. The method of claim 1, wherein the first subtask is sent by the second terminal to the first terminal;
after the first terminal obtains the processing result of the first subtask, the method further includes:
and the first terminal sends the processing result of the first subtask to the first terminal.
3. The method of claim 2, wherein the second terminal is connected to the first terminal via a bluetooth connection or a local area network.
4. The method of claim 1, wherein the first subtask is broadcast by a base station to the first terminal; the first terminal and the second terminal establish a registration relationship with the base station in advance;
after the first terminal obtains the processing result of the first subtask, the method further includes:
the first terminal sends the processing result of the first subtask to the base station; and the base station is used for sending the processing result of the first subtask to the second terminal.
5. A method of data processing, the method comprising:
the second terminal acquires a task to be processed;
if the second terminal determines that the to-be-processed task is processed in a memory sharing mode, the to-be-processed task is divided into at least one first subtask and one second subtask; the memory amount required by the second subtask is less than or equal to the memory available amount of the second terminal;
the second terminal processes the second subtask to obtain a processing result of the second subtask;
the second terminal sends the at least one first subtask to a base station or at least one first terminal, and receives a processing result of the at least one first subtask sent by the base station or the at least one first terminal;
and the second terminal obtains the processing result of the task to be processed according to the processing result of the at least one first subtask and the processing result of the second subtask.
6. A method of data processing, the method comprising:
a base station receives at least one first subtask sent by a second terminal, wherein the at least one first subtask is at least one subtask of a task to be processed in the second terminal;
the base station broadcasts the at least one first subtask to each first terminal which has a registration relationship with the base station; the registration relation between the base station and each first terminal is established after the base station determines that the first terminal and the base station successfully handshake when the first terminal enters the area where the base station is located;
the base station receives the processing result of the at least one first subtask sent by each first terminal;
and the base station sends the processing result of the at least one first subtask to the second terminal, and the processing result of the at least one first subtask is used for the second terminal to obtain the processing result of the task to be processed.
7. The method of claim 6, wherein after the base station broadcasts the at least one first subtask to each first terminal having a registration relationship with the base station, the method further comprises:
for any first subtask, if the base station detects that a target first terminal successfully receives the first subtask, setting the state of the first subtask to be a locking state; the locked state is used for avoiding that other first terminals except the target first terminal receive the first subtask.
8. The method of claim 7, wherein after the base station sets the state of the first subtask to the locked state, the method further comprises:
and if the base station detects that the target first terminal is no longer in the area where the base station is located, the base station releases the registration relation of the first target terminal and rebroadcasts the first subtask to each first terminal which has the registration relation with the base station.
9. A data processing apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a first subtask, wherein the first subtask is a subtask of a task to be processed in the second terminal;
the receiving and sending module is used for receiving the first subtask if the memory available amount of the first terminal is determined to be enough to process the first subtask;
the processing module is used for processing the first subtask to obtain a processing result of the first subtask; and the processing result of the first subtask is used for the second terminal to obtain the processing result of the task to be processed.
10. The apparatus of claim 9, wherein the first sub-task is sent by the second terminal to the first terminal;
after the processing module obtains the processing result of the first subtask, the transceiver module is further configured to:
and sending the processing result of the first subtask to the first terminal.
11. The apparatus of claim 10, wherein the second terminal is connected to the first terminal via a bluetooth connection or a local area network.
12. The apparatus of claim 9, wherein the first subtask is broadcasted to the first terminal by a base station; the first terminal and the second terminal establish a registration relationship with the base station in advance;
after the processing module obtains the processing result of the first subtask, the transceiver module is further configured to:
sending the processing result of the first subtask to the base station; and the base station is used for sending the processing result of the first subtask to the second terminal.
13. A data processing apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring the tasks to be processed;
the slicing module is used for splitting the task to be processed into at least one first subtask and a second subtask if the task to be processed is determined to be processed in a memory sharing mode; the memory amount required by the second subtask is less than or equal to the memory available amount of the second terminal;
the processing module is used for processing the second subtask to obtain a processing result of the second subtask;
a transceiver module, configured to send the at least one first subtask to a base station or at least one first terminal, and receive a processing result of the at least one first subtask sent by the base station or the at least one first terminal;
the processing module is further configured to obtain a processing result of the task to be processed according to the processing result of the at least one first subtask and the processing result of the second subtask.
14. A data processing apparatus, characterized in that the apparatus comprises:
the system comprises a receiving and sending module, a processing module and a processing module, wherein the receiving and sending module is used for receiving at least one first subtask sent by a second terminal, and the at least one first subtask is at least one subtask of a task to be processed in the second terminal;
a broadcasting module, configured to broadcast the at least one first subtask to each first terminal having a registration relationship with the base station; the registration relation between the base station and each first terminal is established after the base station determines that the first terminal and the base station successfully handshake when the first terminal enters the area where the base station is located;
the transceiver module is further configured to receive a processing result of the at least one first sub-task sent by each first terminal, and send the processing result of the at least one first sub-task to the second terminal, where the processing result of the at least one first sub-task is used by the second terminal to obtain the processing result of the to-be-processed task.
15. The apparatus of claim 14, further comprising a processing module;
after the broadcasting module broadcasts the at least one first subtask to each first terminal having a registration relationship with the base station, the processing module is configured to:
for any first subtask, if the first subtask is detected to exist and a target first terminal successfully receives the first subtask, setting the state of the first subtask to be a locking state; the locked state is used for avoiding that other first terminals except the target first terminal receive the first subtask.
16. The apparatus of claim 15, wherein after the processing module sets the state of the first subtask to the locked state, the processing module is further configured to:
if the target first terminal is detected to be no longer in the area where the base station is located, releasing the registration relation of the first target terminal;
the broadcast module is further configured to rebroadcast the first subtask to each first terminal having a registration relationship with the base station.
17. A computing device comprising at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method of any of claims 1 to 8.
18. A computer-readable storage medium storing a computer program executable by a computing device, the program, when run on the computing device, causing the computing device to perform the method of any of claims 1 to 8.
CN201911156461.7A 2019-11-22 2019-11-22 Data processing method and device Pending CN111008073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911156461.7A CN111008073A (en) 2019-11-22 2019-11-22 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911156461.7A CN111008073A (en) 2019-11-22 2019-11-22 Data processing method and device

Publications (1)

Publication Number Publication Date
CN111008073A true CN111008073A (en) 2020-04-14

Family

ID=70113112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911156461.7A Pending CN111008073A (en) 2019-11-22 2019-11-22 Data processing method and device

Country Status (1)

Country Link
CN (1) CN111008073A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080115143A1 (en) * 2006-11-10 2008-05-15 International Business Machines Corporation Job Execution Method, Job Execution System, and Job Execution Program
US20120151491A1 (en) * 2010-12-09 2012-06-14 Sony Corporation Redistributing incomplete segments for processing tasks in distributed computing
CN103885832A (en) * 2012-12-20 2014-06-25 华为技术有限公司 Resource allocating method, equipment and system
CN106980538A (en) * 2017-02-16 2017-07-25 平安科技(深圳)有限公司 The method and device of data processing
US20170367086A1 (en) * 2016-06-16 2017-12-21 International Business Machines Corporation System, method and apparatus for ad-hoc utilization of available resources across mobile devices
CN109918201A (en) * 2019-03-05 2019-06-21 中国联合网络通信集团有限公司 The control method and system of task unloading
CN109978194A (en) * 2017-12-27 2019-07-05 丰田自动车株式会社 The auxiliary system that works and work householder method
CN110113387A (en) * 2019-04-17 2019-08-09 深圳前海微众银行股份有限公司 A kind of processing method based on distributed batch processing system, apparatus and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080115143A1 (en) * 2006-11-10 2008-05-15 International Business Machines Corporation Job Execution Method, Job Execution System, and Job Execution Program
US20120151491A1 (en) * 2010-12-09 2012-06-14 Sony Corporation Redistributing incomplete segments for processing tasks in distributed computing
CN103885832A (en) * 2012-12-20 2014-06-25 华为技术有限公司 Resource allocating method, equipment and system
US20170367086A1 (en) * 2016-06-16 2017-12-21 International Business Machines Corporation System, method and apparatus for ad-hoc utilization of available resources across mobile devices
CN106980538A (en) * 2017-02-16 2017-07-25 平安科技(深圳)有限公司 The method and device of data processing
CN109978194A (en) * 2017-12-27 2019-07-05 丰田自动车株式会社 The auxiliary system that works and work householder method
CN109918201A (en) * 2019-03-05 2019-06-21 中国联合网络通信集团有限公司 The control method and system of task unloading
CN110113387A (en) * 2019-04-17 2019-08-09 深圳前海微众银行股份有限公司 A kind of processing method based on distributed batch processing system, apparatus and system

Similar Documents

Publication Publication Date Title
CN106548262B (en) Scheduling method, device and system for resources for processing tasks
CN108614726B (en) Virtual machine creation method and device
CN110647394B (en) Resource allocation method, device and equipment
CN111163130B (en) Network service system and data transmission method thereof
CN113965579B (en) Resource distribution method of cloud service and related equipment
CN109819023B (en) Distributed transaction processing method and related product
CN111338779B (en) Resource allocation method, device, computer equipment and storage medium
CN111736957A (en) Multi-type service mixed deployment method, device, equipment and storage medium
EP3301626A1 (en) Method, device, and system
CN115550354A (en) Data processing method and device and computer readable storage medium
CN115242598A (en) Cloud operating system deployment method and device
CN113326025A (en) Single cluster remote continuous release method and device
CN111831408A (en) Asynchronous task processing method and device, electronic equipment and medium
CN111008073A (en) Data processing method and device
CN102117261B (en) Communication method between inner processors of chip
CN111382141A (en) Master-slave architecture configuration method, device, equipment and computer readable storage medium
CN111309467B (en) Task distribution method and device, electronic equipment and storage medium
CN114710485A (en) Processing method and processing apparatus
CN114040422A (en) Network parameter configuration method and device
CN113157415A (en) Farm rendering method and device, electronic equipment and storage medium
US11797342B2 (en) Method and supporting node for supporting process scheduling in a cloud system
CN113703930A (en) Task scheduling method, device and system and computer readable storage medium
CN112114971A (en) Task allocation method, device and equipment
CN111984424A (en) Task processing method, device, equipment and computer readable storage medium
CN114510325A (en) Task scheduling method, device and system

Legal Events

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