CN114637555A - General method for obtaining logistics information in batches - Google Patents

General method for obtaining logistics information in batches Download PDF

Info

Publication number
CN114637555A
CN114637555A CN202210298398.6A CN202210298398A CN114637555A CN 114637555 A CN114637555 A CN 114637555A CN 202210298398 A CN202210298398 A CN 202210298398A CN 114637555 A CN114637555 A CN 114637555A
Authority
CN
China
Prior art keywords
logistics information
logistics
acquiring
script
general method
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
CN202210298398.6A
Other languages
Chinese (zh)
Other versions
CN114637555B (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.)
Shenzhen Zhemeng Software Development Co ltd
Original Assignee
Shenzhen Zhemeng Software Development 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 Shenzhen Zhemeng Software Development Co ltd filed Critical Shenzhen Zhemeng Software Development Co ltd
Priority to CN202210298398.6A priority Critical patent/CN114637555B/en
Priority claimed from CN202210298398.6A external-priority patent/CN114637555B/en
Publication of CN114637555A publication Critical patent/CN114637555A/en
Application granted granted Critical
Publication of CN114637555B publication Critical patent/CN114637555B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Operations Research (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the technical field of logistics information, and discloses a general method for acquiring logistics information in batches, which comprises the following steps: s0, transmitting the code number of the logistics company, the logistics single number and the parallelism; s1, acquiring corresponding scripts and parameters according to the code number of the logistics company; s2, starting a corresponding number of threads according to the script configuration, the introduced parallelism and the current hardware environment; and S3, starting a script engine by each thread to load a corresponding script and initiating a request for acquiring logistics information. The invention relates to a general method for acquiring logistics information in batch, which packages different logistics information acquisition request parameters and analyzes partial function codes in different logistics information formats in the industry through a core flow for acquiring abstract logistics information, and issues the function codes to each client and an edge computing node in a script mode, so that the edge computing power is fully utilized to reduce the pressure of a server, the unified and efficient management can be carried out, and the development, deployment, operation and maintenance and data acquisition efficiency are improved.

Description

General method for obtaining logistics information in batches
Technical Field
The invention relates to the technical field of logistics information, in particular to a general method for acquiring logistics information in batches.
Background
With the rapid development of domestic and foreign electronic commerce, the demand for logistics is increasing, and the requirement for timeliness of logistics information is also increasing. For self-building station-like e-commerce and freight agent companies, the timeliness of logistics information becomes more important.
The traditional method is to guide the user to inquire on the website of the corresponding logistics company, or to check the account in batches, or to use the interface or inquiry website provided by the corresponding logistics company to periodically acquire data.
Due to the diversity of technologies adopted by logistics companies, various logistics information acquisition modes are different, so that the development workload is large, newly added cooperative logistics companies need to integrate the logistics information and get online, time and labor are wasted, a large amount of server resources need to be occupied for obtaining the data regularly, the data has a certain delay, and even the data can be blocked due to misjudgment as a malicious request due to excessive requests, and therefore a general method for acquiring the logistics information in batches is provided.
Disclosure of Invention
Technical problem to be solved
Aiming at the defects of the prior art, the invention provides a general method for acquiring logistics information in batches, which has the advantages that the core request part for acquiring the logistics information is abstractly packaged into a script execution engine, actions such as parameter splicing, signature generation, logistics information analysis and the like are completed by a script, the development workload can be greatly reduced, the online flow of a new logistics information channel is simplified, the general method can be deployed in a user computer or a special edge computing node, the logistics information can be provided in real time, the computing power and IP resources of a server do not need to be occupied, and the like, and the problems in the background art are solved.
(II) technical scheme
The invention provides the following technical scheme: a general method for acquiring logistics information in batches comprises the following steps:
s0, the code number of the incoming logistics company, the logistics single number and the parallelism.
And S1, acquiring corresponding scripts and parameters according to the code numbers of the logistics companies.
S2, enabling a corresponding number of threads according to the script configuration, the incoming parallelism and the current hardware environment.
And S3, starting the script engine by each thread to load the corresponding script and initiating a request for acquiring the logistics information.
And S4, analyzing the corresponding requests into a uniform format and combining the logistics information of each thread.
And S5, returning the logistics information to the calling party.
Preferably, in step S0, the code of the logistics company is used to uniquely identify the logistics company that needs to acquire the logistics information, the logistics list number is the unique identifier of the logistics information of the logistics company, and the parallelism indicates the amount of concurrence of acquiring the logistics information at the same time.
Preferably, the parameters in step S1 include the maximum concurrency supported by the current logistics company, the language category of the current script (e.g., lua, python, javascript, and passacal), and the maximum number of logistics list numbers that can be queried by the current logistics company in a single time.
Preferably, the manner of acquiring the script and the parameter in step S1 includes, but is not limited to: a) obtaining the data from a remote central server; b) obtaining from the local; c) the two modes are integrated, and the data are obtained after the data are cached from a remote place to a local place.
Preferably, whether a plurality of processes need to be created is determined by the corresponding script parameters in step S1, and if not, a thread is created by default to reduce resource occupation.
Preferably, the step S4 may be combined with or separated from the step S3.
Preferably, in step S5, the returning means includes, but is not limited to: a) real-time return through TCPRPC; b) when the system is called by Http, returning is carried out when all logistics information is acquired in a blocking mode and the like; c) when the logistics information is called through Http, returning a task id in step S0, and calling an interface for acquiring logistics information by using a task id polling mode; d) returning in real time through WebSocket; e) and returning through a pipeline channel communication mode.
Preferably, the scheme using the script may be replaced with a scheme using a dynamic link library.
Compared with the prior art, the invention provides a general method for acquiring logistics information in batches, which has the following beneficial effects:
1. the invention relates to a general method for acquiring logistics information in batch, which packages different logistics information acquisition request parameters and analyzes partial function codes in different logistics information formats in the industry through a core flow for acquiring abstract logistics information, and issues the function codes to each client and an edge computing node in a script mode, so that the edge computing power is fully utilized to reduce the pressure of a server, the unified and efficient management can be carried out, and the development, deployment, operation and maintenance and data acquisition efficiency are improved. The system adapts to the future requirements of the industry, can continuously and quickly deal with various logistics information acquisition ways, and assists the development of the e-commerce logistics and the goods generation industry.
2. According to the general method for acquiring the logistics information in batches, the core request part for acquiring the logistics information is abstractly packaged into the script execution engine, actions such as parameter splicing, signature generation and logistics information analysis are completed by the script, development workload can be greatly reduced, the on-line flow of a new logistics information channel is simplified, the method can be deployed in a user computer or a special edge computing node, the logistics information can be provided in real time, meanwhile, the computing power and IP resources of a server do not need to be occupied, and the risk that the logistics information is mistakenly judged as a malicious request and is mistakenly blocked can be reduced.
Drawings
FIG. 1 is a schematic diagram of the system of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a general method for acquiring logistics information in batch includes the following steps:
and step S0, the calling party transmits the code number of the logistics company, the logistics list number and the concurrency degree. The logistics company code is used for uniquely identifying a logistics company which needs to acquire logistics information, the logistics single number is the unique identification of the logistics information of the logistics company, and the parallelism degree represents the concurrence amount of acquiring the logistics information at the same time. Such invokers include, without limitation, ERP client programs, web front-end pages, service backend, and the like, and the invocation initiation means includes, but is not limited to, TCPRPC requests, HTTP requests, WebSocket requests, Pipeline communication requests, and the like.
And step S1, acquiring a script and related parameters for packaging the request parameters and analyzing the response result of the logistics company according to the logistics company code transmitted in the step S0. The parameters include and are not limited to: the maximum concurrency supported by the current logistics company, the language category of the current script (such as lua, python, javascript, passacal and the like), the maximum number of logistics single numbers which can be inquired by the current logistics company at a time, and the like. The manner of obtaining the script and the parameter includes, but is not limited to: a) obtaining the data from a remote central server; b) obtaining from the local; c) and integrating the two modes, and obtaining the data from remote cache to local cache, and the like.
And step S2, creating a corresponding work thread or process according to the parameters acquired in the step S0 and the step S1 and the actual hardware environment. Wherein when the concurrency greater than 0 is transmitted in step S0, the created thread (progress) number is the smallest of the concurrency and the maximum concurrency value of the script parameter in step S1; when the concurrency is not transmitted or the transmitted value is less than 1 in the step S0, a proper parallelism is calculated according to the current number of cores of the CPU in the hardware environment and the actual load of the CPU of the system, and then compared with the maximum concurrency value of the script parameter in the step S1, the number of the created thread (in) is selected to be smaller. Whether a plurality of processes need to be created is determined by the corresponding script parameters in step S1, and if not, a thread is created by default to reduce resource occupation.
Step S3, according to the thread (forward) created in step S2, initializing a script engine of the corresponding language, loading the script obtained in step S1, executing the script, packaging the logistics list number transmitted in step S0 and the related parameters obtained in step S1 into request parameters required by the logistics information interface of the logistics company, initiating a request, and obtaining a logistics information result returned by the logistics company.
And step S4, according to the logistics information result obtained in the step S3, analyzing the logistics information result into standard logistics information data with a uniform format, and summarizing the logistics information obtained by each line (process). This step may be combined in step S3 or may be split.
And step S5, returning the information to the caller according to the summary result of the step S4, wherein the returning mode includes but is not limited to: a) real-time return through TCPRPC; b) when the system is called by Http, returning is carried out when all logistics information is acquired in a blocking mode and the like; c) when the logistics information is called through Http, returning a task id in step S0, and calling an interface for acquiring logistics information by using a task id polling mode; d) returning in real time through WebSocket; e) and returning through a pipeline channel communication mode.
Due to the diversity of technologies adopted by logistics companies, various logistics information acquisition modes are different, so that the development workload is large, new cooperative logistics companies need to integrate the logistics information and get online, time and labor are wasted, a large amount of server resources need to be occupied for periodic acquisition, data is delayed to a certain extent, and even the data can be mistakenly judged as malicious requests due to excessive requests to be blocked.
According to the scheme, the core request part for acquiring the logistics information is abstractly packaged into the script execution engine, actions such as parameter splicing, signature generation, logistics information analysis and the like are completed by the script, development workload can be greatly reduced, the on-line flow of a new logistics information channel can be simplified, the method can be deployed in a user computer or a special edge computing node, the logistics information can be provided in real time, meanwhile, the calculation power and IP resources of a server do not need to be occupied, and the risk that the logistics information is mistakenly judged as a malicious request and is mistakenly blocked can be reduced.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (8)

