A method and system for automatically generating supporting materials for logistics tracks
By pre-creating and saving the logistics track screenshots on the business server, the problem of slow query response and poor page interaction in the acquisition of logistics track supporting materials is solved, and fast retrieval and better user experience is achieved.
Patent Information
- Application Number
- CN202311874025.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2043-12-29
AI Technical Summary
The existing logistics trajectory supporting material acquisition technology has the problem of slow query response and poor page interaction. It is mainly due to the need to frequently call third-party interfaces and dynamically process massive trajectory data, which causes the server and browser to bear the pressure of calculation and rendering.
By setting a timing task on the business server, the takeScreenshot interface of the puppeteer system is triggered, and the logistics trajectory data is collected in advance to generate static screenshots and establish an associated index, avoiding frequent calls to third-party interfaces and dynamic processing, and directly calling static screenshots from the database for display.
It realizes rapid and smooth acquisition and presentation of logistics trajectory supporting materials, improves query efficiency and user experience, and reduces the consumption of dynamic interface calls and rendering resources.
Smart Images

Figure CN117827878B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of logistics technology, and in particular to a method and system for automatically generating supporting materials for logistics tracks. Background Art
[0002] In the logistics industry, track evidence is an important proof of the logistics transportation process. However, the current technical means of obtaining logistics track evidence, such as query screenshots on third-party platforms and displaying map tracks on docking interfaces, have problems such as slow query response and unsmooth page interaction. This is mainly due to the need to repeatedly call third-party interfaces and dynamically process massive track data, resulting in heavy computing and rendering pressure on the server and browser. Summary of the invention
[0003] The purpose of the present invention is to propose a method for automatically generating supporting materials for logistics trajectories, which generates static logistics trajectory screenshots by pre-collecting material trajectory data and establishing associated indexes, so as to realize fast and smooth acquisition and presentation of supporting materials for logistics trajectories.
[0004] Another object of the present invention is to propose a system for automatically generating supporting materials for logistics trajectories, using a method for automatically generating supporting materials for logistics trajectories as described above.
[0005] To achieve this object, the present invention adopts the following technical solutions:
[0006] A method for automatically generating supporting materials for logistics tracks, comprising the following steps:
[0007] S1. The business server sets a scheduled task to trigger the takeScreenshot interface of the puppeteer system;
[0008] S2, the puppeteer system collects logistics information in advance, including logistics track data and logistics order number, notifies the logistics track display page to generate a logistics track according to the logistics track data, takes a screenshot of the logistics track, and associates the logistics track screenshot with the logistics order number and saves it in the database;
[0009] S3. When the business server receives the customer's access information, it analyzes the access information, obtains the logistics order number, and enters the logistics track verification tab. The logistics track verification tab pulls the corresponding logistics track screenshot from the database according to the logistics order number and displays it on the logistics track verification tab.
[0010] Preferably, the method further comprises the following steps:
[0011] S4. When the business server receives the customer's access information, the business server parses the access information, obtains the logistics order number, and enters the logistics track verification tab. The logistics track verification tab calls the takeScreenshot interface of the puppeteer system based on the screenshot of the logistics order number that has not been pulled into the database, notifies the logistics track display page to generate the logistics track according to the logistics track data, and takes a screenshot of the logistics track, and then displays the screenshot of the logistics track on the logistics track verification tab.
[0012] Preferably, in S2, the notification logistics track display page generates a logistics track according to the logistics track data, and takes a screenshot of the logistics track, specifically including:
[0013] S21. Obtain logistics track data according to the logistics order number, and draw the logistics track on the Tencent map on the logistics track display page to maximize the presentation of the logistics track, that is, the entire logistics track can be seen at a glance on the logistics track display page, and a small map is displayed in the upper left corner. The small map uses unit coordinate points for the goods, and draws a 2-kilometer electronic fence with the unit coordinate point as the center;
[0014] S22. After the logistics track is drawn, the headless Chrome is controlled programmatically to take a screenshot of the logistics track.
[0015] A system for automatically generating supporting materials for logistics tracks, using the method for automatically generating supporting materials for logistics tracks as described above, applied to a business server and a puppeteer system;
[0016] The business service end includes:
[0017] The timing module is used by the business server to set a scheduled task to trigger the takeScreenshot interface of the puppeteer system;
[0018] The display module is used when the business server receives customer access information. The business server parses the access information, obtains the logistics order number, and enters the logistics track evidence tab. The logistics track evidence tab pulls the corresponding logistics track screenshot from the database according to the logistics order number and displays it on the logistics track evidence tab.
[0019] The puppeteer system includes:
[0020] The generation and saving module is used by the puppeteer system to collect logistics information in advance, including logistics track data and logistics order number, notify the logistics track display page to generate the logistics track according to the logistics track data, take a screenshot of the logistics track, and associate the logistics track screenshot with the logistics order number and save it in the database.
[0021] Preferably, the business service end also includes:
[0022] The calling module is used when the business server receives the customer's access information. The business server parses the access information, obtains the logistics order number, and enters the logistics track evidence tab. The logistics track evidence tab calls the puppeteer system's takeScreenshot interface based on the screenshot of the logistics order number that has not been pulled into the database, notifies the logistics track display page to generate the logistics track according to the logistics track data, and takes a screenshot of the logistics track, and then displays the screenshot of the logistics track on the logistics track evidence tab.
[0023] Preferably, the puppeteer system further includes:
[0024] The drawing module is used to obtain the logistics track data according to the logistics order number, and draw the logistics track on the Tencent map on the logistics track display page to maximize the presentation of the logistics track, that is, the entire logistics track can be seen at a glance on the logistics track display page, and a small map is displayed in the upper left corner. The unit coordinate point is used for the goods on the small map, and a 2-kilometer electronic fence is drawn with the unit coordinate point as the center;
[0025] The screenshot module is used to control headless Chrome to take a screenshot of the logistics track in a programmatic way after the logistics track is drawn.
[0026] One of the above technical solutions has the following beneficial effects:
[0027] (1) By setting a scheduled task on the business server to trigger the takeScreenshot interface of the puppeteer system, the logistics track screenshot and the logistics order number are associated and saved in the database in advance. This avoids the need for the business server to frequently call third-party interfaces and dynamically process massive data when receiving customer access information, saves the resource consumption of dynamic interface calls and rendering, and establishes an associated index with key information such as the logistics order number. When the front-end logistics track evidence tab is displayed, the static logistics track screenshot in the database can be directly called to realize the function of rapid retrieval and positioning.
[0028] (2) The logistics track display page specially set up for the puppeteer system has no entry in the business server. The logistics track display page can only be opened by triggering the takeScreenshot interface of the puppeteer system. After the puppeteer system opens the logistics track display page, it is ready and waiting for instructions. Therefore, when the logistics track evidence page tab does not pull the screenshot into the database according to the logistics order number, it can quickly interact with the logistics track display page, thereby making the page interaction smoother and the user experience better. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart of a method for automatically generating supporting materials for logistics tracks according to the present invention;
[0030] Figure 2 It is a schematic diagram of the principle of a system for automatically generating supporting materials for logistics tracks according to the present invention. DETAILED DESCRIPTION
[0031] The technical solution of the present invention is further described below with reference to the accompanying drawings and through specific implementation methods.
[0032] like Figure 1 As shown, a method for automatically generating supporting materials for logistics tracks includes the following steps:
[0033] S1. The business server sets a scheduled task to trigger the takeScreenshot interface of the puppeteer system;
[0034] S2, the puppeteer system collects logistics information in advance, including logistics track data and logistics order number, notifies the logistics track display page to generate a logistics track according to the logistics track data, takes a screenshot of the logistics track, and associates the logistics track screenshot with the logistics order number and saves it in the database;
[0035] S3. When the business server receives the customer's access information, it analyzes the access information, obtains the logistics order number, and enters the logistics track verification tab. The logistics track verification tab pulls the corresponding logistics track screenshot from the database according to the logistics order number and displays it on the logistics track verification tab.
[0036] The present invention aims to solve the problem of slow query response in the prior art. By setting a scheduled task on the business server to trigger the takeScreenshot interface of the puppeteer system, the logistics track screenshot and the logistics order number are associated and saved in the database in advance, thereby avoiding the need for the subsequent business server to frequently call third-party interfaces and dynamically process massive data when receiving customer access information, eliminating the resource consumption of dynamic interface calls and rendering, and establishing an associated index with key information such as the logistics order number. The static logistics track screenshot in the database can be directly called when the front-end logistics track evidence tab is displayed, thereby realizing the function of rapid retrieval and positioning.
[0037] In summary, the present invention provides a design idea that combines offline processing with real-time query, which is an important way to optimize and improve the acquisition of logistics track supporting materials. It not only improves query efficiency, but also optimizes user experience.
[0038] Further explanation includes the following steps:
[0039] S4. When the business server receives the customer's access information, the business server parses the access information, obtains the logistics order number, and enters the logistics track verification tab. The logistics track verification tab calls the takeScreenshot interface of the puppeteer system based on the screenshot of the logistics order number that has not been pulled into the database, notifies the logistics track display page to generate the logistics track according to the logistics track data, and takes a screenshot of the logistics track, and then displays the screenshot of the logistics track on the logistics track verification tab.
[0040] The present invention aims to solve the problem of unsmooth page interaction in the prior art. The logistics track display page specially set for the puppeteer system has no entry in the business server. The logistics track display page can only be opened by triggering the takeScreenshot interface of the puppeteer system. After the puppeteer system opens the logistics track display page, it is ready and waiting for instructions. Therefore, when the logistics track evidence page tab does not pull the screenshot into the database according to the logistics order number, it can quickly interact with the logistics track display page, thereby making the page interaction smoother and the user experience better.
[0041] Further explanation, in S2, the notification logistics track display page generates a logistics track according to the logistics track data and takes a screenshot of the logistics track, specifically including:
[0042] S21. Obtain logistics track data according to the logistics order number, and draw the logistics track on the Tencent map on the logistics track display page to maximize the presentation of the logistics track, that is, the entire logistics track can be seen at a glance on the logistics track display page, and a small map is displayed in the upper left corner. The small map uses unit coordinate points for the goods, and draws a 2-kilometer electronic fence with the unit coordinate point as the center;
[0043] S22. After the logistics track is drawn, the headless Chrome is controlled programmatically to take a screenshot of the logistics track.
[0044] Specifically, the puppeteer system controls the headless Chrome browser to realize web page automation, and controls the headless Chrome browser in a programmatic way to pull trajectory information, take screenshots, and perform other operations, so as to quickly and smoothly obtain and present logistics trajectory supporting materials.
[0045] like Figure 2 As shown, a system for automatically generating supporting materials for logistics tracks adopts the method for automatically generating supporting materials for logistics tracks as described above, and is applied to a business server and a puppeteer system;
[0046] The business service end includes:
[0047] The timing module is used by the business server to set a scheduled task to trigger the takeScreenshot interface of the puppeteer system;
[0048] The display module is used when the business server receives customer access information. The business server parses the access information, obtains the logistics order number, and enters the logistics track evidence tab. The logistics track evidence tab pulls the corresponding logistics track screenshot from the database according to the logistics order number and displays it on the logistics track evidence tab.
[0049] The puppeteer system includes:
[0050] The generation and saving module is used by the puppeteer system to collect logistics information in advance, including logistics track data and logistics order number, notify the logistics track display page to generate the logistics track according to the logistics track data, take a screenshot of the logistics track, and associate the logistics track screenshot with the logistics order number and save it in the database.
[0051] To further illustrate, the business service end also includes:
[0052] The calling module is used when the business server receives the customer's access information. The business server parses the access information, obtains the logistics order number, and enters the logistics track evidence tab. The logistics track evidence tab calls the puppeteer system's takeScreenshot interface based on the screenshot of the logistics order number that has not been pulled into the database, notifies the logistics track display page to generate the logistics track according to the logistics track data, and takes a screenshot of the logistics track, and then displays the screenshot of the logistics track on the logistics track evidence tab.
[0053] To further illustrate, the puppeteer system also includes:
[0054] The drawing module is used to obtain the logistics track data according to the logistics order number, and draw the logistics track on the Tencent map on the logistics track display page to maximize the presentation of the logistics track, that is, the entire logistics track can be seen at a glance on the logistics track display page, and a small map is displayed in the upper left corner. The unit coordinate point is used for the goods on the small map, and a 2-kilometer electronic fence is drawn with the unit coordinate point as the center;
[0055] The screenshot module is used to control headless Chrome to take a screenshot of the logistics track in a programmatic way after the logistics track is drawn.
[0056] Another object of the present invention is to provide a system for automatically generating supporting materials for logistics trajectories, aiming to solve the problems of slow query response and unsmooth page interaction in the prior art.
[0057] The technical principle of the present invention is described above in conjunction with specific embodiments. These descriptions are only for explaining the principle of the present invention and cannot be interpreted as limiting the scope of protection of the present invention in any way. Based on the explanations herein, those skilled in the art can associate other specific embodiments of the present invention without creative work, and these equivalent variations or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A method for automatically generating supporting materials for logistics tracks, characterized in that: The following steps are involved: S1. The business server sets a scheduled task to trigger the takeScreenshot interface of the puppeteer system; S2, the puppeteer system collects logistics information in advance, including logistics track data and logistics order number, notifies the logistics track display page to generate a logistics track according to the logistics track data, takes a screenshot of the logistics track, and associates the logistics track screenshot with the logistics order number and saves it in the database; S3. When the business server receives the customer's access information, it analyzes the access information, obtains the logistics order number, and enters the logistics track verification tab. The logistics track verification tab pulls the corresponding logistics track screenshot from the database according to the logistics order number and displays it on the logistics track verification tab.
2. The method for automatically generating supporting materials for logistics tracks according to claim 1 is characterized in that: The following steps are also included: S4. When the business server receives the customer's access information, the business server parses the access information, obtains the logistics order number, and enters the logistics track verification tab. The logistics track verification tab calls the takeScreenshot interface of the puppeteer system based on the screenshot of the logistics order number that has not been pulled into the database, notifies the logistics track display page to generate the logistics track according to the logistics track data, and takes a screenshot of the logistics track, and then displays the screenshot of the logistics track on the logistics track verification tab.
3. The method for automatically generating supporting materials for logistics tracks according to claim 1 is characterized in that: In S2, the notification logistics track display page generates a logistics track according to the logistics track data and takes a screenshot of the logistics track, specifically including: S21. Obtain logistics track data according to the logistics order number, and draw the logistics track on the Tencent map on the logistics track display page to maximize the presentation of the logistics track, that is, the entire logistics track can be seen at a glance on the logistics track display page, and a small map is displayed in the upper left corner. The small map uses unit coordinate points for the goods, and draws a 2-kilometer electronic fence with the unit coordinate point as the center; S22. After the logistics track is drawn, the headless Chrome is controlled programmatically to take a screenshot of the logistics track.
4. A system for automatically generating supporting materials for logistics tracks, characterized in that: A method for automatically generating supporting materials for logistics tracks as described in any one of claims 1 to 3 is applied to a business service end and a puppeteer system; The business service end includes: The timing module is used by the business server to set a scheduled task to trigger the takeScreenshot interface of the puppeteer system; The display module is used for when the business server receives the customer's access information, the business server parses the access information, obtains the logistics order number, and enters the logistics track evidence tab. The logistics track evidence tab pulls the corresponding logistics track screenshot in the database according to the logistics order number and displays it on the logistics track evidence tab; The puppeteer system includes: The generation and saving module is used by the puppeteer system to collect logistics information in advance, including logistics track data and logistics order number, notify the logistics track display page to generate the logistics track according to the logistics track data, take a screenshot of the logistics track, and associate the logistics track screenshot with the logistics order number and save it in the database.
5. A system for automatically generating supporting materials for logistics tracks according to claim 4, characterized in that: The business service end also includes: The calling module is used when the business server receives the customer's access information. The business server parses the access information, obtains the logistics order number, and enters the logistics track evidence tab. The logistics track evidence tab calls the puppeteer system's takeScreenshot interface based on the screenshot of the logistics order number that has not been pulled into the database, notifies the logistics track display page to generate the logistics track according to the logistics track data, and takes a screenshot of the logistics track, and then displays the screenshot of the logistics track on the logistics track evidence tab.
6. A system for automatically generating supporting materials for logistics tracks according to claim 4, characterized in that: The puppeteer system also includes: The drawing module is used to obtain the logistics track data according to the logistics order number, and draw the logistics track on the Tencent map on the logistics track display page to maximize the presentation of the logistics track, that is, the entire logistics track can be seen at a glance on the logistics track display page, and a small map is displayed in the upper left corner. The unit coordinate point is used for the goods on the small map, and a 2-kilometer electronic fence is drawn with the unit coordinate point as the center; The screenshot module is used to control headless Chrome to take a screenshot of the logistics track in a programmatic way after the logistics track is drawn.
Citation Information
Patent Citations
Webpage screenshot method and device
CN113382083A
Information query method and device, electronic equipment and readable storage medium
CN113779091A
Logistics data query method and related device
CN115293699A
