Image data processing method, system, device and medium based on load balancing

Through the image data processing method based on load balancing, image data is distributed and processed, which solves the problems of high image data processing cost and low efficiency in traditional technology, achieves efficient image data processing, and reduces server burden and cost.

CN109857549BActive Publication Date: 2024-10-11PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910008336.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-01-04
Publication Date
2024-10-11
Estimated Expiration
2039-01-04

AI Technical Summary

Technical Problem

Traditional image data processing technology is costly and inefficient when processing large amounts or complex image data, which can easily lead to server failure or overload and reduce processing efficiency.

Method used

The image data processing method based on load balancing is used to receive image data processing requests through the server, obtain client status data, allocate task data according to the preset allocation method, reduce the computing burden on the server, and use the client for decentralized processing, and finally The results are converted and saved to the database.

Benefits of technology

It reduces server configuration costs, improves image data processing efficiency, avoids server failures, saves costs, and improves image data processing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109857549B_ABST
    Figure CN109857549B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and provides a method, system, device and medium for image data processing based on load balancing, wherein the method comprises: a server obtains task data of target features in an image data processing request; obtains current status data of each client; according to each status data obtained, in accordance with a preset allocation method, the task data of the target features is assigned tasks to obtain target task information of each client; the server sends each target task information to the corresponding client; the client processes the target task information sent by the server based on an image processing algorithm to obtain a task processing result; the client sends the task processing result to the server; the server converts the processing data in the task processing result sent by the client into data in a preset format according to a preset conversion method. The present invention can save costs and improve the efficiency of image data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an image data processing method, system, device and medium based on load balancing. Background Art

[0002] Traditional image data processing technologies process the acquired image data directly on the server. When a large amount of or complex image data is received, a server with high configuration and performance is required to process the large amount of or complex image data in a timely manner, which is costly. If the configuration and performance of the server are not sufficient to process these large amounts of or complex image data, it is easy to cause server failure or server overload, thereby reducing the efficiency of image data processing. Summary of the invention

[0003] Based on this, it is necessary to provide an image data processing method, system, device and medium based on load balancing to address the above technical problems, so as to solve the problems of high cost and low efficiency of image data processing in traditional image data processing methods.

[0004] A method for processing image data based on load balancing includes the following steps performed by a server:

[0005] Receiving an image data processing request sent by a central server, and acquiring task data of image features in the image data processing request;

[0006] Get the current status data of each client;

[0007] According to each of the acquired state data, task allocation is performed on the task data of the image features in accordance with a preset allocation method to obtain target task information of each of the clients;

[0008] According to the preset identification information of each client, each target task information is sent to the corresponding client;

[0009] Receive the task processing result sent by each client, and convert the processing data in the received task processing result into preset format data according to a preset conversion method, save it in the database, and return the processing result of the image data processing request to the central server.

[0010] A method for processing image data based on load balancing includes the following steps performed by a client:

[0011] Based on the image processing algorithm, the target task information sent by the server is processed to obtain the task processing result;

[0012] Sending the task processing result to the server;

[0013] According to the task processing result, the page data on the display device of the client is updated.

[0014] An image data processing system based on load balancing includes a server, which includes:

[0015] A request acquisition module, used to receive an image data processing request sent by a central server, and acquire task data of image features in the image data processing request;

[0016] The status acquisition module is used to obtain the current status data of each client;

[0017] A data allocation module, used to allocate tasks to the task data of the image features according to each of the acquired status data and in a preset allocation manner, so as to obtain target task information of each of the clients;

[0018] An information sending module, used to send each target task information to the corresponding client according to the preset identification information of each client;

[0019] The data conversion module is used to receive the task processing results sent by each of the clients, and convert the processed data in the received task processing results into preset format data according to a preset conversion method, save it in the database, and return the processing results of the image data processing request to the central server.

[0020] An image data processing system based on load balancing includes a client, wherein the client includes:

[0021] The information processing module is used to process the target task information sent by the server based on the image processing algorithm to obtain the task processing result;

[0022] A result sending module, used to send the task processing result to the server;

[0023] The data updating module is used to update the page data on the display device of the client according to the task processing result.

[0024] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned image data processing method based on load balancing when executing the computer program.

[0025] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the image data processing method based on load balancing is implemented.

[0026] The above-mentioned image data processing method, system, device and medium based on load balancing receive the image data processing request sent by the central server through the server, obtain the task data of the image feature in the image data processing request, the server obtains the current status data of the client, and the server allocates tasks to the task data of the image feature according to the acquired status data and a preset allocation method to obtain the target task information. The server needs to allocate tasks to the acquired task data according to the client's status data, and does not need to perform other data processing, which can reduce the amount of data processing calculations on the server, reduce the calculation burden on the server, and thus reduce the configuration cost of the server. Then, the server The target task information is sent to the client. Based on the image processing algorithm, the client processes the target task information sent by the server to obtain the task processing result. The client performs decentralized processing on the target task information according to the task allocation, which can improve the processing efficiency of the task data. Then the client sends the task processing result to the server. The server receives the task processing result and converts the processed data in the received task processing result into a preset format data according to the preset conversion method, saves it in the database, and returns the processing result of the image data processing request to the central server. The client updates the client's page data according to the task processing result to facilitate the storage and management of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0028] Figure 1 is a schematic diagram of an application environment of an image data processing method based on load balancing in one embodiment of the present invention;