1. A general method for acquiring logistics information in batches is characterized in that: the method comprises the following steps:
s0, transmitting the code number of the logistics company, the logistics single number and the parallelism;
s1, acquiring corresponding scripts and parameters according to the code number of the logistics company;
s2, starting a corresponding number of threads according to the script configuration, the introduced parallelism and the current hardware environment;
s3, starting a script engine by each thread to load a corresponding script and initiating a request for acquiring logistics information;
s4, analyzing the corresponding requests into a uniform format and combining the logistics information of each thread;
and S5, returning the logistics information to the caller.
2. The general method for acquiring logistics information in batch as claimed in claim 1, wherein: in step S0, the code number of the logistics company is used to uniquely identify the logistics company that needs to acquire the logistics information, the logistics list number is the unique identifier of the logistics information of the logistics company, and the parallelism indicates the concurrence amount of acquiring the logistics information at the same time.
3. The general method for acquiring logistics information in batches as claimed in claim 1, wherein: the parameters in step S1 include the maximum concurrency supported by the current logistics company, the language category of the current script (e.g., lua, python, javascript, and passacal), and the maximum number of logistics list numbers that can be queried by the current logistics company at a time.
4. The general method for acquiring logistics information in batch as claimed in claim 1, wherein: the manner of acquiring the script and the parameter in step S1 includes, but is not limited to: a) obtaining the data from a remote central server; b) obtaining from the local; c) and integrating the two modes to obtain the data from the remote cache to the local cache.
5. The general method for acquiring logistics information in batch as claimed in claim 1, wherein: whether a plurality of processes need to be created is determined by the corresponding script parameters in step S1, and if not, a thread is created by default to reduce resource occupation.
6. The general method for acquiring logistics information in batch as claimed in claim 1, wherein: the step S4 may be combined with or separated from the step S3.
7. The general method for acquiring logistics information in batch as claimed in claim 1, wherein: in step S5, the return mode includes but is not limited to: a) real-time return through TCPRPC; b) when the system is called by Http, returning is carried out when all logistics information is acquired in a blocking mode and the like; c) when the logistics information is called through Http, returning a task id in step S0, and calling an interface for acquiring logistics information by using a task id polling mode; d) returning in real time through WebSocket; e) and returning through a pipeline channel communication mode.
8. The general method for acquiring logistics information in batch as claimed in claim 1, wherein: the scheme using scripts may be replaced with a scheme using dynamic link libraries.
CN202210298398.6A 2022-03-25 General method for obtaining logistics information in batches Active CN114637555B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210298398.6A CN114637555B (en) 2022-03-25 General method for obtaining logistics information in batches

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210298398.6A CN114637555B (en) 2022-03-25 General method for obtaining logistics information in batches

