Task processing method and device

By grouping and asynchronously co-processing of facial data in the geographic information system, and using multi-threading technology, the problem of inefficient single-thread processing is solved, and the efficiency and accuracy of facial data processing in the geographic information system is improved.

CN119003762APending Publication Date: 2024-11-22BEIJING JINGDONG ZHENSHI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310554420.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In geographic information systems, single-threaded processing surface data is inefficient, resulting in low processing efficiency.

Method used

By grouping them according to the number of face data in the set of face data to be processed, and using asynchronous concurrent execution of the target tasks corresponding to face data in multiple face data packets, using multi-threaded processing technology to determine the appropriate execution method (string) (line or multithread asynchronous) to process polygon data grouping, and finally merge the group task processing results to obtain task processing results of polygon data set.

Benefits of technology

It improves the processing efficiency of the surface data set, ensures the accuracy of task processing results, and improves the performance of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003762A_ABST
    Figure CN119003762A_ABST
Patent Text Reader

Abstract

The invention discloses a task processing method and device. A specific embodiment of the method comprises the following steps: grouping surface data in a surface data set according to the quantity of the surface data in the surface data set to be processed to obtain a plurality of surface data groups; asynchronously and concurrently executing the target tasks corresponding to the surface data in the plurality of surface data groups to obtain group task processing results corresponding to the plurality of surface data groups; and obtaining a task processing result corresponding to the surface data set according to the grouping task processing results corresponding to the plurality of surface data groups. According to the method, the data processing efficiency is improved while the accuracy of the task processing result is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, specifically to geographic information system technology, and more particularly to a task processing method, device, computer-readable medium, and electronic device. Background Art

[0002] At present, geographic information systems are widely used in almost all fields such as resource surveys, land management, urban planning, post and telecommunications, transportation, water conservancy and electricity, statistics, commercial finance, etc., and the use scenarios of WEB (World Wide Web) map applications are becoming more and more diversified. In all application scenarios, WEB map applications are used to collect, store, relate, process, retrieve, analyze and display geographic information. The basic principles involve the use of point, line and surface data of the basic elements of plane space and the judgment of spatial relationships. At present, in the scenario of geographic information system, surface data is still processed in a single-threaded manner, which has low processing efficiency. Summary of the invention

[0003] The embodiments of the present application provide a task processing method, device, computer-readable medium and electronic device.

[0004] In a first aspect, an embodiment of the present application provides a task processing method, including: grouping the surface data in a surface data set according to the number of surface data in the surface data set to be processed to obtain multiple surface data groups; asynchronously and concurrently executing target tasks corresponding to the surface data in the multiple surface data groups to obtain group task processing results corresponding to each of the multiple surface data groups; and obtaining a task processing result corresponding to the surface data set based on the group task processing results corresponding to each of the multiple surface data groups.

[0005] In some examples, the above-mentioned asynchronous concurrent execution of target tasks corresponding to the surface data in multiple surface data groups to obtain group task processing results corresponding to each of the multiple surface data groups includes: determining multiple threads for asynchronously and concurrently executing target tasks corresponding to the surface data in multiple surface data groups; determining, according to the types of target tasks corresponding to the surface data in the multiple surface data groups, the target execution mode corresponding to each of the multiple surface data groups from the serial execution mode and the multi-thread asynchronous execution mode; and processing the target tasks through multiple threads using the target execution mode corresponding to each of the multiple surface data groups to obtain group task processing results corresponding to each of the multiple surface data groups.

[0006] In some examples, the above-mentioned target execution modes corresponding to each of the multiple surface data groups are determined from the serial execution mode and the multi-threaded asynchronous execution mode according to the type of the target task corresponding to the surface data in the multiple surface data groups, including: for each surface data group in the multiple surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the first type, the serial execution mode is determined as the target execution mode corresponding to the surface data group, wherein when the first type represents that there is overlap between the surface data in the surface data group and the existing surface data in the target map, the surface data in the surface data group and the surface data in the target map are separated by a clipping operation.

[0007] In some examples, the above-mentioned target tasks are processed through multiple threads using target execution methods corresponding to each of the multiple surface data groups to obtain group task processing results corresponding to each of the multiple surface data groups, including: for each surface data group in the multiple surface data groups, the target tasks corresponding to the multiple surface data in the surface data group are serially executed through the target thread corresponding to the surface data group in the multiple threads to obtain the group task processing result corresponding to the surface data group.

[0008] In some examples, the above-mentioned target execution modes corresponding to each of the multiple surface data groups are determined from the serial execution mode and the multi-threaded asynchronous execution mode according to the type of the target task corresponding to the surface data in the multiple surface data groups, including: for each surface data group in the multiple surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the second type, the multi-threaded asynchronous execution mode is determined as the target execution mode corresponding to the surface data group, wherein when the second type represents that there is overlap between the surface data in the surface data group and the existing surface data in the target map, the surface data in the surface data group is classified as the surface data overlapping with the surface data in the target map.

