CN113765958A - Job task processing method and job client - Google Patents

Job task processing method and job client Download PDF

Info

Publication number
CN113765958A
CN113765958A CN202010529110.2A CN202010529110A CN113765958A CN 113765958 A CN113765958 A CN 113765958A CN 202010529110 A CN202010529110 A CN 202010529110A CN 113765958 A CN113765958 A CN 113765958A
Authority
CN
China
Prior art keywords
task
job
client
address
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010529110.2A
Other languages
Chinese (zh)
Other versions
CN113765958B (en
Inventor
姚刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202010529110.2A priority Critical patent/CN113765958B/en
Publication of CN113765958A publication Critical patent/CN113765958A/en
Application granted granted Critical
Publication of CN113765958B publication Critical patent/CN113765958B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a job task processing method and a job client, and relates to the technical field of computers. One embodiment of the method comprises: acquiring a target IP address and a job task corresponding to a management client, and sending a task execution request of the job task to the management client according to the target IP address so that the management client feeds back response information according to the task state of the job task; receiving response information fed back by the management client, and executing the job task when the response information indicates that the job task is allowed to be executed; and after the execution of the job task is finished, returning a task execution result. According to the embodiment, the operation client side obtains the operation task, then executes the operation task according to the response information fed back by the management client side, and returns the task execution result, so that the warehouse production process is ensured to be free from depending on the server side, the network transmission problem is avoided, the return data of the server side is not required to wait, and the warehouse production efficiency is improved.

Description

Job task processing method and job client
Technical Field
The invention relates to the technical field of logistics storage, in particular to an operation task processing method and an operation client.
Background
With the development of logistics storage technology, more and more service parties adopt the automatic warehouse to carry out order production. In the existing warehouse production, operations such as shelving, picking, rechecking, checking and the like are performed through a client (such as a local computer and an RF code scanning gun), and in the operation process, the client sends data to a server in real time to wait for the server to process and return a result. The RF code scanning gun is a device that completes functions of data acquisition, transmission, and the like by using a Radio Frequency Identification (RFID) technology, and is convenient to carry.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the client needs to interact with the server once in each operation step, if the network condition between the client and the server is poor, the processing delay is very high, the production efficiency of the warehouse is affected, and the warehouse is stopped under the condition of network disconnection.
Disclosure of Invention
In view of this, embodiments of the present invention provide a job task processing method and a job client, where a job task is obtained by a job client, and then the job task is executed according to response information fed back by a management client, and a task execution result is returned, so that it is ensured that a server is not required to be relied on in a warehouse production process, a network transmission problem does not exist, and data returned by the server is not required to be waited for, thereby improving the warehouse production efficiency.
To achieve the above object, according to an aspect of an embodiment of the present invention, a job task processing method is provided.
The job task processing method of the embodiment of the invention is executed by a job client, and comprises the following steps: acquiring a target IP address and a job task corresponding to a management client, and sending a task execution request of the job task to the management client according to the target IP address so that the management client feeds back response information according to a task state of the job task; receiving the response information fed back by the management client, and executing the job task when the response information indicates that the job task is allowed to be executed; and after the execution of the job task is finished, returning a task execution result.
Optionally, the feeding back response information by the management client according to the task state of the job task includes: when the task execution request is received, judging whether a custom Key containing the job task is in a locked state; if the Key is in a locked state, feeding back response information which does not allow the job task to be executed; if the Key is in an unlocked state and the job task is not completed, the Key is marked as a locked state, and response information allowing the job task to be executed is fed back.
Optionally, after the execution of the job task is finished, the method further includes: storing the task execution result to a local storage device, and updating the task state of the job task to be completed; returning task execution results, including: and acquiring the task execution result from the local storage equipment and sending the task execution result in a timing scheduling mode.
Optionally, before the step of acquiring the job task, the method further includes: sending a registration message to a server; the registration message comprises an IP address and a port of the job client, and is used for the server to select the target IP address from the IP addresses of the job client according to registration time and send the job task to the job client according to the IP address and the port.
Optionally, after the step of sending the registration message to the server, the method further includes: sending a heartbeat message to the server; and the heartbeat message is used for reselecting the target IP address when the server determines that the heartbeat message from the target IP address is not received in a preset time period.
Optionally, the job client and the server maintain a long connection in a websocket manner.
Optionally, after the step of acquiring the job task, the method further includes: and storing the job task to a local storage device, so that when the job client and the server are disconnected, a next job task is obtained from the local storage device, and the next job task is processed.
To achieve the above object, according to another aspect of the embodiments of the present invention, a client for business task processing is provided.
An embodiment of the present invention provides a job client for task processing, including: the acquisition and sending module is used for acquiring a target IP address and an operation task corresponding to a management client, and sending a task execution request of the operation task to the management client according to the target IP address so that the management client feeds back response information according to a task state of the operation task; the receiving execution module is used for receiving the response information fed back by the management client and executing the job task when the response information indicates that the job task is allowed to be executed; and the result returning module is used for returning the task execution result after the execution of the operation task is finished.
Optionally, the job client further includes: the storage updating module is used for storing the task execution result to local storage equipment after the execution of the job task is finished, and updating the task state of the job task to be finished; the result returning module is further configured to: and acquiring the task execution result from the local storage equipment and sending the task execution result in a timing scheduling mode.
Optionally, the job client further includes: the first message sending module is used for sending a registration message to the server; the registration message comprises the IP address and the port of the job client, and is used for the server to select the target IP address from the IP addresses of the job client according to the registration time and send the job task to the job client according to the IP address and the port of the job client.
Optionally, the job client further includes: the second message sending module is used for sending heartbeat messages to the server; and the heartbeat message is used for reselecting the target IP address when the server determines that the heartbeat message from the target IP address is not received in a preset time period.
Optionally, the job client and the server maintain a long connection in a websocket manner.
Optionally, the client further includes: and the task saving module is used for saving the job task to a local storage device so as to obtain the next job task from the local storage device and process the next job task when the job client and the server are disconnected.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement a job task processing method according to an embodiment of the present invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has stored thereon a computer program that, when executed by a processor, implements a job task processing method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the operation client side obtains the operation task, then executes the operation task according to the response information fed back by the management client side, and returns the task execution result, so that the warehouse production process is ensured to be free from depending on the server side, the network transmission problem is avoided, the return data of the server side is not required to be waited, and the warehouse production efficiency is improved; only one operation client can execute the operation task at the same time in a distributed locking mode; the task execution result is returned in a timing scheduling mode, so that asynchronous transmission of the task execution result is realized, and the task execution efficiency is not influenced; selecting a target IP address based on the registration message, and executing the distribution function of the job task by a management client corresponding to the target IP address to reduce the pressure of a server; communication connection between the operation client and the service end is ensured through heartbeat detection and long connection, and long-term multiple interaction between the operation client and the service end is realized; the job tasks are stored locally, so that the job tasks received by the job client are not affected under the condition of network disconnection, and continuous production can be realized.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a diagram illustrating the main steps of a job task processing method according to a first embodiment of the present invention;
FIG. 2 is a timing chart of a job task processing method according to a second embodiment of the present invention;
FIG. 3 is a timing diagram of a job task processing method according to a third embodiment of the present invention;
FIG. 4 is a timing diagram of a job task processing method according to a fourth embodiment of the present invention;
FIG. 5 is a schematic diagram of the major modules of a job client for job task processing, according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 7 is a schematic diagram of a computer apparatus suitable for use in an electronic device to implement an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram illustrating main steps of a job task processing method according to a first embodiment of the present invention. As shown in fig. 1, a job task processing method according to a first embodiment of the present invention mainly includes the following steps:
step S101: the method comprises the steps of obtaining a target IP address and a job task corresponding to a management client, and sending a task execution request of the job task to the management client according to the target IP address so that the management client feeds back response information according to a task state of the job task. The server side issues a target IP Address (Internet Protocol Address) and a job task to each job client side. And after receiving the job task, the job client sends a task execution request to the corresponding management client according to the target IP address, wherein the task execution request comprises a task identifier of the job task to be executed.
The management client acquires the task state of the corresponding job task according to the task identifier, and if the task state is a locked state or a completed state, the management client feeds back response information which does not allow the job task to be executed to the job client; if the task state is the initial state (i.e., unlocked and not complete), response information allowing the job task to be executed is fed back to the job client.
Step S102: and receiving the response information fed back by the management client, and executing the job task when the response information indicates that the job task is allowed to be executed. And after receiving the response information fed back by the management client, the job client judges whether the response information indicates that the job task is allowed to be executed, and if the response information indicates that the job task is allowed to be executed, the job task can be executed by the operator and/or the job client.
Step S103: and after the execution of the job task is finished, returning a task execution result. And after the operation client finishes executing the operation task, the task execution result is transmitted back to the server. In the embodiment, a calculation sinking scheme is adopted, the server issues data to the operation client in the form of the operation task, and after the operation of the operation client finishes the operation task, the task execution result is transmitted back to the server, so that the dependence on the server is avoided in the warehouse production process, the network transmission problem does not exist, and the warehouse production efficiency is improved.
In order to ensure that only one job client can execute a job task at the same time, in the second embodiment, only one job client can execute the job task at the same time by using a distributed lock mode, which is specifically implemented as follows.
Fig. 2 is a timing chart of a job task processing method according to a second embodiment of the present invention. As shown in fig. 2, the job task processing method according to the second embodiment of the present invention mainly includes the following steps:
step S201: and the plurality of job clients respectively send registration messages to the server. And the plurality of job clients respectively send registration messages to the server through respective http (hyper text transfer protocol) interfaces. Wherein the registration message includes the IP address and port of the job client.
Step S202: and the server records the IP address and the port of each operation client, selects a target IP address according to the registration time, and respectively issues the target IP address to the plurality of operation clients. And the server selects the IP address with the earliest registration time as a target IP address, the operation client corresponding to the target IP address is the management client, and then the target IP address is respectively issued to each operation client. In the embodiment, the IP address and the port of each job client may also be issued to other job clients.
Step S203: and the server generates a job task and issues the job task to all the registered job clients. The server side generates operation tasks according to the task number, the task type, the storage area, the storage position, the article name, the article number, the operation tasks, the operation time, the state and the like, and sends the operation tasks to all registered operation client sides.
Step S204: and after receiving the job task, the current job client sends a task execution request of the job task to the corresponding management client according to the target IP address. And the current job client is the job client which currently initiates the task execution request. And after receiving the instruction for executing the job task, the current job client sends a task execution request of the job task to the management client. Wherein the IP address of the management client is the target IP address.
Step S205: the management client judges whether the current operation client is allowed to execute the operation task or not in a distributed lock mode, and feeds back response information to the current operation client. The management client adopts a distributed lock to judge whether the current operation client is allowed to execute the operation task, and if the operation task is in a locked or finished state, the operation is not allowed to be executed; if the job task is in the initial state (i.e., unlocked and not completed), execution is allowed, and the management client marks the executed job task as locked and notifies other job clients.
In the embodiment, the management client judges whether a custom Key (a main Key) containing a job task is in a locked state, and if the Key is in the locked state and indicates that the job task is being executed by other job clients, the management client feeds back response information which does not allow the job task to be executed; if the Key is in an unlocked state and the job task is not completed, the Key is marked as a locked state, and response information allowing the job task to be executed is fed back. The Key is a unique identifier of the lock, and can be a character string composed of numbers, numbers and/or letters, and the like.
Step S206: after receiving the response information fed back by the management client, the current job client determines whether to allow the job task to be executed, and if the job task is allowed to be executed, step S207 is executed; if execution is not allowed, no processing is done. And the current operation client analyzes the response information to obtain a result of whether the operation task is allowed to be executed.
Step S207: the current job client executes the job task. If so, the current job client executes the job task.
Step S208: and after the execution of the job task is finished, the current job client sends the task execution result to the server. And after the execution of the job task is finished, the current job client synchronously or asynchronously sends the task execution result to the server.
Since synchronous transmission is direct transmission after the execution of the job task is finished, the production efficiency of the warehouse is affected. If the connection between the job client and the server is disconnected due to the network condition, the job task cannot be executed successfully. Therefore, in a preferred embodiment, the task execution result of the job task whose execution is finished can be asynchronously sent to the server. Specifically, the task execution result of the job task whose execution is finished may be stored locally, and then the task execution result may be obtained locally by a timing scheduling manner (for example, once in 2 minutes) and sent to the server.
It should be noted that fig. 2 only shows the information interaction process between the current job client and the server and between the current job client and the management client. In the embodiment, a plurality of job clients are provided, and the current job client and the management client are both one of all the job clients. Each operation client sends a registration message to the server and receives a target IP address and an operation task issued by the server.
Under the condition that the operation client and the server are disconnected, in order to further ensure the production efficiency of the warehouse, the operation tasks can be stored in the local storage device, and the execution of the operation tasks cannot be influenced by the network condition.
Fig. 3 is a timing chart of a job task processing method according to a third embodiment of the present invention. As shown in fig. 3, the job task processing method according to the third embodiment of the present invention mainly includes the following steps:
step S301: and the plurality of job clients respectively send registration messages to the server. The specific implementation of this step is shown in step S201.
Step S302: and the server records the IP address and the port of each operation client, selects a target IP address according to the registration time, and respectively transmits all the IP addresses and the ports to each operation client. And the server side issues the IP address, the port and the target IP address of the registered job client side to each job client side.
Step S303: and the plurality of operation clients respectively send heartbeat messages to the server. The heartbeat message may be a small piece of custom string text information, such as a "ping".
Step S304: when the server determines that the heartbeat message from a certain IP address is not received within a preset time period, judging whether the IP address is a target IP address, if so, executing a step S305; if not, step S306 is executed.
And communication can be established between the service end and the job client in a long connection or short connection mode. Since the server and the job client need to interact for a plurality of times for a long time, in a preferred embodiment, the server and the job client keep long connection in a websocket manner. The websocket is used as a communication protocol between the operation client and the server, so that data exchange between the operation client and the server is simpler, and the server is allowed to actively push data to the operation client. In the websocket API, the job client and the server only need to complete one handshake, and persistent connection can be directly established between the job client and the server, and bidirectional data transmission is performed.
Step S305: the server deletes the IP address and port, reselects an IP address as a new target IP address, notifies other job clients, and executes step S307. If the disconnected IP address is the target IP address, the server reselects the IP address of the operation client with the earliest registration time as a new target IP address according to the registration time, and notifies other operation clients.
Step S306: the server deletes the IP address and port, notifies other job clients, and executes step S307. If one operation client is disconnected and the heartbeat message is not sent to the server for a long time, the server can remove the IP address and the port of the operation client and inform other operation clients, and then an operation task can not be issued to the operation client.
Step S307: and the server generates a job task and issues the job task to all the registered job clients. The specific implementation of this step is shown in step S203.
Step S308: and after receiving the job task, the current job client stores the job task in a local storage device, and sends a task execution request of the job task to the corresponding management client according to the target IP address. The local storage device may employ a simple lightweight in-memory database, a relational database, or file storage. Compared with other two modes, the memory database can meet the service requirement and has better access performance.
Step S309: the management client judges whether the current operation client is allowed to execute the operation task or not in a distributed lock mode, and feeds back response information to the current operation client. The specific implementation of this step is seen in step S205.
Step S310: after receiving the response information fed back by the management client, the current job client determines whether to allow the job task to be executed, and if the job task is allowed to be executed, step S311 is executed; if execution is not allowed, no processing is done.
Step S311: and the current job client executes the job task, and after the job task is executed, the task execution result is stored in the local storage device, and the task state is updated to be completed.
Step S312: and the current job client acquires the task execution result of the executed job task from the local storage device in an asynchronous mode at regular time and sends the task execution result to the server. The embodiment supports centralized deployment, and only one set of server is deployed in a plurality of parks (one park comprises a plurality of warehouses), so that the cost of the server is reduced. Meanwhile, the method adopts the modes of task issuing, production of the warehouse according to the tasks and asynchronous return of the task execution result, ensures that the warehouse does not need to rely on a server in the production process, does not have the problem of network transmission, does not need to wait for the server to return data in real time, and improves the production efficiency of the warehouse.
It should be noted that fig. 3 only shows the information interaction process between the current job client and the server and between the current job client and the management client. In the embodiment, a plurality of job clients are provided, and the current job client and the management client are both one of all the job clients. Each operation client sends registration information and heartbeat information to the server and receives all IP addresses and operation tasks sent by the server.
The job tasks of embodiments one to three may be a pick task, a rack task, a review task, an inventory task, a move warehouse task, etc. In the fourth embodiment, the order picking task is taken as an example, and the processing method thereof will be specifically described.
Fig. 4 is a sequence diagram of a job task processing method according to the fourth embodiment of the present invention. As shown in fig. 4, the job task processing method according to the fourth embodiment of the present invention mainly includes the following steps:
step S401: and the plurality of RF code scanning guns respectively send registration messages to the server through the http interface. And the warehouse picker starts the RF code scanning gun and logs in the system, and the RF code scanning gun sends a registration message to the server through the http interface, wherein the registration message comprises the IP address and the port of the RF code scanning gun.
Step S402: and the server records the IP addresses and ports of the RF code scanning guns, selects a target IP address according to the registration time, and issues the IP addresses and ports of all the RF code scanning guns to each RF code scanning gun. The server selects an IP address with the earliest registration time as a target IP address.
Step S403: the RF code scanning guns store all IP addresses and ports to the memory database.
Step S404: the plurality of RF code scanning guns send heartbeat messages to the server side in a timing mode.
Step S405: when the server determines that the heartbeat message from a certain IP address is not received within a preset time period, whether the IP address is a target IP address or not is judged, and if the IP address is the target IP address, the step S406 is executed; if not, step S407 is executed. And if the heartbeat message from a certain IP address is not received within the preset time period, the RF code scanning gun corresponding to the IP address is disconnected with the server.
Step S406: the server deletes the IP address and port, reselects an IP address as a new target IP address, notifies other RF code scanning guns, and executes step S408. If the disconnected code scanning gun IP address is the target IP address, the server side reselects one code scanning gun IP address as the target IP address and informs other RF code scanning guns.
Step S407: the server deletes the IP address and port, notifies other RF code scanning guns, and executes step S408. If one RF code scanning gun is disconnected and heartbeat messages are not sent to the server for a long time, the server can reject the IP address and the port of the RF code scanning gun and inform other RF code scanning guns, and then a goods picking task can not be issued to the RF code scanning gun subsequently.
And S405-S407 are used for performing heartbeat detection, deleting the IP addresses which cannot be communicated according to the detection result, and if the IP addresses which cannot be communicated are the target IP addresses, re-selecting the target IP addresses from the currently communicated IP addresses.
Step S408: the server generates a picking task and sends the picking task to all registered RF code scanning guns. And the warehouse group order member performs the order combination according to the set order combination piece, and the server generates the picking task according to the result of the order combination. The picking task comprises a task number, a task type, a delivery priority, a storage area, a storage position, a channel, an article name, an article quantity, an operator, operation time, a state and the like.
Step S409: and after the current RF code scanning gun receives the picking task, storing the picking task into an internal memory database.
Step S410: and the current RF code scanning gun sends a task execution request of the picking task to the corresponding management RF code scanning gun according to the target IP address. And clicking a goods picking task execution button on an operation interface of the current RF code scanning gun by a warehouse goods picker, and triggering the current RF code scanning gun to send a task execution request to the management RF code scanning gun.
Step S411: and the management RF code scanning gun judges whether the current RF code scanning gun is allowed to execute the order picking task in a distributed lock mode, and feeds back response information to the current RF code scanning gun. The management RF code scanning gun adopts a distributed lock to judge whether the execution is allowed or not, the locked or completed picking task is not allowed to be executed, and only one RF code scanning gun is allowed to operate at the same time.
For example, the RF code scanning gun a executes the picking task 1, the management RF code scanning gun locks the custom Key containing the picking task, and if the RF code scanning gun B also executes the picking task 1 at the same time, the management RF code scanning gun finds that the Key containing the picking task is in a locked state, which indicates that the picking task 1 is being executed by another person, the management RF code scanning gun B is not allowed to execute.
If the task is successfully executed, the managing RF code scanning gun marks the executed task as locked and informs other RF code scanning guns.
Step S412: after the RF code scanning gun receives the response information fed back by the RF code scanning gun, it is determined whether the picking task is allowed to be executed, and if the picking task is allowed to be executed, step S413 is executed; if execution is not allowed, no processing is done.
Step S413: the current RF code scanning gun executes the picking task, after the picking task is executed, the task execution result is stored in the memory database, and the task state is updated to be completed. The warehouse picker processes the picking task, and in the process, some checking and calculating processes can be realized by the current RF code scanning gun, so that the pressure of a server is relieved. For example, the verification includes parameter non-null verification and single number rule verification, and the calculation may be to merge the picking result for the same article in the same storage location.
After the picking task is executed, the task execution result is stored in the memory database. The RF code scanning gun stores the data in the local memory database, so that the received goods picking task is not influenced and the goods picking can be continuously operated under the condition that the RF code scanning gun and the server are disconnected.
Step S414: and the current RF code scanning gun acquires the task execution result of the finished picking task from the memory database in an asynchronous mode at regular time and sends the task execution result to the server.
It should be noted that fig. 4 only shows the information interaction process between the current RF code scanning gun and the server, between the current RF code scanning gun and the management RF code scanning gun, and between the current RF code scanning gun and the local in-memory database. In one embodiment, there are multiple RF code scanning guns, and the current RF code scanning gun and the management RF code scanning gun are all one of the RF code scanning guns. Each RF code scanning gun sends registration information and heartbeat information to the server and receives all IP addresses and picking tasks sent by the server.
FIG. 5 is a schematic diagram of the main modules of a job client for job task processing according to an embodiment of the present invention. As shown in fig. 5, a job client 500 for job task processing according to an embodiment of the present invention mainly includes:
the acquiring and sending module 501 is configured to acquire a target IP address and a job task corresponding to a management client, and send a task execution request of the job task to the management client according to the target IP address, so that the management client feeds back response information according to a task state of the job task. And the server side issues a target IP address and a job task to each job client side. And after receiving the job task, the job client sends a task execution request to the corresponding management client according to the target IP address, wherein the task execution request comprises a task identifier of the job task to be executed.
The management client acquires the task state of the corresponding job task according to the task identifier, and if the task state is a locked state or a completed state, the management client feeds back response information which does not allow the job task to be executed to the job client; if the task state is the initial state (i.e., unlocked and not complete), response information allowing the job task to be executed is fed back to the job client.
A receiving and executing module 502, configured to receive the response information fed back by the management client, and execute the job task when it is determined that the response information indicates that the job task is allowed to be executed. And after receiving the response information fed back by the management client, the job client judges whether the response information indicates that the job task is allowed to be executed, and if the response information indicates that the job task is allowed to be executed, the job task can be executed by the operator and/or the job client.
A result returning module 503, configured to return the task execution result after the task execution is finished. And after the current client finishes executing the operation task, returning the task execution result to the server. In the embodiment, a calculation sinking scheme is adopted, the server issues data to the operation client in the form of the operation task, and after the operation of the operation client finishes the operation task, the task execution result is transmitted back to the server, so that the dependence on the server is avoided in the warehouse production process, the network transmission problem does not exist, and the warehouse production efficiency is improved.
In addition, the client 500 for job task processing according to the embodiment of the present invention may further include: the system comprises a storage updating module, a first message sending module, a second message sending module and a task saving module (not shown in figure 5). The first message sending module is used for sending a registration message to the server; the registration message comprises the IP address and the port of the job client, and is used for the server to select the target IP address from the IP addresses of the job client according to the registration time and send the job task to the client according to the IP address and the port of the job client.
The second message sending module is used for sending heartbeat messages to the server; and the heartbeat message is used for reselecting the target IP address when the server determines that the heartbeat message from the target IP address is not received in a preset time period.
And the storage updating module is used for storing the task execution result to a local storage device after the execution of the job task is finished, and updating the task state of the job task to be finished. And the task saving module is used for saving the job task to a local storage device so as to obtain the next job task from the local storage device and process the next job task when the job client and the server are disconnected.
From the above description, it can be seen that the job task is acquired by the job client, then the job task is executed according to the response information fed back by the management client, and the task execution result is returned, so that the warehouse production process is ensured to be free from depending on the server, the network transmission problem is avoided, the return data of the server is not required to be waited, and the warehouse production efficiency is improved.
Fig. 6 illustrates an exemplary system architecture 600 of a job task processing method or client for job task processing to which embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various communication client applications can be installed on the terminal devices 601, 602, 603.
The end devices 601, 602, 603 may be a variety of electronic devices having a display screen and supporting networking including, but not limited to, smart phones, tablets, desktop computers, RF code scanners, and the like.
The server 605 may be a server that provides various services, such as a background management server that an administrator processes with a registration request transmitted by the terminal apparatuses 601, 602, 603. The background management server can issue the operation task to the registered terminal equipment and receive the task execution result sent by the terminal equipment.
It should be noted that the job task processing method provided in the embodiments of the present application is generally executed by the terminal devices 601, 602, and 603.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The invention also provides an electronic device and a computer readable medium according to the embodiment of the invention.
The electronic device of the present invention includes: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement a job task processing method according to an embodiment of the present invention.
The computer-readable medium of the present invention has stored thereon a computer program which, when executed by a processor, implements a job task processing method of an embodiment of the present invention.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with an electronic device implementing an embodiment of the present invention. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the computer system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. 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, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, the processes described above with respect to the main step diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the method illustrated in the main step diagram. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises an acquisition and sending module, a receiving and executing module and a result returning module. For example, the acquiring and sending module may be further described as a module that acquires a target IP address and a job task corresponding to the management client and sends a task execution request of the job task to the management client according to the target IP address.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: acquiring a target IP address and a job task corresponding to a management client, and sending a task execution request of the job task to the management client according to the target IP address so that the management client feeds back response information according to a task state of the job task; receiving the response information fed back by the management client, and executing the job task when the response information indicates that the job task is allowed to be executed; and after the execution of the job task is finished, returning a task execution result.
According to the technical scheme of the embodiment of the invention, the operation client side obtains the operation task, then executes the operation task according to the response information fed back by the management client side, and returns the task execution result, so that the dependence on the server side is not required in the warehouse production process, the network transmission problem does not exist, the return data of the server side does not need to be waited, and the warehouse production efficiency is improved.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A job task processing method executed by a job client includes:
acquiring a target IP address and a job task corresponding to a management client, and sending a task execution request of the job task to the management client according to the target IP address so that the management client feeds back response information according to a task state of the job task;
receiving the response information fed back by the management client, and executing the job task when the response information indicates that the job task is allowed to be executed;
and after the execution of the job task is finished, returning a task execution result.
2. The method according to claim 1, wherein the feedback of the response information by the management client according to the task state of the job task comprises:
when the task execution request is received, judging whether a custom Key containing the job task is in a locked state;
if the Key is in a locked state, feeding back response information which does not allow the job task to be executed;
if the Key is in an unlocked state and the job task is not completed, the Key is marked as a locked state, and response information allowing the job task to be executed is fed back.
3. The method of claim 1, wherein after the job task execution ends, the method further comprises: storing the task execution result to a local storage device, and updating the task state of the job task to be completed;
returning task execution results, including: and acquiring the task execution result from the local storage equipment and sending the task execution result in a timing scheduling mode.
4. The method of claim 1, wherein prior to the step of obtaining job tasks, the method further comprises:
sending a registration message to a server; the registration message comprises the IP address and the port of the job client, and is used for the server to select the target IP address from the IP addresses of the job client according to the registration time and send the job task to the job client according to the IP address and the port of the job client.
5. The method of claim 4, wherein after the step of sending the registration message to the server, the method further comprises:
sending a heartbeat message to the server; and the heartbeat message is used for reselecting the target IP address when the server determines that the heartbeat message from the target IP address is not received in a preset time period.
6. The method of claim 4 or 5, wherein the job client and the server maintain a long connection in a websocket manner.
7. The method of claim 1, wherein after the step of obtaining the job task, the method further comprises:
and storing the job task to a local storage device, so that when the job client and the server are disconnected, a next job task is obtained from the local storage device, and the next job task is processed.
8. A job client for job task processing, the job client comprising:
the acquisition and sending module is used for acquiring a target IP address and an operation task corresponding to a management client, and sending a task execution request of the operation task to the management client according to the target IP address so that the management client feeds back response information according to a task state of the operation task;
the receiving execution module is used for receiving the response information fed back by the management client and executing the job task when the response information indicates that the job task is allowed to be executed;
and the result returning module is used for returning the task execution result after the execution of the operation task is finished.
9. The job client according to claim 8, further comprising:
the storage updating module is used for storing the task execution result to local storage equipment after the execution of the job task is finished, and updating the task state of the job task to be finished;
the result returning module is further configured to: and acquiring the task execution result from the local storage equipment and sending the task execution result in a timing scheduling mode.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
11. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010529110.2A 2020-06-11 2020-06-11 Job task processing method and job client Active CN113765958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010529110.2A CN113765958B (en) 2020-06-11 2020-06-11 Job task processing method and job client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010529110.2A CN113765958B (en) 2020-06-11 2020-06-11 Job task processing method and job client

Publications (2)

Publication Number Publication Date
CN113765958A true CN113765958A (en) 2021-12-07
CN113765958B CN113765958B (en) 2024-05-28

Family

ID=78785365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010529110.2A Active CN113765958B (en) 2020-06-11 2020-06-11 Job task processing method and job client

Country Status (1)

Country Link
CN (1) CN113765958B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114969757A (en) * 2022-05-31 2022-08-30 中国银行股份有限公司 System vulnerability processing method and device based on block chain and server

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030051188A1 (en) * 2001-09-10 2003-03-13 Narendra Patil Automated software testing management system
US20110131285A1 (en) * 2009-11-30 2011-06-02 International Business Machines Corporation Task management system associating with contact information and method thereof
US20120272245A1 (en) * 2011-04-20 2012-10-25 International Business Machines Corporation Web service management
CN103092698A (en) * 2012-12-24 2013-05-08 中国科学院深圳先进技术研究院 System and method of cloud computing application automatic deployment
US9171019B1 (en) * 2013-02-19 2015-10-27 Amazon Technologies, Inc. Distributed lock service with external lock information database
JP2017021662A (en) * 2015-07-13 2017-01-26 Keepdata株式会社 Relay server system and communication method using relay server
JP6246403B1 (en) * 2017-03-13 2017-12-13 株式会社A−スタイル Admission management system
CN108009010A (en) * 2017-12-01 2018-05-08 携程旅游信息技术(上海)有限公司 The managing device of thin-client, system, method, electronic equipment, storage medium
CN108718336A (en) * 2018-05-21 2018-10-30 武汉兆格信息技术有限公司 A kind of job space development platform based on network cooperation
CN108958920A (en) * 2018-07-13 2018-12-07 众安在线财产保险股份有限公司 A kind of distributed task dispatching method and system
CN109117360A (en) * 2017-06-26 2019-01-01 北京京东尚科信息技术有限公司 A kind of method and apparatus of processed offline business datum
CN110572360A (en) * 2019-08-02 2019-12-13 武大吉奥信息技术有限公司 method for collaborative editing of GIS spatial data
CN111198753A (en) * 2018-11-16 2020-05-26 北京京东尚科信息技术有限公司 Task scheduling method and device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030051188A1 (en) * 2001-09-10 2003-03-13 Narendra Patil Automated software testing management system
US20110131285A1 (en) * 2009-11-30 2011-06-02 International Business Machines Corporation Task management system associating with contact information and method thereof
US20120272245A1 (en) * 2011-04-20 2012-10-25 International Business Machines Corporation Web service management
CN103092698A (en) * 2012-12-24 2013-05-08 中国科学院深圳先进技术研究院 System and method of cloud computing application automatic deployment
US9171019B1 (en) * 2013-02-19 2015-10-27 Amazon Technologies, Inc. Distributed lock service with external lock information database
JP2017021662A (en) * 2015-07-13 2017-01-26 Keepdata株式会社 Relay server system and communication method using relay server
JP6246403B1 (en) * 2017-03-13 2017-12-13 株式会社A−スタイル Admission management system
CN109117360A (en) * 2017-06-26 2019-01-01 北京京东尚科信息技术有限公司 A kind of method and apparatus of processed offline business datum
CN108009010A (en) * 2017-12-01 2018-05-08 携程旅游信息技术(上海)有限公司 The managing device of thin-client, system, method, electronic equipment, storage medium
CN108718336A (en) * 2018-05-21 2018-10-30 武汉兆格信息技术有限公司 A kind of job space development platform based on network cooperation
CN108958920A (en) * 2018-07-13 2018-12-07 众安在线财产保险股份有限公司 A kind of distributed task dispatching method and system
CN111198753A (en) * 2018-11-16 2020-05-26 北京京东尚科信息技术有限公司 Task scheduling method and device
CN110572360A (en) * 2019-08-02 2019-12-13 武大吉奥信息技术有限公司 method for collaborative editing of GIS spatial data

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
ASHRAF ALI等: "IP Multimedia Subsystem SIP Registration Signaling Evaluation for Mission Critical Communication Systems", 《2015 IEEE INTERNATIONAL CONFERENCE ON DATA SCIENCE AND DATA INTENSIVE SYSTEMS》 *
FELIPE CERQUEIRA等: "Scaling global scheduling with message passing", 《2014 IEEE 19TH REAL-TIME AND EMBEDDED TECHNOLOGY AND APPLICATIONS SYMPOSIUM (RTAS)》, 19 January 2015 (2015-01-19) *
张磊;谭林丰;陈宏君;刘坤;顾熹;文继锋;: "嵌入式装置的可视化云编程平台设计", 单片机与嵌入式系统应用, no. 03, 1 March 2020 (2020-03-01) *
李宏胜;李凡;赵岚;: "多任务网络通信在RTX下的实时性研究", 组合机床与自动化加工技术, no. 02 *
李峰泉;张亚利;: "自动化立体仓库管理系统的设计与实现", 现代电子技术, no. 16, 15 August 2007 (2007-08-15) *
杨峰,刘心松,左朝树,唐续: "分布式并行服务器透明性及任务调度研究", 计算机研究与发展, no. 09 *
谢荣岳,李军,吴秋云,余理富: "基于PDA移动作业系统的设计", 兵工自动化, no. 01 *
钱迎进;金士尧;肖侬;: "Lustre文件系统I/O锁的应用与优化", 计算机工程与应用, no. 03, 21 January 2011 (2011-01-21) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114969757A (en) * 2022-05-31 2022-08-30 中国银行股份有限公司 System vulnerability processing method and device based on block chain and server

Also Published As

Publication number Publication date
CN113765958B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN112860451A (en) Multi-tenant data processing method and device based on SaaS
CN111797091B (en) Method, device, electronic equipment and storage medium for inquiring data in database
CN111917687A (en) Method and device for circularly pushing reminding message
CN108897854A (en) A kind of monitoring method and device of overtime task
CN110321252B (en) Skill service resource scheduling method and device
CN110837409A (en) Method and system for executing task regularly
CN113391979A (en) Processing method, equipment and system for monitoring data display and storage medium
CN111478781B (en) Message broadcasting method and device
CN102035879B (en) Server and data processing system using same
CN111861298A (en) Order canceling method and device
CN111181765A (en) Task processing method and device
CN111341039B (en) Card-retaining processing method and system, client and server
CN116108094A (en) Data integration method and device, electronic equipment and storage medium
CN110389976B (en) Multi-interface data scheduling method and device
CN113076186B (en) Task processing method, device, electronic equipment and storage medium
CN113077201A (en) Method, device and system for analyzing service parameters
CN113765958B (en) Job task processing method and job client
CN112838935A (en) Electronic data exchange method and system
CN108259605B (en) Data calling system and method based on multiple data centers
CN110798495A (en) Method and server for end-to-end message push in cluster architecture mode
CN110324384A (en) The method and apparatus of data-pushing
CN109040331B (en) Electronic business card processing method and device, computing equipment and storage medium
CN115277707B (en) Service processing method, device, electronic equipment and storage medium
WO2021244233A1 (en) Method and apparatus for processing order data
CN114971785A (en) Order processing method and device, electronic equipment and storage medium

Legal Events

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