[0029] Figure 2 is a flow chart of an image data processing method based on load balancing in one embodiment of the present invention;

[0030] Figure 3 is a flow chart for implementing step S2 in the image data processing method based on load balancing in one embodiment of the present invention;

[0031] Figure 4is a flow chart for implementing step S3 in the image data processing method based on load balancing in one embodiment of the present invention;

[0032] Figure 5 is a flow chart for implementing step S5 in the image data processing method based on load balancing in one embodiment of the present invention;

[0033] Figure 6 is a flow chart for implementing step S7 in the image data processing method based on load balancing in one embodiment of the present invention;

[0034] Figure 7 is a schematic diagram of an image data processing system based on load balancing in one embodiment of the present invention;

[0035] Figure 8 is a schematic diagram of a computer device in one embodiment of the present invention;

[0036] Fig. 9 is another schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] Figure 1 The application environment provided by the embodiment of the present invention is shown, and the application environment includes a central server, a service end and a client end, wherein the central server and the service end, as well as the service end and the client end are connected via a network, the central server sends an image data processing request to the service end, and the service end allocates the task data in the acquired image data processing request according to the image data processing request sent by the central server, and the task data allocated by the service end is sent to the client end, and the client end is used to process the received task data and send the processed data to the service end for storage. The client end may specifically be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices; the server end may specifically be implemented with an independent server or a server cluster composed of multiple servers. The image data processing method based on load balancing provided by the embodiment of the present invention depends on the joint cooperation of the server end and the client end.

[0039] The image data processing method based on load balancing in the embodiment of the present invention specifically includes the following steps performed by the server:

[0040] Receiving an image data processing request sent by a central server, and acquiring task data of image features in the image data processing request;

[0041] Get the current status data of each client;

[0042] According to each of the acquired state data, task allocation is performed on the task data of the image features in accordance with a preset allocation method to obtain target task information of each of the clients;

[0043] According to the preset identification information of each client, each target task information is sent to the corresponding client;

[0044] Receive the task processing result sent by each client, and convert the processing data in the received task processing result into preset format data according to a preset conversion method, save it in the database, and return the processing result of the image data processing request to the central server.

[0045] The image data processing method based on load balancing in the embodiment of the present invention specifically includes the following steps executed by the client:

[0046] Based on the image processing algorithm, the target task information sent by the server is processed to obtain the task processing result;

[0047] Sending the task processing result to the server;

[0048] According to the task processing result, the page data on the display device of the client is updated.

[0049] See also Figure 2 , Figure 2 A method for processing image data based on load balancing provided by this embodiment is shown. Figure 1 The server and client in the example are explained as follows:

[0050] S1: The server receives an image data processing request sent by the central server and obtains task data of image features in the image data processing request.

[0051] Specifically, the server includes resources or function plug-ins for processing image data that are allowed to be publicly accessed or called, wherein there are no restrictions on the resources for processing image data that are allowed to be publicly accessed or called, that is, users with any permissions can access or call them as needed. It can be understood that when a user wants to obtain or master image information, the image needs to be digitized, which will generate a large amount of image feature task data. Therefore, the user needs to call the resources or function plug-ins for processing image data in the server to process these image data, and can send an image data processing request to the server through the central server. The image data processing request is used to request the server to process the acquired image feature task data, wherein the image feature task data includes several image feature tasks, the number of packages for each task, the preset task identifier of each task and the total number of tasks, wherein the image feature task includes image feature extraction data, image feature matching data and image feature comparison data, wherein the image feature extraction data is such as image feature value, image feature vector, etc., the image feature matching data is such as image feature similarity calculation data, and the image feature comparison data is such as the maximum and minimum value selection of feature data.

[0052] For example, in a specific implementation, after the central server successfully sends an image data processing request to the server, the server establishes an image data processing task and can obtain the task data in the image processing request based on the task, thereby achieving complete acquisition of the task data and avoiding loss of task data.

[0053] S2: The server obtains the current status data of each client.

[0054] Specifically, the current status data of the client includes the status of each client and the specific capacity of each client for processing image data, wherein the status of each client includes idle state, tense state and normal state, and the capacity refers to the maximum value of the task volume that the client can currently process. The numerical statistics of the client's capacity can be performed through the node interface corresponding to each client.

[0055] After receiving the image data processing request sent by the central server, the server can send a status data acquisition instruction to the client, or call the node interface to obtain the current status data of each client, so that the subsequent steps can transfer or allocate the image data processing workload of the server to the client for processing based on the current status data of each client obtained. This can reduce the burden on the server, improve the efficiency of image data processing, and reduce the performance requirements on the server, thereby reducing the investment cost of the server and achieving cost savings.

[0056] S3: The server allocates tasks to the task data of the image features according to each state data obtained and in a preset allocation method to obtain the target task information of each client.

[0057] Specifically, the target task information includes the target task data and the preset identification information of each client that the server allocates the task data to according to the allocation method. The server can form a cluster with multiple client sets. After the server obtains the current status data of each client in the cluster, the server allocates the task data according to the preset allocation method, such as the load balancing (Load Balancing) allocation method. Among them, load balancing is divided into local load balancing (Local Load Balance) and global load balancing (Global Load Balance, also called regional load balancing) based on the geographical structure of its application. The load balancing allocation method adopted in this embodiment is the local load balancing allocation method, wherein the local load balancing reasonably allocates the task data to multiple clients in the cluster for common burden through flexible and diverse balancing strategies, wherein the balancing strategies include algorithms such as polling balancing, weighted polling balancing, random balancing and hash balancing.