[0009] In some examples, the above-mentioned target tasks are processed through multiple threads and the target execution methods corresponding to each of the multiple surface data groups are adopted to obtain group task processing results corresponding to each of the multiple surface data groups, including: for each surface data group in the multiple surface data groups, the target tasks corresponding to the multiple surface data in the surface data group are asynchronously and concurrently executed through multiple target threads corresponding to the surface data group in the multiple threads to obtain the group task processing results corresponding to the surface data group.

[0010] In some examples, the above-mentioned task processing results corresponding to the surface data set are obtained based on the grouping task processing results corresponding to each of the multiple surface data groups, including: for each surface data group in the multiple surface data groups, in response to determining that the target tasks corresponding to the surface data in the surface data group have been processed, blocking and waiting for the grouping task processing results corresponding to the previous surface data group of the surface data group; in response to determining that the grouping task processing results corresponding to each of the multiple surface data groups are obtained, serially processing the grouping task processing results corresponding to each of the multiple surface data groups to obtain the task processing results.

[0011] In some examples, the above-mentioned grouping the surface data in the surface data set according to the number of surface data in the surface data set to be processed to obtain multiple surface data groups includes: determining the number of groups according to the number of surface data in the surface data set to be processed and the number of available virtual machines; grouping the surface data in the surface data set according to the number of groups to obtain multiple surface data groups.

[0012] In the second aspect, an embodiment of the present application provides a task processing device, including: a grouping unit, configured to group the surface data in a surface data set according to the number of surface data in the surface data set to be processed, so as to obtain multiple surface data groups; a first processing unit, configured to asynchronously and concurrently execute target tasks corresponding to the surface data in the multiple surface data groups, so as to obtain grouping task processing results corresponding to each of the multiple surface data groups; and a second processing unit, configured to obtain a task processing result corresponding to the surface data set based on the grouping task processing results corresponding to each of the multiple surface data groups.

[0013] In some examples, the above-mentioned first processing unit is further configured to: determine multiple threads for asynchronously and concurrently executing target tasks corresponding to the surface data in multiple surface data groups; determine the target execution mode corresponding to each of the multiple surface data groups from the serial execution mode and the multi-threaded asynchronous execution mode according to the type of the target tasks corresponding to the surface data in the multiple surface data groups; and use multiple threads to process the target tasks using the target execution mode corresponding to each of the multiple surface data groups to obtain the group task processing results corresponding to each of the multiple surface data groups.

[0014] In some examples, the above-mentioned first processing unit is further configured to: for each surface data group in multiple surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is a first type, determine the serial execution mode as the target execution mode corresponding to the surface data group, wherein, when the first type represents that there is overlap between the surface data in the surface data group and the existing surface data in the target map, the surface data in the surface data group and the surface data in the target map are separated by a clipping operation.

[0015] In some examples, the above-mentioned first processing unit is further configured to: for each surface data group in the multiple surface data groups, serially execute the target tasks corresponding to the multiple surface data in the surface data group through the target thread corresponding to the surface data group in the multiple threads to obtain the group task processing result corresponding to the surface data group.

[0016] In some examples, the first processing unit is further configured to: for each surface data group in a plurality of surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the second type, determine the multi-threaded asynchronous execution mode as the target execution mode corresponding to the surface data group, wherein when the second type represents that there is overlap between the surface data in the surface data group and the existing surface data in the target map, the surface data in the surface data group is classified as the surface data in the target map that overlaps with the surface data.

[0017] In some examples, the above-mentioned first processing unit is further configured to: for each surface data group in the multiple surface data groups, asynchronously and concurrently execute target tasks corresponding to the multiple surface data in the surface data group through multiple target threads corresponding to the surface data group in the multiple threads, and obtain the group task processing result corresponding to the surface data group.

[0018] In some examples, the second processing unit is further configured to: for each surface data group in a plurality of surface data groups, in response to determining that the target tasks corresponding to the surface data in the surface data group have been processed, block and wait for the group task processing result corresponding to the previous surface data group of the surface data group; in response to determining that the group task processing results corresponding to each of the plurality of surface data groups are obtained, serially process the group task processing results corresponding to each of the plurality of surface data groups to obtain the task processing result.

[0019] In some examples, the above-mentioned grouping unit is further configured to: determine the number of groups based on the number of surface data in the surface data set to be processed and the number of available virtual machines; and group the surface data in the surface data set according to the number of groups to obtain multiple surface data groups.

[0020] In a third aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the first aspect is implemented.

[0021] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner of the first aspect.