Publications (2)

Publication Number Publication Date
CN114637555A true CN114637555A (en) 2022-06-17
CN114637555B CN114637555B (en) 2024-05-28

Family

ID=

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033784A (en) * 2010-11-18 2011-04-27 山东中创软件工程股份有限公司 Method and device for optimizing application server
WO2014005528A1 (en) * 2012-07-05 2014-01-09 华为技术有限公司 Information processing method, server and logistics terminal
WO2014187252A1 (en) * 2013-08-01 2014-11-27 中兴通讯股份有限公司 Method and apparatus for adaptively processing concurrent session in ims network
CN104766189A (en) * 2014-01-07 2015-07-08 携程计算机技术(上海)有限公司 Logistics information processing system and method
CN105426165A (en) * 2014-09-18 2016-03-23 腾讯科技(深圳)有限公司 Script tool processing method and apparatus
CN105469264A (en) * 2015-04-30 2016-04-06 上海乐丽电子商务服务有限公司 Method of order data batch acquisition and batch analysis processing
WO2017166127A1 (en) * 2016-03-30 2017-10-05 方泽辉 Logistics information acquisition method and system for transnational transport
CN109739583A (en) * 2018-12-13 2019-05-10 平安科技(深圳)有限公司 Method, apparatus, computer equipment and the storage medium of multi-threaded parallel operation
WO2020011043A1 (en) * 2018-07-09 2020-01-16 菜鸟智能物流控股有限公司 Method, device and system for acquiring logistics object distribution information
CN112001667A (en) * 2020-07-01 2020-11-27 安徽兵尚科技有限公司 Intelligent logistics integrated management method based on cloud platform
US11138033B1 (en) * 2018-08-24 2021-10-05 Amazon Technologies, Inc. Providing an application programming interface (API) including a bulk computing task operation
CN113806407A (en) * 2021-09-27 2021-12-17 武汉众邦银行股份有限公司 Method, device and storage medium for obtaining order numbers in batch based on cache

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033784A (en) * 2010-11-18 2011-04-27 山东中创软件工程股份有限公司 Method and device for optimizing application server
WO2014005528A1 (en) * 2012-07-05 2014-01-09 华为技术有限公司 Information processing method, server and logistics terminal
WO2014187252A1 (en) * 2013-08-01 2014-11-27 中兴通讯股份有限公司 Method and apparatus for adaptively processing concurrent session in ims network
CN104766189A (en) * 2014-01-07 2015-07-08 携程计算机技术(上海)有限公司 Logistics information processing system and method
CN105426165A (en) * 2014-09-18 2016-03-23 腾讯科技(深圳)有限公司 Script tool processing method and apparatus
CN105469264A (en) * 2015-04-30 2016-04-06 上海乐丽电子商务服务有限公司 Method of order data batch acquisition and batch analysis processing
WO2017166127A1 (en) * 2016-03-30 2017-10-05 方泽辉 Logistics information acquisition method and system for transnational transport
WO2020011043A1 (en) * 2018-07-09 2020-01-16 菜鸟智能物流控股有限公司 Method, device and system for acquiring logistics object distribution information
US11138033B1 (en) * 2018-08-24 2021-10-05 Amazon Technologies, Inc. Providing an application programming interface (API) including a bulk computing task operation
CN109739583A (en) * 2018-12-13 2019-05-10 平安科技(深圳)有限公司 Method, apparatus, computer equipment and the storage medium of multi-threaded parallel operation
CN112001667A (en) * 2020-07-01 2020-11-27 安徽兵尚科技有限公司 Intelligent logistics integrated management method based on cloud platform
CN113806407A (en) * 2021-09-27 2021-12-17 武汉众邦银行股份有限公司 Method, device and storage medium for obtaining order numbers in batch based on cache

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BILI_API: "快递单号查询API接口对接(顺丰|圆通|中通|申通|百世|邮政EMS|京东等600家)", Retrieved from the Internet <URL:《https://www.bilibili.com/read/cv7654886/》> *
吴俞伯;郭俊霞;李征;赵瑞莲;: "基于并发程序数据竞争故障的变异策略", 计算机应用, no. 11, 10 November 2016 (2016-11-10) *
快递鸟: "快递单号查询API接口对接net源码示例_快递鸟", Retrieved from the Internet <URL:《https://blog.csdn.net/KuaiDNiao/article/details/123070520》> *