[0058] Among them, polling refers to allocating task data to clients in sequence, which can be understood as allocating one task to one client at a time, and allocating in sequence until the task data is allocated. The advantage of this strategy is that it is easy to operate and easy to achieve uniform distribution of task data; weighted polling balance is an improved polling balance algorithm, which can be understood as the polling balance algorithm is a weighted polling balance algorithm with the same weight. Different weights can be set for each client in advance to determine the proportion of the number of tasks to be allocated, and then the task data is allocated to the client in sequence according to the proportion. The advantage of this strategy is that it solves the problem of different client performance, that is, the different client capacity; random balance relies on a simple random algorithm to randomly allocate task data to any client. The advantage of this strategy is that it is easy to operate and has a small computational burden; hash balance can rely on estimating the load of each client, that is, the capacity that each client can bear, and then allocates task data to the client according to the ratio between the capacities.

[0059] It should be understood that when processing a large amount of task data and needing to expand or upgrade the client of an existing server and client cluster, it is only necessary to simply add a new node interface and client to the cluster without changing the existing network structure or stopping existing services. This can effectively solve the problems of too many image data processing requests, too much task data, or overload on the server, and does not require expensive expenses to purchase high-performance servers to improve server performance, effectively saving costs, and avoiding single point failures on the server or client that could cause loss of task data or unprocessable losses.

[0060] S4: The server sends each target task information to the corresponding client according to the preset identification information of each client.

[0061] Specifically, according to the preset identification information in the target task information of each client obtained in step S3, the target task information can be sent to the client corresponding to the preset identification information. The present embodiment can specifically adopt the framework of the reliable coordination system (Zookeeper) of the distributed system based on the expansion formula (Quartz) to realize the load-balanced task scheduling of the server and the client to form a cluster, that is, to accurately send the target task information to the client, and can manage multiple node interfaces through the Zookeeper framework of Quartz, find the increase, decrease or abnormal situation of the amount that can be undertaken by the client corresponding to each node interface, and improve the reliability and computing power of the client to process the target task information. The present embodiment, through this decentralized thought, disperses the task data concentrated on the server to the client corresponding to the node interface with the ability to undertake data processing, which can improve the ability to process image data, thereby improving the efficiency of processing image data. In addition, task scheduling can also be performed through a network protocol, or by other means, which is not specifically limited here.

[0062] Among them, Quartz is an open source job scheduling framework. The core of the Quartz framework is the scheduler. The scheduler is responsible for managing the runtime environment of the Quartz application. The scheduler does not do all the work by itself, but relies on some very important components in the framework. Quartz is not just threads and thread management. To ensure scalability, Quartz adopts a multi-threaded architecture. At startup, the framework initializes a set of worker threads, which are used by the scheduler to execute scheduled jobs.

[0063] Among them, ZooKeeper is a distributed, open source distributed application that can coordinate services. It is an open source implementation of Google's Chubby and an important component of Hadoop and Hbase. It is a software that provides consistency services for distributed applications. The functions it provides include: configuration maintenance, domain name services, distributed synchronization, group services, etc.

[0064] S5: The client processes the target task information sent by the server based on the image processing algorithm to obtain the task processing result.

[0065] In this embodiment, before the client receives the target task information sent by the server, in order to ensure the processing efficiency of the target task data by the client, this embodiment pre-installs an object category extension (Object Linking and Embedding (OLE) Control Extension, ocx) component on each client, wherein the ocx component includes a plurality of pre-collected image processing algorithms for processing various image data, that is, the image processing algorithm is encapsulated in the ocx component, which is convenient for calling and managing the image processing algorithm. At the same time, a service management strategy (services.msc) manager is also pre-installed on each client. Among them, the services.msc manager can be used to read the target task data of the client, and then call the image processing algorithm suitable for the target task data in the ocx component to achieve the optimal processing of the target task data, thereby improving the processing efficiency of the image data. The services.msc manager is also used to monitor the current task status of each client, and has a task termination function, which can terminate the process of the client whose target task data has been processed, reduce the resource consumption of the client, and improve the operating efficiency, thereby saving costs and improving the efficiency of processing image data.

[0066] For example, in a specific embodiment, assuming that it is detected that the current task status of the PC device 006 is task processing completed, the services.msc service manager can end the task processing process of the PC device 006 and feed back to the server.

[0067] Since the PC device is a Windows machine, the services.msc service manager can be executed and set to automatically start the services.msc service manager when the PC device is turned on, or set to start the services.msc service manager when a data processing request is received.

[0068] Specifically, after the client receives the target task information sent by the server, the services.msc manager on the client can parse the target task information sent by the server, read the type and specific value of the target task data in the target task information, and then call the image processing algorithm suitable for the target task data in the ocx component to process the target task data to obtain the task processing result of the target task data, wherein the task processing result includes processing data, which is a specific value calculated by the task in the target task data according to the called image processing algorithm, such as the feature value or pixel value of the image.

[0069] S6: The client sends the task processing result to the server.

[0070] Specifically, the client sends the task processing results to the server through a network transmission protocol, wherein the task processing results sent by the client include processing data of the target task information and preset identification information of the client, so that the server can save the received processing data and preset identification information correspondingly, to facilitate the call and management of the processing data.