[0022] The task processing method and device provided in the embodiment of the present application obtain multiple surface data groups by grouping the surface data in the surface data set according to the number of surface data in the surface data set to be processed; asynchronously and concurrently execute the target tasks corresponding to the surface data in the multiple surface data groups to obtain the group task processing results corresponding to each of the multiple surface data groups; obtain the task processing results corresponding to the surface data set according to the group task processing results corresponding to each of the multiple surface data groups, so that the surface data in the surface data set can be processed asynchronously and concurrently by multiple threads, thereby improving the data processing efficiency while ensuring the accuracy of the task processing results. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0024] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;

[0025] Figure 2 is a flow chart of an embodiment of a task processing method according to the present application;

[0026] Figure 3 is a flowchart of generating task processing results according to this embodiment

[0027] Figure 4 is a schematic diagram of an application scenario of the task processing method according to this embodiment;

[0028] Figure 5 is a flowchart of another embodiment of the task processing method according to the present application;

[0029] Figure 6 is a structural diagram of an embodiment of a task processing device according to the present application;

[0030] Figure 7 It is a structural diagram of a computer system suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION

[0031] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0032] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0033] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0034] Figure 1 An exemplary architecture 100 to which the task processing method and apparatus of the present application can be applied is shown.

[0035] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The communication connection between the terminal devices 101, 102, 103 constitutes a topological network, and the network 104 is used to provide a medium for the communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0036] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 can be hardware devices or software that support network connection for data interaction and data processing. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices that support network connection, information acquisition, interaction, display, processing and other functions, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.

[0037] The server 105 may be a server that provides various services, for example, a background processing server that asynchronously processes the surface data in the surface data set provided by the terminal devices 101, 102, and 103 in multiple threads. As an example, the server 105 may be a cloud server.

[0038] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0039] It should also be noted that the task processing method provided in the embodiments of the present application can be executed by a server, or by a terminal device, or by a server and a terminal device in cooperation with each other. Accordingly, the various parts (e.g., various units) included in the task processing device can be all arranged in the server, or all arranged in the terminal device, or respectively arranged in the server and the terminal device.

[0040] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the system architecture is only illustrative. Depending on the implementation requirements, there may be any number of terminal devices, networks, and servers. When the electronic device on which the task processing method is running does not need to transmit data with other electronic devices, the system architecture may only include the electronic device (e.g., server or terminal device) on which the task processing method is running.

[0041] Continue to refer Figure 2 , shows a process 200 of an embodiment of a task processing method, comprising the following steps:

[0042] Step 201 : grouping the surface data in the surface data set according to the amount of surface data in the surface data set to be processed to obtain a plurality of surface data groups.

