Data Processing Method, Apparatus, Device, and Medium
By using instructions to manage the behavioral data processing of the computing terminal in safe multi-party computing, the resource waste problem caused by computing terminal failure is solved and efficient resource utilization is achieved.
Patent Information
- Application Number
- CN202110941677.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-17
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2041-08-17
AI Technical Summary
In security multi-party computing, recalculation caused by computing terminal failures has caused serious waste of computing resources.
When the target behavior data value is not received within the preset time, an instruction is sent to the calculation terminal to continue or stop the calculation, and the total behavior data value is determined based on the data values of other terminals, and a third instruction is sent to the calculation terminal determine the second behavior data value based on the total behavior data value.
Reduces the waste of computing resources, improves computing efficiency, and avoids long-term waiting and idle resources.
Smart Images

Figure CN115705248B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of big data, and particularly relates to a data processing method, apparatus, device, and medium. Background Art
[0002] Secure multi-party computation is used to solve the problem of a group of mutually untrusted computing terminals working collaboratively while protecting data security. However, in actual applications of secure multi-party computation, since it is impossible to avoid failures of computing terminals, it is easy to cause a situation where multiple computing terminals need to recalculate due to a temporary failure of a certain computing terminal during the calculation process, resulting in a serious waste of computing resources. Summary of the Invention
[0003] Embodiments of this application provide a data processing method, apparatus, device, and medium, which reduce the waste of computing resources.
[0004] In a first aspect, an embodiment of this application provides a data processing method, which is applied to a first node. The method includes: receiving first behavior data values respectively sent by multiple computing terminals, where the first behavior data value of each computing terminal is determined based on first behavior data of multiple devices corresponding to each computing terminal; in a case where the first target behavior data value sent by the first computing terminal among the multiple computing terminals is not received within a first preset time, sending a first calculation instruction to the first computing terminal and a second computing terminal respectively, for the first computing terminal to calculate the first target behavior data value according to the first calculation instruction, and the second computing terminal to calculate a second behavior data value according to the first calculation instruction; in a case where the first target behavior data value sent by the first computing terminal is not received within a second preset time, determining the total behavior data value of each computing terminal based on the first behavior data value sent by the received second computing terminal, and sending a second calculation instruction to the first computing terminal, for the first computing terminal to stop calculating the first target behavior data value according to the second calculation instruction, where the second computing terminal is a computing terminal other than the first computing terminal among the multiple computing terminals; sending a third calculation instruction and the total behavior data value corresponding to each computing terminal to the multiple computing terminals, for the multiple computing terminals to determine a second behavior data value according to the third calculation instruction and the total behavior data value or the second behavior data, where the second behavior data is second behavior data of multiple devices corresponding to each computing terminal; and the duration of the second preset time is greater than the duration of the first preset time.
[0005] In some embodiments of the first aspect, the method further includes: within a first preset time, determining a first quantity of computing terminals that send a first behavior data value; and when the first quantity meets a first preset condition, sending a first computing instruction to the first computing terminal and the second computing terminal respectively, for the first computing terminal to calculate a first target behavior data value according to the first computing instruction, and the second computing terminal to calculate a second behavior data value according to the first computing instruction.
[0006] In some embodiments of the first aspect, the method further includes: within a second preset time, determining a second quantity of computing terminals that send a first behavior data value; and when the second quantity meets a second preset condition, sending a second computing instruction to the first computing terminal, for the first computing terminal to stop calculating the first target behavior data value according to the second computing instruction.
[0007] In some embodiments of the first aspect, the method further includes: when receiving the first target behavior data value sent by the first computing terminal within the second preset time, determining the total behavior data value of each computing terminal based on the first target behavior data value and the first behavior data value received from the second computing terminal; sending a third computing instruction and the total behavior data value of each computing terminal to multiple computing terminals, for the multiple computing terminals to calculate a second behavior data value according to the third computing instruction and the total behavior data value or the second behavior data value of each computing terminal.
[0008] Second aspect, an embodiment of the present application provides a data processing method, which is applied to multiple computing terminals. The multiple computing terminals include a first computing terminal and a second computing terminal, and the method includes: based on the behavior data of multiple devices respectively corresponding to the multiple computing terminals, the multiple computing terminals determine their respective first behavior data values; the multiple computing terminals respectively send the first behavior data values to a first node; in the case that the first node does not receive the first target behavior data value sent by the first computing terminal among the multiple computing terminals within a first preset time, the multiple computing terminals receive a first computing instruction for the first computing terminal to calculate the first target behavior data value according to the first computing instruction, and the second computing terminal to calculate a second behavior data value according to the first computing instruction, where the second computing terminal is a computing terminal other than the first computing terminal among the multiple computing terminals; in the case that the first node does not receive the first target behavior data value within a second preset time, the first computing terminal receives a second computing instruction for the first computing terminal to stop calculating the first target behavior data value; the multiple computing terminals receive the total behavior data value and a third computing instruction sent by the first node; the multiple computing terminals determine their respective second behavior data values according to the third computing instruction and the total behavior data value or the second behavior data, and the second behavior data is the second behavior data of multiple devices corresponding to each computing terminal; where the duration of the second preset time is greater than the duration of the first preset time.
[0009] In a third aspect, an embodiment of the present application provides a data processing device, which includes: a receiving module, configured to receive first behavior data values respectively sent by multiple computing terminals, and the first behavior data value of each computing terminal is determined based on the first behavior data of multiple devices corresponding to each computing terminal; a sending module, configured to, when the first target behavior data value sent by the first computing terminal among the multiple computing terminals is not received within a first preset time, send a first computing instruction to the first computing terminal and the second computing terminal respectively, so that the first computing terminal calculates the first target behavior data value according to the first computing instruction, and the second computing terminal calculates the second behavior data value according to the first computing instruction; a determining module, configured to, when the first target behavior data value sent by the first computing terminal is not received within a second preset time, determine the total behavior data value of each computing terminal based on the first behavior data value sent by the received second computing terminal, and send a second computing instruction to the first computing terminal, so that the first computing terminal stops calculating the first target behavior data value according to the second computing instruction, where the second computing terminal is a computing terminal other than the first computing terminal among the multiple computing terminals; the sending module is further configured to send a third computing instruction and the total behavior data value corresponding to each computing terminal to the multiple computing terminals, so that the multiple computing terminals determine the second behavior data value according to the third computing instruction and the total behavior data value or the second behavior data, where the second computing terminal is a computing terminal other than the first computing terminal among the multiple computing terminals; and the duration of the second preset time is greater than the duration of the first preset time.
[0010] In some embodiments of the third aspect, the device further includes: a determining module, further configured to determine a first quantity of the computing terminals that send the first behavior data value within the first preset time; the sending module is further configured to, when the first quantity meets a first preset condition, send a first computing instruction to the first computing terminal and the second computing terminal respectively, so that the first computing terminal calculates the first target behavior data value according to the first computing instruction, and the second computing terminal calculates the second behavior data value according to the first computing instruction.
[0011] Fourthly, a data processing device is provided. The device includes: a determining module, configured to determine respective first behavior data values of multiple computing terminals based on behavior data of multiple devices corresponding to the multiple computing terminals; a sending module, configured to enable the multiple computing terminals to respectively send the first behavior data values to a first node; a receiving module, configured to enable the multiple computing terminals to receive a first calculation instruction for the first computing terminal to calculate a first target behavior data value according to the first calculation instruction and for a second computing terminal to calculate a second behavior data value according to the first calculation instruction, where the second computing terminal is a computing terminal other than the first computing terminal among the multiple computing terminals, in a case where the first node does not receive the first target behavior data value sent by the first computing terminal within a first preset time; the receiving module is further configured to enable the first computing terminal to receive a second calculation instruction for the first computing terminal to stop calculating the first target behavior data value according to the second calculation instruction in a case where the first node does not receive the first target behavior data value within a second preset time; the receiving module is further configured to enable the multiple computing terminals to receive a total behavior data value and a third calculation instruction sent by the first node; the determining module is further configured to enable the multiple computing terminals to determine respective second behavior data values of the multiple computing terminals according to the third calculation instruction and the total behavior data value or the second behavior data, where the second behavior data is second behavior data of multiple devices corresponding to each computing terminal; and the duration of the second preset time is greater than the duration of the first preset time.
[0012] Fifthly, a data processing device is provided, including: a memory, configured to store computer program instructions; and a processor, configured to read and run the computer program instructions stored in the memory to execute the data processing method provided in any optional implementation manner of the first aspect, the second aspect, the third aspect, and the fourth aspect.
[0013] Sixthly, a computer storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the data processing method provided in any optional implementation manner of the first aspect, the second aspect, the third aspect, and the fourth aspect is implemented.
[0014] The technical solutions provided in the embodiments of the present application at least bring the following beneficial effects:
[0015] In an embodiment of the present application, after receiving the first behavior data values sent by multiple computing terminals respectively, if it is determined that the first target behavior data value sent by the first computing terminal among the multiple computing terminals is not received within the first preset time, a first computing instruction is sent to the first computing terminal and the second computing terminal respectively, so that the first computing terminal and the second computing terminal calculate the first target behavior data value and the second behavior data value respectively based on the first computing instruction. If it is determined that the first target behavior data value sent by the first computing terminal is still not received within the second preset time, the total behavior data value of each computing terminal is determined based on the first behavior data value sent by the received second computing terminal, and a second computing instruction is sent to the first computing terminal, so that the first computing terminal stops calculating the first target behavior data value according to the second computing instruction. Based on this, a third computing instruction and the total behavior data value of each computing terminal are sent to the multiple computing terminals, so that the multiple computing terminals determine the second behavior data value according to the third computing instruction and the total behavior data value or the second behavior data. In this way, the waste of computing resources is reduced. Brief Description of the Drawings
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced below. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0017] Figure 1 It is an architecture diagram of a data processing method provided by an embodiment of the present application;
[0018] Figure 2 It is a flowchart of a data processing method provided by an embodiment of the present application;
[0019] Figure 3 It is a flowchart of another data processing method provided by an embodiment of the present application;
[0020] Figure 4 It is a structural diagram of a data processing device provided by an embodiment of the present application;
[0021] Figure 5 It is a structural diagram of another data processing device provided by an embodiment of the present application;
[0022] Figure 6 It is a structural diagram of a data processing device provided by an embodiment of the present application. Detailed Embodiments
[0023] The features and exemplary embodiments of various aspects of the present application will be described in detail below. To make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than limiting the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0024] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, the elements defined by the statement "comprising..." do not exclude the existence of additional identical elements in the process, method, article or device comprising the elements.
[0025] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone.
[0026] In the actual application process of secure multi-party computation, there may be a situation where multiple computing terminals need to recalculate due to a temporary failure of a certain computing terminal. As Figure 1 shown, the figure includes a first node 10 and multiple computing terminals 11. Among them, information or instructions are transmitted between the first node and the multiple computing terminals. During the process of the multiple computing terminals performing calculations and sending the calculation results to the first node, if a certain computing terminal has a network problem or a temporary failure, the first node will not receive the calculation result sent by the computing terminal, which will cause the multiple computing terminals to be forced to exit and recalculate. In this way, a serious waste of computing resources is caused.
[0027] In summary, in order to solve the problem in the prior art that due to a temporary failure of a certain computing terminal, multiple computing terminals need to recalculate, resulting in a serious waste of computing resources, the embodiments of the present application provide a data processing method, device, equipment and medium.
[0028] The technical solutions provided by the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0029] Figure 2 It is a schematic flowchart of a data processing method provided by an embodiment of the present application. This method is applied to the first node. Next, a detailed description of the data processing method will be given in conjunction with Figure 2 a description.
[0030] As Figure 2 shown, the data processing method may include the following steps:
[0031] S210, receiving first behavior data values respectively sent by multiple computing terminals.
[0032] Among them, the computing terminal may be a terminal device or a server with computing capabilities. The first behavior data value of each computing terminal is determined based on the first behavior data of multiple devices corresponding to each computing terminal. Among them, the multiple devices involved are electronic devices including first behavior data, such as mobile phones, computers, tablet computers, and wearable electronic devices, etc. The first behavior data characterizes the behavior characteristics of the user corresponding to the device, for example, it may include the user's consumption data, movement trajectory data, etc. Here, no excessive limitation is imposed on the first behavior data. The first behavior data value may be data values such as the average value, variance, and total value corresponding to multiple first behavior data.
[0033] In one embodiment, the first behavior data values respectively sent by multiple computing terminals may be received within a preset time or in real time through a signal. Exemplarily, assuming there are three computing terminals A, B, and C, the first node may receive the corresponding first behavior data values a, first behavior data value b, and first behavior data value c respectively sent by computing terminal A, computing terminal B, and computing terminal C within the preset time.
[0034] Specifically, assuming there are n computing terminals, at a certain moment, the first behavior data set included in each computing terminal is k = {k1, k2... k n}, and the first behavior data value corresponding to each computing terminal is a = {a 11 , a 21 ... a n1}. Thus, it can be inferred that the multiple sets of behavior data values respectively sent by the n received computing terminals can be represented by the following matrix (1):
[0035]
[0036] Among them, a nm is the m-th behavior data value of the n-th computing terminal at the m-th moment.
[0037] In addition, in one embodiment, the behavior data values of each computing terminal and the corresponding basic information are saved. The basic information includes serial number, the computing terminal to which it belongs, behavior data set and quantity, reception status, time, and group number.
[0038] S220, when the first target behavior data value sent by the first computing terminal among multiple computing terminals is not received within the first preset time, a first computing instruction is sent to the first computing terminal and the second computing terminal respectively.
[0039] Among them, the first preset time is a time period preset based on actual needs or empirical values, which can be ten minutes, one hour, etc., and is not specifically limited here. The first computing terminal represents the computing terminal that has not sent the first target behavior data value within the first preset time, and the second computing terminal is the computing terminal other than the first computing terminal among multiple computing terminals. The determination method and the physical meaning expressed by the first target behavior data value are the same as those of the first behavior data value, and will not be elaborated here. The first computing instruction is used to instruct the first computing terminal to continue calculating the first target behavior data value, and the second computing terminal starts to calculate the second behavior data value. The second behavior data value of each computing terminal is determined based on the second behavior data of multiple devices corresponding to each computing terminal.
[0040] In one embodiment, by receiving the signal sent by the computing terminal, when the first node detects that the first target behavior data value sent by the first computing terminal is not received within the first preset time, the first node will send a first computing instruction to the first computing terminal and the second computing terminal, so that the first computing terminal continues to calculate the first target behavior data value according to the first computing instruction, and the second computing terminal starts to calculate the second behavior data value according to the first computing instruction.
[0041] Take a specific example. Assume that the first preset time is h, and there are computing terminal A, computing terminal B, and computing terminal C. If the first node does not receive the average consumption data of the user sent by computing terminal A within the first preset time h, a first computing instruction is sent to computing terminal A, computing terminal B, and computing terminal C respectively, so that computing terminal A continues to calculate the average consumption data of the user according to the first computing instruction, and computing terminal B and computing terminal C start to calculate the variance of the user's consumption data according to the first computing instruction respectively.
[0042] In this way, when there may be network problems or failure problems with the first computing terminal, so that the first node does not receive the first target behavior data value sent by it within the first preset time, based on the first computing instruction sent by the first node, the first computing terminal can continue to calculate the first target behavior data value, and the remaining computing terminals do not need to wait for the calculation result of the first computing terminal for a long time and can start calculating the next behavior data value first. In this way, not only the computing efficiency of the computing terminal is improved, but also the waste of computing resources is reduced.
[0043] S230, when the first target behavior data value sent by the first computing terminal is not received within the second preset time, determine the total behavior data value of each computing terminal based on the first behavior data value sent by the received second computing terminal, and send a second computing instruction to the first computing terminal.
[0044] Among them, the second preset time is a time period preset based on actual needs or empirical values, which can be one minute, one hour, and is not limited here. The duration of the second preset time is greater than the duration of the first preset time. The total behavior data value is a data value determined by summarizing the first behavior data values corresponding to each computing terminal. The second computing instruction is used to instruct the first computing terminal to stop calculating the first target computing terminal.
[0045] Specifically, assume that the number of computing terminals corresponding to the first node successfully receiving the behavior data value is n, and the behavior data set k = {k1, k2... k n} included in each computing terminal, and the behavior data value a = {a1, a2... a n} of each computing terminal. Then the total behavior data value a new can be determined based on the following formula (2):
[0046]
[0047] Among them, is the sum of the number of behavior data of multiple devices corresponding to all computing terminals.
[0048] In one embodiment, when the first node detects that it still has not received the first target behavior data value sent by the first computing terminal within the second preset time by receiving the signal sent by the computing terminal, the first node will determine the total behavior data value of each computing terminal based on the first behavior data value sent by the received second computing terminal, and send a second computing instruction to the first computing terminal, so that the first computing terminal stops calculating the first target behavior data value according to the second computing instruction.
[0049] Exemplarily, assume that the second preset time is x. If the first node does not receive the first target behavior data value sent by the computing terminal A within the first preset time h, the first node still does not receive the first target behavior data value sent by the computing terminal A within the second preset time x. At this time, the computing terminal A can be determined as an invalid computing terminal, that is, a faulty terminal. In this way, the total behavior data value of each computing terminal can be determined according to the first behavior data values sent by the remaining computing terminals that have been received, and a second calculation instruction is sent to the computing terminal A for the computing terminal A to stop calculating the first target behavior data value according to the second calculation instruction.
[0050] In addition, it should be noted that although the first computing terminal can stop calculating the target behavior data value based on the second calculation instruction, it can determine the target behavior data value by taking the average of the behavior data values of the computing terminals other than the first computing terminal, and then determine the corresponding total target behavior data value. Or determine the total target behavior data value by taking the average of the total behavior data values of the computing terminals other than the first computing terminal, so as to continue to determine the next behavior data value. The specific determination method is not limited here.
[0051] In this way, it is possible to avoid the situation where the first node does not receive the first target behavior data value sent by the first computing terminal within the first preset time due to network problems. By setting the second preset time, it is possible to further accurately determine whether the first computing terminal is an invalid computing terminal, that is, a faulty terminal. Furthermore, when it is determined that the first computing terminal is a faulty terminal, losses can be minimized in a timely manner by causing the first computing terminal to stop calculating, reducing waste of computing resources.
[0052] S240. Send a third calculation instruction and the total behavior data value of each computing terminal to multiple computing terminals.
[0053] Specifically, regardless of whether the first target behavior data value sent by the first computing terminal is received within the second preset time, when the second preset time is exceeded, a third calculation instruction and the total behavior data value of each computing terminal are sent to multiple computing terminals, so that the multiple computing terminals calculate the second behavior data value according to the third calculation instruction and their respective total behavior data values or second behavior data. Among them, the third calculation instruction is used to instruct the multiple computing terminals to calculate the second behavior data value.
[0054] In one embodiment, after sending a third calculation instruction and the total behavior data value corresponding to each computing terminal to multiple computing terminals, if the second behavior data value is associated with the total behavior data value, the multiple computing terminals determine the second behavior data value according to their respective total behavior data values and the first behavior data; if there is no association between the second behavior data value and the total behavior data value, the multiple computing terminals can determine the second behavior data value according to the second behavior data of multiple devices corresponding to themselves.
[0055] Exemplarily, assume that the total behavior data value is the average consumption data. After sending a third calculation instruction and the average consumption data of each computing terminal to multiple computing terminals, if the second behavior data value is a data value related to the average consumption data, such as the variance value of consumption data, each computing terminal is made to respond to the third calculation instruction and determine the variance value of the user consumption data value according to its own average consumption data and consumption data. If the second behavior data value is the average moving distance, the multiple computing terminals can respond to the third calculation instruction and determine the average moving distance according to their own moving distance data.
[0056] Thus, after receiving the first behavior data values respectively sent by multiple computing terminals, if it is determined that the first target behavior data value sent by the first computing terminal among the multiple computing terminals is not received within the first preset time, a first calculation instruction is sent to the first computing terminal and the second computing terminal respectively, for the first computing terminal and the second computing terminal to calculate the first target behavior data value and the second behavior data value respectively based on the first calculation instruction. If it is determined that the first target behavior data value sent by the first computing terminal is still not received within the second preset time, the total behavior data value of each computing terminal is determined based on the first behavior data value sent by the received second computing terminal, and a second calculation instruction is sent to the first computing terminal, for the first computing terminal to stop calculating the first target behavior data value according to the second calculation instruction. Based on this, a third calculation instruction and the total behavior data value of each computing terminal are sent to multiple computing terminals, for the multiple computing terminals to determine the second behavior data value according to the third calculation instruction, the total behavior data value or the second behavior data. In this way, the waste of computing resources is reduced.
[0057] To better reduce the waste of computing resources, in one embodiment, the method further includes: determining the first quantity of the computing terminals that send the first behavior data value within the first preset time;
[0058] When the first quantity meets the first preset condition, a first calculation instruction is sent to the first computing terminal and the second computing terminal respectively, for the first computing terminal to calculate the first target behavior data value according to the first calculation instruction, and the second computing terminal to calculate the second behavior data value according to the first calculation instruction.
[0059] Among them, the first quantity characterizes the number of computing terminals that send the first behavior data value within the first preset time. The first preset condition is a condition preset in advance according to actual needs or empirical values. For example, it can be that the number of computing terminals that send the first behavior data value is greater than a certain preset value.
[0060] Specifically, in the case where the first target behavior data value sent by the first computing terminal is not received within the first preset time, the first node can, within the first preset time, parse the received signal to determine the number of computing terminals that send the first behavior data value. When the number of computing terminals that send the first behavior data value meets the first preset condition, send a first calculation instruction to the first computing terminal and the second computing terminal, so that the first computing terminal can continue to calculate the first target behavior data value according to the first calculation instruction, and the second computing terminal can calculate the second behavior data value according to the first calculation instruction.
[0061] In addition, it should be noted that the method of determining whether to send the first calculation instruction derived from the first quantity of the computing terminals that send the first behavior data value is also within the protection scope of this application. For example, in some embodiments, it can also be based on the success rate of the computing terminals sending the first behavior data value, that is, the ratio of the number of computing terminals that successfully send the first behavior data value to the total number of computing terminals. When the success rate meets the first preset condition, send a first calculation instruction to the first computing terminal and the second computing terminal, for the first computing terminal to calculate the first target behavior data value according to the first calculation instruction, and the second computing terminal to calculate the second behavior data value according to the first calculation instruction.
[0062] Thus, in the case where the first target behavior data value sent by the first computing terminal among multiple computing terminals is not received within the first preset time, based on the number of computing terminals that successfully send the first behavior data value, when it meets the preset condition, the first computing terminal and the second computing terminal can perform asynchronous processing to avoid waiting for a long time for the first computing terminal corresponding to the unreceived first target behavior data value, prevent the long-term idle of computing resources, and thus reduce the serious waste of computing resources.
[0063] In addition to this, in another embodiment, the method further includes:
[0064] Within the second preset time, determine the second quantity of the computing terminals that send the first behavior data value;
[0065] When the second quantity meets the second preset condition, send a second calculation instruction to the first computing terminal, for the first computing terminal to stop calculating the first target behavior data value according to the second calculation instruction.
[0066] Among them, the second quantity characterizes the number of computing terminals that send the calculation terminal of the first behavior data value within the second preset time. The second preset condition is a condition preset based on actual needs or empirical values. For example, it can be that the number of computing terminals that send the first behavior data value is greater than a certain preset value, and no specific limitation is made here.
[0067] Specifically, within the second preset time, by determining the second quantity of the computing terminals that send the first behavior data value, when the second quantity meets the second preset condition, a second calculation instruction is sent to the first calculation to enable the first computing terminal to stop calculating the first target behavior value according to the second calculation instruction.
[0068] In addition, the total behavior data value of each computing terminal can also be determined based on the first behavior data value. Among them, the specific method for determining the total behavior data value of each computing terminal is the same as the above method for determining the total behavior data value, and will not be elaborated here.
[0069] In addition, it should be noted that the method for determining the total behavior data value and sending the second calculation instruction derived from the second quantity of the computing terminals that send the first behavior data value is also within the protection scope of this application. For example, the success rate of the computing terminal sending the first behavior data value can be used to determine whether to perform subsequent operations. Details are not elaborated here.
[0070] Thus, on the basis that the first target behavior data value sent by the first computing terminal is not received within the first preset time, when the first target behavior data value sent by the first computing terminal is still not received within the second preset time, it can be determined that the first computing terminal is a faulty computing terminal. In this way, a second calculation instruction can be sent to the first computing terminal, so that the first computing terminal stops calculating the first target behavior data value. In this way, it avoids the serious waste of computing resources caused by the first computing terminal being unable to successfully calculate or send the first target behavior data value for a long time.
[0071] In addition, in some embodiments, the method further includes:
[0072] When the first target behavior data value sent by the first computing terminal is received within the second preset time, the total behavior data value of each computing terminal is determined based on the first target behavior data value and the first behavior data value sent by the received second computing terminal;
[0073] A third calculation instruction and the total behavior data value of each computing terminal are sent to multiple computing terminals for calculating the second behavior data value according to the third calculation instruction, the total behavior data value of each computing terminal, or the second behavior data by multiple computing terminals.
[0074] Specifically, if the first target behavior data value sent by a certain first computing terminal is received within the second preset time, the total behavior data value of each computing terminal can be determined based on the first target behavior data value and the first behavior data value sent by the received second computing terminal. And a third computing instruction and the total behavior data value of each computing terminal are sent to multiple computing terminals, so that the multiple computing terminals respond to the third computing instruction and determine the second behavior data value according to the total behavior data value or the second behavior data of each computing terminal.
[0075] In one embodiment, assume that the first node receives the first behavior data value sent by computing terminal A within the first preset time and does not receive the first target behavior data values sent by computing terminal B and computing terminal C respectively. If the first node receives the first target behavior data value sent by computing terminal B within the second preset time and does not receive the first target behavior data value sent by computing terminal C, the total behavior data values of computing terminal A, computing terminal B, and computing terminal C are determined based on the first target behavior data value of computing terminal A and the first behavior data value of computing terminal B. And based on this, a third computing instruction and the total behavior data value of each computing terminal are sent to the above three computing terminals, so that computing terminal A, computing terminal B, and computing terminal C respond to the third computing instruction and calculate the second behavior data value based on their respective total behavior data values or the second behavior data.
[0076] To make the embodiments of the present application clearer, the present application also provides a data processing method applied to multiple computing terminals. Next, in combination with Figure 3 it will be introduced in detail.
[0077] As Figure 3 shown, the data processing method includes the following steps:
[0078] S310. Based on the first behavior data of multiple devices respectively corresponding to multiple computing terminals, the multiple computing terminals determine their respective first behavior data values.
[0079] In some embodiments, the multiple computing terminals can determine data values such as the average value or variance corresponding to the first behavior data according to their respective first behavior data, such as consumption data, mobile location data, etc.
[0080] S320. The multiple computing terminals respectively send the first behavior data values to the first node.
[0081] S330. When the first node does not receive the first target behavior data value sent by the first computing terminal among the multiple computing terminals within the first preset time, the multiple computing terminals receive the first computing instruction.
[0082] Among them, the first calculation instruction is used to instruct the first calculation terminal to continue calculating the first target behavior data value, and the second calculation terminal starts to calculate the second behavior data value. The second calculation terminal is a calculation terminal other than the first calculation terminal among the multiple calculation terminals.
[0083] S340. When the first node does not receive the first target behavior data value sent by the first calculation terminal within the second preset time, the first calculation terminal receives the second calculation instruction.
[0084] Among them, the second calculation instruction is used to instruct the first calculation terminal to stop calculating the first target behavior data value. The duration of the second preset time is greater than the duration of the first preset time.
[0085] S350. Multiple calculation terminals receive the total behavior data value and the third calculation instruction sent by the first node.
[0086] S360. Multiple calculation terminals determine the second behavior data values of each of the multiple calculation terminals according to the third calculation instruction and the total behavior data value or the second behavior data.
[0087] Among them, the second behavior data is the second behavior data of multiple devices corresponding to each calculation terminal.
[0088] Thus, when multiple calculation terminals calculate the first behavior data value and send the first behavior data value to the first node, if the first node does not receive the first target behavior data value sent by the first calculation terminal within the first preset time, these multiple calculation terminals receive the first calculation instruction, so that the first calculation terminal and the second terminal among them calculate the first target behavior data value and the second behavior data value respectively. Based on this, if the first node still does not receive the first target behavior data value sent by the first calculation terminal within the second preset time, the first calculation terminal stops calculating the first target behavior data value according to the received second calculation instruction. In this case, multiple calculation terminals will determine the second behavior data value of each calculation terminal according to the third calculation instruction received from the first node and the total behavior data value or the second behavior data of each of the multiple calculation terminals. In this way, the waste of computing resources is reduced.
[0089] Based on this, in order to better reduce the waste of computing resources, in one embodiment, the method further includes:
[0090] Within the first preset time, when the first quantity of the calculation terminals determined by the first node to send the first behavior data value meets the first preset condition, multiple calculation terminals receive the first calculation instruction, so that the first calculation terminal calculates the first target behavior data value according to the first calculation instruction, and the second calculation terminal calculates the second behavior data value according to the first calculation instruction.
[0091] Thus, it is possible to avoid waiting for a long time for the first computing terminal corresponding to the unreceived first target behavior data value, prevent the long-term idle of computing resources, and further reduce the serious waste of computing resources.
[0092] In addition, in another embodiment, the method further includes:
[0093] Within a second preset time, when the second quantity of the computing terminals determined by the first node to send the first behavior data value satisfies a second preset condition, the first computing terminal receives a second computing instruction for the first computing terminal to stop calculating the first target behavior data value according to the second computing instruction.
[0094] In this way, it is possible to avoid the serious waste of computing resources caused by the first computing terminal being unable to successfully calculate or send the first target behavior data value for a long time.
[0095] In addition, for the sake of facilitating a complete understanding of the present application, in one embodiment, the method further includes:
[0096] When the first target behavior data value sent by the first computing terminal is received within the second preset time, a third computing instruction and the total behavior data value of each computing terminal are received for multiple computing terminals to respond to the third computing instruction and calculate the second behavior data value according to the total behavior data value or the second behavior data.
[0097] Based on the same inventive concept, an embodiment of the present application further provides a data processing device. In some embodiments, the data processing device may be the first node, or a functional module or component inside the first node. Next, in combination with Figure 4 The data processing device will be described.
[0098] Figure 4 It is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
[0099] As Figure 4 shown, the data processing device 400 may include: a receiving module 410, a sending module 420, and a determining module 430.
[0100] The receiving module 410 is configured to receive the first behavior data values respectively sent by multiple computing terminals, and the first behavior data value of each computing terminal is determined based on the first behavior data of multiple devices corresponding to each computing terminal.
[0101] A sending module 420, configured to, when the first target behavior data value sent by the first computing terminal among multiple computing terminals is not received within a first preset time, send a first computing instruction to the first computing terminal and the second computing terminal respectively, so that the first computing terminal calculates the first target behavior data value according to the first computing instruction, and the second computing terminal calculates a second behavior data value according to the first computing instruction, where the second computing terminal is a computing terminal other than the first computing terminal among the multiple computing terminals.
[0102] A determining module 430, configured to, when the first target behavior data value sent by the first computing terminal is not received within a second preset time, determine the total behavior data value of each computing terminal based on the first behavior data value sent by the received second computing terminal, and send a second computing instruction to the first computing terminal, so that the first computing terminal stops calculating the first target behavior data value according to the second computing instruction.
[0103] The sending module 420 is further configured to send a third computing instruction and the total behavior data value corresponding to each computing terminal to the multiple computing terminals, so as to determine the second behavior data value according to the third computing instruction and the total behavior data value or the second behavior data, and the second behavior data is the second behavior data of multiple devices corresponding to each computing terminal.
[0104] Wherein, the duration of the second preset time is greater than the duration of the first preset time.
[0105] In some embodiments,
[0106] The determining module is further configured to determine the first quantity of the computing terminals that send the first behavior data value within the first preset time.
[0107] The sending module is further configured to, when the first quantity meets a first preset condition, send a first computing instruction to the first computing terminal and the second computing terminal respectively, so that the first computing terminal calculates the first target behavior data value according to the first computing instruction, and the second computing terminal calculates the second behavior data value according to the first computing instruction.
[0108] In some embodiments,
[0109] The determining module is further configured to determine the second quantity of the computing terminals that send the first behavior data value within the second preset time; and, when the second quantity meets a second preset condition, send a second computing instruction to the first computing terminal, so that the first computing terminal stops calculating the first target behavior data value according to the second computing instruction.
[0110] In some embodiments,
[0111] The determination module is further configured to, when the first target behavior data value sent by the first computing terminal is received within the second preset time, determine the total behavior data value of each computing terminal based on the first target behavior data value and the first behavior data value sent by the received second computing terminal.
[0112] The sending module is further configured to send a third computing instruction and the total behavior data value of each computing terminal to multiple computing terminals, so as to be used for multiple computing terminals to calculate the second behavior data value according to the third computing instruction and the total behavior data value or the second behavior data value of each computing terminal.
[0113] Thus, after receiving the first behavior data values sent by multiple computing terminals respectively, if it is determined that the first target behavior data value sent by the first computing terminal among the multiple computing terminals is not received within the first preset time, the first computing instruction is sent to the first computing terminal and the second computing terminal respectively, so as to be used for the first computing terminal and the second computing terminal to calculate the first target behavior data value and the second behavior data value respectively based on the first computing instruction. If it is determined that the first target behavior data value sent by the first computing terminal is still not received within the second preset time, the total behavior data value of each computing terminal is determined based on the first behavior data value sent by the received second computing terminal, and the second computing instruction is sent to the first computing terminal, so as to be used for the first computing terminal to stop calculating the first target behavior data value according to the second computing instruction. Based on this, the third computing instruction and the total behavior data value of each computing terminal are sent to multiple computing terminals, so as to be used for multiple computing terminals to calculate the second behavior data value according to the third computing instruction and the total behavior data value or the second behavior data. In this way, the waste of computing resources is reduced.
[0114] Each module in the data processing device provided in the embodiments of the present application can implement Figure 2 the method steps of the illustrated embodiment and can achieve the corresponding technical effects. For the sake of brevity, the description is not repeated here.
[0115] Based on the same inventive concept, the embodiments of the present application further provide another data processing device. In some embodiments, the data processing device may be multiple computing terminals, or functional modules or components inside multiple computing terminals. Next, it will be specifically described in combination with Figure 5 to illustrate the data processing device.
[0116] Figure 5 It is a schematic structural diagram of another data processing device provided in the embodiments of the present application.
[0117] As Figure 5 shown, the data processing device 500 may include: a determination module 510, a sending module 520, and a receiving module 530.
[0118] A determination module 510, configured to determine respective first behavior data values of multiple computing terminals based on behavior data of multiple devices respectively corresponding to the multiple computing terminals.
[0119] A sending module 520, configured to enable the multiple computing terminals to respectively send the first behavior data values to a first node.
[0120] A receiving module 530, configured to enable the multiple computing terminals to receive a first calculation instruction in the case that the first node does not receive a first target behavior data value sent by a first computing terminal among the multiple computing terminals within a first preset time, so that the first computing terminal calculates the first target behavior data value according to the first calculation instruction, and a second computing terminal calculates a second behavior data value according to the first calculation instruction, where the second computing terminal is a computing terminal other than the first computing terminal among the multiple computing terminals.
[0121] The receiving module 530 is further configured to enable the first computing terminal to receive a second calculation instruction in the case that the first node does not receive the first target behavior data value within a second preset time, so that the first computing terminal stops calculating the first target behavior data value according to the second calculation instruction.
[0122] The receiving module 530 is further configured to enable the multiple computing terminals to receive a total behavior data value and a third calculation instruction sent by the first node.
[0123] The determination module 510 is further configured to enable the multiple computing terminals to determine respective second behavior data values of the multiple computing terminals according to the third calculation instruction and the total behavior data value or the second behavior data, where the second behavior data is second behavior data of multiple devices respectively corresponding to each computing terminal.
[0124] Wherein, the duration of the second preset time is greater than the duration of the first preset time.
[0125] Thus, in the case that the multiple computing terminals calculate the first behavior data value and send the first behavior data value to the first node, if the first node does not receive the first target behavior data value sent by the first computing terminal within the first preset time, the multiple computing terminals receive the first calculation instruction, so that the first computing terminal and the second terminal among them respectively calculate the first target behavior data value and the second behavior data value. Based on this, if the first node still does not receive the first target behavior data value sent by the first computing terminal within the second preset time, the first computing terminal stops calculating the first target behavior data value according to the received second calculation instruction. In this case, the multiple computing terminals will determine the second behavior data value of each computing terminal according to the third calculation instruction received from the first node, and the total behavior data value or the second behavior data of the multiple computing terminals. In this way, waste of resources is reduced.
[0126] Each module in the data processing device provided by the embodiments of the present application can implement Figure 3 the method steps of the embodiments shown, and can achieve the corresponding technical effects. For the sake of brevity, they will not be described herein again.
[0127] Figure 6 FIG. is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
[0128] As Figure 6 shown, the data processing device 600 in this embodiment includes an input device 601, an input interface 602, a central processing unit 603, a memory 604, an output interface 605, and an output device 606. Among them, the input interface 602, the central processing unit 603, the memory 604, and the output interface 605 are connected to each other through a bus 610. The input device 601 and the output device 606 are respectively connected to the bus 610 through the input interface 602 and the output interface 605, and then connected to other components of the data processing device 600.
[0129] Specifically, the input device 601 receives input information from the outside and transmits the input information to the central processing unit 603 through the input interface 602; the central processing unit 603 processes the input information based on the computer-executable instructions stored in the memory 604 to generate output information, temporarily or permanently stores the output information in the memory 604, and then transmits the output information to the output device 606 through the output interface 605; the output device 606 outputs the output information to the outside of the data processing device 600 for user use.
[0130] In one embodiment, Figure 6 the data processing device 600 shown includes: a memory 604 for storing programs; a processor 603 for running the programs stored in the memory to execute the Figure 2 or Figure 3 method of the embodiments shown.
[0131] The embodiments of the present application also provide a computer-readable storage medium, on which computer program instructions are stored; when the computer program instructions are executed by a processor, the methods of the embodiments provided by the present application are implemented Figure 2 or Figure 3 shown embodiments.
[0132] It should be clear that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.
[0133] The functional blocks shown in the above-described structural block diagrams can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, and so on. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (ROM), flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical discs, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0134] It should also be noted that in the exemplary embodiments mentioned in the present application, some methods or systems are described based on a series of steps or devices. However, the present application is not limited to the order of the above steps. That is, the steps can be executed in the order mentioned in the embodiments, can be different from the order in the embodiments, or several steps can be executed simultaneously.
[0135] As described above, the above is only the specific implementation manner of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, modules, and units can refer to the corresponding processes in the foregoing method embodiments and will not be repeated here. It should be understood that the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application.
Claims
1. A data processing method, characterized in that: Applied to the first node, including: Receiving first behavior data values respectively sent by a plurality of computing terminals, where the first behavior data value of each computing terminal is determined based on first behavior data of a plurality of devices corresponding to each computing terminal; In a case where the first target behavior data value sent by the first computing terminal among the multiple computing terminals is not received within a first preset time, sending a first calculation instruction to the first computing terminal and a second computing terminal respectively, so that the first computing terminal calculates the first target behavior data value according to the first calculation instruction, and the second computing terminal calculates the second behavior data value according to the first calculation instruction, wherein the second computing terminal is a computing terminal among the multiple computing terminals other than the first computing terminal; determining a total behavior data value of each computing terminal based on the received first behavior data value sent by the second computing terminal, and sending a second calculation instruction to the first computing terminal, so that the first computing terminal stops calculating the first target behavior data value according to the second calculation instruction, if the first target behavior data value sent by the first computing terminal is not received within a second preset time; sending a third calculation instruction and a total behavior data value of each computing terminal to the plurality of computing terminals, so that the plurality of computing terminals determine a second behavior data value according to the third calculation instruction and the total behavior data value or second behavior data, where the second behavior data is second behavior data of a plurality of devices corresponding to each computing terminal; The second preset time is longer than the first preset time.
2. The method according to claim 1, characterized in that The method further comprises: determining, within the first preset time, a first number of computing terminals that send the first behavior data value; When the first quantity meets the first preset condition, the first calculation instruction is sent to the first computing terminal and the second computing terminal respectively, so that the first computing terminal calculates the first target behavior data value according to the first calculation instruction, and the second computing terminal calculates the second behavior data value according to the first calculation instruction.
3. The method according to claim 1, characterized in that The method further comprises: determining, within the second preset time, a second number of computing terminals that send the first behavior data value; In a case where the second number satisfies a second preset condition, a second calculation instruction is sent to the first calculation terminal, so that the first calculation terminal stops calculating the first target behavior data value according to the second calculation instruction.
4. The method according to claim 1, wherein The method further comprises: determining a total behavior data value for each computing terminal based on the first target behavior data value and the received first behavior data value sent by the second computing terminal, upon receiving the first target behavior data value sent by the first computing terminal within the second preset time; A third calculation instruction and the total behavior data value of each computing terminal are sent to the multiple computing terminals, so that the multiple computing terminals calculate the second behavior data value according to the third calculation instruction and the total behavior data value or the second behavior data value of each computing terminal.
5. A data processing method, characterized in that: Applied to a plurality of computing terminals, the plurality of computing terminals including a first computing terminal and a second computing terminal, comprising: Based on the first behavior data of the plurality of devices corresponding to the plurality of computing terminals, the plurality of computing terminals determine respective first behavior data values; The plurality of computing terminals respectively send the first behavior data value to the first node; In a case where the first node does not receive a first target behavior data value sent by a first computing terminal among the multiple computing terminals within a first preset time, the multiple computing terminals receive a first computing instruction, so that the first computing terminal calculates the first target behavior data value according to the first computing instruction, and the second computing terminal calculates a second behavior data value according to the first computing instruction, wherein the second computing terminal is a computing terminal among the multiple computing terminals other than the first computing terminal; When the first node does not receive the first target behavior data value within a second preset time, the first computing terminal receives a second computing instruction, so that the first computing terminal stops computing the first target behavior data value according to the second computing instruction; The plurality of computing terminals receive the total behavior data value and the third computing instruction sent by the first node; The plurality of computing terminals determine second behavior data values for each of the plurality of computing terminals based on the third computing instruction and the total behavior data value or the second behavior data, where the second behavior data is second behavior data for a plurality of devices corresponding to each computing terminal; The second preset time is longer than the first preset time.
6. A data processing device, characterized in that: The device comprises: a receiving module, configured to receive first behavior data values respectively sent by a plurality of computing terminals, wherein the first behavior data value of each computing terminal is determined based on first behavior data of a plurality of devices corresponding to each computing terminal; a sending module, configured to send a first calculation instruction to each of the first and second computing terminals, if the first target behavior data value sent by the first computing terminal among the multiple computing terminals is not received within a first preset time, so that the first computing terminal calculates the first target behavior data value according to the first calculation instruction, and the second computing terminal calculates the second behavior data value according to the first calculation instruction, wherein the second computing terminal is a computing terminal among the multiple computing terminals other than the first computing terminal; a determination module configured to, if the first target behavior data value sent by the first computing terminal is not received within a second preset time, determine the total behavior data value of each computing terminal based on the first behavior data value received from the second computing terminal, and to send a second calculation instruction to the first computing terminal, causing the first computing terminal to stop calculating the first target behavior data value according to the second calculation instruction; wherein the second computing terminal is a computing terminal other than the first computing terminal among the plurality of computing terminals; The sending module is further configured to send a third calculation instruction and a total behavior data value corresponding to each of the computing terminals to the plurality of computing terminals, so that the plurality of computing terminals determine a second behavior data value based on the third calculation instruction and the total behavior data value or the second behavior data, where the second behavior data is second behavior data of the plurality of devices corresponding to each of the computing terminals; The second preset time is longer than the first preset time.
7. The data processing device according to claim 6, characterized in that The device further comprises: The determining module is further configured to determine a first number of computing terminals that send the first behavior data value within the first preset time; The sending module is also used to send the first calculation instruction to the first computing terminal and the second computing terminal respectively when the first quantity meets the first preset condition, so that the first computing terminal calculates the first target behavior data value according to the first calculation instruction, and the second computing terminal calculates the second behavior data value according to the first calculation instruction.
8. A data processing device, characterized in that: Applied to a plurality of computing terminals, the plurality of computing terminals including a first computing terminal and a second computing terminal, the apparatus comprising: a determination module, configured to, based on the first behavior data of the plurality of devices corresponding to the plurality of computing terminals, enable the plurality of computing terminals to determine respective first behavior data values; A sending module, configured for the plurality of computing terminals to respectively send the first behavior data value to the first node; a receiving module, configured to, if the first node does not receive the first target behavior data value sent by a first computing terminal among the multiple computing terminals within a first preset time, cause the multiple computing terminals to receive a first calculation instruction, so that the first computing terminal calculates the first target behavior data value according to the first calculation instruction, and the second computing terminal calculates the second behavior data value according to the first calculation instruction, wherein the second computing terminal is a computing terminal among the multiple computing terminals other than the first computing terminal; The receiving module is further configured to, if the first node does not receive the first target behavior data value within a second preset time, cause the first computing terminal to receive a second computing instruction, so that the first computing terminal stops calculating the first target behavior data value according to the second computing instruction; The receiving module is further configured to receive, at the plurality of computing terminals, the total behavior data value and the third computing instruction sent by the first node; The determining module is further configured to determine, by the plurality of computing terminals, second behavior data values for each of the plurality of computing terminals based on the third computing instruction and the total behavior data value or the second behavior data, where the second behavior data is second behavior data for a plurality of devices corresponding to each computing terminal; The second preset time is longer than the first preset time.
9. A data processing device, characterized in that: The device includes: a processor and a memory storing computer program instructions; The processor reads and executes the computer program instructions to implement the data processing method according to any one of claims 1 to 4; or, The processor reads and executes the computer program instructions to implement the data processing method according to claim 5.
10. A computer storage medium, characterized in that The computer storage medium stores computer program instructions, which, when executed by a processor, implement the data processing method according to any one of claims 1 to 4; or, The processor reads and executes the computer program instructions to implement the data processing method according to claim 5.
Citation Information
Patent Citations
Data processing method, system and device, terminal and storage medium
CN111506921A
Data processing method, device, equipment and system for realizing disconnection reconnection
CN111510492A