[0071] The network transmission protocols include, but are not limited to, Internet Control Message Protocol (ICMP), Address Resolution Protocol (ARP), and File Transfer Protocol (FTP).

[0072] S7: The server receives the task processing results sent by each client, and converts the processing data in the received task processing results into preset format data according to the preset conversion method, saves it to the database, and returns the processing results of the image data processing request to the central server.

[0073] Specifically, after the server receives the task processing result sent by each client, in order to facilitate the unified management, storage and use of the data by the server, the server can use a preset conversion method, such as JavaScript Object Notation (JSON) format and Extensible Markup Language (XML) format. In this embodiment, the processing data in the received task processing result can be converted into JSON format data by calling the from Object() method in the JSON Object object, and saved in the database of the server, which is convenient for data management and calling. Then, the processing result of the image data processing request is returned to the central server, which is convenient for users to grasp the processing status of the image data in time. The data in JSON format includes key-value pairs, and each key-value pair includes a parameter name and a parameter value corresponding to the parameter. The key-value pair is a data type commonly used in software development and is the simplest organizational form for data storage. The returned processing result can be the format data obtained by converting the processing data of each task into the content of the processing result, and the preset task identifier corresponding to the format data is noted. The processing result can also include other content, which is not limited here.

[0074] S8: The client updates the page data on the display device of the client according to the task processing result.

[0075] Specifically, after the client processes the target task data and obtains the task processing result, in order to ensure the accuracy and validity of the page data on the client's display device and facilitate the user to receive accurate page data in a timely manner, this embodiment replaces the historical data of the data type in the client's page with the processed data in the task processing result according to the type of processed data, thereby updating the page data on the client and facilitating the user to manage and view the client's page data.

[0076] In this embodiment, the server receives the image data processing request sent by the central server, obtains the task data in the image data processing request, obtains the current status data of the client, and assigns the task data to the task according to the preset assignment method based on the acquired status data to obtain the target task information. The server needs to assign the acquired task data to the task according to the status data of the client, and does not need to perform other data processing, which can reduce the amount of data processing calculations of the server, reduce the calculation burden of the server, and thus reduce the configuration cost of the server. Then, the server sends the target task information to the client. Based on the image processing algorithm, the client processes the received target task information sent by the server to obtain the task processing result. The client performs decentralized processing on the target task information according to the task assignment, which can improve the processing efficiency of the task data. Then, the client sends the task processing result to the server. The server receives the task processing result and converts the processing data in the received task processing result into a preset format data according to the preset conversion method, saves it in the database, and returns the processing result of the image data processing request to the central server. The client updates the page data of the client according to the task processing result, which is convenient for data storage and management.

[0077] In one embodiment, if Figure 3 As shown, in step S2, the server obtains the current status data of each client, wherein the status data includes the available capacity of each client, and specifically includes the following steps:

[0078] S201: The server obtains the node interface of each client, wherein each node interface corresponds to one client.

[0079] Specifically, the network connection between the server and each client includes a node interface for counting the current status data of each client. The node interface is a calling interface left by the operating system to the application program. It is a set of definitions, programs and protocols. It is a general function set with the function of transmitting, counting or receiving data. Among them, each node interface corresponds to a client. The server can execute the command of the server application program by calling the node interface of each client, such as counting the current status data of each client. After the server receives the image data processing request sent by the central server, in order to reduce the performance requirements of the server for processing image data, the workload of the server can be transferred or distributed to the client for processing, which can reduce the work pressure of the server and thus reduce the cost of image data processing. Therefore, the server can obtain the node interface to facilitate the subsequent steps of the server calling the node interface to execute the command in the server application program, such as obtaining the current status data of each client, and further realize the workload transfer or distribution of the server, thereby saving the cost of image data processing.

[0080] S202: The server obtains the current status data of the client corresponding to each node interface and the preset identification information of each client according to the node interface.

[0081] Specifically, this embodiment can count the maximum value of the amount of tasks that the client can currently process by calling the node interface corresponding to each client, and compare the statistically available amount of each client with the preset status threshold range, and then determine the current status of the client based on the comparison result, and then obtain the preset identification information of each client, wherein the preset identification information of each client is used to uniquely identify the client, so as to facilitate the management, calling and maintenance of the client. The preset identification information can specifically be a number, graphic or character label, etc., which can be set according to actual application requirements and is not limited here. By comparing the statistically obtained available capacity of each client with the preset state threshold range, the current state of the client is determined based on the comparison result, specifically including: if the available capacity of client A is greater than the preset state threshold range, then the client A is marked as idle; if the available capacity of client B is less than the preset state threshold range, then the client B is marked as tense; if the available capacity of client C is within the preset state threshold range, then the client C is marked as normal, wherein the preset state threshold range can be set according to actual application requirements, and is not limited here, such as [40%, 50%].

[0082] For example, in a specific embodiment, assuming that the preset status threshold range is [30%, 60%], if a node interface h counts that the capacity of a client with preset identification information numbered "001" is 80%, the capacity is compared with the preset status threshold range, and it is found that the capacity is greater than the preset status threshold range, then the status of the client can be obtained as idle, and then the current status data of the client can be obtained as "client: preset identification information is numbered 001, status: idle, capacity: 80%".