[0043] In this embodiment, the execution subject of the task processing method (for example Figure 1 The terminal device or server in the surface data set can obtain the surface data set to be processed remotely or locally through a wired network connection or a wireless network connection, and group the surface data in the surface data set according to the number of surface data in the surface data set to obtain multiple surface data groups. The surface data is data representing a surface with a certain area.

[0044] In the GIS (Geographic Information System) application scenario, Web map applications are all about the collection, storage, relationship, processing, retrieval, analysis and display of geographic information. The basic principles involve the use of the basic elements of plane space, points, lines, and surfaces, and the judgment of spatial relationships.

[0045] Taking the after-sales service scenario of home appliances as an example, a customer's after-sales order will be assigned to the after-sales outlet closest to the customer based on the customer's after-sales address. This involves the calculation of the distance between points and surfaces, where the points correspond to the customer's after-sales address and the surfaces correspond to the service range of the after-sales outlet. The implicit internal logic is that the same after-sales order cannot be assigned to two after-sales outlets at the same time, which involves the situation in which the surfaces represented by different surface data in the spatial data cannot overlap.

[0046] Users generally upload face data in the form of EXCEL files. The above-mentioned execution subject can download the EXCEL file through the file system and verify the format, size, title, etc. of the EXCEL file. In response to the verification passing, the face data in the EXCEL file is parsed to obtain a face data set.

[0047] A face data set generally includes a plurality of face data. As an example, a preset number of face data may be grouped as one group, and the face data in the face data set may be grouped to obtain a plurality of face data groups. The preset number may be specifically set according to actual conditions and is not limited here.

[0048] As another example, the number of surface data groups is a preset number of groups, and the execution entity may evenly divide the surface data in the surface data set into the preset number of surface data groups to obtain the preset number of surface data groups.

[0049] In some optional implementations of the present embodiment, the execution entity may perform step 201 in the following manner: first, determine the number of groups based on the number of surface data in the surface data set to be processed and the number of available virtual machines; then, group the surface data in the surface data set according to the number of groups to obtain multiple surface data groups.

[0050] As an example, the execution subject may determine the amount of surface data in each surface data group by the following formula:

[0051] n=(polygonSize / T)+1

[0052] Wherein, n represents the number of face data in the face data group, polygonSize represents the total amount of face data in the face data set, and T represents the number of Java virtual machines available in the above execution entity.

[0053] In this implementation, a specific implementation method is provided for grouping surface data sets according to the amount of surface data and the number of available virtual machines, so that the number of surface data groups obtained is more consistent with the data processing capability of the above-mentioned execution subject, which helps to further improve the processing efficiency of surface data.

[0054] Step 202 : asynchronously and concurrently execute target tasks corresponding to the surface data in the plurality of surface data groups, and obtain group task processing results corresponding to each of the plurality of surface data groups.

[0055] In this embodiment, the execution subject can asynchronously and concurrently execute the target tasks corresponding to the surface data in the multiple surface data groups, and obtain the group task processing results corresponding to each of the multiple surface data groups.

[0056] As an example, for each surface data group in multiple surface data groups, the execution subject can run a thread to execute the target task corresponding to the surface data of the surface data group, and after processing the target tasks corresponding to all surface data in the surface data group, obtain the group task processing result corresponding to the surface data group. At the level of multiple surface data groups, multiple threads asynchronously and concurrently execute the target tasks corresponding to the surface data in multiple surface data groups.

[0057] As another example, for each surface data group in the multiple surface data groups, the execution subject can run multiple threads to execute the target task corresponding to the surface data of the surface data group, and after the target tasks corresponding to all the surface data in the surface data group are processed, the group task processing result corresponding to the surface data group is obtained. At the level of multiple surface data groups, multiple threads asynchronously and concurrently execute the target tasks corresponding to the surface data in the multiple surface data groups.

[0058] In some optional implementations of this embodiment, the execution subject may perform step 202 in the following manner:

[0059] First, multiple threads are determined to asynchronously and concurrently execute target tasks corresponding to the surface data in the multiple surface data groups.

[0060] In this implementation, the number of threads can be specifically set according to actual conditions, and can be the same as the number of surface data groups or different from the number of surface data groups.

[0061] Second, according to the types of target tasks corresponding to the surface data in the plurality of surface data groups, target execution modes corresponding to the plurality of surface data groups are determined from a serial execution mode and a multi-thread asynchronous execution mode.

[0062] In the serial execution mode, one thread is generally used to execute the target tasks corresponding to the surface data in sequence. When the processing of a target task corresponding to the surface data is completed, the processing operation of the target task corresponding to the next surface data is performed.

[0063] In the multi-threaded asynchronous execution mode, multiple threads are generally used to asynchronously and concurrently process target tasks corresponding to multiple surface data.

[0064] In this implementation method, all types of target tasks corresponding to the surface data can be determined in advance, and then the correspondence between the type of target task and the serial execution mode and the multi-threaded asynchronous execution mode can be determined, and a correspondence table representing the correspondence between each type and the serial execution mode and the multi-threaded asynchronous execution mode can be constructed.

[0065] By referring to the corresponding relationship table, the execution subject can determine the target execution modes corresponding to the multiple surface data groups.

[0066] Third, through multiple threads, target execution modes corresponding to the multiple surface data groups are adopted to process target tasks, so as to obtain group task processing results corresponding to the multiple surface data groups.

[0067] In this implementation, the corresponding task processing method is determined based on the type of target task corresponding to the surface data, which further improves the data processing efficiency while ensuring the accuracy of the task processing results.

[0068] In some optional first methods of this embodiment, the above-mentioned execution entity can perform the above-mentioned second step in the following manner: for each surface data group in multiple surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the first type, the serial execution mode is determined as the target execution mode corresponding to the surface data group.

[0069] The first type represents that when the surface data in the surface data group overlaps with the existing surface data in the target map, the surface data in the surface data group and the surface data in the target map are separated by a clipping operation.

[0070] As an example, in the field of home appliance after-sales, with the sharp increase in home appliance sales, additional after-sales outlets are needed to better handle after-sales matters. Both the original after-sales outlets and the additional service outlets are set with corresponding service ranges, that is, the fences of the after-sales outlets. The service range of the additional service outlets may overlap with the service range of the original service outlets. At this time, it is necessary to re-divide the service ranges of the two overlapping service outlets through the clipping operation to separate the two service ranges.

[0071] For the surface data corresponding to the target task under the first type, there is a dependency relationship between different surface data. Specifically, surface data A overlaps with the existing surface data B in the target map, and surface data A and surface data B need to be re-divided through a clipping operation to obtain an updated target map; then, based on the updated target map, the target tasks corresponding to the subsequent surface data can be executed.

[0072] Since there is a dependency relationship between the surface data corresponding to the first type of target tasks, it is necessary to process the surface data in the surface data group in a serial execution manner.

[0073] In this implementation, the above-mentioned execution entity can execute the above-mentioned third step in the following manner: for each surface data group in multiple surface data groups, through the target thread corresponding to the surface data group in multiple threads, serially execute the target tasks corresponding to the multiple surface data in the surface data group to obtain the group task processing result corresponding to the surface data group.

[0074] As an example, multiple surface data groups correspond to multiple threads one by one. For each surface data group, the target thread corresponding to the surface data group serially executes the target tasks corresponding to multiple surface data in the surface data group until all the target tasks corresponding to the surface data group are completed, and the group task processing result corresponding to the surface data group is obtained.

[0075] In this implementation, a serial execution method is adopted to process the first type of target tasks corresponding to the surface data in the surface data grouping, thereby improving the accuracy of the processing results of the first type of target tasks.

[0076] In some optional implementations of this embodiment, the above-mentioned execution entity can also perform the above-mentioned second step in the following manner: for each surface data group in multiple surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the second type, the multi-threaded asynchronous execution mode is determined as the target execution mode corresponding to the surface data group.

[0077] The second type represents that when the surface data in the surface data group overlaps with the existing surface data in the target map, the surface data in the surface data group is assigned to the overlapping surface data in the target map.

[0078] As an example, the home appliance parent company and the home electronics company have their own corresponding target maps in their original layouts, and the target maps are set with the service scopes corresponding to each after-sales outlet. Now, the subsidiary needs to be merged into the parent company. For each surface data corresponding to the subsidiary, the surface data is assigned to the overlapping surface data in the parent company. For example, the surface data A corresponding to the subsidiary overlaps with the surface data B, C, and D corresponding to the parent company, and the surface data B, C, and D completely cover the surface data A. At this time, the part of the surface data A that is covered by the surface data B is divided into the surface data B, the part of the surface data A that is covered by the surface data C is divided into the surface data C, and the part of the surface data A that is covered by the surface data D is divided into the surface data D.

[0079] Since there is no dependency between the surface data corresponding to the second type of target tasks, the surface data in the surface data group can be processed in an asynchronous concurrent execution manner.

[0080] In this implementation, the above-mentioned execution entity can execute the above-mentioned third step in the following manner: for each surface data group in multiple surface data groups, through multiple target threads corresponding to the surface data group in multiple threads, asynchronously and concurrently execute target tasks corresponding to multiple surface data in the surface data group to obtain the group task processing result corresponding to the surface data group.

[0081] For each surface data group, the number of multiple target threads corresponding to the surface data group can be specifically set according to actual conditions and is not limited here.

[0082] In this implementation, an asynchronous concurrent method is used to process the second type of target tasks corresponding to the surface data in the surface data group, which further improves the processing efficiency and accuracy of the processing results of the second type of target tasks.

[0083] Step 203 , obtaining a task processing result corresponding to the surface data set according to the group task processing results corresponding to each of the plurality of surface data groups.

[0084] In this embodiment, the execution subject may obtain the task processing result corresponding to the surface data set according to the group task processing results corresponding to each of the plurality of surface data groups.

[0085] As an example, the execution subject may combine the group task processing results corresponding to each of the plurality of surface data groups to obtain the task processing result corresponding to the surface data set.

[0086] In some optional implementations of this embodiment, the execution subject may perform step 203 in the following manner:

[0087] First, for each surface data group in the plurality of surface data groups, in response to determining that the target tasks corresponding to the surface data in the surface data group have been processed, the surface data group is blocked and waited for the processing result of the group task corresponding to the previous surface data group of the surface data group.

[0088] When a process being executed cannot continue to execute due to waiting for a certain event to occur, it changes from the execution state to the blocking state. In this implementation, when a thread completes the target task of the surface data in the corresponding surface data group, it blocks and waits for the group task processing result corresponding to the previous surface data group until the group task processing result corresponding to each surface data group is obtained.

[0089] Then, in response to determining that the grouping task processing results corresponding to the plurality of surface data groups are obtained, the grouping task processing results corresponding to the plurality of surface data groups are processed in series to obtain the task processing results.

[0090] In this implementation, especially for the grouping task processing results of the surface data grouping corresponding to the first type of target task, the serial processing method helps to improve its accuracy.

[0091] Continue to refer Figure 3, which shows a flow chart of generating task processing results. The surface data set is divided into three surface data groups 301, 302, and 303. For the target thread corresponding to the surface data group 302, after completing the target task of the surface data in the surface data group 302 and obtaining the group task processing result 305, it blocks and waits for the group task processing result 304 corresponding to the surface data group 301; for the target thread corresponding to the surface data group 303, after completing the target task of the surface data in the surface data group 303 and obtaining the group task processing result 306, it blocks and waits for the group task processing result 305 corresponding to the surface data group 302. After obtaining the group task processing results 304, 305, and 306 corresponding to the surface data groups 301, 302, and 303, respectively, the group task processing results 304, 305, and 306 are processed serially to obtain the task processing result 307 corresponding to the surface data set.

[0092] In this implementation, the group task processing results corresponding to each of the surface data groups are processed serially to obtain the final task processing result, thereby further improving the accuracy of the task processing result.

[0093] Continue to see Figure 4 , Figure 4 FIG. 4 is a schematic diagram 400 of an application scenario of the task processing method according to this embodiment. Figure 4 In the application scenario, with the sharp increase in the sales volume of home appliances of home appliance company A, it is necessary to add more after-sales outlets on the basis of the original after-sales outlets to provide better after-sales services to customers. The designers of home appliance company A provide the added after-sales outlets and the corresponding service scope of the after-sales outlets, that is, the surface data corresponding to the after-sales outlets, to the server through the terminal device. After the server obtains the surface data set 401 corresponding to the added after-sales outlets, it groups the surface data in the surface data set according to the number of surface data in the surface data set to obtain multiple surface data groups 402; then, it asynchronously and concurrently executes the target tasks corresponding to the surface data in the multiple surface data groups 402 to obtain the grouping task processing results 403 corresponding to each of the multiple surface data groups; according to the grouping task processing results corresponding to each of the multiple surface data groups, it obtains the task processing results 404 corresponding to the surface data set.

[0094] The method provided by the above-mentioned embodiment of the present application obtains multiple surface data groups by grouping the surface data in the surface data set to be processed according to the number of surface data in the surface data set to be processed; asynchronously and concurrently executes the target tasks corresponding to the surface data in the multiple surface data groups to obtain the grouping task processing results corresponding to each of the multiple surface data groups; obtains the task processing results corresponding to the surface data set according to the grouping task processing results corresponding to each of the multiple surface data groups, thereby enabling multi-threaded asynchronous and concurrent processing of the surface data in the surface data set, thereby improving the data processing efficiency while ensuring the accuracy of the task processing results.

[0095] Continue to refer Figure 5 , shows a schematic process 500 of an embodiment of a task processing method according to the present application, comprising the following steps:

[0096] Step 501 : determining the number of groups according to the number of surface data in the surface data set to be processed and the number of available virtual machines.

[0097] Step 502: grouping the surface data in the surface data set according to the number of groups to obtain a plurality of surface data groups.

[0098] Step 503 , determining multiple threads for asynchronously and concurrently executing target tasks corresponding to the surface data in the multiple surface data groups.

[0099] Step 504 : for each surface data group in the plurality of surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the first type, determining the serial execution mode as the target execution mode corresponding to the surface data group.

[0100] The first type represents that when the surface data in the surface data group overlaps with the existing surface data in the target map, the surface data in the surface data group and the surface data in the target map are separated by a clipping operation.

[0101] Step 505, for each surface data group in the multiple surface data groups, serially execute the target tasks corresponding to the multiple surface data in the surface data group through the target thread corresponding to the surface data group in the multiple threads to obtain the group task processing result corresponding to the surface data group.

[0102] Step 506 : For each surface data group in the plurality of surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the second type, determine the multi-thread asynchronous execution mode as the target execution mode corresponding to the surface data group.

[0103] The second type represents that when the surface data in the surface data group overlaps with the existing surface data in the target map, the surface data in the surface data group is assigned to the overlapping surface data in the target map.

[0104] Step 507, for each surface data group in the multiple surface data groups, multiple target threads corresponding to the surface data group in the multiple threads asynchronously and concurrently execute target tasks corresponding to the multiple surface data in the surface data group to obtain a group task processing result corresponding to the surface data group.

[0105] Step 508 , for each surface data group in the plurality of surface data groups, in response to determining that the target tasks corresponding to the surface data in the surface data group have all been processed, blocking and waiting for the group task processing result corresponding to the previous surface data group of the surface data group.

[0106] Step 509 , in response to determining that the grouping task processing results corresponding to the plurality of surface data groups are obtained, the grouping task processing results corresponding to the plurality of surface data groups are serially processed to obtain the task processing results.

[0107] It can be seen from this embodiment that Figure 2 Compared with the corresponding embodiments, the process 500 of the task processing method in this embodiment specifically illustrates the grouping process of the surface data set, the process of asynchronously and concurrently executing the target task, and the process of determining the final task processing result based on the grouped task processing result, further improving the data processing efficiency while ensuring the accuracy of the task processing result.

[0108] Continue to refer Figure 6 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a task processing device, which is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0109] like Figure 6 As shown, the task processing device includes: a grouping unit 601, which is configured to group the surface data in the surface data set to be processed according to the number of surface data in the surface data set to be processed, so as to obtain multiple surface data groups; a first processing unit 602, which is configured to asynchronously and concurrently execute target tasks corresponding to the surface data in the multiple surface data groups, so as to obtain grouping task processing results corresponding to each of the multiple surface data groups; and a second processing unit 603, which is configured to obtain a task processing result corresponding to the surface data set according to the grouping task processing results corresponding to each of the multiple surface data groups.