Similar Documents

Publication Publication Date Title
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
CN110780870B (en) Service execution method, device, equipment and storage medium
US9497096B2 (en) Dynamic control over tracing of messages received by a message broker
US10467576B2 (en) Distributed software process tracking
CN108021357B (en) Optimization method and device for program call
CN110995847A (en) Insurance service bus implementation method and system applied to multi-system communication
CN110765464A (en) Vulnerability detection method, device, equipment and computer storage medium
US11294740B2 (en) Event to serverless function workflow instance mapping mechanism
CN112699040B (en) Pressure testing method, device, equipment and computer readable storage medium
CN116541855B (en) Cross-coroutine runtime vulnerability analysis method and device, electronic equipment and storage medium
CN114490268A (en) Full link monitoring method, device, equipment, storage medium and program product
CN114549068A (en) Short link generation method, equipment, device and computer readable storage medium
US20130138801A1 (en) System and method for adaptive data monitoring
US20150365460A1 (en) Dynamic workflow-based composite web service system and method
US11622020B2 (en) Push control
CN114637555A (en) General method for obtaining logistics information in batches
CN112732372A (en) Service calling method and device and server
CN114637555B (en) General method for obtaining logistics information in batches
CN114090268B (en) Container management method and container management system
CN113127335A (en) System testing method and device
US11966323B2 (en) Troubleshooting software services based on system calls
CN110266762B (en) Data uploading method, system, device and storage medium
CN113656161A (en) Method, device and system for scheduling pressure generation service in performance test
CN112596974A (en) Full link monitoring method, device, equipment and storage medium
US20240134734A1 (en) Determining false positive and active event data

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