Method, device, electronic device, and storage medium for obtaining business travel settlement service data
By grouping and distributing the business travel fields, data is requested asynchronously and rendered, the problem of low efficiency in the business travel clearing system of multi-data source business data acquisition is solved, and fast and accurate data acquisition and unified clearing is achieved.
Patent Information
- Application Number
- CN202210121423.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-09
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-02-09
AI Technical Summary
The existing business travel clearing system is inefficient and prone to errors when acquiring business data from multiple data sources, and has a wide range of data sources and diverse formats, which makes it difficult to obtain data.
Through the first thread pool grouping and distributing the business travel field to the corresponding interface, the second thread pool requests data asynchronously, and renders data through parameter request templates and type identifications, realizing automated multi-data source business data acquisition.
It improves the speed and accuracy of business travel data acquisition, making it easier to uniformly clear and process business data.
Smart Images

Figure CN114462972B_ABST
Abstract
Description
Background Art
[0002] In the business travel field, usually employees book air tickets and hotels required for business trips by themselves. After issuing invoices, they can then apply for reimbursement. The whole process is relatively complex. Employees need to advance business trip expenses first. If the invoices are lost or they forget to apply for reimbursement, they will not be able to obtain the advanced expenses.
[0003] Therefore, an online travel agency can provide a business travel reservation system to the company, so that the business travel reservation system can be docked with relevant systems within the company, facilitating the approval of employees' business trip reservations, the reservations after approval, and generating documents for the company to make unified payments.
[0004] When the online travel agency docks with the company or after docking, for old customers, business travel settlement data needs to be provided; for new customers, an overview of services needs to be provided. However, whether it is the business travel settlement of old customers or the service overview of new customers, it requires measurement personnel to search for hundreds of fields in multiple systems by themselves, and each collection takes a long time, which is time-consuming, laborious and extremely error-prone.
[0005] At the same time, the obtained fields have a wide range of sources: business fields come from accounts, big data systems, settlements, etc. of different businesses (such as hotels, air tickets, train tickets, bus tickets, etc.), and the field sources will continue to increase; there are many fields and various formats: there are already hundreds of fields currently, and the data formats are diverse. For example, the type of service fee charging method is character type, the service fee is numeric type, and the type of whether to charge service fees is boolean type; the data cannot be obtained quickly: since the data is scattered in multiple external systems, waiting for a long time to synchronize and obtain the data is not conducive to the business operations of business personnel.
[0006] Therefore, it can be seen that how to optimize the multi-data source business data acquisition method for business travel settlement is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention
[0007] In order to overcome the defects existing in the above-mentioned prior art, the present invention provides a method, device, electronic device, and storage medium for acquiring multi-data source business data for business travel settlement, so as to realize the automated acquisition of multi-data source business data for business travel settlement, improve the speed of business data acquisition, and facilitate the unified settlement and processing of business data.
[0008] According to one aspect of the present invention, there is provided a method for acquiring multi-data source business data for business travel settlement, including:
[0009] In response to a business travel data acquisition request, determining a plurality of business travel fields to be acquired, and each business travel field is associated with an interface identifier;
[0010] The first thread pool divides the business travel fields with the same interface identifier into a group of business travel fields according to the interface identifier associated with each business travel field, and distributes the business travel fields in the same group to the interface indicated by the interface identifier according to the interface list of the second thread pool. The interface includes at least one or more of a hotel data interface, an air ticket data interface, a train ticket data interface, and a bus ticket data interface;
[0011] The second thread pool requests the interface indicated by the interface identifier to return business travel data according to the parameter request template, and fills the parameter request template to obtain the business travel data of the requested multiple business travel fields;
[0012] Perform type identification on the obtained business travel data;
[0013] Render the business travel data of the obtained multiple business travel fields according to the identified type, and the rendered business travel data of the multiple business travel fields is used for display.
[0014] In some embodiments of the present application, the business travel data acquisition request is associated with a customer identifier. Before determining the multiple business travel fields required to be acquired in response to the business travel data acquisition request, it includes:
[0015] Judge whether the customer identifier exists according to the business travel data acquisition request;
[0016] If so, execute the step of determining the multiple business travel fields required to be acquired in response to the business travel data acquisition request, wherein the acquired multiple business travel fields are associated with the customer identifier;
[0017] If not, obtain similar customers from the existing customers according to the customer identifier, and determine the multiple business travel fields required to be acquired in response to the business travel data acquisition request according to the customer identifier of the similar customers. Among them, the acquired multiple business travel fields are associated with the customer identifier of the similar customers.
[0018] In some embodiments of the present application, the obtaining similar customers from the existing customers according to the customer identifier includes:
[0019] Calculate the similarity between the customer indicated by the current customer identifier and the existing customers according to the enterprise scale and business travel system of the customer indicated by the current customer identifier and the existing customers;
[0020] Determine one or more similar customers according to the calculated similarity.
[0021] In some embodiments of the present application, the calculating the similarity between the customer indicated by the current customer identifier and the existing customers according to the enterprise scale and business travel system of the customer indicated by the current customer identifier and the existing customers further includes:
[0022] Taking existing customers whose enterprise scale is in the same scale level as that of the customer indicated by the current customer identifier as candidate customers;
[0023] Forming a current differential standard matrix and a candidate differential standard matrix for the customer indicated by the current customer identifier and the candidate customers respectively according to the employee business trip standard level, business trip distance range level and standard price of business trips in the business travel system;
[0024] Calculating the similarity between the customer indicated by the current customer identifier and the candidate customers according to the current differential standard matrix and the candidate differential standard matrix.
[0025] In some embodiments of the present application, the differential standard matrix includes multiple sub-differential standard matrices such as a hotel differential standard matrix, an air ticket differential standard matrix, a train ticket differential standard matrix, and a bus ticket differential standard matrix. The calculating the similarity between the customer indicated by the current customer identifier and the candidate customers according to the current differential standard matrix and the candidate differential standard matrix includes:
[0026] Calculating a sub-similarity according to the current sub-differential standard matrix and the candidate sub-differential standard matrix;
[0027] Calculating the similarity between the customer indicated by the current customer identifier and the candidate customers according to the weighted sum of the sub-similarities.
[0028] In some embodiments of the present application, when the number of similar customers is multiple, rendering the business travel data of multiple business travel fields obtained according to the identified type further includes:
[0029] In response to the identified type being numerical, for each business travel field, taking the average value of the business travel data of each similar customer as the business travel data of this business travel field.
[0030] In some embodiments of the present application, the rendering the business travel data of multiple business travel fields obtained according to the identified type further includes:
[0031] Determining a preset rendering strategy for the business travel data of the multiple business travel fields obtained;
[0032] Rendering the business travel data of the multiple business travel fields obtained according to the identified type and the determined preset rendering strategy.
[0033] According to another aspect of the present application, there is also provided a business travel settlement multi-data source service data acquisition device, including:
[0034] A determination module: used to determine multiple business travel fields to be acquired and the interface identifiers associated with each business travel field in response to a business travel data acquisition request;
[0035] Distribution module: It is used by the first thread pool to divide the business travel fields with the same interface identifier into a group of business travel fields according to the interface identifier associated with each business travel field, and distribute the same group of business travel fields to the interface indicated by the interface identifier according to the interface list of the second thread pool. The interface includes at least one or more of a hotel data interface, an air ticket data interface, a train ticket data interface, and a bus ticket data interface;
[0036] Request module: It is used by the second thread pool to request the interface indicated by the interface identifier to return business travel data according to the parameter request template, and fill it into the parameter request template to obtain the business travel data of the requested multiple business travel fields;
[0037] Identification module: It is used to identify the type of the obtained business travel data;
[0038] Rendering module: It is used to render the business travel data of the obtained multiple business travel fields according to the identified type. The rendered business travel data of the multiple business travel fields is used for display.
[0039] According to another aspect of the present invention, there is also provided an electronic device, which includes: a processor; a storage medium, on which a computer program is stored, and when the computer program is run by the processor, it executes the steps of the above-mentioned business travel settlement multi-data source business data acquisition method.
[0040] According to another aspect of the present invention, there is also provided a storage medium, on which a computer program is stored, and when the computer program is run by a processor, it executes the steps of the above-mentioned business travel settlement multi-data source business data acquisition method.
[0041] Compared with the prior art, the advantages of the present invention are:
[0042] Through the first thread pool, the business travel fields to be obtained are grouped based on the interface identifier, so as to distribute and obtain the second thread pool, and the business travel data of the business travel fields are respectively requested through one or more of a hotel data interface, an air ticket data interface, a train ticket data interface, and a bus ticket data interface, so as to realize asynchronous data requests, and perform template configuration processing of business travel data based on the parameter request template, and through the rendering of type identification, to realize the acquisition of multi-data source business data for automated business travel settlement, improve the speed of business data acquisition, and facilitate the unified settlement and processing of business data. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] By referring to the accompanying drawings and describing its exemplary embodiments in detail, the above and other features and advantages of the present invention will become more obvious.
[0044] Figure 1Shows a flowchart of a business travel settlement multi - data - source service data acquisition method according to an embodiment of the present invention.
[0045] Figure 2 Shows a flowchart of determining whether the current customer is an existing customer according to a specific embodiment of the present invention.
[0046] Figure 3 Shows a flowchart of determining similar customers according to an embodiment of the present invention.
[0047] Figure 4 Shows a flowchart of calculating the similarity between customers according to an embodiment of the present invention.
[0048] Figure 5 Shows a module diagram of a business travel settlement multi - data - source service data acquisition device according to an embodiment of the present invention.
[0049] Figure 6 Schematically shows a schematic diagram of a computer - readable storage medium in an exemplary embodiment of the present disclosure.
[0050] Figure 7 Schematically shows a schematic diagram of an electronic device in an exemplary embodiment of the present disclosure. Detailed implementation manners
[0051] Now, example embodiments will be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments.
[0052] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0053] This application is applied to business travel settlement multi - data - source service data acquisition. First, refer to Figure 1 , Figure 1 Shows a schematic diagram of a business travel settlement multi - data - source service data acquisition method according to an embodiment of the present invention. The business travel settlement multi - data - source service data acquisition method includes the following steps:
[0054] Step S110: In response to a business travel data acquisition request, determine multiple business travel fields to be acquired, and each business travel field is associated with an interface identifier.
[0055] Step S120: By the first thread pool, divide the business travel fields with the same interface identifier into a group of business travel fields according to the interface identifiers associated with each business travel field, and distribute the same group of business travel fields to the interface indicated by the interface identifier according to the interface list of the second thread pool. The interface includes at least one or more of a hotel data interface, an air ticket data interface, a train ticket data interface, and a bus ticket data interface.
[0056] Step S130: By the second thread pool, request the interface indicated by the interface identifier to return business travel data according to the parameter request template, and fill it into the parameter request template to obtain the business travel data of the multiple business travel fields requested.
[0057] Step S140: Perform type identification on the acquired business travel data.
[0058] Step S150: Render the business travel data of the multiple business travel fields acquired according to the identified type, and the rendered business travel data of the multiple business travel fields is used for display.
[0059] Specifically, this application can be developed using the Java language, the Java template engine freemarker, and the JSON parsing tool JsonPath.
[0060] Specifically, this application can call the configuration of an external request to identify the interface request address and request transmission parameters. This application can use this configuration to distribute requests, call third-party interfaces to obtain data, and set the template of the request transmission parameters. The request transmission parameters are implemented in a configuration form. Given that the parameter forms of the docking interfaces are diverse, the Java template engine is used to configure the request transmission parameters, and the same parameter sequence is passed to all interfaces, so as to fill different parameters according to the request parameter template to request data. At the same time, when the parameters of the docked interface change, this application can also be quickly configured.
[0061] Specifically, the present application can perform initialization configuration on business data (business travel data). For example, grouping of business data fields. When the field type = 1, it is identified as a business data field that needs to be initialized, and other types of fields do not need to be initialized; due to the large number of field sources, the present application can group and obtain fields based on the interface identifier in the external request configuration, distinguish which external interface the field needs to request, and what data processing strategy to apply. When obtaining data, the mapping rule of the value of the business data field can be identified by the mapping name and mapping path. Specifically, a JSON parsing tool can be used to obtain data from the corresponding external interface according to the mapping name and mapping path. The present application can generate the context path of the corresponding return data and obtain it from the context path according to the mapping path. After obtaining the data, the format of the data can be converted for front-end display. The present application can be implemented by rendering the data. In a specific embodiment, it can be divided into data type, front-end data display format, digital precision, etc. The data type identifies whether the data type is numeric, character, boolean, etc., and the front-end data display format identifies the rendering format of the data on the front-end.
[0062] Specifically, in the acquisition and conversion of business data, synchronous return of business data can be achieved. For example, external interfaces can be requested based on the list of external request interfaces, and the processing information can be returned to the front-end first to prevent the front-end from waiting for a long time. The present application can also perform asynchronous processing on the data. For example, the present application can enable two thread pools to process the data requests to perform request distribution and obtain the processing of the original data and the return data. The first thread pool is used for request distribution, and the second thread pool can be started according to the list of external request interfaces and the distribution strategy to initiate a request to pull data. The second thread pool can request a specific third-party interface, match and fill the corresponding request parameters using a Java template engine according to the request parameter template, and request the third-party interface.
[0063] After all the interface data is returned, the present application can use different strategies to process the original data in a strategy pattern to generate the data required by the business travel calculation system. For example, the present application can provide three strategies: Strategy A, Strategy B, and Strategy C. Different processing modes can be selected according to the identifier of the external request.
[0064] Strategy A is a general processing strategy applicable to most data processing. After obtaining the original data, since the original data sources are numerous and the data formats are not standardized, unified data standardization processing is performed according to the field type and the front-end data display rules:
[0065] When the field type = boolean type, it is uniformly replaced with True and False;
[0066] When the field type is numeric and the "Is it percentage data" of this field is "Yes", perform the operation of dividing by one hundred; then process the data precision according to the data precision policy.
[0067] The front-end data display rule is the processing rule of the checkbox. According to whether it needs to be split (Yes), the split rule is used to split and display the multiple-choice data; according to whether it is necessary to merge fields (Yes), the data values of the two fields are merged and displayed; according to whether it is necessary to convert (Yes), the numerical value of the field is replaced and displayed according to the policy.
[0068] Policy B is applicable to data processing related to customer types. The business travel calculation system is divided into new customer and old customer calculations. When the customer type = 0, it represents a new customer. When the average value of the business data = 0, the actual value is also assigned 0. When the customer type = 1, it represents an old customer. When the average value of the business data!= 0, the actual value is assigned the average value, and then the data precision is processed according to the data precision policy.
[0069] Policy C is applicable to array type data processing. The present invention first judges whether the mapping path of the current business field = the array rule. If so, the first data of the array is obtained; otherwise, the data is directly returned, and then post-processing - boolean type conversion and digital precision processing are performed.
[0070] When displaying on the page, the present application can dynamically render the display format of the field and whether the field is displayed according to the front-end data display format field. The present application performs dynamic rendering according to which product categories (flight tickets, hotels, train tickets, bus tickets, and public) are selected on the front end. In specific implementation, for the rendering of each field, the front-end data display format field is used for rendering, and the field stores the JSON data format agreed with the front end. The field elements are divided into data type "type" and pre-rendered value "value". When type = "select", the field is set as a dropdown box, and value is the dropdown box option; when type = "input", the field is set as an input box, and value is not filled. The present application can implement more variation methods, which will not be elaborated here.
[0071] Thus, in the method for obtaining business travel settlement multi-data source business data in this embodiment, through the first thread pool, the business travel fields to be obtained are grouped based on the interface identifier, so as to distribute and obtain the second thread pool, and the business travel data of the business travel fields are respectively requested and obtained through one or more of the hotel data interface, flight ticket data interface, train ticket data interface, and bus ticket data interface, thereby realizing asynchronous data requests, and performing template configuration processing on the business travel data based on the parameter request template, and through the rendering of the type identifier, to realize the automated acquisition of business travel settlement multi-data source business data, improve the speed of obtaining business data, and facilitate the unified settlement and processing of business data.
[0072] Figure 2 The figure shows a flowchart for determining whether the current customer is an existing customer according to a specific embodiment of the present invention. In this embodiment, the business travel data acquisition request is associated with a customer identifier. Thus, before determining the multiple business travel fields to be acquired in response to the business travel data acquisition request, the following steps are included:
[0073] Step S101: According to the business travel data acquisition request, determine whether the customer identifier exists;
[0074] If the determination in step S101 is yes, step S110 can be executed: In response to the business travel data acquisition request, determine the multiple business travel fields to be acquired, where the multiple business travel fields acquired are associated with the customer identifier;
[0075] If the determination in step S101 is no, step S111 can be executed: Acquire similar customers from existing customers according to the customer identifier, and in response to the business travel data acquisition request according to the customer identifier of the similar customers, determine the multiple business travel fields to be acquired, where the multiple business travel fields acquired are associated with the customer identifier of the similar customers.
[0076] Specifically, the present application can be applied to the calculation of business travel data of old customers, and can also be applied to the provision of service data for new customers. When applied to the calculation of business travel data of old customers, the business travel data associated with the old customers can be directly acquired. When applied to the provision of service data for new customers, since there is no associated business travel data of new customers in the system, therefore, through the calculation of similar customers, the business travel data of similar customers can be acquired, so as to provide service data to new customers.
[0077] Next, refer to Figure 3 , Figure 3 The figure shows a flowchart for determining similar customers according to an embodiment of the present invention. Figure 3 The following steps are shown in total:
[0078] Step S113: Calculate the similarity between the customer indicated by the current customer identifier and the existing customers according to the enterprise scale and business travel system of the customer indicated by the current customer identifier and the existing customers.
[0079] Specifically, the enterprise scale may include but is not limited to the number of employees in the enterprise, the number of associated companies of the enterprise, the number of employees in each subsidiary company, etc. The business travel system may include setting different standard prices for business trips for different employee levels, setting different standard prices for business trips for different travel distances, etc.
[0080] Specifically, the business travel system can be provided by the customer in the form of text. The system can unify the business travel systems of different customers into the same format by identifying the text / fields.
[0081] Since this application is applied to business travel settlement, the similarity between customers can be calculated according to the enterprise scale and business travel system, which can better fit the similarity of customers in the dimension of business travel.
[0082] Step S114: Determine one or more similar customers according to the calculated similarity.
[0083] Refer to the following Figure 4 , Figure 4 which shows a flowchart of calculating the similarity between customers according to an embodiment of the present invention. Figure 4 The following steps are shown in total:
[0084] Step S115: Use the existing customers whose enterprise scale is in the same scale level as the customer indicated by the current customer identifier as candidate customers.
[0085] Specifically, different scale levels can be preset in advance. For example, the scale level is a small enterprise (the number of employees is less than 50); a medium-sized enterprise (50 - 200 people); a large enterprise (more than 200 people). According to the obtained enterprise scale data of the customer, enterprises with different enterprise scales from the current customer can be filtered out first.
[0086] Step S116: Form a current differential standard matrix and a candidate differential standard matrix for the customer indicated by the current customer identifier and the candidate customers respectively according to the employee business travel standard level, business travel distance range level, and business travel standard price of the business travel system.
[0087] Specifically, in the differential standard matrix, the employee business travel standard level can be used as the row label, the business travel distance range level can be used as the column label, and the matrix item is the business travel standard price corresponding to the corresponding row label and column label. For example, for a customer, its employee business travel standard level can be divided into junior employees, senior employees, and leaders, and the business travel distance range can be divided into domestic short-distance business travel, domestic long-distance business travel, and international business travel. Thus, a 3*3 differential standard matrix can be formed. Among them, the matrix item in the first row and the first column is the business travel standard price when a junior employee travels on a domestic short-distance business trip, and so on.
[0088] Step S117: Calculate the similarity between the customer indicated by the current customer identifier and the candidate customers according to the current differential standard matrix and the candidate differential standard matrix.
[0089] Specifically, the matrix similarity can be calculated by the cosine distance of the matrix. The closer the distance is, the higher the similarity is, and the farther the distance is, the lower the similarity is.
[0090] Preferably, the current differential label matrix and the candidate differential label matrix have the same number of rows and columns. In some variations, the number of rows and columns of the current differential label matrix and the candidate differential label matrix are different. In this embodiment, the differential label matrix with fewer rows and columns can be filled with matrix items according to the distribution of matrix items. For example, for a 2*2 differential label matrix, when it needs to be filled into a 2*3 matrix, the added column can be located in the middle of the original two columns, and the matrix items are the average values of the matrix items in the previous column and the next column in the same row. The present application can implement more different matrix item filling schemes, which will not be elaborated here.
[0091] In a further embodiment, the differential label matrix may include multiple sub-differential label matrices such as a hotel differential label matrix, an air ticket differential label matrix, a train ticket differential label matrix, and a bus ticket differential label matrix. Thus, calculating the similarity between the customer indicated by the current customer identifier and the candidate customer according to the current differential label matrix and the candidate differential label matrix includes: calculating sub-similarities according to the current sub-differential label matrix and the candidate sub-differential label matrix; calculating the similarity between the customer indicated by the current customer identifier and the candidate customer according to the weighted sum of the sub-similarities. Thus, the similarity of customers in business travel can be calculated based on different dimensions (hotels, air tickets, train tickets, bus tickets).
[0092] Further, when the number of similar customers is multiple, rendering the business travel data of the multiple business travel fields obtained according to the identified type further includes: in response to the identified type being numerical, for each business travel field, taking the average value of the business travel data of each similar customer as the business travel data of this business travel field. Thus, it is convenient to hide the accurate business travel data of existing customers from new customers, but still be able to provide similar service data to new customers.
[0093] The above are only schematic descriptions of multiple implementation manners of the present invention, and the present invention is not limited thereto.
[0094] The present invention also provides a business travel settlement multi-data source service data acquisition device Figure 5 shows a schematic diagram of a business travel settlement multi-data source service data acquisition device according to an embodiment of the present invention. The business travel settlement multi-data source service data acquisition device 300 includes a determination module 310, a distribution module 320, a request module 330, an identification module 340, and a rendering module 350.
[0095] The determination module 310 is configured to determine multiple business travel fields to be acquired and the interface identifiers associated with each business travel field in response to a business travel data acquisition request;
[0096] The distribution module 320 is used to divide the business travel fields with the same interface identifier into a group of business travel fields by the first thread pool according to the interface identifiers associated with each business travel field, and distribute the same group of business travel fields to the interface indicated by the interface identifier according to the interface list of the second thread pool. The interface includes at least one or more of a hotel data interface, an air ticket data interface, a train ticket data interface, and a bus ticket data interface;
[0097] The request module 330 is used to request the interface indicated by the interface identifier to return business travel data by the second thread pool according to the parameter request template, and fill it into the parameter request template to obtain the business travel data of the requested multiple business travel fields;
[0098] The identification module 340 is used to perform type identification on the obtained business travel data;
[0099] The rendering module 350 is used to render the business travel data of the obtained multiple business travel fields according to the identified type, and the rendered business travel data of the multiple business travel fields is used for display.
[0100] In the business travel settlement multi-data source service data acquisition device provided by the present invention, through the first thread pool, the business travel fields to be acquired are grouped based on the interface identifier, so as to distribute and obtain the second thread pool, and the business travel data of the business travel fields are respectively requested through one or more of a hotel data interface, an air ticket data interface, a train ticket data interface, and a bus ticket data interface, so as to realize asynchronous data request, and perform template configuration processing on the business travel data based on the parameter request template, and through the rendering of type identification, so as to realize the acquisition of multi-data source service data for automatic business travel settlement, improve the service data acquisition speed, and facilitate the unified settlement and processing of service data.
[0101] Figure 5 The business travel settlement multi-data source service data acquisition device provided by the present invention is only schematically shown. Without departing from the concept of the present invention, the splitting, merging, and addition of modules are all within the protection scope of the present invention. The business travel settlement multi-data source service data acquisition device provided by the present invention can be implemented by software, hardware, firmware, plug-ins, and any combination thereof. The present invention is not limited thereto.
[0102] In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having a computer program stored thereon, and when the program is executed by, for example, a processor, the steps of the business travel settlement multi-data source service data acquisition method described in any of the above embodiments can be implemented. In some possible implementation manners, various aspects of the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above business travel settlement multi-data source service data acquisition method section of this specification.
[0103] Referring Figure 6 As shown, a program product 400 for implementing the above method according to an embodiment of the present invention is described. It may be a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device.
[0104] The program product may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, be but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0105] The computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal may take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than the readable storage medium, and this readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0106] The program code for performing the operations of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the tenant computing device, partially on the tenant device, executed as a stand-alone software package, partially on the tenant computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the tenant computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).
[0107] In an exemplary embodiment of the present disclosure, an electronic device is further provided. The electronic device may include a processor and a memory for storing executable instructions of the processor. Among them, the processor is configured to execute the steps of the business travel settlement multi-data source service data acquisition method described in any one of the above embodiments by executing the executable instructions.
[0108] Those skilled in the art can understand that various aspects of the present invention can be implemented as a system, a method, or a program product. Therefore, various aspects of the present invention can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuitry", "module", or "system" here.
[0109] The following refers to Figure 7 to describe the electronic device 600 according to this embodiment of the present invention. Figure 7 The electronic device 600 shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.
[0110] As Figure 7 shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0111] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present invention described in the above-mentioned business travel settlement multi-data source service data acquisition method part of this specification. For example, the processing unit 610 can execute as Figure 1 the steps shown in
[0112] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 6201 and / or a cache storage unit 6202, and may further include a read-only storage unit (ROM) 6203.
[0113] The storage unit 620 may also include a program / utilities 6204 having a set (at least one) of program modules 6205. Such program modules 6205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0114] The bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus structures.
[0115] The electronic device 600 can also communicate with one or more external devices 700 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and can also communicate with one or more devices that enable a tenant to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 650. In addition, the electronic device 600 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 660. The network adapter 660 can communicate with other modules of the electronic device 600 through the bus 630. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0116] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above-mentioned method for obtaining business travel settlement multi-data source business data according to the embodiments of the present disclosure.
[0117] Compared with the prior art, the advantages of the present invention are as follows:
[0118] The present invention groups the business travel fields to be obtained based on the interface identifier through the first thread pool, so as to distribute and obtain the second thread pool, and respectively request and obtain the business travel data of the business travel fields through one or more of the hotel data interface, the air ticket data interface, the train ticket data interface, and the bus ticket data interface, thereby realizing asynchronous data requests, and performing template configuration processing on the business travel data based on the parameter request template, and through the rendering of the type identifier, to realize the acquisition of multi-data source business data for automatic business travel settlement, improve the speed of business data acquisition, and facilitate the unified settlement and processing of business data.
[0119] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the appended claims.
Claims
1. A method for obtaining business data of multiple data sources for business travel settlement, characterized in that, it includes: In response to a business travel data acquisition request, obtain the customer identifier associated with the request; According to the business travel data acquisition request, determine whether the customer identifier already exists; If so, determine multiple business travel fields to be obtained, and each business travel field is associated with an interface identifier; among them, the multiple obtained business travel fields are associated with the customer identifier; By the first thread pool, divide the business travel fields with the same interface identifier into a group of business travel fields according to the interface identifiers associated with each business travel field, and distribute the same group of business travel fields to the interface indicated by the interface identifier according to the interface list of the second thread pool. The interface includes at least one or more of a hotel data interface, an air ticket data interface, a train ticket data interface, and a bus ticket data interface; By the second thread pool, request the interface indicated by the interface identifier to return business travel data according to the parameter request template, and fill it into the parameter request template to obtain the business travel data of the multiple requested business travel fields; Perform type identification on the obtained business travel data; According to the identified type, render the business travel data of the multiple obtained business travel fields. The rendered business travel data of the multiple business travel fields is used for display; If not, obtain similar customers from existing customers according to the customer identifier, and determine multiple business travel fields to be obtained in response to the business travel data acquisition request according to the customer identifiers of the similar customers. Among them, the multiple obtained business travel fields are associated with the customer identifiers of the similar customers; Calculate the similarity between the customer indicated by the current customer identifier and existing customers according to the enterprise scale of the customer indicated by the current customer identifier and existing customers and the business travel system; Take the existing customers with the same scale level as the enterprise scale of the customer indicated by the current customer identifier as candidate customers; According to the employee business travel standard level, business travel distance range level, and business travel standard price of the business travel system, form a current business travel standard matrix and a candidate business travel standard matrix for the customer indicated by the current customer identifier and candidate customers respectively; Calculate the similarity between the customer indicated by the current customer identifier and candidate customers according to the current business travel standard matrix and the candidate business travel standard matrix; Determine one or more similar customers according to the calculated similarity; When the number of the similar customers is multiple, the rendering of the business travel data of the multiple obtained business travel fields according to the identified type further includes: In response to the identified type being numerical, for each business travel field, take the average value of the business travel data of each similar customer as the business travel data of this business travel field.
2. The method for obtaining business data of multiple data sources for business travel settlement according to claim 1, characterized in that, The business travel standard matrix includes multiple sub-business travel standard matrices such as a hotel business travel standard matrix, an air ticket business travel standard matrix, a train ticket business travel standard matrix, and a bus ticket business travel standard matrix. The calculation of the similarity between the customer indicated by the current customer identifier and candidate customers according to the current business travel standard matrix and the candidate business travel standard matrix includes: Calculate the sub-similarity according to the current sub-business travel standard matrix and the candidate sub-business travel standard matrix; Calculate the similarity between the customer indicated by the current customer identifier and the candidate customers based on the weighted sum of the sub-similarities.
3. The business travel settlement multi-data source service data acquisition method according to claim 1, characterized in that the rendering of the business travel data of the multiple business travel fields obtained according to the identified type further includes: determine the preset rendering strategy for the business travel data of the multiple business travel fields obtained; Render the business travel data of the multiple business travel fields obtained according to the identified type and the determined preset rendering strategy.
4. A business travel settlement multi-data source service data acquisition device, characterized in that used to execute the business travel settlement multi-data source service data acquisition method according to any one of claims 1 to 3, including: Determination module: used to respond to a business travel data acquisition request, determine the multiple business travel fields to be acquired, and each business travel field is associated with an interface identifier; Distribution module: used by the first thread pool, divide the business travel fields with the same interface identifier into a group of business travel fields according to the interface identifier associated with each business travel field, and distribute the same group of business travel fields to the interface indicated by the interface identifier according to the interface list of the second thread pool, and the interface includes at least one or more of a hotel data interface, an air ticket data interface, a train ticket data interface, and a bus ticket data interface; Request module: used by the second thread pool, request the interface indicated by the interface identifier to return business travel data according to the parameter request template, and fill it into the parameter request template to obtain the business travel data of the multiple business travel fields requested; Identification module: used to perform type identification on the acquired business travel data; Rendering module: used to render the business travel data of the multiple business travel fields obtained according to the identified type, and the rendered business travel data of the multiple business travel fields is used for display.
5. An electronic device, characterized in that the electronic device includes: a processor; a storage medium, on which a computer program is stored, and when the computer program is run by the processor, it executes the business travel settlement multi-data source service data acquisition method according to any one of claims 1 to 3.
6. A storage medium, characterized in that a computer program is stored on the storage medium, and when the computer program is run by a processor, it executes the business travel settlement multi-data source service data acquisition method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Product recommendation method, apparatus, and computer readable storage medium
CN109299997A
Data accounting system and method, computer readable storage medium and electronic equipment
CN113362025A
Single system for managing multi-platform data retrieval
US20040148270A1