[0110] In some optional implementations of the present embodiment, the above-mentioned first processing unit 602 is further configured to: determine multiple threads for asynchronously and concurrently executing target tasks corresponding to the surface data in multiple surface data groups; determine the target execution mode corresponding to each of the multiple surface data groups from the serial execution mode and the multi-threaded asynchronous execution mode according to the types of the target tasks corresponding to the surface data in the multiple surface data groups; and process the target tasks through multiple threads using the target execution mode corresponding to each of the multiple surface data groups to obtain the group task processing results corresponding to each of the multiple surface data groups.

[0111] In some optional implementations of the present embodiment, the first processing unit 602 is further configured to: for each surface data group in a plurality of surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the first type, determine the serial execution mode as the target execution mode corresponding to the surface data group, wherein when the first type represents that there is overlap between the surface data in the surface data group and the existing surface data in the target map, separate the surface data in the surface data group from the surface data in the target map through a clipping operation.

[0112] In some optional implementations of the present embodiment, the above-mentioned first processing unit 602 is further configured to: for each surface data group in the multiple surface data groups, serially execute the target tasks corresponding to the multiple surface data in the surface data group through the target thread corresponding to the surface data group in the multiple threads, and obtain the group task processing result corresponding to the surface data group.

[0113] In some optional implementations of the present embodiment, the first processing unit 602 is further configured to: for each surface data group in a plurality of surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the second type, determine the multi-threaded asynchronous execution mode as the target execution mode corresponding to the surface data group, wherein, when the second type represents that there is overlap between the surface data in the surface data group and the existing surface data in the target map, the surface data in the surface data group is classified as the surface data in the target map that overlaps with the surface data.