[0083] In this embodiment, by obtaining the node interface of each client, and then, based on the node interface, obtaining the current status data of the client corresponding to each node interface, as well as the preset identification information of each client, it is possible to transfer or distribute the workload of the server to the client for processing by obtaining the status data of each client, thereby reducing the workload of the server, thereby reducing the cost of image data processing and ensuring the efficiency of image data processing.

[0084] In one embodiment, if Figure 4As shown, in step S3, the state data includes the device state, and the device state includes the idle state, the tense state and the normal state. That is, the server allocates the task data according to each state data obtained and in accordance with the preset allocation method, and obtains the target task information of each client, which specifically includes the following steps:

[0085] S301: The server selects clients whose device status is idle and clients whose device status is normal as target clients according to the device status included in the status data.

[0086] Specifically, after the server obtains the current status data of the client, in order to ensure the rationalization of task data allocation and optimize the efficiency of task data processing, this embodiment screens out clients with idle device status and normal device status as target clients, and eliminates clients with tense device status, so that target task information can be assigned to these target clients in the future, avoiding the burden of processing image data for clients with tense device status, thereby rationalizing task allocation.

[0087] S302: The server allocates the task data according to the ratio between the available capacity of each target client, and obtains the target task data corresponding to each target client.

[0088] Specifically, after the server obtains the current status data of the client and filters out the target client, in order to achieve balanced distribution of task data, balance the load of the target clients, reduce the data processing burden of the server, and thus improve the processing efficiency of the image data, this embodiment obtains the available capacity of the target client and calculates the ratio between the available capacity of each target client, and then distributes the task data obtained by the server according to the ratio to obtain the task capacity that each target client can load, that is, the target task data corresponding to each target client.

[0089] For example, in a specific embodiment, assuming that the selected target clients have "client preset identification information: 002, status: idle state, available capacity: 100%", "client preset identification information: 003, status: idle state, available capacity: 80%" and "client preset identification information: 004, status: normal state, available capacity: 60%", the ratio of the available capacity of these three target clients is calculated, that is, 100%:80%:60%=5:4:3. Assuming that the total number of tasks in the acquired task data is 120, according to the ratio of 5:4:3 between the available capacity of the three target clients, the task allocation is performed, and the target task data of the three target clients are 50 tasks, 40 tasks and 30 tasks respectively.

[0090] It should be noted that the target task data also includes task attributes such as the task type, number of task packages and preset task identifier of each task assigned to each task, so as to facilitate the processing or management of the target task data in subsequent steps.

[0091] S303: The server combines each target task data with the preset identification information of the corresponding target client to form the target task information of each target client.

[0092] For example, in a specific embodiment, continuing to use the example of step S302, the preset identification information of the three target clients are "client preset identification information: 002", "client preset identification information: 003" and "client preset identification information: 004", and the target task data of the three target clients are 50 tasks, 40 tasks and 30 tasks, respectively. Each target task data is combined with the preset identification information of its corresponding target client, and the target task information of the three target clients is obtained as "client preset identification information: 002, target task data: 50 tasks", "client preset identification information: 003, target task data: 40 tasks" and "client preset identification information: 004, target task data: 30 tasks".

[0093] In this embodiment, by screening out clients with idle device status and clients with normal device status as target clients based on the device status included in the status data, task data is allocated based on the ratio of the capacity that each target client can undertake to obtain target task data corresponding to each target client, and each target task data is combined with preset identification information of its corresponding target client to form the target task information of each target client. In order to achieve balanced distribution of task data, the target clients are load balanced, reducing the data processing burden on the server, thereby improving the processing efficiency of image data.

[0094] In one embodiment, if Figure 5 As shown, in step S5, the client processes the target task information sent by the server based on the image processing algorithm, and obtains the task processing result, which specifically includes the following steps:

[0095] S501: The client sets a priority for the target task according to the order of the number of packets of each target task in the target task data in the target task information from large to small.

[0096] Specifically, after the client receives the target task information sent by the server, the client can give priority to processing tasks with high complexity and large computational workload, which can speed up the processing of the target task information to a certain extent, thereby improving the processing efficiency of the image data. This embodiment sets priorities for the target tasks according to the order of the number of packets of each target task in the target task data from large to small through the acquired target task data, so that subsequent target clients give priority to processing target tasks with high priorities.

[0097] For example, in a specific embodiment, assuming a target client "preset identification information: 006", the target task data in the received target task information is 3 target tasks, the packet numbers of these 3 target tasks are "Task 1 is 200k", "Task 2 is 300k" and "Task 3 is 400k", respectively. The priorities of the target tasks are set according to the order of the packet numbers of these 3 target tasks from large to small, that is, 400k>300k>200k, and task 3 takes precedence over task 2 which takes precedence over task 1.

[0098] S502: The client starts the object category expansion component of the client according to the preset timed task, and processes the target task according to the priority level according to the image processing algorithm in the object category expansion component to obtain the task processing result.

[0099] Specifically, the preset timed task can be specifically to start the object category expansion component of the client according to the preset time interval. Preferably, the time interval can be set to 1 minute, 30 seconds or 10 seconds, but it is not limited thereto. It can be set according to the needs of actual application and is not limited here. Among them, the object category expansion component of the client is such as an ocx component, an executable program (exe file, exe) component or a delay-locked loop (Delay-locked Loop, dll) component, etc. In this embodiment, by enabling the ocx component pre-encapsulated with multiple image processing algorithms, according to the priority of the acquired target task, the target task with the best level is processed first. According to the task type and task package number of the target task acquired, the client calls the image processing algorithm adapted to the task type and the task package number in the ocx component to process data, and obtains the processing data of the target task. Then, the processing data of all target tasks in the target task data, the preset task identifier of each target task and the preset identifier information of the target client are combined to obtain the task processing result of the target client.

