Bill data processing method, electronic device, and storage medium
Patent Information
- Application Number
- CN202411832449.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2044-12-12
AI Technical Summary
[0004]本公开实施例提供了一种账单数据处理方法、电子设备及存储介质,以至少解决相关技术中提供的账单数据处理方法存在的安全性不足、处理效率低下以及灵活性差的技术问题
[0021]在本公开实施例中,通过获取目标用户对应的原始服务账单数据,并基于原始账单数据确定元数据信息,进而依据元数据信息生成目标账单文件,最后利用目标传输方式将目标账单文件发送至目标用户,达到了高效安全传输目标用户服务账单的目的,从而实现了提高账单数据处理的安全性、效率和灵活性的技术效果,进而解决了相关技术中提供的账单数据处理方法存在的安全性不足、处理效率低下以及灵活性差的技术问题。
Smart Images

Figure CN119809841B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of civil aviation information services, and more specifically, to a billing data processing method, electronic device, and storage medium. Background Technology
[0002] Foreign airline service billing data, serving as a crucial basis for airline financial analysis and decision-making, contains detailed transaction records and critical business information. The accuracy and security of its processing and transmission are paramount to maintaining the airline's economic interests and customer trust. Current billing data processing methods typically employ manual or semi-automated approaches for formatting, verifying, and sending bills. However, these methods suffer from low security, low processing efficiency, and poor flexibility. Data lacks effective encryption protection during transmission, making it vulnerable to unauthorized access or tampering. Furthermore, the rigid billing process struggles to adapt to the personalized needs of different users or business scenarios regarding billing formats and transmission methods. Consequently, it is difficult to provide efficient and flexible billing data services while ensuring data security.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This disclosure provides a billing data processing method, an electronic device, and a storage medium to at least address the technical problems of insufficient security, low processing efficiency, and poor flexibility in the billing data processing methods provided in the related art.
[0005] According to one aspect of the present disclosure, a billing data processing method is provided, comprising: obtaining an original billing file, wherein the original billing file includes original service billing data corresponding to a target user; determining metadata information based on the original billing file, wherein the metadata information is used to represent the mapping relationship between a target user identifier and an absolute file path; generating a target billing file based on the metadata information, wherein the target billing file contains encrypted service billing data corresponding to the target user; and sending the target billing file to the target user using a target transmission method, wherein the target transmission method is determined from a plurality of candidate transmission methods.
[0006] Optionally, obtaining the original billing file includes: obtaining original file information from the configuration center, wherein the original file information includes: service bill type, original bill path, and original bill format; determining a preset file directory based on the original bill path; and scanning the preset file directory to obtain the original billing file.
[0007] Optionally, determining metadata information based on the original billing file includes: obtaining regularization expression information based on the original billing format; performing validation processing on the original billing file using the regularization expression information and service billing type to obtain a file validation result; responding by determining that the original billing file has passed validation based on the file validation result, determining the target user identifier based on the file identifier of the original billing file, and determining the absolute file path based on the original billing path, the file identifier of the original billing file, and the file format; and determining metadata information based on the target user identifier and the absolute file path.
[0008] Optionally, generating the target billing file based on metadata information includes: obtaining user file information from the configuration center, wherein the user file information includes a processing date field; determining that the original billing file is in an unprocessed state based on the processing date field, constructing a file matching relationship using metadata information, wherein the file matching relationship is used to represent the association between the original billing file and the target billing file; encrypting the original billing file based on the file matching relationship to obtain an encryption result; and formatting the encryption result to generate the target billing file.
[0009] Optionally, encrypting the original bill file based on the file matching relationship to obtain the encryption result includes: obtaining user key information in response to the file matching relationship being verified; and encrypting the original bill file using a symmetric encryption algorithm and the user key information to obtain the encryption result.
[0010] Optionally, obtaining user key information includes: obtaining user key information from the configuration center, or generating user key information using random characters.
[0011] Optionally, the billing data processing method further includes updating the processing date field in response to successfully sending the target billing file to the target user using the target transmission method.
[0012] According to another aspect of the embodiments of this disclosure, a billing data processing apparatus is also provided, comprising: an acquisition module for acquiring an original billing file, wherein the original billing file includes original service billing data corresponding to a target user; a determination module for determining metadata information based on the original billing file, wherein the metadata information is used to represent the mapping relationship between a target user identifier and an absolute file path; a generation module for generating a target billing file based on the metadata information, wherein the target billing file contains encrypted service billing data corresponding to the target user; and a sending module for sending the target billing file to the target user using a target transmission method, wherein the target transmission method is determined from a plurality of candidate transmission methods.
[0013] Optionally, the acquisition module is also used to: obtain original file information from the configuration center, wherein the original file information includes: service bill type, original bill path and original bill format; determine a preset file directory based on the original bill path; and scan the preset file directory to obtain the original bill file.
[0014] Optionally, the determination module is further configured to: obtain regularization expression information based on the original bill format; perform verification processing on the original bill file using the regularization expression information and service bill type to obtain a file verification result; respond by determining that the original bill file passes verification based on the file verification result, determining the target user identifier based on the file identifier of the original bill file, and determining the absolute path of the file based on the original bill path, the file identifier of the original bill file, and the file format; and determine metadata information based on the target user identifier and the absolute path of the file.
[0015] Optionally, the generation module is further configured to: obtain user file information from the configuration center, wherein the user file information includes a processing date field; determine that the original bill file is in an unprocessed state based on the processing date field, construct a file matching relationship using metadata information, wherein the file matching relationship is used to represent the association between the original bill file and the target bill file; encrypt the original bill file based on the file matching relationship to obtain the encryption result; and perform format processing on the encryption result to generate the target bill file.
[0016] Optionally, the generation module is also used to: obtain user key information in response to the file matching relationship being verified; and encrypt the original billing file using a symmetric encryption algorithm and the user key information to obtain the encryption result.
[0017] Optionally, the generation module is also used to: obtain user key information from the configuration center, or generate user key information using random characters.
[0018] According to another aspect of the present disclosure, an electronic device is also provided, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the billing data processing method of the present disclosure.
[0019] According to another aspect of the present disclosure, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the storage medium is located to perform the billing data processing method of the present disclosure.
[0020] According to another aspect of the embodiments of this disclosure, a computer program product is also provided, the computer program product including computer instructions that, when executed by a processor, implement the billing data processing method of the embodiments of this disclosure.
[0021] In this embodiment of the disclosure, by obtaining the original service bill data corresponding to the target user, determining the metadata information based on the original bill data, generating the target bill file based on the metadata information, and finally sending the target bill file to the target user using the target transmission method, the goal of efficiently and securely transmitting the target user's service bill is achieved. This realizes the technical effect of improving the security, efficiency, and flexibility of bill data processing, thereby solving the technical problems of insufficient security, low processing efficiency, and poor flexibility in the bill data processing methods provided in related technologies. Attached Figure Description
[0022] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:
[0023] Figure 1 This is a flowchart of a billing data processing method according to one embodiment of the present disclosure;
[0024] Figure 2 This is a schematic diagram of a billing data processing method according to one embodiment of the present disclosure;
[0025] Figure 3 This is a schematic diagram of a file acquisition unit according to one embodiment of the present disclosure;
[0026] Figure 4 This is a schematic diagram of a file processing unit according to one embodiment of the present disclosure;
[0027] Figure 5 This is a schematic diagram of a file sending unit according to one embodiment of the present disclosure;
[0028] Figure 6 This is a structural block diagram of a billing data processing apparatus according to one embodiment of the present disclosure. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.
[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] Invoice data processing methods in related technologies typically employ manual or semi-automated approaches to format, verify, and send invoices. However, these methods suffer from low security, low processing efficiency, and poor flexibility. Data lacks effective encryption protection during transmission, making it vulnerable to unauthorized access or tampering. Furthermore, the rigid invoice processing flow struggles to adapt to the personalized needs of different users or business scenarios regarding invoice formats and transmission methods. Consequently, it is difficult to provide efficient and flexible invoice data services while ensuring data security.
[0032] Specifically, the "Data Security Law of the People's Republic of China," the "Personal Information Protection Law of the People's Republic of China," and the "Cybersecurity Law of the People's Republic of China" form a solid foundation for data protection, jointly promoting the improvement of my country's top-level design and overall layout in the field of cybersecurity, and establishing a legal framework for data security. Data security refers to ensuring that data is effectively protected and legally used through necessary measures, while possessing the ability to guarantee a continuous state of security. To regulate cross-border data transfer activities, protect personal information rights, safeguard national security and public interests, and promote the secure and free flow of data across borders, the "Measures for Security Assessment of Cross-border Data Transfer" explicitly requires data processors and overseas recipients to specify in detail their responsibilities and obligations for data security protection when signing legal documents, including but not limited to the purpose, method, and scope of data transfer, and the overseas recipient's intention to use and process the data.
[0033] Foreign airline service billing data products encompass various business types, such as Passenger Name Records (PNRs), tickets, ancillary services, New Distribution Capabilities (NDCs), and branded fares. This data contains detailed transaction records, exhibiting high accuracy, reliability, privacy, and security, while also possessing diverse sources and formats, thus holding rich business value. These characteristics make billing data a crucial basis for foreign airlines' financial management, risk control, and business decision-making. However, traditional billing data generation functions, under the same business type, generate billing file names, file types, and delivery methods for all users in a fixed pattern. While this standardized operation improves convenience and consistency, with the continuous expansion of billing business types and users' personalized demands for billing formats, the current system has certain limitations in maintainability, scalability, flexibility, and manageability, making it difficult to adapt to rapidly changing market demands.
[0034] According to an embodiment of this disclosure, a method embodiment for billing data processing is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0035] This method embodiment can be executed in an electronic device or similar computing device that includes memory and a processor. Taking a computer terminal as an example, the computer terminal may include one or more processors (processors may include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), digital signal processing (DSP) chips, microcontroller units (MCUs), field-programmable gate arrays (FPGAs), neural network processors (NPUs), tensor processors (TPUs), artificial intelligence (AI) type processors, etc.) and memory for storing data. Optionally, the computer terminal may also include transmission devices, input / output devices, and display devices for communication functions. Those skilled in the art will understand that the above structural description is merely illustrative and does not limit the structure of the computer terminal. For example, the computer terminal may include more or fewer components than described above, or have a different configuration than described above.
[0036] The memory can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the billing data processing method in this embodiment. The processor executes various functional applications and data processing by running the computer program stored in the memory, thereby implementing the aforementioned billing data processing method. The memory may include high-speed random access memory (RAM) and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks (LANs), mobile communication networks, and combinations thereof.
[0037] The transmission device is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0038] Display devices can be, for example, touchscreen liquid crystal displays (LCDs) and touch displays (also referred to as "touchscreens" or "touch displays"). The LCD allows users to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows users to interact with the GUI through finger contact and / or gestures on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.
[0039] Figure 1 This is a flowchart of a billing data processing method according to one embodiment of the present disclosure, such as... Figure 1 As shown, the method includes the following steps:
[0040] Step S11: Obtain the original billing file, wherein the original billing file includes the original service billing data corresponding to the target user;
[0041] Step S12: Determine metadata information based on the original billing file, wherein the metadata information is used to represent the mapping relationship between the target user identifier and the absolute path of the file;
[0042] Step S13: Generate a target billing file based on metadata information, wherein the target billing file contains encrypted service billing data corresponding to the target user;
[0043] Step S14: Send the target billing file to the target user using the target transmission method, wherein the target transmission method is determined from multiple candidate transmission methods.
[0044] The aforementioned metadata refers to the key attribute data about the file generated and maintained by the system during the processing of the original billing file, including but not limited to the target user identifier and the absolute path of the original billing file on the server. By analyzing and extracting specific patterns in the filename and its storage path, the system can construct a mapping table to associate specific billing files with corresponding target users.
[0045] The absolute file path mentioned above refers to the complete path from the server's root directory to the location of the specific original billing file. It includes every level of directory from the root directory to the file's location, as well as the file's name. It serves as a unique identifier for locating a specific file on the server or storage device. For example, in a Windows system, the absolute path of a file might be "C:\Users\Username\Documents\file.txt"; while in a Unix-like system, it might be " / home / username / Documents / file.txt".
[0046] The aforementioned candidate transmission methods refer to various methods pre-configured in the system for sending billing documents to the target user, including but not limited to email, Secure File Transfer Protocol (SFTP), File Transfer Protocol (FTP), and Hypertext Transfer Protocol Secure (HTTPS). Users or system administrators can select one of these as the target transmission method based on actual needs, security considerations, or network environment to ensure that the transmission of billing documents meets both efficiency requirements and security standards.
[0047] For example, during the billing data processing, the original billing data corresponding to the target user is first obtained. Assuming the target user is identified as "AA" and its absolute file path is " / DATA / prod_data / bidt / 202401 / AA_Bidt202401.txt", a key-value mapping relationship can be established between the target user and the absolute file path, i.e., the key "AA" maps to the value " / DATA / prod_data / bidt / 202401 / AA_Bidt202401.txt". Further, based on the above mapping relationship, encrypted service billing data corresponding to the target user is generated. Finally, the obtained encrypted service billing data is sent to the target user using SFTP.
[0048] Based on the above steps S11 to S15, by obtaining the original service bill data corresponding to the target user, determining the metadata information based on the original bill data, generating the target bill file according to the metadata information, and finally sending the target bill file to the target user using the target transmission method, the goal of efficiently and securely transmitting the target user's service bill is achieved. This realizes the technical effect of improving the security, efficiency, and flexibility of bill data processing, and solves the technical problems of insufficient security, low processing efficiency, and poor flexibility in the bill data processing methods provided in related technologies.
[0049] The billing data processing method in the embodiments of this disclosure will be further described below.
[0050] Optionally, in step S11, obtaining the original billing file includes:
[0051] Step S111: Obtain the original file information from the configuration center. The original file information includes: service bill type, original bill path, and original bill format.
[0052] Step S112: Determine the preset file directory based on the original bill path;
[0053] Step S113: Scan the preset file directory to obtain the original bill file.
[0054] The aforementioned service bill types refer to various predefined bill categories in the system. These bill categories are usually represented by numbers or codes and correspond to specific service types in the airline's business (such as 1-PNR reservation, 2-ticket sales, 3-ancillary services, 4-NDC transactions, etc.) to simplify bill identification and classification in the logical processing.
[0055] The aforementioned original billing path refers to the specific location information of the original billing file on the server or storage device, that is, the complete path starting from the server root directory and ending at the directory where the original billing file is stored. For example, " / DA TA / prod_data / bidt / YYYYMM / DD" represents the standard path for storing billing data for a specific month and day, where "YYYYMM" and "DD" represent the specific year, month, and day.
[0056] The aforementioned original bill format refers to the regular expression used to describe the naming and formatting rules of original bill files. It is the basis used by the system to check and verify whether a file belongs to a specific bill type. For example, "[AZ]{2}_Bidt[0-9]{6}.txt" is a regular expression that indicates the filename should begin with two uppercase letters, followed by the prefix "_Bidt", then six digits, and finally the .txt extension. This ensures that the files processed by the system conform to the prescribed bill file naming rules and format requirements.
[0057] The aforementioned preset file directory refers to the specific server directory determined by the system based on the original billing path information, used for storing and retrieving original billing files of a specific type. After the system obtains the original file information from the configuration center, namely the service billing type, the original billing path, and the original billing format, it will determine a preset file directory based on the original billing path. This directory contains all billing files related to that service billing type.
[0058] For example, information about a certain raw file obtained from the configuration center is shown in Table 1:
[0059] Table 1 Original File Information
[0060] Service billing types character varying(2) 1 Original billing path character varying(50) / DATA / prod_data / bidt / YYYYMM / DD Original bill format character varying(50) [AZ]{2}_Bidt[0-9]{6}.txt
[0061] In Table 1, the service bill type is 1, which is PNR reservation; the original bill path is " / DATA / prod_data / bidt / YYYYMM / DD"; the original bill format is "[AZ]{2}_Bidt[0-9]{6}.txt"; character varying(*) represents a variable-length character field with a maximum length of * characters.
[0062] For example, assuming the original billing path information is " / DATA / prod_data / bidt / YYYYMM / DD", where "YYYYMM" and "DD" represent the year, month, and day, the system will use " / DATA / prod_data / bidt / " as the base path for the default file directory. If the current billing cycle is a PNR reservation bill for January 10, 2024, the system will use " / DATA / prod_data / bidt / 202401 / 10" as the default file directory and scan the default file directory to obtain the original billing file.
[0063] Based on the above optional embodiments, by using the original file information provided by the configuration center, the system can not only intelligently identify and locate original bill files of specific types and formats, but also determine the preset file directory based on the original bill path, and further perform efficient scanning of the directory, thereby accurately obtaining the original bill files to be processed. This improves the automation level of bill data processing, reduces errors and redundant work, and at the same time enhances the efficiency and security of the entire bill data processing process.
[0064] Optionally, in step S12, determining the metadata information based on the original billing file includes:
[0065] Step S121: Obtain regularization expression information based on the original bill format;
[0066] Step S122: Use regular expression information and service bill type to perform verification processing on the original bill file to obtain the file verification result;
[0067] Step S123: The response determines that the original bill file has passed the verification based on the file verification result, determines the target user identifier based on the file identifier of the original bill file, and determines the absolute path of the file based on the original bill path, the file identifier of the original bill file, and the file format.
[0068] Step S124: Determine metadata information based on the target user identifier and the absolute file path.
[0069] For example, assuming the original file of AA Airlines' PNR reservation service monthly bill is located in the directory " / DATA / prod_data / bidt / 202401" and the file name and format is "AA_Bidt202401.txt", the collection module scans the directory files and compares them with the original file information. Assuming that it matches the regular expression "[0-9A-Z]{2}_Bidt[0-9]{6}.txt" under the service bill type "1-Reservation", the file is matched to this service bill type, and the first two fields of the file name are extracted as the two-letter code corresponding to the airline user. Then, the absolute path of the airline user and the file is stored in key-value format as shown in Table 2.
[0070] Table 2 Metadata Information
[0071] AA / DATA / prod_data / bidt / 202401 / AA_Bidt202401.txt
[0072] In Table 2, “AA” represents the two-letter code corresponding to the airline user, i.e., the user identifier; “ / DATA / prod_data / bidt / 202401 / AA_Bidt202401.txt” represents the absolute path of the file corresponding to “AA”.
[0073] Based on the above optional embodiments, the above verification process can ensure that the original billing files processed meet the predefined format and type requirements, avoiding the inclusion of erroneous files in the processing flow. At the same time, based on the verified files, the system can accurately identify the target user and the location information of the files, thereby improving the accuracy and efficiency of data processing, as well as strengthening data security and the reliability of bill generation.
[0074] Optionally, in step S13, generating the target billing file based on metadata information includes:
[0075] Step S131: Obtain user file information from the configuration center, wherein the user file information includes: processing date field;
[0076] Step S132: The response determines that the original bill file is in an unprocessed state based on the processing date field, and constructs a file matching relationship using metadata information, wherein the file matching relationship is used to represent the association between the original bill file and the target bill file;
[0077] Step S133: Encrypt the original bill file based on the file matching relationship to obtain the encryption result;
[0078] Step S134: Format the encryption result to generate the target billing file.
[0079] The aforementioned user file information refers to the file processing configuration data stored in the system that is related to each user. It covers the personalized needs and preferences of the account, ensuring that the system can generate and send bills according to each user's specific instructions and requirements.
[0080] Specifically, user file information includes, but is not limited to, fields such as identifier, transmission method, user identifier, official file format, service bill type, transmission destination, and processing date. The identifier is a system-defined value with no business meaning, used to uniquely identify each piece of data; the official file format refers to the custom-defined filename and format sent to the user to meet personalized needs; the transmission method includes, but is not limited to, email transmission (M) and SFTP transmission (F); the transmission destination refers to the user's recipient address information, which is the user's email address for email transmissions and the relay server address path for SFTP transmissions; the processing date field refers to the latest processing date recorded by the system for each file, used to track and manage the file's processing status.
[0081] For example, by checking the latest processing date in the user file information in the configuration center, the processing status is checked. If the current execution date is less than or equal to the latest processing date, it means that the original file has already been processed, and no further processing is needed. Conversely, if the current execution date is less than or equal to the latest processing date, it means that the file corresponding to the current date has not been processed, and it is necessary to establish an association between the original billing file and the target billing file by using the key-value information under each service billing type and the service billing type and user identifier.
[0082] The above-mentioned format processing refers to a series of processing operations performed by the system on the encrypted result after the file is encrypted, based on the formal file format requirements in the user's file information, in order to meet the user's personalized needs and transmission format requirements. These operations include, but are not limited to, file renaming, file compression, adjusting the arrangement of file content, converting file encoding, or adding additional metadata.
[0083] For example, if a user requests that a file be sent in ".zip" format, the system will compress the encrypted file; if the user has specific file naming requirements, the system will modify the file name accordingly; if the user's file information contains a custom file content structure, the system will also adjust the encrypted file content to meet the specific format requirements.
[0084] For example, the user file information obtained from the configuration center is shown in Table 3:
[0085] Table 3 User File Information
[0086] identifier integer 1 Transmission method character varying(2) F User ID character varying(3) AA Formal document format character varying(50) AA_BidtYYYYMM_encrypt.zip Service billing types character varying(2) 1 Transmission destination character varying(500) / bidtfile / Processing date date 2024-01-01
[0087] In Table 3, the identifier for the current user file information is 1; the transfer method is SFTP; the user identifier is "AA"; the official file format is "AA_BidtYYYYMM_encrypt.zip"; the service bill type is 1, i.e., PNR reservation; the transfer destination is " / bidtfile / "; the latest processing date is "2024-01-01", and its field type is "date".
[0088] Based on the above optional embodiments, by obtaining user file information from the configuration center and checking the processing date field, the system can intelligently determine whether the original bill file is in an unprocessed state, and then use the retained metadata information to construct a file matching relationship. Simultaneously, the original bill file is encrypted based on the constructed matching relationship to ensure the security of data transmission. After obtaining the encryption result, it is then formatted according to the formal file format requirements specified in the user file information, ultimately generating a target bill file that meets the user's personalized needs. This not only ensures the automation and efficiency of data processing but also enhances data security and meets the diverse needs of users for bill files, achieving an effective combination of flexible, secure, automated, and personalized services.
[0089] Optionally, in step S133, the original bill file is encrypted based on the file matching relationship, and the encryption result includes:
[0090] Step S1331: In response to the file matching relationship being verified, obtain the user's key information;
[0091] Step S1332: Encrypt the original billing file using a symmetric encryption algorithm and user key information to obtain the encryption result.
[0092] For example, when the matching relationship between the original billing file and the target billing file is successful, meaning the two billing files have been successfully mapped, the original billing file with the absolute path in the association information is encrypted using the user key information obtained from the configuration center and the internationally recognized symmetric encryption algorithm (Advanced Encryption Standard with 256-bit key, AES-256). During the AES-256 encryption process, Cipher Block Chaining (CBC) is used to enhance encryption security. First, a random initialization vector (IV) is selected, and the IV is XORed with the first plaintext data block in the original billing data to ensure that even the same plaintext data will produce different ciphertext outputs, thereby improving the randomness and security of the encryption. Next, for each data block, the result of the XOR operation with the ciphertext of the previous data block is encrypted using the AES-256 encryption algorithm. The encryption process of the first data block uses the IV XORed with the plaintext before encryption. The output of each encrypted data block becomes the input for encrypting the next data block, forming a chain encryption process. This ensures that even similar plaintext data blocks will have different encrypted outputs due to their different relationships with the current and previous ciphertext blocks, thus increasing the complexity and security of data encryption.
[0093] Based on the above optional embodiments, encrypting the original billing file using a symmetric encryption algorithm and user key information can ensure the integrity and security of the original billing file during transmission.
[0094] Optionally, in step S1331, obtaining user key information includes: obtaining user key information from the configuration center, or generating user key information using random characters.
[0095] For example, before performing encryption, the system retrieves the user's key information from the configuration center. If the key information for that user exists in the configuration center, it will directly use that key for encryption. If the user's key information is not pre-stored in the configuration center, a key generation process will be automatically triggered, generating a new 256-bit key using random characters to encrypt the original billing file.
[0096] Based on the above optional embodiments, for users who already have keys, directly using their keys can save resources and improve efficiency. For new users or those with missing keys, automatically generating and properly storing keys ensures the security of data transmission. This not only simplifies the key management process but also enhances the flexibility and security of billing data processing.
[0097] Optionally, the billing data processing method further includes updating the processing date field in response to successfully sending the target billing file to the target user using the target transmission method.
[0098] For example, once the target billing file is successfully sent to the target user using the transfer method selected by the target user (such as email or SFTP), the system will immediately update the "processing date field" associated with the billing file, that is, update the latest processing date with the current execution date.
[0099] Based on the above optional embodiments, by automatically updating the processing date field, the lifecycle of billing documents can be effectively managed, improving the efficiency and accuracy of billing data processing.
[0100] Figure 2 This is a schematic diagram of a billing data processing method according to one embodiment of the present disclosure, such as... Figure 2 As shown, the method includes the following steps: First, the original billing data is retrieved from the specified directory, and the user file generation status is checked. Further, when the original billing file matches the target billing file, file encryption, file format processing, and file renaming are performed to generate the official billing file. Finally, the official billing file is sent to the target user, and the user file processing status is updated.
[0101] For example, the system retrieves various original service billing files generated by foreign airlines from a designated directory during the billing cycle and checks their file formats. Further, it checks the latest processing date of the user's files to determine if the files have already been generated. Then, it matches the collected original service billing files with the billing type. For successfully matched files, it encrypts them, processes the format according to business requirements, renames them, and generates official billing files. Finally, based on the user's selected transmission method, it sends the corresponding official billing file to the target user and updates the latest processing date of the corresponding file.
[0102] Figure 3 This is a schematic diagram of a file acquisition unit according to one embodiment of the present disclosure, such as... Figure 3 As shown, in the file acquisition unit, firstly, the original billing file is obtained from the specified directory through the configuration center; secondly, the file name format is checked according to a regular expression. If the check result is satisfactory, the original billing file is input into the file processing unit; if the check result is unsatisfactory, the process ends.
[0103] Figure 4 This is a schematic diagram of a file processing unit according to one embodiment of the present disclosure, such as... Figure 4As shown, in the file processing unit, firstly, the user file generation status is checked based on the configuration center. If a user file has been generated, the current process ends; if no user file has been generated, file classification is completed when the original invoice file matches the invoice type. The current process ends when the original invoice file does not match the target invoice file. Further, when the original invoice file matches the target invoice file, the user key is read. If the user key does not exist, a new user key is generated and stored in the configuration center. If the user key exists, the file is encrypted based on the user key. After encryption, it is determined whether a custom filename is needed. If so, the filename is changed according to specific requirements; otherwise, it is determined whether a custom file format is needed. If a custom file format is needed, it is customized according to specific requirements. Finally, the data processed as described above is input to the file sending unit.
[0104] Figure 5 This is a schematic diagram of a file sending unit according to one embodiment of the present disclosure, such as... Figure 5 As shown, in the file sending unit, the transmission method is first obtained based on the configuration center. There are two transmission methods: the file is sent to the user via email and the file is sent to the user via a secure file transfer protocol. Furthermore, after the file is sent to the client via the transmission method, the user's file processing status is updated and the latest user file processing status is stored in the configuration center.
[0105] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0106] This disclosure also provides a billing data processing apparatus for implementing the above embodiments and preferred embodiments, which will not be repeated hereafter. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0107] Figure 6 This is a structural block diagram of a billing data processing apparatus according to one embodiment of the present disclosure, such as... Figure 6 As shown, the device includes:
[0108] The acquisition module 601 is used to acquire the original billing file, wherein the original billing file includes the original service billing data corresponding to the target user;
[0109] The determination module 602 is used to determine metadata information based on the original billing file, wherein the metadata information is used to represent the mapping relationship between the target user identifier and the absolute path of the file;
[0110] The generation module 603 is used to generate a target billing file based on metadata information, wherein the target billing file contains encrypted service billing data corresponding to the target user;
[0111] Sending module 604 is used to send a target billing file to a target user using a target transmission method, wherein the target transmission method is determined from multiple candidate transmission methods.
[0112] Optionally, the acquisition module 601 is further configured to: acquire original file information from the configuration center, wherein the original file information includes: service bill type, original bill path and original bill format; determine a preset file directory based on the original bill path; and scan the preset file directory to obtain the original bill file.
[0113] Optionally, the determining module 602 is further configured to: obtain regularization expression information based on the original bill format; perform verification processing on the original bill file using the regularization expression information and service bill type to obtain a file verification result; respond by determining that the original bill file passes verification based on the file verification result, determining the target user identifier based on the file identifier of the original bill file, and determining the absolute path of the file based on the original bill path, the file identifier of the original bill file, and the file format; and determine metadata information based on the target user identifier and the absolute path of the file.
[0114] Optionally, the generation module 603 is further configured to: obtain user file information from the configuration center, wherein the user file information includes a processing date field; determine that the original bill file is in an unprocessed state based on the processing date field, construct a file matching relationship using metadata information, wherein the file matching relationship is used to represent the association between the original bill file and the target bill file; encrypt the original bill file based on the file matching relationship to obtain an encryption result; and perform format processing on the encryption result to generate the target bill file.
[0115] Optionally, the generation module 603 is further configured to: obtain user key information in response to the verification of the file matching relationship; and encrypt the original billing file using a symmetric encryption algorithm and the user key information to obtain the encryption result.
[0116] Optionally, the generation module 603 is also used to: obtain user key information from the configuration center, or generate user key information using random characters.
[0117] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0118] According to another aspect of the present disclosure, an electronic device is also provided, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the billing data processing method of the present disclosure.
[0119] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0120] S1, Obtain the original billing file, wherein the original billing file includes the original service billing data corresponding to the target user;
[0121] S2, determine metadata information based on the original billing file, wherein the metadata information is used to represent the mapping relationship between the target user identifier and the absolute path of the file;
[0122] S3, Generate a target billing file based on metadata information, wherein the target billing file contains encrypted service billing data corresponding to the target user;
[0123] S4, send the target billing file to the target user using the target transmission method, wherein the target transmission method is determined from multiple candidate transmission methods.
[0124] According to another aspect of the present disclosure, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the storage medium is located to perform the billing data processing method of the present disclosure.
[0125] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0126] S1, Obtain the original billing file, wherein the original billing file includes the original service billing data corresponding to the target user;
[0127] S2, determine metadata information based on the original billing file, wherein the metadata information is used to represent the mapping relationship between the target user identifier and the absolute path of the file;
[0128] S3, Generate a target billing file based on metadata information, wherein the target billing file contains encrypted service billing data corresponding to the target user;
[0129] S4, send the target billing file to the target user using the target transmission method, wherein the target transmission method is determined from multiple candidate transmission methods.
[0130] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0131] According to another aspect of the embodiments of this disclosure, a computer program product is also provided, the computer program product including computer instructions that, when executed by a processor, implement the billing data processing method of the embodiments of this disclosure.
[0132] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0133] S1, Obtain the original billing file, wherein the original billing file includes the original service billing data corresponding to the target user;
[0134] S2, determine metadata information based on the original billing file, wherein the metadata information is used to represent the mapping relationship between the target user identifier and the absolute path of the file;
[0135] S3, Generate a target billing file based on metadata information, wherein the target billing file contains encrypted service billing data corresponding to the target user;
[0136] S4, send the target billing file to the target user using the target transmission method, wherein the target transmission method is determined from multiple candidate transmission methods.
[0137] The sequence numbers of the embodiments disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0138] In the above embodiments of this disclosure, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0139] In the several embodiments provided in this disclosure, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0140] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0141] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0142] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0143] The above description is only a preferred embodiment of this disclosure. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles of this disclosure, and these improvements and modifications should also be considered within the scope of protection of this disclosure.
Claims
1. A method for processing billing data, characterized in that, include: The system retrieves original file information and user file information from the configuration center. The original file information includes: service bill type, original bill path, and original bill format. The user file information includes at least: processing date field, transmission method, official file format, service bill type, and transmission destination. The user file information refers to the file processing configuration data related to each user stored in the system, covering the user's personalized needs and preference settings. Determine the preset file directory based on the original billing path; The preset file directory is scanned to obtain the original billing file, wherein the original billing file includes the original service billing data corresponding to the target user; Obtain regular expression information based on the original bill format; The original billing file is validated using the regular expression information and the service billing type to obtain the file validation result; The response determines that the original bill file passes verification based on the file verification result, determines the target user identifier based on the file identifier of the original bill file, and determines the absolute file path based on the original bill path, the file identifier of the original bill file, and the file format; Metadata information is determined based on the target user identifier and the absolute file path, wherein the metadata information is used to represent the mapping relationship between the target user identifier and the absolute file path; The response determines that the original bill file is in an unprocessed state based on the processing date field, and constructs a file matching relationship using the metadata information. The file matching relationship is used to represent the association between the original bill file and the target bill file, and the target bill file contains the encrypted service bill data corresponding to the target user. The original billing file is encrypted based on the file matching relationship to obtain the encryption result. Based on the formal file format requirements in the user file information, the encryption result is format-processed to generate the target bill file. The format processing includes at least file compression, adjusting the arrangement of file content, converting file encoding, or adding additional metadata. The target billing file is sent to the target user using a target transmission method, wherein the target transmission method is determined from a plurality of candidate transmission methods; The original billing file is encrypted based on the file matching relationship, and the encryption result includes: In response to the successful verification of the file matching relationship, the user key information is obtained; The original billing file is encrypted using a symmetric encryption algorithm and the user key information to obtain the encryption result; Obtaining the user key information includes: The user key information can be obtained from the configuration center, or the user key information can be generated using random characters.
2. The billing data processing method according to claim 1, characterized in that, The method further includes: In response to the successful transmission of the target billing file to the target user using the target transmission method, the processing date field is updated.
3. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the billing data processing method according to any one of claims 1 to 2.
4. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the billing data processing method according to any one of claims 1 to 2.
5. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the billing data processing method as described in any one of claims 1 to 2.
Citation Information
Patent Citations
File data processing method and device
CN113382029A
Bill processing method and device, storage medium and electronic equipment
CN115099818A