[0114] In some optional implementations of the present embodiment, the above-mentioned first processing unit 602 is further configured to: for each surface data group in the multiple surface data groups, asynchronously and concurrently execute target tasks corresponding to the multiple surface data in the surface data group through multiple target threads corresponding to the surface data group in multiple threads, and obtain the group task processing result corresponding to the surface data group.

[0115] In some optional implementations of the present embodiment, the second processing unit 603 is further configured to: for each surface data group in the multiple surface data groups, in response to determining that the target tasks corresponding to the surface data in the surface data group have been processed, block and wait for the group task processing results corresponding to the previous surface data group of the surface data group; in response to determining that the group task processing results corresponding to each of the multiple surface data groups are obtained, serially process the group task processing results corresponding to each of the multiple surface data groups to obtain the task processing results.

[0116] In some optional implementations of this embodiment, the above-mentioned grouping unit 601 is further configured to: determine the number of groups based on the number of surface data in the surface data set to be processed and the number of available virtual machines; and group the surface data in the surface data set according to the number of groups to obtain multiple surface data groups.

[0117] In this embodiment, the grouping unit in the task processing device groups the surface data in the surface data set according to the number of surface data in the surface data set to be processed, and obtains multiple surface data groups; the first processing unit asynchronously and concurrently executes the target tasks corresponding to the surface data in the multiple surface data groups, and obtains the grouping task processing results corresponding to each of the multiple surface data groups; the second processing unit obtains the task processing results corresponding to the surface data set according to the grouping task processing results corresponding to each of the multiple surface data groups, so that the surface data in the surface data set can be processed asynchronously by multiple threads, thereby improving the data processing efficiency while ensuring the accuracy of the task processing results.