[0100] In this embodiment, the priority of the target task is set by following the order of the number of packets of each target task in the target task data in the target task information from large to small, and then, according to the preset scheduled task, the object category expansion component of the client is started, and according to the image processing algorithm in the object category expansion component, the target task is processed according to the priority to obtain the task processing result, which can give priority to tasks with high complexity and large amount of calculation, thereby improving the processing efficiency of the target task to a certain extent, thereby improving the processing efficiency of the image data.

[0101] In one embodiment, if Figure 6 As shown, in step S7, the server receives the task processing result sent by each client, and converts the processing data in the received task processing result into a preset format data according to a preset conversion method, saves it in the database, and returns the processing result of the image data processing request to the central server. Specifically, the following steps are also included:

[0102] S701: The server constructs a key-value pair according to a preset data format.

[0103] Specifically, after the server receives the task processing results sent by each client, in order to better manage and save the processed data in each task processing result, this embodiment uses a preset data format, such as JSON format. Since any supported data type can be represented by JSON format data, such as strings, numbers, objects, arrays, etc., this embodiment uses JSON format data to construct key-value pairs based on the processed data in the received task processing results, wherein the key-value pair includes a key (key) which is the number of the stored data, and a value (value) which is the data to be stored.

[0104] S702: The server uses the preset task identifier of each task in each task processing result as the parameter name in the key-value pair, and uses the processing data value of each task in the task processing result as the parameter value of the parameter name to obtain format data.

[0105] Specifically, after the server constructs key-value pairs that are adapted to the processing data in the task processing results according to the preset data format, based on the form of the key-value pairs, this embodiment uses the preset task identifier of each task in each task processing result as the key (key) of the key-value pair to store the data number, that is, the parameter name of the key, and uses the processing data value of each task as the value (value) of the key-value pair as the data to be stored, that is, the parameter value in the value corresponding to the parameter name of the key.

[0106] For example, in a specific embodiment, assuming a constructed key-value pair format such as: key""=value"", the preset task identifiers of the three tasks in a task processing result received by the server are n, m and k, respectively, and the processing data values ​​of the three tasks are 1, 2 and 3, respectively, the preset task identifier is filled in key as the parameter name, and the processing data value is filled in value as the parameter value of the parameter name, and the format data of the three tasks are key"n"=value"1"; key"m"=value"2"; key"k"=value"3".

[0107] In this embodiment, the server constructs a key-value pair according to a preset data format, and then uses the preset task identifier of each task in each task processing result as the parameter name in the key-value pair, and uses the processed data value of each task in the task processing result as the parameter value of the parameter name to obtain format data, thereby realizing format conversion of any supported data type and obtaining unified and standardized format data, which is convenient for the server to save, call and manage the format data.

[0108] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0109] In one embodiment, a load balancing-based image data processing system is provided, and the load balancing-based image data processing system corresponds one-to-one to the load balancing-based image data processing method in the above embodiment. Figure 7 As shown, the image data processing system based on load balancing includes a request acquisition module 701, a state acquisition module 702, a data allocation module 703, an information sending module 704, an information processing module 705, a result sending module 706, a data conversion module 707 and a data update module 708.

[0110] The detailed description of each functional module is as follows:

[0111] The image data processing system based on load balancing includes a server and a client. The server includes:

[0112] The request acquisition module 701 is used to receive the image data processing request sent by the central server and obtain the task data of the image feature in the image data processing request;

[0113] The status acquisition module 702 is used to obtain the current status data of each client;

[0114] The data allocation module 703 is used to allocate tasks to the task data of the image features according to each state data obtained and in accordance with a preset allocation method, so as to obtain target task information of each client;

[0115] The information sending module 704 is used to send each target task information to the corresponding client according to the preset identification information of each client;

[0116] The data conversion module 707 is used to receive the task processing results sent by each client, and convert the processing data in the received task processing results into preset format data according to a preset conversion method, save it in the database, and return the processing results of the image data processing request to the central server.

[0117] The client includes:

[0118] The information processing module 705 is used to process the target task information sent by the server based on the image processing algorithm to obtain the task processing result;

[0119] The result sending module 706 is used to send the task processing result to the server;

[0120] The data updating module 708 is used to update the page data on the display device of the client according to the task processing result.

[0121] Furthermore, the status acquisition module 702 of the server includes:

[0122] The interface acquisition unit 7021 is used to acquire the node interface of each client, wherein each node interface corresponds to one client;

[0123] The data acquisition unit 7022 is used to acquire the current status data of the client corresponding to each node interface and the preset identification information of each client according to the node interface.

[0124] Furthermore, the data distribution module 703 of the server includes:

[0125] The device screening unit 7031 is used to screen out clients whose device status is idle and clients whose device status is normal as target clients according to the device status included in the status data;

[0126] The task allocation unit 7032 is used to allocate the task data according to the ratio between the available quantities of each target client, and obtain the target task data corresponding to each target client;

[0127] The information composition unit 7033 is used to combine each target task data and the preset identification information of the corresponding target client to compose the target task information of each target client.

[0128] Furthermore, the information processing module 705 of the client includes:

