Data processing method and device, equipment and storage medium
By constructing the prompt word information of the language model and extracting the sub-geographic area hierarchy information, an accurate address hierarchy tree is generated, which solves the problem of inaccurate address data analysis in the existing technology, and improves the reliability of the address hierarchy tree and public service support capabilities. .
Patent Information
- Application Number
- CN202411379822.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-14
AI Technical Summary
When establishing address hierarchy trees, the address data analysis is inaccurate due to different data structures and representation methods, resulting in low reliability of address hierarchy trees and ineffective support for public services and emergency responses.
By constructing prompt word information for the language model, the language model is used to extract the hierarchical information of the sub-geographic region from the unstructured address data, and an address hierarchical tree of the target geographical region is generated based on this information.
Improve the accuracy and reliability of address hierarchy trees, ensure data support for services and governance work within the geographical area, and improve emergency response efficiency.
Smart Images

Figure CN119311691A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, apparatuses, devices, and computer-readable storage media for data processing. Background Art
[0002] An address hierarchy tree usually refers to an address system that is arranged in a geographical or administrative hierarchy. In the field of public safety and public services, such as firefighting, medical rescue, and emergency rescue, mastering the address hierarchy tree in the area can achieve the rational allocation of personnel and rescue materials and improve the efficiency and effectiveness of emergency response. For example, in order to better provide public services to residents, a corresponding address hierarchy tree can be established based on the building information in the geographical area where the residents are located. However, there are some problems with the current way of establishing the address hierarchy tree, which makes it impossible to rely on the address hierarchy tree to provide good public services to residents. Summary of the invention
[0003] In a first aspect of the present disclosure, a method for data processing is provided. The method includes: constructing prompt word information for a language model based on address-related data in a target geographic area, wherein the address-related data is unstructured text; inputting the prompt word information and the address-related data into the language model to obtain a model output of the language model; determining hierarchical information of at least one sub-geographical area in the address-related data from the model output; and generating an address hierarchical tree corresponding to the target geographic area based on the address-related data and the hierarchical information.
[0004] In a second aspect of the present disclosure, a device for data processing is provided. The device includes: a construction module configured to construct prompt word information for a language model based on address-related data in a target geographic area, wherein the address-related data is unstructured text; an acquisition module configured to input the prompt word information and the address-related data into the language model to obtain a model output of the language model; a determination module configured to determine the hierarchical information of at least one sub-geographical area in the address-related data from the model output; and a generation module configured to generate an address hierarchy tree corresponding to the target geographic area based on the address-related data and the hierarchy information.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.
[0007] In a fifth aspect of the present disclosure, a computer program product is provided, which is tangibly stored in a computer storage medium and includes computer executable instructions, which, when executed by a device, cause the device to perform the method of the first aspect.
[0008] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0010] Figure 1 A schematic diagram showing an example of an address hierarchy tree according to some embodiments of the present disclosure;
[0011] Figure 2 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0012] Figure 3 A flowchart showing a process of data processing according to some embodiments of the present disclosure;
[0013] Figure 4 A schematic diagram showing an example of a machine learning model for processing data according to some embodiments of the present disclosure;
[0014] Figure 5 A schematic diagram showing an example of a threshold value of the number of address levels according to some embodiments of the present disclosure;
[0015] Figure 6 A schematic diagram showing an example of a symmetrically structured address hierarchy tree according to some embodiments of the present disclosure;
[0016] Figure 7 A block diagram showing an apparatus for data processing according to some embodiments of the present disclosure; and
[0017] Figure 8 A block diagram of a device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0018] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0019] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0020] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0021] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0022] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0024] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.
[0025] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0026] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.
[0027] As used herein, the term "model" can learn the association between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units. In this article, "model" may also be referred to as "machine learning model", "machine learning network" or "network", which are used interchangeably in this article. A model may also include different types of processing units or networks.
[0028] A "neural network" is a machine learning network based on deep learning. A neural network is capable of processing inputs and providing corresponding outputs, and typically includes an input layer and an output layer and one or more hidden layers between the input layer and the output layer. Neural networks used in deep learning applications typically include many hidden layers, thereby increasing the depth of the network. The layers of a neural network are connected in sequence so that the output of the previous layer is provided as input to the next layer, where the input layer receives the input of the neural network and the output of the output layer serves as the final output of the neural network. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each of which processes input from the previous layer.
[0029] Generally, machine learning can be roughly divided into three stages, namely the training stage, the testing stage, and the application stage (also called the inference stage). In the training stage, a given model can be trained using a large amount of training data, and the parameter values are continuously updated iteratively until the model can obtain consistent inferences that meet the expected goals from the training data. Through training, the model can be considered to be able to learn the association from input to output (also called the mapping of input to output) from the training data. The parameter values of the trained model are determined. In the testing stage, the test input is applied to the trained model to test whether the model can provide the correct output, thereby determining the performance of the model. In the application stage, the model can be used to process the actual input based on the parameter values obtained from the training to determine the corresponding output.
[0030] Figure 1FIG. 1 is a schematic diagram showing an example 100 of an address hierarchy tree according to some embodiments of the present disclosure. Figure 1 As shown, the address hierarchy tree 110 generally refers to an address system arranged in a geographical or administrative hierarchy. The address hierarchy tree 110 can help users quickly locate a specific geographical location. Figure 1 As shown in , the address hierarchy tree 110 is a structured address tree with the community as the root node, the building number and the unit number as the intermediate nodes, and the community households as the leaf nodes. In the address hierarchy tree 110, the root node 120 represents the community (expressed as Residential Community XXX). The intermediate nodes 130-1 and 130-2 represent the buildings inside the community, such as Building 2. The intermediate nodes 140-1, 140-2, 140-3, and 140-4 represent a unit inside the building, such as Unit 1. The leaf nodes 150-1, 150-2, 150-3, 150-4, 150-5, and 150-6 represent the households in the community units, for example, expressed as Room 201 and Room 301. By constructing the address hierarchy tree 110 of the address area, a solid foundation can be laid for the services and governance work in the area. Especially in the field of public safety and public services, such as firefighting, medical rescue, and emergency rescue, the address hierarchy tree 110 can be used to achieve a reasonable allocation of personnel and rescue materials, thereby improving the efficiency and effectiveness of emergency response. The address data of the target geographic area is not comprehensive, which brings inconvenience to the establishment of the address hierarchy tree 110 related to the target area.
[0031] Figure 2 Schematic diagram of an example environment 200 in which embodiments of the present disclosure can be implemented. Figure 2 As shown, environment 200 may include computing device 210 .
[0032] The computing device 210 can generate an address hierarchy tree 110 based on the obtained address data. That is, the computing device 210 can convert unstructured address data into data nodes in the address hierarchy tree 110. The address hierarchy tree 110 here can be a hierarchy tree of any geographical area and any length. The address data obtained by the computing device 210 indicates the address of one or more geographical locations in the target geographical area. Each address data may include sub-geographical areas of multiple levels. The sub-geographical areas indicate geographical areas of each level. For example: XX cell X unit 101 room, where the cell, unit and household room are sub-geographical areas of different levels. By processing the address data, the computing device 210 can obtain multiple nodes of different levels, for example, nodes representing cells, nodes representing units and nodes representing household rooms.
[0033] The computing device 210 may, for example, use the trained machine learning model 230 to perform data processing tasks. The machine learning model 230 may, for example, include but is not limited to any appropriate model such as a Transformer model, a convolutional neural network (CNN), a recurrent neural network (RNN), a deep neural network (DNN), etc. The machine learning model 230 may be a model local to the computing device 210, or a model installed in another computing device 210 (e.g., installed in a remote device).
[0034] The computing device 210 may include any computing system with computing capabilities, such as various computing devices 210 / systems, terminal devices, server devices, etc. The terminal device may be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, PDAs, portable game terminals, VR / AR devices, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDA), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, game devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. The server device may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. The server-side device may include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device 210 in a cloud environment, and the like.
[0035] It should be understood that the structure and function of each element in the environment 200 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.
[0036] As briefly mentioned above, the address hierarchy tree based on the target geographic area can accurately grasp the building information in the target geographic area (for example, the total number of buildings and the number of houses inside), so as to provide data support for regional services and governance. At present, the address hierarchy tree within the region is mainly constructed based on the property information and logistics distribution addresses in the target geographic area.
[0037] At present, the data is mainly analyzed through methods such as deep neural network (DNN), convolutional neural network (CNN), recurrent neural network (RNN) and pre-trained models to establish the corresponding address hierarchy tree. However, most of this information is unstructured data, and often comes from different property companies, developers and logistics companies. Different companies save data in different ways, resulting in a lack of unified standardization of the data obtained. When processing data from different sources, the existing models are unable to accurately parse the address data included in the data because the structure and representation of different data are different. As a result, the reliability of the final address hierarchy tree is low.
[0038] The embodiment of the present disclosure provides a method for data processing. According to the embodiment of the present disclosure, based on the address-related data in the target geographic area, the prompt word information for the language model is constructed, and the address-related data is unstructured text. The prompt word information and the address-related data are input to the language model to obtain the model output of the language model. The hierarchical information of at least one sub-geographical area in the address-related data is determined from the model output. Based on the address-related data and the hierarchical information, an address hierarchy tree corresponding to the target geographic area is generated.
[0039] In this way, the embodiments of the present disclosure determine the hierarchical information of each sub-geographical area in the address-related data based on the language model by constructing prompt word information for the language model. Based on the determined address hierarchical information, an address hierarchical tree is generated. By constructing prompt word information, the hierarchical information of each sub-geographical area in the address-related data can be accurately obtained using the language model. Thus, the accuracy and reliability of the address hierarchical tree are improved.
[0040] Figure 3 A flow chart of a process 300 of data processing according to some embodiments of the present disclosure is shown. Figure 4 FIG. 4 is a schematic diagram showing an example of a language model 400 for processing data according to some embodiments of the present disclosure. Figure 3 and Figure 4 In the example of Figure 2 For ease of discussion, reference will be made to the computing device 210. Figure 2 The process 300 is described with reference to the environment 200 of FIG.
[0041] In block 310 , the computing device 210 determines to construct prompt word information 410 for a language model 420 based on address-related data 220 in a target geographic area, where the address-related data 220 is unstructured text.
[0042] In some embodiments, the address-related data 220 is data including address data, such as property service data provided by a property company, logistics distribution data provided by a logistics company, etc. The computing device 210 processes the address-related data 220 to determine the corresponding address data. For example, if the address-related data 220 is logistics distribution data, it may include address data, item information, and delivery time data, etc. The computing device 210 constructs prompt word information 410 for the language model 420 based on the address data.
[0043] In some embodiments, the address data may be accurate location information (including longitude and latitude) of the delivery location recorded by the courier through a personal digital assistant (PDA) carried by the courier. The PDA is used to upload the logistics distribution data carrying the location information to the database. The computing device 210 determines the address-related data 220 based on the data in the database. Specifically, the computing device 210 first determines the regional boundaries related to the target geographic area. Subsequently, the address-related data 220 related to the target geographic area is determined using the data of the operation of determining the spatial intersection of the regional boundaries.
[0044] In some embodiments, the acquired address-related data 220 may also be screened to filter out invalid data and duplicate data therein.
[0045] like Figure 4 As shown, the prompt word information 410 of the language model 420 indicates at least one of the following: a goal of obtaining hierarchical information of sub-geographical areas from unstructured text, an instruction for determining hierarchical information of sub-geographical areas, an example of the format of the address-related data 220 to be processed, or an example of the format of the model output. Figure 4, the role of the target information is to clearly indicate the parsing task objective that the language model 420 needs to achieve, so as to ensure that the output result of the language model 420 is consistent with the expected purpose. In some embodiments, the objective of the language model 420 is to identify and extract sub-geographical regions from unstructured text. The instruction information provides detailed operation guidelines to guide the large model to complete the address data parsing task. In addition, the instruction information also details the types of sub-geographical regions that may be encountered. The types of sub-geographical regions include residential community, sub-community, building, unit, and apartment, etc., to ensure that the model can identify and correctly classify each sub-geographical region in the address data. The example information shows the conversion of the input format to the output format after being parsed by the language model 420, which is used to indicate how the parsed result output by the model should be structured. For example, if the input data is the unstructured text "No. 301, 12-01", the output data is {12, Building-level}, {01, Unit-level}, {301, Apartment-level}. In this way, the accuracy and efficiency of the language model 420 in determining the hierarchical information of sub-geographical regions can be significantly improved.
[0046] In block 320, the computing device 210 inputs the address-related data 220 and the prompt word information 410 corresponding to the address-related data 220 into the language model 420, so as to use the language model 420 to obtain the hierarchical information of each sub-geographical region in the address-related data 220.
[0047] The hierarchical information of the sub-geographical region indicates the hierarchy of each sub-geographical region in the address data. In some embodiments, the target address region is a community. The hierarchical information of each sub-geographical region in the address data at least includes province, street, residential community, and unit. In some embodiments, the language model 420 determines the hierarchical information corresponding to each sub-geographical region in the address data according to the provided prompt information. That is, the output of the language model 420 can directly indicate the hierarchical information. Alternatively or additionally, the prompt information may not indicate the optional hierarchical information, but the hierarchical information of the sub-geographical region can be determined from multiple hierarchical information according to the output data of the language model 420. That is, the output of the language model 420 can be mapped to a predetermined type of hierarchical information.
[0048] In block 330, the computing device 210 determines the hierarchical information of at least one sub-geographical region in the address-related data 220 from the model output.
[0049] In block 340, the computing device 210 generates an address hierarchy tree 110 corresponding to the target geographical region based on the address-related data 220 and the hierarchical information.
[0050] The computing device 210 determines the hierarchical information of each sub-geographical area in the address-related data 220 based on the output result of the language model 420. The output result of the language model 420 is Figure 4 The output example of the language model 420 in FIG. 2 is the same as that in FIG. 2. The computing device 210 generates an address hierarchy tree 110 corresponding to the target geographic area based on the sub-geographic areas and the corresponding hierarchy information in the address-related data 220 .
[0051] In some embodiments, the address-related data 220 may include multiple address data indicating different geographical areas. Each address data may include one or more sub-geographical areas. Therefore, the output data of the language model 420 may include hierarchical information corresponding to multiple sub-geographical areas.
[0052] In some embodiments, for a target sub-region in at least one sub-geographical region, based on the location of the target sub-region and the hierarchical information of the target sub-region, node data 430 is generated. Based on the node data 430 corresponding to each target sub-region, an address hierarchical tree 110 is generated.
[0053] The level of each node data 430 (ie, the level of the node corresponding to the node data 430 in the address hierarchy tree 110) is determined based on the level information of the corresponding target sub-region. The value of the node data 430 is the corresponding sub-target region.
[0054] In some embodiments, the address data may include multiple sub-geographical areas. The geographical ranges indicated by these sub-geographical areas may not be the same. Therefore, the language model 420 can generate node data 430 of multiple different levels of the address hierarchy tree 110 according to a provided address data.
[0055] The address-related data 220 provided by the computing device 210 to the language model 420 may be data obtained through other channels (e.g., property companies, developers, etc.), or data uploaded by couriers. Since the data source is relatively complex, there may be erroneous data. The node data 430 generated based on the erroneous address-related data 220 will also be erroneous. For example, there are only 20 unit buildings in the target geographic area. If the user mistakenly writes the original "12 units" as "21 units" when filling in the logistics address. The data output by the language model 420 will contain data corresponding to the 21 units, resulting in errors in the address hierarchy tree 110 generated in the end. Therefore, it is necessary to detect the generated node data 430 to delete the erroneous node data 430 to ensure that only real nodes exist in the address hierarchy tree 110. In some embodiments, the number of address-related data 220 corresponding to the same node data 430 can be counted. If the number of address-related data 220 corresponding to a node data 430 is greater than the data volume threshold, the node data 430 is determined to be valid node data 430. The computing device 210 generates the address hierarchy tree 110 according to the acquired valid node data 430 .
[0056] Figure 5 A schematic diagram of an example 500 of a threshold value for the number of address levels according to some embodiments of the present disclosure is shown. Figure 5 As shown, the data volume threshold is a predetermined value. In some embodiments, considering that nodes at different levels correspond to different sub-address areas, nodes at higher levels appear more frequently. The computing device 210 can determine different data volume thresholds for node data 430 at different levels to improve the accuracy and reliability of the node data 430 detection process. Figure 5 As shown, the data volume threshold corresponding to the building-level node is τ b , the data volume threshold corresponding to the node at the unit level is τ u If the hierarchical information of the node data 430 is the building level, and the number of address-related data 220 corresponding to the node data 430 exceeds τ b , then the node data 430 is added to the address hierarchy tree 110. Otherwise, the node data 430 is discarded.
[0057] In some embodiments, the address-related data 220 can be detected. To delete the erroneous data therein. The computing device 210 performs logical verification on the target sub-area and the hierarchical information. If it is determined that the target sub-area and the hierarchical information are both valid data, the node data 430 is generated based on the target sub-area and the hierarchical information. For example, the obtained address data is analyzed to determine whether the address data therein is an actual address. For abnormal addresses (for example, unit numbers that do not exist in the target area, address data that does not meet the address specification, etc.), a correction operation or a deletion operation is performed to remove unreliable address data. In some embodiments, the quality of the address data can also be ensured by manual review. After determining the valid address data, the node data 430 is generated based on the valid address data. In this way, the accuracy of the generated node data 430 can be improved.
[0058] Since data between different enterprises are not interoperable, the address data of the target geographic area obtained often cannot cover all households in the community, resulting in an incomplete address hierarchy tree 110. Therefore, the obtained address hierarchy tree 110 can be filled. In some embodiments, after generating the address hierarchy tree 110 corresponding to the target geographic area, the computing device 210 determines the coverage rate of the address hierarchy tree 110 for the target geographic area. If it is detected that the coverage rate of the address hierarchy tree 110 for the target geographic area is lower than the coverage rate threshold, the missing data in the address hierarchy tree 110 is filled.
[0059] In some embodiments, the computing device 210 may fill in missing data in the address hierarchy tree 110 based on a preset filling rule.
[0060] The filling rule may be a specified rule, or a rule determined by the electronic device based on the characteristics of the address hierarchy tree 110 (eg, the structural characteristics of the address hierarchy tree 110 , the number of node data 430 in the address hierarchy tree 110 ).
[0061] In some embodiments, filling missing data in the address hierarchy tree 110 includes: selecting a data filling rule corresponding to the address hierarchy tree 110 from a plurality of data filling rules based on the structural characteristics of the address hierarchy tree 110. Filling missing data in the address hierarchy tree 110 based on the data filling rule.
[0062] Figure 6 FIG. 6 is a schematic diagram showing an example 600 of a symmetrically structured address hierarchy tree according to some embodiments of the present disclosure. Figure 6As shown, in some embodiments, the address hierarchy tree 110 is a symmetrical structure, and the missing sub-area associated with the missing data in the address hierarchy tree 110 is first determined. Then, a symmetric sub-area symmetrical to the missing sub-area is determined, and data filling is performed based on the data in the address hierarchy tree 110 associated with the symmetric sub-area. In some geographical areas, the address hierarchy structure presents a certain degree of symmetry. For example, in the target geographical area 120, unit 1 140-1 (i.e., Unit 1) and unit 2 140-2 (i.e., Unit 2) are structurally symmetrical, and unit 3 140-3 (i.e., Unit 3) and unit 4 140-4 (i.e., Unit 4) are also symmetrical. Each unit has multiple related household room nodes. If the address hierarchy tree 110 needs to be filled, the missing nodes of unit 1 can be filled based on the data nodes related to unit 2. If all the door rooms of unit 3 have been covered, it can be reasonably inferred that unit 4 should also have corresponding household rooms. Therefore, unit 4 can be filled with reference to the structure of unit 3 to ensure the accuracy and logic of filling.
[0063] In some embodiments, if the address hierarchy tree 110 is an asymmetric structure, adjacent sub-regions adjacent to the missing sub-regions are determined, and data filling is performed based on the data in the address hierarchy tree 110 related to the adjacent sub-regions. If the address hierarchy structure is not symmetrical, the missing unit numbers can be inferred and filled in based on the continuity of the naming within the cell using the numbering information of the existing units. For example, if there are units 1, 3, 4, and 5 in the address hierarchy tree 110, but there is no unit 2, the existence of unit 2 can be inferred based on the surrounding unit structure, and the information of the most adjacent unit 1 or unit 3 can be copied to complete the data filling of unit 2. This method not only simplifies the processing process, but also guarantees the rationality of the filling results to a large extent.
[0064] Figure 7 A schematic structural block diagram of an apparatus 700 for data processing according to some embodiments of the present disclosure is shown. The apparatus 700 may be implemented as or included in a computing device 210. Each module / component in the apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.
[0065] like Figure 7As shown, the apparatus 700 for data processing includes a construction module 710, which is configured to construct prompt word information for a language model based on address-related data in a target geographic area, and the address-related data is unstructured text. The apparatus 700 for data processing also includes an acquisition module 720, which is configured to input the prompt word information and the address-related data into the language model to obtain a model output of the language model. The apparatus 700 for data processing also includes a determination module 730, which is configured to determine the hierarchical information of at least one sub-geographical area in the address-related data from the model output. The apparatus 700 for data processing also includes a generation module 740, which is configured to generate an address hierarchy tree corresponding to the target geographic area based on the address-related data and the hierarchy information.
[0066] In some embodiments, the prompt word information of the language model indicates at least one of the following: a goal of obtaining hierarchical information of sub-geographic areas from unstructured text, instructions for determining hierarchical information of sub-geographic areas, an example of the format of address-related data to be processed, or an example of the format of model output.
[0067] In some embodiments, the generation module 740 is also configured to generate an address hierarchy tree corresponding to the target geographic area, including: generating node data for a target sub-area in at least one sub-geographic area based on the location of the target sub-area and the hierarchy information of the target sub-area; and generating an address hierarchy tree based on at least one node data.
[0068] In some embodiments, the generation module 740 is further configured to generate an address hierarchy tree based on the node data in response to the amount of address-related data corresponding to the node data exceeding a data amount threshold.
[0069] In some embodiments, the device 700 also includes a coverage determination module 750, which is configured to determine the coverage of the address hierarchy tree for the target geographic area after generating an address hierarchy tree corresponding to the target geographic area; and fill in missing data in the address hierarchy tree in response to the coverage of the address hierarchy tree being lower than a coverage threshold.
[0070] In some embodiments, the coverage determination module 750 is further configured to select a data filling rule corresponding to the address hierarchy tree from a plurality of data filling rules based on the structural characteristics of the address hierarchy tree; and fill missing data in the address hierarchy tree based on the data filling rule.
[0071] In some embodiments, the device 700 also includes a data acquisition module 760, which is configured to determine regional boundaries related to the target geographic area; and acquire address-related data based on the regional boundaries and logistics delivery information.
[0072] Figure 88 is a block diagram of an electronic device 800 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 8 The electronic device 800 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 8 The electronic device 800 shown can be used to implement Figure 1 A computing device 210 is provided.
[0073] like Figure 8 As shown, the electronic device 800 is in the form of a general electronic device. The components of the electronic device 800 may include, but are not limited to, one or more processors or processing units 810, a memory 820, a storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. The processing unit 810 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 820. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 800.
[0074] The electronic device 800 typically includes a plurality of computer storage media. Such media can be any accessible media that can be obtained by the electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 820 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 830 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 800.
[0075] The electronic device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 8 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 820 may include a computer program product 825 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0076] The communication unit 840 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 800 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 800 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0077] The input device 850 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 860 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 800 may also communicate with one or more external devices (not shown) through the communication unit 840 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 800, or communicate with any device that allows the electronic device 800 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0078] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0079] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0080] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0081] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0082] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0083] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A method for data processing, comprising: Constructing prompt word information for a language model based on address-related data in a target geographic area, wherein the address-related data is unstructured text; Inputting the prompt word information and the address-related data into the language model to obtain a model output of the language model; determining, from the model output, hierarchical information of at least one sub-geographical area in the address-related data; as well as Based on the address-related data and the hierarchical information, an address hierarchical tree corresponding to the target geographic area is generated.
2. The method according to claim 1, wherein the prompt word information of the language model indicates at least one of the following: A goal of obtaining the hierarchical information of the sub-geographical area from unstructured text, Instructions for determining the hierarchical information of a sub-geographical area, An example of the format of the address-related data to be processed, or An example of the format of the model output.
3. The method according to claim 1, wherein generating an address hierarchy tree corresponding to the target geographic area comprises: For a target sub-region in the at least one sub-geographical region, generating node data based on a location of the target sub-region and the hierarchical information of the target sub-region; as well as The address hierarchy tree is generated based on at least one of the node data.
4. The method according to claim 3, wherein generating the address hierarchy tree comprises: In response to the amount of the address-related data corresponding to the node data exceeding a data amount threshold, the address hierarchy tree is generated based on the node data.
5. The method according to claim 3, wherein generating the address hierarchy tree comprises: performing logic verification on the target sub-area and the hierarchical information; as well as In response to the target sub-region and the level information being both valid data, the node data is generated based on the target sub-region and the level information.
6. The method according to claim 1, further comprising: After generating an address hierarchy tree corresponding to the target geographic area, Determining coverage of the target geographic area by the address hierarchy tree; as well as In response to the coverage of the address hierarchy tree being lower than a coverage threshold, missing data is filled in the address hierarchy tree.
7. The method of claim 6, wherein filling missing data in the address hierarchy tree comprises: Based on the structural characteristics of the address hierarchy tree, selecting a data filling rule corresponding to the address hierarchy tree from a plurality of data filling rules; as well as The missing data is filled in the address hierarchy tree based on the data filling rule.
8. The method according to claim 1, wherein the address-related data in the target geographic area is obtained by: determining area boundaries associated with the target geographic area; and Based on the regional boundaries and logistics delivery information, the address-related data is obtained.
9. A device for data processing, comprising: A construction module is configured to construct prompt word information for a language model based on address-related data in a target geographic area, wherein the address-related data is unstructured text; an acquisition module, configured to input the prompt word information and the address-related data into the language model to acquire a model output of the language model; a determination module configured to determine, from the model output, level information of at least one sub-geographical area in the address-related data; as well as A generating module is configured to generate an address hierarchy tree corresponding to the target geographic area based on the address-related data and the hierarchy information.
10. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 8 when executed by the at least one processing unit.
11. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 8.
12. A computer program product tangibly stored in a computer storage medium and comprising computer executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 8.