[0118] Reference below Figure 7 , which shows a device suitable for implementing the embodiments of the present application (eg Figure 1 Schematic diagram of the structure of a computer system 700 of devices 101, 102, 103, 105) shown. Figure 7 The device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0119] like Figure 7 As shown, the computer system 700 includes a processor (e.g., CPU, central processing unit) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The processor 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0120] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0121] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 709, and / or installed from a removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the method of the present application are executed.

[0122] It should be noted that the computer-readable medium of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0123] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the client computer, partially on the client computer, as a separate software package, partially on the client computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the client computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0124] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the device, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0125] The units involved in the embodiments described in the present application may be implemented by software or by hardware. The described units may also be arranged in a processor, for example, may be described as: a processor comprising a grouping unit, a first processing unit, and a second processing unit. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances. For example, the first processing unit may also be described as "a unit that asynchronously and concurrently executes target tasks corresponding to surface data in multiple surface data groups, and obtains grouping task processing results corresponding to each of the multiple surface data groups."

[0126] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the device, the computer device: groups the surface data in the surface data set according to the number of surface data in the surface data set to be processed to obtain multiple surface data groups; asynchronously and concurrently executes the target tasks corresponding to the surface data in the multiple surface data groups to obtain the grouping task processing results corresponding to each of the multiple surface data groups; obtains the task processing results corresponding to the surface data set according to the grouping task processing results corresponding to each of the multiple surface data groups.