[0129] The task sorting unit 7051 is used to set the priority of the target task according to the order of the number of packets of each target task in the target task data in the target task information from large to small;

[0130] The task processing unit 7052 is used to start the object category expansion component of the client according to the preset timed task, and process the target task according to the priority based on the image processing algorithm in the object category expansion component to obtain the task processing result.

[0131] Furthermore, the data conversion module 707 of the server includes:

[0132] The key-value construction unit 7071 is used to construct a key-value pair according to a preset data format;

[0133] The data generating unit 7072 is used to use the preset task identifier of each task in each task processing result as the parameter name in the key-value pair, and use the processing data value of each task in the task processing result as the parameter value of the parameter name to obtain format data.

[0134] For the specific definition of the image data processing system based on load balancing, please refer to the definition of the image data processing method based on load balancing above, which will not be repeated here. Each module in the above-mentioned image data processing system based on load balancing can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0135] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store image processing data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing image data based on load balancing is implemented.

[0136] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, a method for processing image data based on load balancing is implemented.

[0137] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the image data processing method based on load balancing in the above embodiment are implemented, for example Figure 2 The steps S1 to S8 shown are performed by the server or client. Alternatively, when the processor executes the computer program, the functions of each module / unit of the image data processing system based on load balancing in the above embodiment are realized, for example Figure 7 The functions of the server or client in modules 701 to 708 are shown in detail. To avoid repetition, they are not described here.

[0138] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps performed by the server or client in the text processing method in the above method embodiment are implemented, or when the computer program is executed by a processor, the functions of each module / unit of the server or client in the image data processing system based on load balancing in the above system embodiment are implemented. To avoid repetition, it will not be repeated here.

[0139] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink), DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0140] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.

[0141] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for processing image data based on load balancing, characterized in that: The image data processing method based on load balancing includes the following steps performed by the server: Receive an image data processing request sent by a central server, and obtain task data of image features in the image data processing request, wherein the task data of the image features includes tasks of several image features, the number of packages of each task, a preset task identifier of each task, and the total number of tasks, wherein the task of the image features includes extraction data of image features, matching data of image features, and comparison data of image features; Acquire the current status data of each client, the status data including the device status and the capacity of each client, the device status including the idle state, the tense state and the normal state, wherein the device status is determined by comparing the capacity of each client with a preset status threshold range; According to each of the acquired state data, task allocation is performed on the task data of the image features in accordance with a preset allocation method to obtain target task information of each of the clients; According to the preset identification information of each client, each target task information is sent to the corresponding client; Receive the task processing result sent by each client, and convert the processed data in the received task processing result into preset format data according to a preset conversion method, save it in a database, and return the processing result of the image data processing request to the central server, wherein the task processing result is obtained by processing the target task information based on an image processing algorithm; The task processing result is obtained by processing the target task information based on an image processing algorithm, and includes: Setting a priority for the target task according to the order of the number of packets of each target task in the target task data in the target task information from large to small; According to the preset timed task, the object category expansion component is started, and according to the image processing algorithm in the object category expansion component and the priority, the target task is processed to obtain a task processing result; The method of starting the object category expansion component according to the preset timed task and processing the target task according to the priority level according to the image processing algorithm in the object category expansion component to obtain the task processing result includes: activating an ocx component pre-packaged with a plurality of image processing algorithms, and processing the target task according to the priority of the acquired target task, wherein the target task includes a task type and a task package number, and processing the target task includes: calling an image processing algorithm adapted to the task type and the task package number in the ocx component to perform data processing; The processing data of all target tasks in the target task, the preset task identifier of each target task and the preset identifier information of the client are combined to obtain the task processing result.

2. The image data processing method based on load balancing according to claim 1, characterized in that: Obtaining the current status data of each client includes: Obtaining a node interface of each of the clients, wherein each node interface corresponds to one of the clients; According to the node interface, the current status data of the client corresponding to each node interface and the preset identification information of each client are obtained.

3. The image data processing method based on load balancing according to claim 1, characterized in that: According to each of the acquired state data, task allocation is performed on the task data of the image features in a preset allocation manner to obtain target task information of each of the clients, including: According to the device status included in the status data, filtering out clients whose device status is the idle state and clients whose device status is the normal state as target clients; Allocating the task data according to the ratio between the available capacity of each target client to obtain target task data corresponding to each target client; Each target task data and the preset identification information of the corresponding target client are combined to form the target task information of each target client.

4. The image data processing method based on load balancing according to claim 1, characterized in that: The receiving of the task processing result sent by each of the clients, and converting the processing data in the received task processing result into preset format data according to a preset conversion method, saving the data in the database, and returning the processing result of the image data processing request to the central server includes: Construct key-value pairs according to the preset data format; The preset task identifier of each task in each task processing result is used as the parameter name in the key-value pair, and the processing data value of each task in the task processing result is used as the parameter value of the parameter name to obtain the format data.

