Logistics network name logic definition method, apparatus and device, and storage medium
By obtaining basic information of logistics outlets, determining basic elements and formulating naming logic templates, and automatically generating logical names for logistics outlets, it solves the problem of inconvenient naming of logistics outlets and improves management efficiency and information processing speed.
Patent Information
- Application Number
- CN202411410923.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art is difficult to effectively name and identify logistics outlets, resulting in inconvenience in management and information processing.
By obtaining basic information of logistics outlets, determining basic elements, setting a character set for each element, formulating a naming logic template, automatically generating logical names for logistics outlets, and storing and updating them in the database.
It realizes the systematic and standardized nature of logistics outlet naming, improves management efficiency and information processing speed, and reduces the problems caused by name chaos.
Smart Images

Figure CN119398049A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of logistics information management, and in particular to a method, device, equipment and storage medium for logically defining a logistics network name. Background Art
[0002] With the rapid development of e-commerce, the logistics industry is facing increasing demands, especially for the management and processing of logistics information. As key nodes in the logistics network, logistics outlets play a vital role in the entire supply chain management. However, due to the large number and wide distribution of logistics outlets, how to effectively name and identify each outlet has become an urgent problem to be solved. Traditional naming methods often lack systematicity and standardization, which brings great inconvenience to subsequent information processing.
[0003] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0004] The main purpose of the present invention is to solve the problem that the existing logistics outlets are huge in number and widely distributed, resulting in the inability to effectively name and identify each outlet.
[0005] The first aspect of the present invention provides a method for logically naming logistics outlets, including: obtaining basic information of logistics outlets, and determining basic elements used for logical naming of logistics outlets based on the basic information; setting a specific character set for each basic element, and formulating a naming logic template based on the basic elements; naming each logistics outlet according to the naming logic template, and storing the named logistics outlet logical name in a database; when a new logistics outlet is added or the historical logistics outlet information changes, the logistics outlet name record in the database is automatically updated.
[0006] Optionally, in a first implementation of the first aspect of the present invention, obtaining basic information of a logistics network point, and determining basic elements for logical naming of the logistics network point according to the basic information include the following steps:
[0007] Call the API interface to obtain the basic information of the logistics outlets, the basic information includes: the geographical location of the outlets, the service type of the outlets, the level of the outlets, and the status of the outlets; clean the basic information to remove duplicate, erroneous or irrelevant information to obtain pre-processed basic information; determine the basic elements used for the logical naming of the logistics outlets based on the pre-processed basic information, the basic elements include: country code, city code, district code, street number code, logistics outlet service type, logistics outlet level, and logistics outlet status.
[0008] Optionally, in a second implementation method of the first aspect of the present invention, a specific character set is set for each basic element, and a naming logic template based on the basic elements is formulated, including the steps of: clarifying the meaning of each basic element and setting a specific character set for each basic element; designing a naming logic template according to the order and importance of the basic elements, and the corresponding character set of each basic element is separated by a specific separator.
[0009] Optionally, in a third implementation method of the first aspect of the present invention, each logistics point is named according to the naming logic template, and the named logistics point logical name is stored in a database, including the steps of: using a programming language to write a naming logic function, the naming logic function accepts the basic elements of the logistics point as input; traversing the basic elements of all logistics points, executing the naming logic function for each logistics point, and generating a logistics point logical name; storing the generated logistics point logical name together with the basic information of the corresponding logistics point in the database.
[0010] Optionally, in a fourth implementation method of the first aspect of the present invention, when a new logistics point is added or the information of a historical logistics point changes, the logistics point name record in the database is automatically updated, including the steps of: setting a trigger according to the database type or using an external event monitoring mechanism to capture data change events; if it is monitored that the status of a logistics point changes from normal to delisted, the current year, month and day of the system is added to the logical name of the logistics point, and the point name assigned by the system is stored in the database.
[0011] Optionally, in a fifth implementation method of the first aspect of the present invention, when a new logistics point is added or the information of a historical logistics point changes, the logistics point name record in the database is automatically updated, including the steps of: setting a trigger according to the database type or using an external event monitoring mechanism to capture data change events; if it is monitored that the status of the logistics point changes from suspended to normal, determining whether the logistics point exists in the database; if the database does not contain the logistics point, directly naming the logistics point according to the naming logic template, and storing the named logistics point logical name in the database; if the database contains the logistics point, adding the current year, month and day of the system to the logistics point logical name corresponding to the logistics point.
[0012] Optionally, in a sixth implementation method of the first aspect of the present invention, when a new logistics point or historical logistics point information changes, the logistics point name record in the database is automatically updated, including the steps of: setting a trigger according to the database type or using an external event monitoring mechanism to capture data change events; if it is monitored that the point status of the logistics point changes from delisted to normal, determining whether the logistics point exists in the database; if the database does not contain the logistics point, directly naming the logistics point according to the naming logic template, and storing the named logistics point logical name in the database; if the database contains the logistics point, determining whether the system time when the point status of the logistics point changes from delisted to normal is the same day as the system time when the point status of the current logistics point changes from normal to delisted; if it is not the same day, directly adding the year, month, and day of the current system to the logistics point logical name corresponding to the logistics point in the database; if it is the same day, directly adding the year, month, day, and hour and minute of the current system to the logistics point logical name corresponding to the logistics point in the database.
[0013] The second aspect of the present invention provides a device for logically naming logistics outlets, including: a determination module for acquiring basic information of logistics outlets, and determining basic elements for logical naming of logistics outlets based on the basic information; a formulation module for setting a specific character set for each basic element, and formulating a naming logic template based on the basic elements; a naming module for naming each logistics outlet according to the naming logic template, and storing the named logistics outlet logical name in a database; an update module for automatically updating the logistics outlet name record in the database when new logistics outlets are added or historical logistics outlet information changes.
[0014] Optionally, in a first implementation method of the second aspect of the present invention, the determination module includes: a calling unit, used to call an API interface to obtain basic information of a logistics outlet, the basic information including: geographic location of the outlet, service type of the outlet, level of the outlet, and status of the outlet; a cleaning unit, used to clean the basic information, remove duplicate, erroneous or irrelevant information, and obtain pre-processed basic information; an acquisition unit, used to determine the basic elements used for logical naming of logistics outlets based on the pre-processed basic information, the basic elements including: country code, city code, district code, street number code, logistics outlet service type, logistics outlet level, and logistics outlet status.
[0015] Optionally, in a second implementation of the second aspect of the present invention, the formulation module includes: a setting unit, used to clarify the meaning of each basic element and set a specific character set for each basic element; a design unit, used to design a naming logic template according to the order and importance of the basic elements, and the corresponding character set of each basic element is separated by a specific separator.
[0016] Optionally, in a third implementation method of the second aspect of the present invention, the naming module includes: a writing unit, used to write a naming logic function using a programming language, and the naming logic function accepts the basic elements of the logistics network as input; a generation unit, used to traverse the basic elements of all logistics network points, execute the naming logic function for each logistics network point, and generate a logistics network point logical name; a storage unit, used to store the generated logistics network point logical name together with the basic information of the corresponding logistics network in a database.
[0017] Optionally, in a fourth implementation method of the second aspect of the present invention, the update module includes: a capture unit, used to set triggers according to the database type or use an external event monitoring mechanism to capture data change events; a first change unit, used to add the system's current year, month, and day to the logical name of the logistics point when it is monitored that the point status of the logistics point has changed from normal to delisted, and store the point name assigned by the system in the database.
[0018] Optionally, in a fifth implementation of the second aspect of the present invention, the update module includes: a capture unit, which sets a trigger according to the database type or uses an external event monitoring mechanism to capture data change events; a second change unit, which is used to determine whether the logistics point exists in the database if it is monitored that the status of the logistics point changes from suspended to normal; if the database does not contain the logistics point, directly name the logistics point according to the naming logic template, and store the named logistics point logical name in the database; if the database contains the logistics point, add the current year, month and day of the system to the logistics point logical name corresponding to the logistics point.
[0019] Optionally, in a sixth implementation manner of the second aspect of the present invention, the update module includes: a capture unit, which sets a trigger according to the database type or uses an external event monitoring mechanism to capture data change events; a third change unit, which is used to determine whether the logistics point exists in the database if it is monitored that the point status of the logistics point has changed from delisted to normal; if the database does not contain the logistics point, the logistics point is directly named according to the naming logic template, and the named logistics point logical name is stored in the database; if the database contains the logistics point, it is determined whether the system time when the point status of the logistics point is changed from delisted to normal is the same day as the system time when the point status of the current logistics point is changed from normal to delisted; if it is not the same day, the year, month, and day of the current system is directly added to the logistics point logical name corresponding to the logistics point in the database; if it is the same day, the year, month, day, hour and minute of the current system are directly added to the logistics point logical name corresponding to the logistics point in the database.
[0020] The third aspect of the present invention provides a logistics network name logical naming device, comprising: a memory and at least one processor, the memory storing computer-readable instructions, the memory and the at least one processor being interconnected through a line; the at least one processor calls the computer-readable instructions in the memory so that the logistics network name logical naming device executes each step of the logistics network name logical naming method as described above.
[0021] A fourth aspect of the present invention provides a computer-readable storage medium, in which computer-readable instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes each step of the above-mentioned method for logically naming logistics network points.
[0022] Beneficial effects: The technical solution of the present invention obtains the basic information of the logistics outlets, determines the basic elements used for the logical naming of the logistics outlets based on the basic information; sets a specific character set for each basic element, and formulates a naming logic template based on the basic elements; names each logistics outlet according to the naming logic template, and stores the named logistics outlet logical name in the database; when a new logistics outlet is added or the historical logistics outlet information changes, the logistics outlet name record in the database is automatically updated. The method of the present invention applies the naming logic to the actual logistics outlet management to ensure the consistency and accuracy of the naming. The method significantly improves the management efficiency and information processing speed of the logistics outlets, and reduces various problems caused by name confusion. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A first flow chart of a method for logically naming logistics outlets provided by an embodiment of the present invention;
[0024] Figure 2 A second flow chart of the method for logically naming logistics outlets provided in an embodiment of the present invention;
[0025] Figure 3 A third flow chart of the method for logically naming logistics outlets provided in an embodiment of the present invention;
[0026] Figure 4 A fourth flow chart of the method for logically naming logistics outlets provided by an embodiment of the present invention;
[0027] Figure 5 A fifth flow chart of the method for logically naming logistics outlets provided by an embodiment of the present invention;
[0028] Figure 6 A sixth flow chart of the method for logically naming logistics outlets provided by an embodiment of the present invention;
[0029] Figure 7 A seventh flow chart of the method for logically naming logistics outlets provided in an embodiment of the present invention;
[0030] Figure 8 A schematic diagram of a structure of a device for logically naming logistics network points provided by an embodiment of the present invention;
[0031] Fig. 9 Another structural schematic diagram of the device for logically naming logistics network points provided by an embodiment of the present invention;
[0032] Fig.10 A schematic diagram of the structure of a logistics network point name logical naming device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The embodiment of the present invention provides a method, device, equipment and storage medium for logical naming of logistics outlets, which obtains basic information of logistics outlets, determines basic elements used for logical naming of logistics outlets according to the basic information; sets a specific character set for each basic element, and formulates a naming logic template based on the basic element; names each logistics outlet according to the naming logic template, and stores the named logistics outlet logical name in a database; when new logistics outlets or historical logistics outlet information changes, the logistics outlet name record in the database is automatically updated. The method of the present invention applies naming logic to actual logistics outlet management to ensure the consistency and accuracy of naming. The method significantly improves the management efficiency and information processing speed of logistics outlets, and reduces various problems caused by name confusion.
[0034] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first embodiment of the method for logically naming logistics network points in the embodiment of the present invention includes:
[0036] S100, obtaining basic information of logistics outlets, and determining basic elements for logical naming of logistics outlets according to the basic information;
[0037] Specifically, considering the distribution characteristics of logistics outlets, geographical location information is essential in the basic information of logistics outlets, which can include country codes, province codes, city codes, district and county codes, and even finer-grained geographical divisions. For example, internationally accepted geocoding standards (such as ISO 3166-1alpha-2) are used to represent countries and regions; basic information can also include functional characteristics: different logistics outlets have different functions, such as distribution centers, transfer stations, return processing centers, etc. The definition of functional characteristics can help distinguish the specific responsibilities of outlets. Basic information can also include level coding: according to the hierarchical structure of the logistics network, corresponding codes are assigned to outlets at different levels. For example, national-level distribution centers and regional-level distribution centers should be different in coding. Of course, in addition to the above information, more detailed geographical information such as street names and specific location coordinates can also be considered to facilitate precise positioning. The main purpose of acquiring the basic information of logistics outlets in this embodiment is to extract the basic elements used for the logical naming of logistics outlets, create a data dictionary for each basic element, and list all possible values and meanings; this can ensure that the naming of all logistics outlets is based on unified standards and rules, and by defining clear value ranges and meanings, the system can flexibly adapt to possible changes in the future.
[0038] S200, setting a specific character set for each basic element, and formulating a naming logic template based on the basic element;
[0039] In this embodiment, a suitable character set is selected for each basic element, such as using two uppercase letters for the country code, using numbers or alphanumeric combinations for the city code and district code, and using predefined abbreviations or codes for functions, levels, and states. Finally, a naming template that includes all basic elements is designed.
[0040] S300, naming each logistics network point according to the naming logic template, and storing the named logistics network point logical name in the database;
[0041] In this embodiment, by writing a script or program, a logistics point logical name is automatically generated for each logistics point according to a naming logic template; a table structure is designed in the database to store the basic information of the logistics point and the generated logistics point logical name; the automatically generated logistics point logical name is entered into the database together with other information of the logistics point, and data integrity and consistency verification is performed. The automated naming process of this embodiment greatly improves work efficiency and reduces human errors; by generating names through a program, errors caused by human factors are reduced. Database storage facilitates subsequent data query, analysis and maintenance.
[0042] S400. When a new logistics point is added or the historical logistics point information is changed, the logistics point name record in the database is automatically updated.
[0043] In this embodiment, triggers or periodic tasks are set to monitor changes in logistics outlet information; when new or changed logistics outlet information is detected, the name is automatically regenerated according to the latest naming logic template; the newly generated name is updated to the corresponding record in the database. The benefits of this are that the names of logistics outlets in the database are always kept up to date; manual intervention is reduced, the automation level of the system is improved; and the naming rules of all logistics outlets are ensured to be consistent, avoiding confusion caused by manual updates.
[0044] The method of the present invention applies the naming logic to the actual logistics network point management to ensure the consistency and accuracy of the naming. The method significantly improves the management efficiency and information processing speed of the logistics network points and reduces various problems caused by name confusion.
[0045] See also Figure 2 The second embodiment of the method for logically naming logistics network points in the embodiment of the present invention includes:
[0046] S110, calling the API interface to obtain basic information of the logistics outlets, the basic information including: geographical location of the outlets, service type of the outlets, level of the outlets, and status of the outlets;
[0047] S120, cleaning the basic information to remove duplicate, erroneous or irrelevant information to obtain pre-processed basic information;
[0048] S130. Determine basic elements for logical naming of logistics outlets according to the pre-processed basic information, wherein the basic elements include: country code, city code, district code, street number code, logistics outlet service type, logistics outlet level, and logistics outlet status.
[0049] Specifically, first, a reliable API interface needs to be determined, which can return relevant information of logistics outlets. This usually involves cooperating with logistics companies or third-party data providers to obtain access rights and API documents; according to the API documents, write code to send HTTP requests to the API interface, and the request should contain necessary parameters (such as area code, query keywords, etc.); receive the response of the API, and parse the response data in JSON or XML format to extract basic information such as the geographic location of the outlet, the type of service of the outlet, the level of the outlet, and the status of the outlet, among which the geographic location includes longitude and latitude, province, city, and street number; the service type of the outlet includes express delivery, warehousing, and distribution; the status of the outlet includes: normal, suspended, and delisted; the level of the outlet includes level one, level two, etc. The data obtained through the API interface in this embodiment is usually real-time or near real-time, ensuring the latest information; the data format provided by the API is usually standardized, which is convenient for subsequent processing and storage; the data is automatically obtained to reduce the workload of manual query and entry.
[0050] In this embodiment, the basic information cleaning process includes: removing duplicate records by comparing key fields of records (such as outlet ID, address, etc.); using regular expressions, logical checks, etc. to check and correct errors in the data, such as format errors, unreasonable data values, etc.; deleting data fields that are not related to the basic information of logistics outlets to maintain the purity of the data. The cleaned data is more accurate and complete, providing a reliable basis for subsequent analysis; after cleaning, redundant and irrelevant data can be removed, reducing storage space usage and improving query efficiency.
[0051] In this embodiment, basic elements such as country code, city code, district code, street number code, logistics network service type, logistics network level, and logistics network status are extracted from the pre-processed basic information, and the extracted basic elements are combined into a logical name of the logistics network in a certain order and format. For example, "CN-SH-XH-JSDM123-EX-AO", where "CN" represents the country code, "SH" represents the city code of Shanghai, "XH" represents a district code, "JSDM123" is the street number code, "EX" represents the express service type, "A" represents the network level, and "O" represents the network status (open). This embodiment uses logical naming to enable each logistics network to have a unique and easy-to-understand identifier for easy management and query; the naming contains rich information, and the location and basic situation of the network can be roughly understood without additional queries; the naming rules are unified, which facilitates automated data processing and analysis in the system.
[0052] See also Figure 3 The third embodiment of the method for logically naming logistics network points in the embodiment of the present invention includes:
[0053] S210, clarifying the meaning of each basic element, and setting a specific character set for each basic element;
[0054] S220. Design a naming logic template according to the order and importance of the basic elements, where the corresponding character set of each basic element is separated by a specific separator.
[0055] Specifically, first clarify the meaning of the basic elements, such as country code: used to identify the country where the logistics outlet is located, usually a two- or three-letter code of the ISO 3166-1alpha-2 or alpha-3 standard; city code: used to identify the city where the logistics outlet is located, usually a short code that is customized or uses the existing city coding system; district code: used to further refine the district or county where the logistics outlet is located, and is also a short code that is customized or uses the existing coding system; street house number code: used to identify the specific address of the logistics outlet, which may include the street name and house number, and is simplified to a code form here; logistics outlet service type: indicates the type of service provided by the outlet, such as express delivery, warehousing, distribution, etc., represented by letters or letter combinations; logistics outlet level: indicates the scale or importance level of the logistics outlet, represented by numbers or letters; logistics outlet status: indicates the operating status of the logistics outlet, such as normal, suspended, delisted, etc., represented by a single letter or a short code. As an example, a specific character set is assigned to each basic element, country code: using the ISO 3166-1alpha-2 standard (such as "CN" for China). City code, district code: a custom short code (such as "SH" for Shanghai, "XH" for Xuhui District). Street code: a custom code that may contain a combination of letters and numbers (such as "JSD123"). Logistics point service type: use letter codes (such as "EX" for express delivery, "WH" for warehousing). Logistics point level: use numbers or letters (such as "A" for a first-level point, "B" for a second-level point). Logistics point status: use a single letter (such as "O" for open, "C" for closed).
[0056] Determine the order of basic elements according to actual needs. Generally, the order from the largest scope to the most specific details is reasonable, such as country first, then city, then district and county, and finally the specific address and outlet attributes; importance is usually related to order, but in some cases, some elements may be more important than others (such as country code is usually more important than street number); use specific separators (such as hyphen "-" or underscore "_") to separate different basic elements; design a clear naming template, such as: "country code-city code-district code-street number code-service type-level-status". Substitute the actual basic element values into the template to generate the final name. For example, a first-level express outlet located in Xuhui District, Shanghai, China, with an open status, may be named "CN-SH-XH-JSD123-EX-AO".
[0057] Before the logistics outlets are named, their logos may be a string of confusing numbers or letters, without clear meaning and structure, which is difficult to understand and maintain; after naming: "CN-SH-XH-JSD123-EX-AO" Such naming clearly shows the country, city, district, specific address, service type, level and status of the logistics outlets. The benefits of doing this are high readability, clear naming structure, easy to read and understand, and reduced possibility of misunderstanding and confusion; by combining different basic elements, a unique name can be generated to avoid naming conflicts; when the information of the logistics outlets changes (such as moving to a new address or changing the service type), only the corresponding part of the name needs to be updated; the naming rules can be implemented by programming, supporting automatic generation and parsing of names, and improving work efficiency; unified naming rules help to achieve data standardization and facilitate information sharing and exchange between systems; through naming, key information of logistics outlets can be quickly identified, which helps to optimize management and decision-making processes.
[0058] See also Figure 4 The fourth embodiment of the method for logically naming the logistics outlet name of express delivery in the embodiment of the present invention includes:
[0059] S310, using a programming language to write a naming logic function, wherein the naming logic function accepts basic elements of a logistics network point as input;
[0060] S320, traverse the basic elements of all logistics outlets, execute the naming logic function for each logistics outlet, and generate a logical name for the logistics outlet;
[0061] S330. Store the generated logical name of the logistics network point together with the basic information of the corresponding logistics network point in the database.
[0062] Specifically, first define the input parameters, country code (countryCode), city code (cityCode), district code (districtCode), street address code (streetAddressCode), logistics point service type (serviceType), logistics point level (level), logistics point status (status); design naming rules according to actual business needs, for example, the naming rule can be country code_city code_district code_street address code_service type_level_status abbreviation; some parts (such as status) may need to be converted into abbreviated form to reduce length or meet specific format requirements. Use a programming language (such as Python) to implement this function as follows:
[0063] def generate_logistic_name(countryCode,cityCode,districtCode,streetAddressCode,serviceType,level,status):
[0064] status_abbr={'active':'A','retired':'R','pause':
[0065] 'P'}[status]#Assume there are three states
[0066] return f"{countryCode}_{cityCode}_{districtCode}_{streetAddressCode}_{serviceType}_{level}_{status_abbr}".
[0067] Next, traverse all logistics outlets and apply the generate_logistic_name function to each logistics outlet. The specific code is as follows:
[0068] #Assume that logistic_centers is a list containing all logistics network information for center inlogistic_centers:center['logical_name']=generate_logistic_name(center['countryCode'],center['cityCode'],center['districtCode'],center['streetAddressCode'],center['serviceType'],center['level'],center['status']).
[0069] Make sure there is a table in the database to store logistics point information, including logical names; use a database operation library (such as SQLAlchemy, pymysql, etc.) to insert or update the updated logistics point information (including logical names) into the database, as shown below:
[0070] #Suppose there is a function update_database used to update the database for center in logistic_centers: update_database(center) #Implement this function to actually update the database.
[0071] In this embodiment, the naming of all logistics outlets follows the same rules through automatically generated logical names, which improves the consistency and readability of the data; the rich information contained in the logical names (such as country, city, district, county, etc.) makes queries based on these attributes more convenient and efficient; when the number of logistics outlets increases or the attributes change, it is only necessary to adjust the naming logic function without manually changing the name of each outlet; automated naming reduces the possibility of human error, especially when the number of logistics outlets is large.
[0072] See also Figure 5 The fifth embodiment of the logical naming of logistics network names in the embodiment of the present invention includes:
[0073] S410, setting triggers according to the database type or using an external event monitoring mechanism to capture data change events;
[0074] S420. If it is monitored that the status of the logistics network point changes from normal to offline, the current year, month and day of the system is added after the logical name of the logistics network point, and the network point name assigned by the system is stored in the database.
[0075] Specifically, first determine the data change conditions, and in the database, create a trigger for the table containing the logistics network information. The trigger is triggered when the status field is updated to "retired", that is, the status field (such as status) of the logistics network changes from a certain value (such as 'active' for normal) to another value (such as 'retired' for retired). The trigger updates the logical name, and adds the current year, month and day of the system after the logical name, providing a clear record of the historical changes of the logistics network, which is helpful for subsequent auditing and data analysis. By implementing these steps in this embodiment, you can effectively monitor the changes in the status of logistics network points, and automatically update their logical names when necessary, thereby providing a more reliable and flexible basis for data management and analysis. As an example, when the network status changes from "normal" to "retired", the year, month and day are added after the network name, and the network name assigned by the system is stored in the database. For example: the network name is "Qingpu Zhaoxiang Company", and the "retired" time is June 27, 2024. At this time, the network name is "Qingpu Zhaoxiang Company 240627".
[0076] See also Figure 6 The sixth embodiment of the logical naming of logistics network names in the embodiment of the present invention includes:
[0077] S510, setting triggers according to the database type or using an external event monitoring mechanism to capture data change events;
[0078] S520: If it is monitored that the status of the logistics network point changes from suspended to normal, determine whether the logistics network point exists in the database;
[0079] S530: If the database does not contain the logistics network point, directly name the logistics network point according to the naming logic template, and store the named logistics network point logical name in the database;
[0080] S540. If the logistics point is included in the database, add the current year, month and day of the system after the logical name of the logistics point corresponding to the logistics point.
[0081] Specifically, first, confirm whether the database is relational (such as MySQL, PostgreSQL) or NoSQL (such as MongoDB, Redis). For relational databases, you can write SQL triggers to monitor the update operations of specific tables (such as the logistics outlet status table). The trigger should be triggered when the status field (such as status) changes from "pause" to "normal". If you use a NoSQL database or need a more flexible monitoring mechanism, you can use a message queue (such as RabbitMQ, Kafka) or a database change data capture (CDC) tool to monitor data changes. When a specific data change is detected, a message containing the change information is sent to the message queue. Create an event processing service that subscribes to the above message queue or trigger event. Triggers or external monitoring mechanisms can respond to data changes immediately, ensuring that the system can handle the status changes of logistics outlets in real time; reducing the need for manual intervention and improving the automation level of the system.
[0082] When the event processing service receives a state change event, it uses a database query (such as a SQL query or a NoSQL query) to check whether the logistics point already exists in the database. By querying the database to confirm the existence of the logistics point, it is possible to avoid repeated creation or updating of incorrect point information.
[0083] If the logistics point is not contained in the database, the logistics point is directly named according to the naming logic template, and the named logistics point logical name is stored in the database. The naming logic template ensures the standardization and identifiability of the logistics point name, and the information of the new logistics point is fully recorded in the database, providing a data basis for subsequent operations.
[0084] If the database contains the logistics outlet, the current year, month and day of the system will be added after the logical name of the logistics outlet corresponding to the logistics outlet. By adding a timestamp after the name, the change history of the logistics outlet name can be clearly tracked, which is convenient for problem tracking and auditing. In the case of multiple status changes, ensure that the name after each change is unique to avoid confusion and errors.
[0085] For example, when "Qingpu Zhaoxiang Company (suspended)" is changed from "suspended" to "normal", it is first determined whether "Qingpu Zhaoxiang Company" exists in the database. If not, the branch name is changed to "Qingpu Zhaoxiang Company". If it exists, the branch name is changed to "the branch name followed by the current system year, month and day", that is, "Qingpu Zhaoxiang Company 240628".
[0086] See also Figure 7 The seventh embodiment of the logical naming of logistics network names in the embodiment of the present invention includes:
[0087] S610, setting triggers according to the database type or using an external event monitoring mechanism to capture data change events;
[0088] S620: If it is monitored that the status of the logistics network point changes from offline to normal, determine whether the logistics network point exists in the database;
[0089] S630: If the database does not contain the logistics network point, directly name the logistics network point according to the naming logic template, and store the named logistics network point logical name in the database;
[0090] S640: If the database includes the logistics outlet, determine whether the system time when the outlet status of the logistics outlet changes from offline to normal is the same day as the system time when the outlet status of the current logistics outlet changes from normal to offline;
[0091] S650. If it is not the same day, directly add the current system year, month and day after the logical name of the logistics outlet corresponding to the logistics outlet in the database;
[0092] S660. If it is the same day, then directly add the year, month, day, hour and minute of the current system after the logical name of the logistics network point corresponding to the logistics network point in the database.
[0093] Specifically, confirm whether the database is relational (such as MySQL, PostgreSQL) or NoSQL (such as MongoDB, Redis). For relational databases, you can write SQL triggers to monitor update operations on specific tables (such as logistics outlet status tables). The trigger should be triggered when the status field (such as status) changes from "offline" to "normal". If you use a NoSQL database or need a more flexible monitoring mechanism, you can use a message queue (such as RabbitMQ, Kafka) or a database change data capture (CDC) tool to monitor data changes. When a specific data change is detected, a message containing the change information is sent to the message queue. Create an event processing service that subscribes to the above message queue or trigger event. Triggers or external monitoring mechanisms can respond to data changes immediately, ensuring that the system can handle status changes of logistics outlets in real time; reducing the need for manual intervention and improving the automation level of the system.
[0094] When the event processing service receives a state change event, it uses a database query (such as a SQL query or a NoSQL query) to check whether the logistics point already exists in the database. By querying the database to confirm the existence of the logistics point, it is possible to avoid repeated creation or updating of incorrect point information.
[0095] If the logistics point is not contained in the database, the logistics point is directly named according to the naming logic template, and the named logistics point logical name is stored in the database. The naming logic template ensures the standardization and identifiability of the logistics point name, and the information of the new logistics point is fully recorded in the database, providing a data basis for subsequent operations.
[0096] If the database contains the logistics network point, it is determined whether the system time when the network status of the logistics network point is changed from off-line to normal is the same day as the system time when the network status of the current logistics network point is changed from normal to off-line. This embodiment queries the database for the status change history of the logistics network point, especially focusing on the change time from "normal" to "off-line" and from "off-line" to "normal", and compares whether the two change times are on the same day. By comparing the time, repeated processing due to repeated status changes on the same day can be avoided.
[0097] If it is not the same day, simply add the current system year, month and day to the logical name of the logistics outlet corresponding to the logistics outlet in the database. By adding a timestamp, the change history of the logistics outlet name can be tracked, which is convenient for auditing and tracking.
[0098] If it is the same day, the current system's year, month, day, hour and minute are directly added to the logical name of the logistics outlet corresponding to the logistics outlet in the database to provide higher accuracy.
[0099] For example, when "Qingpu Zhaoxiang Company 240627" is changed from "offline" to "normal", it is first determined whether "Qingpu Zhaoxiang Company" exists in the database. If not, the branch name is changed to "Qingpu Zhaoxiang Company". If it exists, the branch name is changed to "the branch name followed by the year, month and day of the current system", that is, "Qingpu Zhaoxiang 240628". If it is changed on the same day, the original name when "offline" was "Qingpu Zhaoxiang Company 240627", and the system has "Qingpu Zhaoxiang", so it is changed to the normal branch name plus the time and minute "Qingpu Zhaoxiang Company 2406270945".
[0100] The method of the present invention applies the naming logic to the actual logistics network point management to ensure the consistency and accuracy of the naming. The method significantly improves the management efficiency and information processing speed of the logistics network points and reduces various problems caused by name confusion.
[0101] The above describes the method for logically naming the names of logistics outlets in the embodiment of the present invention. The following describes the device for logically naming the names of logistics outlets in the embodiment of the present invention. Figure 8 In one embodiment of the present invention, a device for logically naming a logistics network point includes:
[0102] A determination module 10 is used to obtain basic information of the logistics network point and determine the basic elements used for the logical naming of the logistics network point according to the basic information;
[0103] A formulation module 20, for setting a specific character set for each basic element, and formulating a naming logic template based on the basic element;
[0104] A naming module 30, used to name each logistics network point according to the naming logic template, and store the named logistics network point logical name in the database;
[0105] The updating module 40 is used to automatically update the logistics network point name record in the database when a new logistics network point is added or the historical logistics network point information is changed.
[0106] The present invention applies naming logic to actual logistics network management to ensure the consistency and accuracy of naming. This method significantly improves the management efficiency and information processing speed of logistics networks and reduces various problems caused by name confusion.
[0107] See also Fig. 9 Another embodiment of the device for logically naming logistics network points in the embodiment of the present invention includes:
[0108] A determination module 10 is used to obtain basic information of the logistics network point and determine the basic elements used for the logical naming of the logistics network point according to the basic information;
[0109] A formulation module 20, for setting a specific character set for each basic element, and formulating a naming logic template based on the basic element;
[0110] A naming module 30, used to name each logistics network point according to the naming logic template, and store the named logistics network point logical name in the database;
[0111] The updating module 40 is used to automatically update the logistics network point name record in the database when a new logistics network point is added or the historical logistics network point information is changed.
[0112] In this embodiment, the determining module 10 includes:
[0113] The calling unit 11 is used to call the API interface to obtain basic information of the logistics outlets, the basic information includes: the geographical location of the outlets, the service type of the outlets, the level of the outlets, and the status of the outlets;
[0114] A cleaning unit 12 is used to clean the basic information to remove duplicate, erroneous or irrelevant information to obtain pre-processed basic information;
[0115] The acquisition unit 13 is used to determine the basic elements used for the logical naming of the logistics network according to the pre-processed basic information, and the basic elements include: country code, city code, district code, street number code, logistics network service type, logistics network level, and logistics network status.
[0116] In this embodiment, the formulation module 20 includes:
[0117] A setting unit 21, used to clarify the meaning of each basic element and set a specific character set for each basic element;
[0118] The design unit 22 is used to design a naming logic template according to the order and importance of the basic elements, and the corresponding character set of each basic element is separated by a specific separator.
[0119] In this embodiment, the naming module 30 includes:
[0120] A writing unit 31, used to write a named logic function using a programming language, wherein the named logic function accepts basic elements of a logistics network point as input;
[0121] A generating unit 32, used to traverse the basic elements of all logistics outlets, execute a naming logic function on each logistics outlet, and generate a logistics outlet logical name;
[0122] The storage unit 33 is used to store the generated logistics network point logical name and the basic information of the corresponding logistics network point in the database.
[0123] In this embodiment, the updating module 40 includes:
[0124] A capture unit 41 is used to set a trigger according to the database type or use an external event monitoring mechanism to capture data change events;
[0125] The first changing unit 42 is used for adding the current year, month and day of the system to the end of the logical name of the logistics network point when monitoring that the network state of the logistics network point changes from normal to de-networked, and storing the network point name assigned by the system in the database;
[0126] The second changing unit 43 is used to determine whether the logistics network point exists in the database if the network state of the logistics network point is changed from suspended to normal; if the database does not contain the logistics network point, directly name the logistics network point according to the naming logic template, and store the named logistics network point logical name in the database; if the database contains the logistics network point, add the current year, month and day of the system to the logistics network point logical name corresponding to the logistics network point
[0127] The third change unit 43 is used to determine whether the logistics point exists in the database if it is monitored that the status of the logistics point changes from delisted to normal; if the database does not contain the logistics point, directly name the logistics point according to the naming logic template, and store the named logistics point logical name in the database; if the database contains the logistics point, determine whether the system time when the status of the logistics point changes from delisted to normal is the same day as the system time when the status of the current logistics point changes from normal to delisted; if they are not the same day, directly add the year, month, and day of the current system to the logistics point logical name corresponding to the logistics point in the database; if they are the same day, directly add the year, month, day, hour, and minute of the current system to the logistics point logical name corresponding to the logistics point in the database.
[0128] The present invention applies naming logic to actual logistics network management to ensure the consistency and accuracy of naming. This method significantly improves the management efficiency and information processing speed of logistics networks and reduces various problems caused by name confusion.
[0129] above Figure 8 and Fig. 9 The logistics network point name logical naming device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The logistics network point name logical naming device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0130] Fig.101 is a schematic diagram of the structure of a logistics network name logical naming device provided by an embodiment of the present invention. The logistics network name logical naming device 100 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 11 (for example, one or more processors) and a memory 12, and one or more storage media 13 (for example, one or more mass storage devices) storing application programs 133 or data 132. Among them, the memory 12 and the storage medium 13 can be short-term storage or permanent storage. The program stored in the storage medium 13 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the logistics network name logical naming device 100. Furthermore, the processor 11 can be configured to communicate with the storage medium 13 to execute a series of instruction operations in the storage medium 13 on the logistics network name logical naming device 100.
[0131] The logistics network point name logical naming device 100 may also include one or more power supplies 14, one or more wired or wireless network interfaces 15, one or more input and output interfaces 16, and / or one or more operating systems 131, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Fig.10 The device structure shown does not constitute a limitation on the logistics network point name logical naming device 100, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0132] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the logical naming method for logistics network names.
[0133] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0134] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0135] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for logically naming logistics outlets, characterized in that: The method for logically naming the logistics network point name includes: Obtaining basic information of the logistics outlets, and determining basic elements for logical naming of the logistics outlets according to the basic information; A specific character set is set for each basic element, and a naming logic template based on the basic element is formulated; Name each logistics network point according to the naming logic template, and store the named logistics network point logical name in the database; When a new logistics point is added or the information of a historical logistics point changes, the logistics point name record in the database will be automatically updated.
2. The method for logically naming logistics outlets according to claim 1 is characterized in that: Obtaining basic information of logistics outlets, and determining basic elements for logical naming of logistics outlets according to the basic information, including the following steps: Call the API interface to obtain the basic information of the logistics outlets, including: outlet geographical location, outlet service type, outlet level, and outlet status; Cleaning the basic information to remove duplicate, erroneous or irrelevant information to obtain pre-processed basic information; The basic elements used for the logical naming of the logistics outlets are determined according to the pre-processed basic information, and the basic elements include: country code, city code, district code, street house number code, logistics outlet service type, logistics outlet level, and logistics outlet status.
3. The method for logically naming logistics network points according to claim 1 is characterized in that: A specific character set is set for each basic element, and a naming logic template based on the basic element is formulated, including the steps of: Clarify the meaning of each basic element and set a specific character set for each basic element; According to the order and importance of the basic elements, a naming logic template is designed, and the corresponding character set of each basic element is separated by a specific separator.
4. The method for logically naming logistics network points according to claim 1, characterized in that: Naming each logistics network point according to the naming logic template and storing the named logistics network point logical name in a database includes the following steps: Using a programming language to write a named logic function, wherein the named logic function accepts basic elements of a logistics network point as input; Traverse the basic elements of all logistics outlets, execute the naming logic function for each logistics outlet, and generate the logical name of the logistics outlet; The generated logical name of the logistics network point is stored in the database together with the basic information of the corresponding logistics network point.
5. The method for logically naming logistics outlets according to claim 1, characterized in that: When a new logistics outlet is added or the historical logistics outlet information is changed, the logistics outlet name record in the database is automatically updated, including the following steps: Set triggers according to the database type or use external event monitoring mechanisms to capture data change events; If it is monitored that the status of a logistics network point changes from normal to offline, the current year, month and day of the system will be added after the logical name of the logistics network point, and the network point name assigned by the system will be stored in the database.
6. The method for logically naming logistics network points according to claim 1, characterized in that: When a new logistics outlet is added or the historical logistics outlet information is changed, the logistics outlet name record in the database is automatically updated, including the following steps: Set triggers according to the database type or use external event monitoring mechanisms to capture data change events; If the status of the logistics network point is monitored to change from suspended to normal, it is determined whether the logistics network point exists in the database; If the database does not contain the logistics network point, directly name the logistics network point according to the naming logic template, and store the named logistics network point logical name in the database; If the logistics network point is included in the database, the current year, month and day of the system will be added after the logical name of the logistics network point corresponding to the logistics network point.
7. The method for logically naming logistics network points according to claim 1, characterized in that: When a new logistics outlet is added or the historical logistics outlet information is changed, the logistics outlet name record in the database is automatically updated, including the following steps: Set triggers according to the database type or use external event monitoring mechanisms to capture data change events; If the status of the logistics network point is monitored to change from off-line to normal, it is determined whether the logistics network point exists in the database; If the database does not contain the logistics network point, directly name the logistics network point according to the naming logic template, and store the named logistics network point logical name in the database; If the database contains the logistics network point, determine whether the system time when the network status of the logistics network point is changed from offline to normal is the same day as the system time when the network status of the current logistics network point is changed from normal to offline; If it is not the same day, directly add the current system year, month and day after the logical name of the logistics outlet corresponding to the logistics outlet in the database; If it is the same day, then the current system year, month, day, hour and minute are directly added to the logical name of the logistics network point corresponding to the logistics network point in the database.
8. A device for logically naming logistics outlets, characterized in that: include: A determination module, used to obtain basic information of logistics outlets, and determine basic elements for logical naming of logistics outlets according to the basic information; A designation module, used to set a specific character set for each basic element and formulate a naming logic template based on the basic element; A naming module, used to name each logistics network point according to the naming logic template, and store the named logistics network point logical name in the database; The update module is used to automatically update the logistics point name records in the database when a new logistics point is added or the historical logistics point information changes.
9. A device for logically naming logistics outlets, characterized in that: comprising a memory and at least one processor, wherein the memory has computer-readable instructions stored therein; The at least one processor calls the computer-readable instructions in the memory to execute the various steps of the method for logically naming logistics network points as described in any one of claims 1-7.
10. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the various steps of the method for logically naming logistics network points as described in any one of claims 1-7 are implemented.