[0127] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A task processing method, comprising: According to the amount of surface data in the surface data set to be processed, grouping the surface data in the surface data set to obtain a plurality of surface data groups; asynchronously and concurrently executing target tasks corresponding to the surface data in the plurality of surface data groups, and obtaining group task processing results corresponding to each of the plurality of surface data groups; The task processing result corresponding to the surface data set is obtained according to the group task processing results corresponding to each of the plurality of surface data groups.

2. The method according to claim 1, wherein: The asynchronously and concurrently executing the target tasks corresponding to the surface data in the plurality of surface data groups to obtain the group task processing results corresponding to each of the plurality of surface data groups includes: Determine a plurality of threads for asynchronously and concurrently executing target tasks corresponding to the surface data in the plurality of surface data groups; According to the types of target tasks corresponding to the surface data in the plurality of surface data groups, determining the target execution modes corresponding to the plurality of surface data groups respectively from a serial execution mode and a multi-threaded asynchronous execution mode; The target tasks are processed by the target execution modes corresponding to the plurality of surface data groups through the plurality of threads, so as to obtain the group task processing results corresponding to the plurality of surface data groups.

3. The method according to claim 2, wherein: The step of determining the target execution modes corresponding to the plurality of surface data groups from a serial execution mode and a multi-threaded asynchronous execution mode according to the types of target tasks corresponding to the surface data in the plurality of surface data groups comprises: For each surface data group among the multiple surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the first type, the serial execution mode is determined as the target execution mode corresponding to the surface data group, wherein when the first type represents that there is overlap between the surface data in the surface data group and the existing surface data in the target map, the surface data in the surface data group and the surface data in the target map are separated by a clipping operation.

4. The method according to claim 3, wherein: The method of processing the target task by using the multiple threads and adopting the target execution modes corresponding to the multiple surface data groups to obtain the group task processing results corresponding to the multiple surface data groups includes: For each surface data group in the multiple surface data groups, target tasks corresponding to multiple surface data in the surface data group are serially executed through a target thread corresponding to the surface data group in the multiple threads to obtain a group task processing result corresponding to the surface data group.

5. The method according to claim 2, wherein: The step of determining the target execution modes corresponding to the plurality of surface data groups from a serial execution mode and a multi-threaded asynchronous execution mode according to the types of target tasks corresponding to the surface data in the plurality of surface data groups comprises: For each surface data group among the multiple surface data groups, in response to determining that the target task corresponding to the surface data in the surface data group is of the second type, the multi-threaded asynchronous execution mode is determined as the target execution mode corresponding to the surface data group, wherein when the second type represents that there is overlap between the surface data in the surface data group and the existing surface data in the target map, the surface data in the surface data group is classified as the surface data in the target map that overlaps with the surface data.

6. The method according to claim 5, wherein: The method of processing the target task by using the multiple threads and adopting the target execution modes corresponding to the multiple surface data groups to obtain the group task processing results corresponding to the multiple surface data groups includes: For each surface data group in the multiple surface data groups, multiple target threads corresponding to the surface data group in the multiple threads are used to asynchronously and concurrently execute target tasks corresponding to multiple surface data in the surface data group to obtain a group task processing result corresponding to the surface data group.

7. The method according to claim 1, wherein: The obtaining the task processing result corresponding to the surface data set according to the group task processing results corresponding to each of the plurality of surface data groups comprises: For each of the plurality of surface data groups, in response to determining that the target tasks corresponding to the surface data in the surface data group have all been processed, blocking and waiting for the processing result of the grouping task corresponding to the previous surface data group of the surface data group; In response to determining that the grouping task processing results corresponding to each of the plurality of surface data groups are obtained, the grouping task processing results corresponding to each of the plurality of surface data groups are serially processed to obtain the task processing results.

8. The method according to claim 1, wherein: The step of grouping the surface data in the surface data set according to the amount of surface data in the surface data set to be processed to obtain a plurality of surface data groups comprises: Determine the number of groups according to the number of surface data in the surface data set to be processed and the number of available virtual machines; The surface data in the surface data set are grouped according to the grouping quantity to obtain the multiple surface data groups.

9. A task processing device, comprising: A grouping unit, configured to group the surface data in the surface data set to be processed according to the amount of surface data in the surface data set to obtain a plurality of surface data groups; A first processing unit is configured to asynchronously and concurrently execute target tasks corresponding to the surface data in the plurality of surface data groups, and obtain group task processing results corresponding to each of the plurality of surface data groups; The second processing unit is configured to obtain the task processing result corresponding to the surface data set according to the group task processing results corresponding to each of the plurality of surface data groups.

10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

11. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.