5. A method for processing image data based on load balancing, characterized in that: The image data processing method based on load balancing includes the following steps performed by the client: Based on the image processing algorithm, the target task information received and sent by the server is processed to obtain the task processing result, wherein the target task information is obtained by the server assigning tasks to the task data of the image feature according to the current status data of the client and in accordance with a preset allocation method, the status data includes the device status and the capacity of the client, the device status includes an idle state, a tense state and a normal state, and the device status is determined by comparing the capacity of the client with a preset state threshold range, wherein the task data of the image feature includes tasks of several image features, the number of packages of each task, a preset task identifier of each task and the total number of tasks, and the tasks of the image feature include image feature extraction data, image feature matching data and image feature comparison data; Sending the task processing result to the server, so that the server converts the processed data in the task processing result into preset format data according to a preset conversion method, and saves it in a database; According to the task processing result, updating the page data on the display device of the client; The target task information sent by the server is processed based on the image processing algorithm to obtain the task processing result including: Setting a priority for the target task according to the order of the number of packets of each target task in the target task data in the target task information from large to small; According to the preset timed task, the object category expansion component of the client is started, and according to the image processing algorithm in the object category expansion component and the priority, the target task is processed to obtain a task processing result; The method of starting the object category expansion component according to the preset timed task and processing the target task according to the priority level according to the image processing algorithm in the object category expansion component to obtain the task processing result includes: activating an ocx component pre-packaged with a plurality of image processing algorithms, and processing the target task according to the priority of the acquired target task, wherein the target task includes a task type and a task package number, and processing the target task includes: calling an image processing algorithm adapted to the task type and the task package number in the ocx component to perform data processing; The processing data of all target tasks in the target task, the preset task identifier of each target task and the preset identifier information of the client are combined to obtain the task processing result.

6. An image data processing system based on load balancing, characterized in that: The image data processing system based on load balancing includes a server, and the server includes: A request acquisition module, used to receive an image data processing request sent by a central server, and acquire task data of image features in the image data processing request, wherein the task data of the image features includes tasks of several image features, the number of packages of each task, a preset task identifier of each task, and the total number of tasks, wherein the tasks of the image features include extraction data of image features, matching data of image features, and comparison data of image features; A status acquisition module is used to acquire the current status data of each client, wherein the status data includes the device status and the capacity of each client, wherein the device status includes an idle state, a tense state and a normal state, wherein the device status is determined by comparing the capacity of each client with a preset status threshold range; A data allocation module, used to allocate tasks to the task data of the image features according to each of the acquired status data and in a preset allocation manner, so as to obtain target task information of each of the clients; An information sending module, used to send each target task information to the corresponding client according to the preset identification information of each client; A data conversion module, used for receiving the task processing result sent by each of the clients, and converting the processed data in the received task processing result into preset format data according to a preset conversion method, saving it in a database, and returning the processing result of the image data processing request to the central server, wherein the task processing result is obtained by processing the target task information based on an image processing algorithm; The task processing result is obtained by processing the target task information based on an image processing algorithm, and includes: Setting a priority for the target task according to the order of the number of packets of each target task in the target task data in the target task information from large to small; According to the preset timed task, the object category expansion component is started, and according to the image processing algorithm in the object category expansion component and the priority, the target task is processed to obtain a task processing result; The method of starting the object category expansion component according to the preset timed task and processing the target task according to the priority level according to the image processing algorithm in the object category expansion component to obtain the task processing result includes: activating an ocx component pre-packaged with a plurality of image processing algorithms, and processing the target task according to the priority of the acquired target task, wherein the target task includes a task type and a task package number, and processing the target task includes: calling an image processing algorithm adapted to the task type and the task package number in the ocx component to perform data processing; The processing data of all target tasks in the target task, the preset task identifier of each target task and the preset identifier information of the client are combined to obtain the task processing result.

7. An image data processing system based on load balancing, characterized in that: The image data processing system based on load balancing includes a client, and the client includes: An information processing module is used to process the target task information sent by the server based on the image processing algorithm to obtain the task processing result, wherein the target task information is obtained by the server assigning tasks to the task data of the image feature according to the current status data of the client in accordance with a preset allocation method, the status data includes the device status and the capacity of the client, the device status includes an idle state, a tense state and a normal state, and the device status is determined by comparing the capacity of the client with a preset state threshold range, wherein the task data of the image feature includes tasks of several image features, the number of packages of each task, a preset task identifier of each task and the total number of tasks, and the tasks of the image feature include image feature extraction data, image feature matching data and image feature comparison data; A result sending module, used for sending the task processing result to the server, so that the server converts the processed data in the task processing result into a preset format data according to a preset conversion method, and saves it in a database; A data updating module, used for updating the page data on the display device of the client according to the task processing result; The information processing module is further used for: Setting a priority for the target task according to the order of the number of packets of each target task in the target task data in the target task information from large to small; According to the preset timed task, the object category expansion component of the client is started, and according to the image processing algorithm in the object category expansion component and the priority, the target task is processed to obtain a task processing result; The method of starting the object category expansion component according to the preset timed task and processing the target task according to the priority level according to the image processing algorithm in the object category expansion component to obtain the task processing result includes: activating an ocx component pre-packaged with a plurality of image processing algorithms, and processing the target task according to the priority of the acquired target task, wherein the target task includes a task type and a task package number, and processing the target task includes: calling an image processing algorithm adapted to the task type and the task package number in the ocx component to perform data processing; The processing data of all target tasks in the target task, the preset task identifier of each target task and the preset identifier information of the client are combined to obtain the task processing result.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the image data processing method based on load balancing as described in any one of claims 1 to 4 is implemented, or when the processor executes the computer program, the image data processing method based on load balancing as described in claim 5 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the image data processing method based on load balancing as described in any one of claims 1 to 4 is implemented, or when the processor executes the computer program, the image data processing method based on load balancing as described in claim 5 is implemented.